v1
latestOpenAPI 3.0.02026-07-141,4077,1665.2 MBKey Management
Create an API key
Create an API key.
post/api/v2/api_keys
Request body
Example request
{
"data": {
"attributes": {
"name": "API Key for submitting metrics"
},
"type": "api_keys"
}
}Response
Created
Example response
{
"data": {
"attributes": {
"created_at": "2020-11-23T10:00:00.000Z",
"date_last_used": "2020-11-27T10:00:00.000Z",
"last4": "abcd",
"modified_at": "2020-11-23T10:00:00.000Z",
"name": "API Key for submitting metrics"
},
"relationships": {
"created_by": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
},
"modified_by": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "users"
}
}
},
"type": "api_keys"
},
"included": [
{
"relationships": {
"org": {
"data": {
"id": "00000000-0000-beef-0000-000000000000",
"type": "orgs"
}
},
"other_orgs": {
"data": []
},
"other_users": {
"data": []
},
"roles": {
"data": [
{
"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
"type": "roles"
}
]
}
},
"type": "users"
}
]
}