Перейти до вмісту

Create API Key

POST
/api/v1/keys

Create a new API key. Requires an internal or enterprise API key. Returns the generated key string — save it, it cannot be retrieved later.

object
Example
{
"name": "My App",
"plan": "free"
}

Successful calculation

object
ok
boolean
Example
true
data
object
Example
{
"ok": true,
"data": {
"apiKey": "aw_free_a1b2c3d4e5f6a1b2c3d4e5f6",
"name": "My App",
"plan": "free",
"rateLimit": 10
}
}

Validation error

Example
{
"ok": false,
"error": {
"code": "INVALID_INPUT",
"message": "Validation failed: date: Date must be YYYY-MM-DD",
"details": [
{
"path": "date",
"message": "Date must be YYYY-MM-DD"
}
]
}
}

Missing or invalid API key

Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}