API Key

Create

POST
Create a new API key

Request

This endpoint expects an object.
name
stringRequired

Response

This endpoint returns an object
success
boolean
data
objectOptional
Represents a ApiKey record
POST
$curl -X POST https://api.beta.superagent.sh/api/v1/api-keys \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "string"
>}'
Response
1{
2 "success": true,
3 "data": {
4 "id": "string",
5 "name": "string",
6 "displayApiKey": "string",
7 "createdAt": "2024-01-15T09:30:00Z",
8 "updatedAt": "2024-01-15T09:30:00Z",
9 "apiUserId": "string",
10 "apiKey": "string",
11 "apiUser": {
12 "id": "string",
13 "createdAt": "2024-01-15T09:30:00Z",
14 "updatedAt": "2024-01-15T09:30:00Z"
15 }
16 }
17}