Common Features
Authentication Basics
Authorization: Bearer YOUR_ACCESS_TOKEN
Custom Claims
accountId
, workspaceId
, principalId
, userId
, and othersaccountId
, workspaceId
, principalId
, userId
, and othersprincipalId
and othersMachine-to-Machine (M2M) Flows
x-user-id
header to impersonate a userAPI Versioning
GraphQL
REST
API Features
Caching
Idempotency
x-idempotency-key
header in the response.Response Compression
Accept-Encoding: gzip
Schema Introspection
Note: The AWorld API is in pre-alpha stage and undergoes frequent updates. Schema introspection is a great way to discover the latest available operations.
Pagination
nextToken
for requesting the next page.
{
"input": {
"limit": 10,
"nextToken": "eyJsYXN0SXRlbUlkIjoiMTIzNDUiLCJsYXN0SXRlbVZhbHVlIjoidGVzdCJ9"
}
}
Pagination Guidelines
limit
to control the number of items returned per pagenextToken
from the previous responsenextToken
is only valid when used with the same limit
that was used in the original request. You should not mix tokens returned from calls with different limit valuesRate Limiting
Data Validation
Common Types and Validation Rules
Identifiers
String Data
Timestamps
Language Codes
Timezones
Validation Behavior
Language Selection
1.
lang
custom claim in the access token2.
3.
4.
Important: If a user changes their language preference in their profile, the access token needs to be refreshed to retrieve content in the newly selected language. Simply changing the profile setting without getting a new token will not affect API responses.
Best Practices
1.
2.
3.
4.
5.
6.
Modified at 2025-06-26 10:29:57