Create API key
POST
Generate a new API key. The full key is returned only once — store it securely.
apiKeyHeaderheader
x-api-key<token>API key for authentication. Generate from the dashboard or via POST /v1/api-keys.
x-api-key*stringAPI key for authentication
Length
1 <= length- body
name*stringHuman-readable label for this API key
Length
1 <= lengthexpires_in?numberKey expiry duration in seconds from now. Minimum 3600 (1 hour). Omit for no expiry.
Range
3600 <= valuepreset?stringA named bundle of permissions, such as read_only or developer. Provide this or permissions.
permissions?array<string>Permissions granted to this key: resource:action, or wildcards (, payments:, *:read) that never match sensitive permissions. Provide this or preset. The new key can't hold permissions the calling key doesn't.
Response for status 200
application/json- response
id*stringkey*stringname*stringstatus*stringpermissions*array<string>preset*string|nullexpires_at*string|nullcreated_at*stringcurl -X POST 'https://api.tryaccess.xyz/api/v1/api-keys/' \ -H 'x-api-key: string' \ -H 'Content-Type: application/json' \ -d '{ "name": "Production Key"}'{ "id": "string", "key": "string", "name": "string", "status": "string", "permissions": [ "string" ], "preset": "string", "expires_at": "string", "created_at": "string"}How is this guide?