Skip to Content
API ReferenceCLI authorization

CLI authorization

Protocol reference for the official SellApp CLI and your personal CLI connection.

These endpoints support the official SellApp CLI. Use sellapp login to connect and authorize current and future stores under your current membership and role permissions. You can connect before you have a store. These endpoints do not register general-purpose REST OAuth applications. Use API keys for your own REST integrations, or hosted MCP for an MCP-specific browser connection.

Follow CLI authorization for login, consent, store selection, and personal disconnect. The CLI handles authorization, token refresh, and revocation for you. This low-level reference describes its protocol and connection endpoints; it is not an onboarding flow for custom applications. OAuth protocol errors use an error field rather than the business API error envelope.

GET
/.well-known/oauth-authorization-server

Response Body

Successful response.

application/json
  1. response
issuer*string
Formaturi
authorization_endpoint*string
Formaturi
token_endpoint*string
Formaturi
revocation_endpoint*string
Formaturi
response_types_supported*array<string>
grant_types_supported*array<string>
code_challenge_methods_supported*array<string>
token_endpoint_auth_methods_supported*array<string>
revocation_endpoint_auth_methods_supported*array<string>
scopes_supported*array<string>
Example Request
curl -X GET 'https://sell.app/.well-known/oauth-authorization-server'
{  "issuer": "https://sell.app",  "authorization_endpoint": "https://sell.app/oauth/authorize",  "token_endpoint": "https://sell.app/oauth/token",  "revocation_endpoint": "https://sell.app/oauth/revoke",  "response_types_supported": [    "code"  ],  "grant_types_supported": [    "authorization_code",    "refresh_token"  ],  "code_challenge_methods_supported": [    "S256"  ],  "token_endpoint_auth_methods_supported": [    "none"  ],  "revocation_endpoint_auth_methods_supported": [    "none"  ],  "scopes_supported": [    "admin"  ]}
GET
/oauth/authorize

Query Parameters

response_type*string
client_id*string
Formatuuid
redirect_uri*string
Formaturi
scope?string
state*string
Length1 <= length
code_challenge*string
Length43 <= length <= 43
code_challenge_method*string

Response Body

Browser consent page.

response?stringtext/html
Example Request
curl -X GET 'https://sell.app/oauth/authorize?response_type=code&client_id=01992a65-e064-71ba-b38f-902b7966a6be&redirect_uri=http%3A%2F%2F127.0.0.1%3A49152%2Fcallback&scope=admin&state=RANDOM_STATE&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code_challenge_method=S256'
"<html><body>Review CLI access</body></html>"
POST
/oauth/authorize

Authorization

oauthBrowserSession
cookiesell_session<token>

SellApp browser login session (the default cookie name is sell_session and deployment configuration may change it). Submit the consent form with its CSRF token and authorization-session token.

Request Body

application/x-www-form-urlencoded
  1. body
auth_token*string
client_id*string
Formatuuid
state*string
Length1 <= length
_token*string

Response Body

Redirect to the registered callback, preserving state. Approval includes code; denial includes error=access_denied.

Example Request
curl -X POST 'https://sell.app/oauth/authorize' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'auth_token=CONSENT_AUTH_TOKEN&client_id=01992a65-e064-71ba-b38f-902b7966a6be&state=RANDOM_STATE&_token=CSRF_TOKEN'

No response body.

DELETE
/oauth/authorize

Authorization

oauthBrowserSession
cookiesell_session<token>

SellApp browser login session (the default cookie name is sell_session and deployment configuration may change it). Submit the consent form with its CSRF token and authorization-session token.

Request Body

application/x-www-form-urlencoded
  1. body
auth_token*string
_token*string

Response Body

Redirect to the registered callback with access_denied and the original state.

Example Request
curl -X DELETE 'https://sell.app/oauth/authorize' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'auth_token=CONSENT_AUTH_TOKEN&_token=CSRF_TOKEN'

No response body.

POST
/oauth/token

Authorization

oauthClientBasic
headerAuthorizationBasic <token>

Legacy SDK authentication interface retained for compatibility. The official CLI uses a public client ID without a secret.

Request Body

application/x-www-form-urlencoded
  1. body
client_id?string

The configured official CLI public client ID. It identifies the registration, not the executable.

Formatuuid
client_secret?string

Legacy SDK field retained for compatibility. Omit for the official CLI; it has no client secret.

grant_type*string
code*string
redirect_uri*string
Formaturi
code_verifier*string
Match^[A-Za-z0-9._~-]+$
Length43 <= length <= 128

Response Body

Successful response.

application/json
  1. response
token_type*string
expires_in*integer
access_token*string
refresh_token*string
curl -X POST 'https://sell.app/oauth/token' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'client_id=01992a65-e064-71ba-b38f-902b7966a6be&grant_type=authorization_code&code=AUTHORIZATION_CODE&redirect_uri=http%3A%2F%2F127.0.0.1%3A49152%2Fcallback&code_verifier=dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk'
{  "token_type": "Bearer",  "expires_in": 3600,  "access_token": "ACCESS_TOKEN",  "refresh_token": "REFRESH_TOKEN"}
POST
/oauth/revoke

Authorization

oauthClientBasic
headerAuthorizationBasic <token>

Legacy SDK authentication interface retained for compatibility. The official CLI uses a public client ID without a secret.

Request Body

application/x-www-form-urlencoded
  1. body
client_id?string

The configured official CLI public client ID. It identifies the registration, not the executable.

Formatuuid
client_secret?string

Legacy SDK field retained for compatibility. Omit for the official CLI; it has no client secret.

token*string
token_type_hint?string
Value in"access_token""refresh_token"

Response Body

Revocation completed, including unknown tokens.

application/json
  1. response
Itemsitems <= 0
[index: integer]?unknown
Example Request
curl -X POST 'https://sell.app/oauth/revoke' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'client_id=01992a65-e064-71ba-b38f-902b7966a6be&token=REFRESH_TOKEN&token_type_hint=refresh_token'
[]
GET
/v2/me

Authorization

headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X GET 'https://sell.app/api/v2/me'
{  "data": {    "id": "42",    "username": "alex",    "email": "alex@example.com",    "credential_type": "oauth"  }}
GET
/v2/stores

Authorization

headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

Response Body

Successful response.

application/json
  1. response
data*array<>
Example Request
curl -X GET 'https://sell.app/api/v2/stores'
{  "data": [    {      "id": "12",      "slug": "launch-lab",      "name": "Launch Lab"    }  ]}
POST
/v2/stores

Authorization

headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

Header Parameters

Idempotency-Key*string

Identifies one intended store creation for this user for 24 hours. Reuse only with an identical request.

Length1 <= length <= 255

Request Body

application/json
  1. body
name*string
Match^[\p{L}\p{N}\s]+$
Length3 <= length <= 48
slug*string

Lowercased before validation. Reserved infrastructure names such as api, www and cdn are unavailable.

Match^[A-Za-z0-9]+$
Length3 <= length <= 63
visibility?StoreVisibility
Default"PUBLIC"
Value in"PUBLIC""HIDDEN""PRIVATE"

Response Body

Store created. Identical retries return the same response with Idempotent-Replayed: true.

application/json
  1. response
data*
Example Request
curl -X POST 'https://sell.app/api/v2/stores' \  -H 'Idempotency-Key: create-launch-lab-01' \  -H 'Content-Type: application/json' \  -d '{  "name": "Launch Lab",  "slug": "launchlab"}'
{  "data": {    "id": "12",    "slug": "launchlab",    "name": "Launch Lab",    "visibility": "PUBLIC",    "storefront_url": "https://launchlab.sell.app",    "dashboard_url": "https://sell.app/dashboard"  }}
GET
/v2/stores/{store}

Authorization

headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

Path Parameters

store*integer

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X GET 'https://sell.app/api/v2/stores/12'
{  "data": {    "id": "12",    "slug": "launch-lab",    "name": "Launch Lab"  }}
GET
/v2/permissions

Authorization

headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Header Parameters

X-STORE*string

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Response Body

Successful response.

application/json
  1. response
data*|
Example Request
curl -X GET 'https://sell.app/api/v2/permissions' \  -H 'X-STORE: launch-lab'
{  "data": {    "credential_type": "sanctum",    "key_abilities": [      "account:read",      "invoice"    ],    "store_access": "all",    "store_permissions": [      "invoice"    ],    "effective_abilities": [      "invoice"    ]  }}
GET
/v2/oauth/installation

Authorization

oauthAccessToken admin
headerAuthorizationBearer <token>

OAuth access tokens are supported only for the official SellApp CLI. The CLI handles authorization with PKCE S256 and rotating refresh tokens. The admin grant covers current and future accessible stores. Store operations require X-STORE and current store permissions. Account operations omit X-STORE. Use API keys for custom integrations.

Scope: admin

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X GET 'https://sell.app/api/v2/oauth/installation'
{  "data": {    "id": "01992a65-e064-71ba-b38f-902b7966a6bf",    "client_id": "01992a65-e064-71ba-b38f-902b7966a6be",    "grant_model": "account",    "scopes": [      "admin"    ],    "created_at": "2026-09-04T09:12:00Z"  }}
DELETE
/v2/oauth/installation

Authorization

oauthAccessToken admin
headerAuthorizationBearer <token>

OAuth access tokens are supported only for the official SellApp CLI. The CLI handles authorization with PKCE S256 and rotating refresh tokens. The admin grant covers current and future accessible stores. Store operations require X-STORE and current store permissions. Account operations omit X-STORE. Use API keys for custom integrations.

Scope: admin

Response Body

Installation revoked; no response body.

Example Request
curl -X DELETE 'https://sell.app/api/v2/oauth/installation'

No response body.