API документація
Create Personal Access Token
post
/api/v1/personal-access-tokensCreates a personal API token and returns its complete value once. Requires Developers to be enabled and the caller's required identity checks to be complete.
PersonalAccessTokens
Параметри
version
path · string
Обов'язковий
Текст запиту
{
"name": "Alex Morgan",
"expiresInDays": 1
}Відповіді
- 201The token metadata and the complete token value. Store it securely because it cannot be retrieved again.application/json
{ "id": "89520924-c854-4b51-8fab-37765ca8cb26", "name": "Reporting integration", "tokenPrefix": "om_pat_Q2hhbmd", "createdAtUtc": "2026-07-20T08:30:00Z", "expiresAtUtc": "2026-10-18T08:30:00Z", "lastUsedAtUtc": "2026-07-20T09:12:43Z", "revokedAtUtc": null, "token": "om_pat_exampleTokenValueReturnedOnce" } - 400The request is invalid or the active-token limit has been reached.application/json
{ "error": "Token expiry must be between 1 and 3650 days." } - 401The caller is not authenticated with an application session or session token.application/json
{ "type": "Deposit", "title": "Example", "status": 1, "detail": "The request could not be completed. Check the values and try again.", "instance": "Example" } - 403Developers is disabled, the account cannot create tokens, or required account verification is incomplete.application/json
{ "error": "Complete account verification before creating an API token." }