Skip to main content
GET
/
api-keys
/
{id}
Get API key
curl --request GET \
  --url https://api.sevalla.com/v3/api-keys/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
  "company_id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
  "name": "My API Key",
  "is_enabled": true,
  "source": "DASHBOARD",
  "masked_token": "svl_ab...wxyz",
  "roles": [
    {
      "id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
      "name": "COMPANY_ADMIN",
      "description": "<string>"
    }
  ],
  "capabilities": [
    {
      "id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
      "permission": "APP:READ",
      "id_resource": "fb5e5168-4281-4bec-94c5-0d1584e9e657"
    }
  ],
  "last_used_at": "2024-01-01T00:00:00.000Z",
  "expired_at": "2025-01-01T00:00:00.000Z",
  "old_token_expired_at": "2024-01-02T00:00:00.000Z",
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z"
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

API key identifier

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

Response

Default Response

id
string<uuid>
required

Unique identifier for the API key

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

company_id
string<uuid>
required

Identifier of the company that owns this API key

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

name
string
required

Human-readable name for the API key

Required string length: 1 - 255
Example:

"My API Key"

is_enabled
boolean
required

Whether the API key is currently active and can be used for authentication

source
enum<string>
required

How the API key was created - DASHBOARD created via the web dashboard, CLI created via CLI, EXTERNAL created via the API

Available options:
DASHBOARD,
CLI,
EXTERNAL
masked_token
string
required

Masked version of the token showing only the first 6 and last 4 characters

Example:

"svl_ab...wxyz"

roles
object[]
required

Pre-defined roles assigned to this API key

capabilities
object[]
required

Granular capabilities assigned to this API key

last_used_at
string<date-time> | null
required

Timestamp when the API key was last used for authentication, in ISO 8601 format

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2024-01-01T00:00:00.000Z"

expired_at
string<date-time> | null
required

Timestamp when the API key expires, in ISO 8601 format. Null means no expiration

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2025-01-01T00:00:00.000Z"

old_token_expired_at
string<date-time> | null
required

Timestamp when the previous token expires during rotation, in ISO 8601 format. Null if no rotation is in progress

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2024-01-02T00:00:00.000Z"

created_at
string<date-time>
required

Timestamp when the API key was created, in ISO 8601 format

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2024-01-01T00:00:00.000Z"

updated_at
string<date-time>
required

Timestamp when the API key was last updated, in ISO 8601 format

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2024-01-01T00:00:00.000Z"