Get API token
Returns a single API token by id.
get
Authorizations
Api-TokenstringRequired
Pass the API token in the Api-Token
Path parameters
idinteger · int64RequiredExample:
API token ID
12345Responses
200
API token
application/json
idinteger · int64Optional
API token ID
namestringOptional
Token display name
last_4_digitsstringOptional
Last 4 characters of the token (full token is only shown on create or reset)
created_bystringOptional
Name of the user or token that created this token
expires_atstring · date-time · nullableOptional
When the token expires (ISO 8601); null if the token does not expire
401
Returns unauthorized error message. Check your credentials.
application/json
404
Returns not found error message
application/json
get/api/api_tokens/{id}
curl -X GET https://mailtrap.io/api/api_tokens/{id} \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"id": 12345,
"name": "My API Token",
"last_4_digits": "x7k9",
"created_by": "user@example.com",
"expires_at": null,
"resources": [
{
"resource_type": "account",
"resource_id": 3229,
"access_level": 100
}
]
}Last updated
Was this helpful?

