メインコンテンツまでスキップ

Authentication

All API requests require a Bearer token in the Authorization header.

Authorization: Bearer eyJhbGciOiJFZERTQS...

Creating an API key

  1. Log in to Docwize and navigate to Settings > API Keys
  2. Click Create API Key
  3. Enter a name and select the required scopes
  4. Copy the token immediately — it is shown only once and cannot be retrieved later

Token payload

The JWT contains these claims:

ClaimTypeDescription
company_loginstringThe organisation code this token authenticates against. All API requests are scoped to this organisation's data.
scopestringComma-separated list of granted scopes (e.g. "documents_read,documents_write,search"). Determines which endpoints the token can access.
token_typestringEither "user" or "full_control". A user token inherits the document permissions of the associated user. A full_control token has unrestricted access to all documents.
user_emailstring or nullFor user tokens, the email of the user whose permissions the token inherits. null for full_control tokens.
namestringThe human-readable name given to the API key at creation time.
expintegerToken expiry as a Unix epoch timestamp. Requests made after this time are rejected with 401.

Scopes

Each endpoint requires a specific scope. A token with full_control in its scope list bypasses all scope checks.


Token revocation

Tokens can be revoked at any time from Settings > API Keys in the Docwize portal. Revoked tokens are rejected immediately on the next API call — there is no grace period.