POST
/
v1
/
api-keys
/
create
Create a new API key
curl --request POST \
  --url https://api.weblinq.dev/v1/api-keys/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>"
}'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "start": "<string>",
    "prefix": "<string>",
    "userId": "<string>",
    "enabled": true,
    "requestCount": 123,
    "remaining": 123,
    "lastRequest": "<string>",
    "expiresAt": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "metadata": {},
    "key": "<string>"
  },
  "creditsCost": 123,
  "requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Enter your API token or session token

Body

application/json

API key creation parameters

The body is of type object.

Response

201
application/json

API key created successfully

The response is of type object.