curl --location --request POST 'https://useraccounts.srblabs.io/api/v1/apps//apikeys' \
--header 'Content-Type: application/json' \
--data-raw '{
"description": "Analytics Service Key",
"expires_in_days": 90,
"permissions": [
"event:record",
"inventory:write"
]
}'
{
"api_key_details": {
"application_id": "c3d4e5f6-a7b8-9012-3456-7890abcdef01",
"created_at": "2023-10-26T11:00:00Z",
"description": "CI/CD Deployment Key",
"expires_at": "2024-10-25T11:00:00Z",
"id": "d4e5f6a7-b8c9-0123-4567-890abcdef012",
"key_prefix": "ask_abcd",
"last_used": "2023-10-26T11:00:00Z",
"permissions": [
"event:record",
"inventory:read"
],
"revoked_at": "2023-11-01T09:00:00Z"
},
"raw_key": "ask_abcd1234xyz..............................."
}