Start a Device Authorization (RFC 8628) consent flow.
The agent calls this with the merchant identified by X-Site-ID
and the requested capability shape. Stella mints a fresh
consent-code row and returns:
device_code long opaque secret the agent uses on /poll
user_code short 8-char code the customer types
verification_uri where the customer goes to type it
verification_uri_complete same URL with ?user_code= baked in
expires_in seconds until both codes die
interval minimum seconds between polls
The decode-resistant user_code alphabet (no 0/O/1/I/L) is
chosen to minimise customer typing errors. Plaintexts are
returned exactly once and never leave this response.
Documentation Index
Fetch the complete documentation index at: https://docs.stella-commerce.com/llms.txt
Use this file to discover all available pages before exploring further.
Agent → Stella: start a consent flow.
The merchant is identified by the X-Site-ID header, NOT by a
body field — same convention as /api/storefront/*. Multi-merchant
agent tokens are out of scope for v1 (see PLAN §A2).
Free-form agent identity displayed on the consent screen. The customer's approval is what makes the string trustworthy; Stella does not register or authenticate agent identities in v1.
1 - 120Hard spending cap in merchant-currency minor units. Decremented at order creation. Refunds do NOT restore.
0 <= x <= 10000000Coarse capability vocabulary the agent is requesting. Phase 6 v1: catalog:read, cart:write, checkout:create, customer:read. Unknown scopes are rejected at validation time (422) so a customer is never asked to approve a permission Stella doesn't honor.
16Optional category allowlist. Empty = any category. Match is against Product.product_type / Product.tags case-insensitively.
32Requested lifetime for the minted agt_ token, in seconds. Min 1 minute, max 90 days. Default 30 days.
60 <= x <= 7776000Successful Response
Stella → agent: device-flow handshake response per RFC 8628 §3.2.
verification_uri_complete includes the user_code so the agent
can render a single-tap link / QR code; verification_uri is the
bare endpoint for clients that prefer to display the user_code
separately.
Seconds until the codes expire.
Minimum seconds between poll calls per RFC 8628 §3.2. Reserved for future slow_down cadence enforcement; Phase 6-B currently uses a per-IP token bucket instead.