Skip to content

Create an API key (requires admin)

POST
/api/apikeys
curl --request POST \
--url https://api.langparse.dev/api/apikeys \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <X-Api-Key>' \
--data '{ "name": "CI pipeline", "scopes": [ "parse" ] }'

The secret is returned once — store it now. scopes default to ["parse"]; granting manage/admin needs the admin role.

Media typeapplication/json
object
name
required
string
scopes
Array<string>
Allowed values: parse manage admin
Example
{
"name": "CI pipeline",
"scopes": [
"parse"
]
}

The new key — the secret is shown only here.

Media typeapplication/json
object
data
required
object
id
string
name
string
scopes
Array<string>
secret
string
Example
{
"data": {
"id": "key_mrb1a2c3",
"name": "CI pipeline",
"scopes": [
"parse"
],
"secret": "lp_use1_…"
}
}

Missing or invalid API key.

Media typeapplication/json

Error response. statusCode mirrors the HTTP status; statusMessage is human-readable.

object
statusCode
integer
statusMessage
string
Example
{
"statusCode": 404,
"statusMessage": "Document not found"
}