API Keys
Create an API key
Changed onCreate a new API key. API keys may be scoped by project and may include a policy.
post/org/api_keys
Request
- Base URLhttps://api.onkernel.com
- URLhttps://api.onkernel.com/org/api_keys
- AuthHTTP bearer
Request body
Example request
{
"days_to_expire": 30,
"expires_at": "2025-01-15T09:00:00Z",
"name": "staging",
"policy": {
"statements": [
{
"action": "browsers:use",
"resource": "projects/proj_abc123/browsers/br_abc123"
}
]
},
"project_id": "proj_abc123"
}Response
API key created successfully
Example response
{
"created_by": {
"email": "user@example.com",
"id": "user-abc123",
"name": "Jane Doe"
},
"id": "ckv9w8q2f000001l5r3j7k9m4",
"masked_key": "sk_1234...abcd",
"name": "production",
"policy": {
"statements": [
{
"action": "browsers:use",
"resource": "projects/proj_abc123/browsers/br_abc123"
}
]
},
"project_id": "proj_abc123",
"project_name": "Production",
"key": "sk_1234abcd"
}Changes
- info
added the required property
////to the response with the status
- info
- info
added the new optional request property
- info
added the new optional request property
- info
added the non-success response with the status
- info
added the optional property
////to the response with the status
- info