A service token lets an automation or your own application reach the Autodigy API with limited permissions. Through the API you can create content drafts, but the API never publishes content; every item still goes through editorial approval.

Before you start

  • You must be the Account owner or an Administrator to create, list and revoke tokens. The Enterprise item is visible only to these roles.
  • A token is tied to one workspace and to the user who created it. If that user leaves the workspace, the token stops working.
  • A token with write permission (content:write) can create content only while its owner is an Account owner, Administrator, Team manager or Editor.
  • Never put a token in a code repository or any public place. The examples below use the placeholder xxxx.

Steps

Sample screen · Service tokens · Token name · Permissions
  1. In the left menu, open Enterprise from the Trust and support group. The page is titled "Enterprise control center".

  2. In Service tokens, enter a name that describes the purpose in Token name, for example "Reporting service".

  3. Under Permissions, tick only what you need: account:read (lists sites), content:read (reads content), content:write (creates drafts), seo:read (reads SEO data) and seo:export (requests SEO exports). account:read and content:read are ticked at first.

  4. In Validity period, enter a number of days from 1 to 365; the default is 90.

  5. Select Create token and confirm your password if asked.

  6. The Copy the new token now box opens. Select Copy token and store the value somewhere safe. For security it is never shown again; if you lose it, create a new token.

  7. When you call the API, send the token in the Authorization header. This example lists your sites from the /api/v1/sites endpoint:

    curl -H "Authorization: Bearer xxxx" https://<your-app-address>/api/v1/sites
    
  8. To create a draft, call POST /api/v1/contents with a content:write token. The body needs site_id and title; body and status are optional. status can only be draft or pending. The content is created as Draft (or Awaiting approval) on an active site of your workspace and enters the Editorial approval queue flow. The read endpoints are GET /api/v1/contents and GET /api/v1/contents/{id} (content:read), and GET /api/v1/sites (account:read).

  9. Optionally lock the API to specific addresses: in Brand and access policy on the same page, enter one IP address per line in Allowed IP addresses and select Save policy. When the list is not empty, API requests are accepted only from those addresses.

  10. To keep track of tokens, use the Search tokens, Scope, Status (Active, Expired) and Sort filters. Each token shows its last use and expiry date.

  11. When a token is no longer needed, or you suspect it leaked, close it with Revoke token and confirm. It becomes invalid immediately and services using it lose access.

Common problems

  • Enterprise is missing from the menu. Your role is not Account owner or Administrator.
  • A 401 response. The token is missing, wrong or expired. Create a new one.
  • 403 "Token scope is insufficient." The token lacks the permission the endpoint needs. Permissions cannot be added later; create a new token with the right ones.
  • 403 "IP address is not allowed." The sender's address is not in Allowed IP addresses.
  • 403 with content:write. The token owner's role does not allow creating content.
  • I cannot publish through the API. This is by design: the API only creates draft or awaiting-approval content. Approval and publishing run in the portal.
  • Many requests fail. The API has a request rate limit; space your requests out.

Related articles