List API Keys for your User
Copy curl --request GET 'https://${BASE_URL}/api/api-keys' \
--header 'Authorization: Bearer ${API_KEY}'
200: OK 401: Unauthorized Your API key is unrecognized or inactive 500: Server error An unexpected error has occurred on the server.
Example Schema
Copy {
"api_keys" : [
{
"id" : "00n06yx75dzuxz2lgi" ,
"name" : "default api key" ,
"created_at" : "2023-06-09T06:34:37.685Z" ,
"is_active" : true
}
]
}
Copy {
api_keys : Array <{
id : string
name : string
created_at : string
is_active : boolean
}>
}
Example Schema
Copy {
"statusCode" : 401 ,
"message" : "Unauthorized"
}
Copy {
statusCode : number
message : string
}
Example Schema
Copy {
"statusCode" : 500 ,
"message" : "Internal server error"
}
Copy {
statusCode : number
message : string
}
Copy curl --request POST 'https://${BASE_URL}/api/api-keys' \
--header 'Authorization: Bearer ${API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "new api key",
"deactivate_current": false
}'
Create a new API key and optionally deactivate the API key used to authenticate this request
200: OK 401: Unauthorized Your API key is unrecognized or inactive 403: User does not have `API User` role. 422: Unprocessable Entity There was a problem processing the request 500: Server error An unexpected error has occurred on the server.
Example Schema
Copy {
"api_key" : "18077981128785C05993E9C685FD52410BADCD994B3C1D0365A0C7088BA5BAC1"
}
Example Schema
Copy {
"statusCode" : 401 ,
"message" : "Unauthorized"
}
Copy {
statusCode : number
message : string
}
Example Schema
Copy {
"error" : "Forbidden" ,
"message" : "Permission denied according to assigned roles." ,
"statusCode" : 403
}
Copy {
statusCode : number
message : string
error : string
}
Example Schema
Copy {
"statusCode" : 422 ,
"timestamp" : "2023-06-11T09:23:27.078Z" ,
"url" : "/api/api-keys" ,
"error" : "MAX_KEYS_REACHED" ,
"message" : "You have reached the maximum active API keys for your user. Maximum: 2"
}
Copy {
statusCode : number
timestamp : string
url : string
error : string
message : string | string[]
}
Example Schema
Copy {
"statusCode" : 500 ,
"message" : "Internal server error"
}
Copy {
statusCode : number
message : string
}
422: Unprocessable Entity error
types
Copy curl --request DELETE 'https://${BASE_URL}/api/api-keys/${API_KEY_ID}' \
--header 'Authorization: Bearer ${API_KEY}'
200: OK There is no body returned from this endpoint 401: Unauthorized Your API key is unrecognized or inactive 422: Unprocessable Entity There was a problem processing the request 500: Server error An unexpected error has occurred on the server.
Example Schema
Copy {
"statusCode" : 401 ,
"message" : "Unauthorized"
}
Copy {
statusCode : number
message : string
}
Example Schema
Copy {
"statusCode" : 422 ,
"timestamp" : "2023-06-11T09:23:27.078Z" ,
"url" : "/api/api-keys" ,
"error" : "API_KEY_NOT_EXISTS" ,
"message" : "Api key not found"
}
Copy {
statusCode : number
timestamp : string
url : string
error : string
message : string | string[]
}
Example Schema
Copy {
"statusCode" : 500 ,
"message" : "Internal server error"
}
Copy {
statusCode : number
message : string
}
422: Unprocessable Entity error
types