Create API Key

POST
/api/v1/api-keys

Create a new API key for the authenticated tenant

Authorization

headerX-Api-Key<token>

API key in format: sti_env_prefix_secret

Header Parameters

idempotency-key*string

Required for mutating calls. Use a V4 UUID. The server stores the first result for 24h and returns it on subsequent retries with the same key.

Match^([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)$
Formatuuid

Request Body

application/json
  1. body
name*string

Name/label for the API key

Length1 <= length <= 255
metadata?

Response Body

Default Response

application/json
  1. response
apiKey*
plaintextKey*string

The complete API key. Store this securely - it will only be shown once!

Example Request
curl -X POST 'https://api.sandbox.stables.money/api/v1/api-keys' \  -H 'idempotency-key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response200
{  "apiKey": {    "apiKeyId": "37ba0474-c0bb-4910-bfb5-d6cebb614366",    "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",    "name": "string",    "prefix": "string",    "active": true,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "lastUsedAt": "2019-08-24T14:15:22Z",    "metadata": {      "property1": "string",      "property2": "string"    }  },  "plaintextKey": "string"}