Access tokens
/api/v1/access-tokens/{id}/useslast_used_at on the token answers "recently?"; this answers "by what?", which is the question you ask when a token might have leaked.
Rows are appended when the client looks new — a different IP or user-agent, or the same one after ten minutes — so a token driving a cron writes one row, not one per request. The newest 50 per token are kept. Scoped to the calling user: another user's token id returns an empty list, not an error.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/access-tokens/string/uses"[ { "used_at": "2019-08-24T14:15:22Z", "ip": "string", "user_agent": "string" }]/api/v1/access-tokensAuthorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/access-tokens"[ { "id": "string", "name": "string", "token_prefix": "string", "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z" }]/api/v1/access-tokensReturns the full token secret once. Store it securely; it cannot be retrieved again.
Omit expires_in_days for a never-expiring token, or pass 30, 90, or 365.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/access-tokens" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "id": "string", "name": "string", "token_prefix": "string", "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "token": "string"}/api/v1/access-tokens/{id}Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/api/v1/access-tokens/string"