API reference
Create an API key
Source: OpenAPI (openapi/openapi.yaml).
curl -X POST "https://api.sendtier.example/api-keys" \ -H "Authorization: Bearer st_live_REPLACE_ME" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "mode": "live", "scope": "full" }'{ "id": "string", "name": "string", "mode": "live", "scope": "full", "prefix": "string", "created_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "key": "string"}POST
Requires a full-scope key. A test key may create only test keys. The full secret is returned only by this operation and is never stored. Idempotency-Key is not supported. Retrying creates a second key; the first can be revoked.
header
AuthorizationBearer <token>API key: st_live_... or st_test_...
application/json- body
name*stringNames with control characters are rejected. Surrounding whitespace is trimmed; the trimmed name must be nonblank.
Length
1 <= length <= 64mode*stringValue in
"live""test"scope*stringValue in
"full""sending""read_only"API key created. Save the secret now.
application/json- response
id*stringname*stringmode*stringValue in
"live""test"scope*stringValue in
"full""sending""domain""read_only"prefix*stringStored lookup prefix, not the full secret.
created_at*stringFormat
date-timelast_used_at?stringFormat
date-timekey*stringFull secret, returned only in the create response and never stored.