Skip to main content
POST
/
developers
/
keys
Create API key
curl --request POST \
  --url https://api.txcloud.io/v1/developers/keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "environment": "live",
  "permissions": [
    "<string>"
  ],
  "allowed_ips": [
    "<string>"
  ],
  "rate_limit": 123,
  "expires_at": "2023-11-07T05:31:56Z"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "prefix": "<string>",
  "environment": "live",
  "permissions": [
    "<string>"
  ],
  "last_used": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "key": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
environment
enum<string>
required
Available options:
live,
test
permissions
string[]
allowed_ips
string[]
rate_limit
integer
expires_at
string<date-time>

Response

201 - application/json

Key created

id
string
name
string
prefix
string
environment
enum<string>
Available options:
live,
test
permissions
string[]
last_used
string<date-time>
created_at
string<date-time>
key
string

Full key (only shown once)