Create an API key

​

Mints a long-lived bearer token (default one year) with the same roles as the caller. The token is shown once.

Body

required
application/json
  • Integer numbers.

Responses

  • application/json
  • application/json
  • application/json
Request Example for post/api-keys
curl https://api.weddingoperatingsystems.com/api/v1/api-keys \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "label": "",
  "expiresInDays": 1
}'
{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "label": null,
    "expiresAt": null,
    "lastUsedAt": null,
    "token": "string"
  }
}