ReferenceApi keys

Create API key

Create a new API key for programmatic access

POST
/auth/api-keys
AuthorizationBearer <token>

Bearer token authentication. Use your API key as the bearer token.

In: header

API key creation input

accountIdstring
description?string
expiresIn?integer

Seconds, nil = no expiration

metadata?object

Custom key-value pairs

Empty Object

namestring
scopes?array<string>

For service accounts

Response Body

curl -X POST "https://eu1.api.bivariant.com/v1/auth/api-keys" \  -H "Content-Type: application/json" \  -d '{    "accountId": "string",    "name": "string"  }'
{
  "accountId": "string",
  "accountType": "string",
  "createdAt": "string",
  "expiresAt": 0,
  "id": "string",
  "key": "string",
  "keyPreview": "string",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "name": "string"
}
{
  "code": "string",
  "message": "string"
}
{
  "code": "string",
  "message": "string"
}
{
  "code": "string",
  "message": "string"
}
{
  "code": "string",
  "message": "string"
}