Browse the API reference

Create API Key

post/v1/user/api-keys

Part of User.

The raw key value is only returned once at creation time and cannot be retrieved again.

Authentication

Authenticate in any one of these ways — not all of them:

  • API key in the X-API-Key header.
  • Bearer token in the Authorization header.

Request body

Required, application/json.

FieldTypeDescription
namerequiredstring

Name for the API key

descriptionoptionalstring

Optional description

expires_atoptionalstring

Optional expiration date in ISO format (e.g. 2024-12-31T23:59:59Z)

graph_idoptionalstring

Optional graph scope. A scoped key works only for this graph (and its subgraphs) and is the only kind of key accepted in an MCP connector URL. Omit for an account-wide key.

Example request

curl
curl -X POST "https://api.robosystems.ai/v1/user/api-keys" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string"
}'

Responses

201 Successful Response

FieldTypeDescription
api_keyrequiredAPIKeyInfo

API key information

APIKeyInfo fields
FieldTypeDescription
idrequiredstring

API key ID

namerequiredstring

API key name

descriptionoptionalstring

API key description

prefixrequiredstring

API key prefix for identification

is_activerequiredboolean

Whether the key is active

last_used_atoptionalstring

Last used timestamp

expires_atoptionalstring

Expiration timestamp

created_atrequiredstring

Creation timestamp

graph_idoptionalstring

Graph scope; null means account-wide

keyrequiredstring

The actual API key (only shown once)

StatusMeaning
400Invalid request
401Authentication required
403Access denied
422Validation Error
429Rate limit exceeded
500Internal server error