GET /api/v2/user/api_keys
Get API keys of the current user

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Examples

// Successful request
GET /api/v2/user/api_keys
200
{
  "api_keys": [
    {
      "id": 29,
      "key_prefix": "QozuF",
      "name": "test key",
      "last_access": "2023-11-27T09:42:41.182Z"
    }
  ]
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/user/api_keys
Create new API key

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

Name

Validations:

  • Must be a String

Examples

// Successful request
POST /api/v2/user/api_keys
{
  "name": "test api key"
}
200
{
  "api_key": "j4f1J.afsJaN502wm8YMBo6JOcst-aUlfG5QxAvq5NqeqOQgDNKU_75CJ_3HXVow"
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/user/api_keys/:api_key_id
Delete API key

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
api_key_id
required

API key ID

Validations:

  • Must be a String

Examples

// Successful request
DELETE /api/v2/user/api_keys/32
200
{
  "ok": "ok"
}
// API key not found
DELETE /api/v2/user/api_keys/not-found-id
404
{
  "error": "Couldn't find ApiKey with 'id'=not-found-id [WHERE \"api_keys\".\"user_id\" = $1]"
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters