API documentation
View as Markdown

Authentication

The Demarky API uses OAuth 2.0 bearer access tokens. All authenticated resource requests require an installation token in the Authorization header.

Installation tokens

Public applications use the authorization-code flow with PKCE and explicit seller consent. A successful token exchange returns a short-lived installation access token plus a rotating refresh token. Each installation token is bound to exactly one account.

PropertyDescription
Access-token prefixdmk_at_live_
Refresh-token prefixdmk_rt_live_
ScopesResource-granular read, write, and page deployment permissions
Account bindingExactly one account_id per installation
Access-token expiry10 minutes

Making authenticated requests

Include the access token in the Authorization header:

curl -H "Authorization: Bearer dmk_at_live_xxx" https://api.demarky.ai/v1/accounts/acct_0123456789abcdefghjkmnpqrs/pages

Scopes

Each grant is assigned one or more scopes that determine which operations its tokens can perform:

ScopePermissions
products:readList and retrieve products
products:writeCreate, update, and delete products
pages:readList and retrieve pages, jobs, and deployments
pages:writeCreate, update, and delete pages
pages:deployDeploy landing pages
leads:readList and retrieve leads
leads:writeCreate and update leads

Attempting an operation without the required scope returns a 403 Forbidden response with code insufficient_scope.