Skip to main content
POST
/
v2
/
auth
/
create-api-key
Create Api Key Via Edge Function
curl --request POST \
  --url https://api.valiqor.com/v2/auth/create-api-key \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "project_id": "<string>"
}
'
{
  "api_key": "<string>",
  "key_id": "<string>",
  "name": "<string>",
  "public_prefix": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "warning": "Store this key securely. It won't be shown again!"
}

Body

application/json

Request to create a new API key

name
string
required

Human-readable key name (e.g., Production Key)

project_id
string | null

Optional project to associate with

Response

Successful Response

Response for API key creation

api_key
string
required

Full API key - show once and never again!

key_id
string
required
name
string
required
public_prefix
string
required

Safe to display prefix

created_at
string<date-time>
required
warning
string
default:Store this key securely. It won't be shown again!