---
title: "Create API Key"
method: POST
path: "/v1/user/api-keys"
tags: ["User"]
---

# Create API Key

`POST /v1/user/api-keys`

## Request

- Base URL: `https://api.robosystems.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.robosystems.ai/v1/user/api-keys`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

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

## Request body

- CreateAPIKeyRequest: Request model for creating a new API key.
  - `name` string, required: Name for the API key
  - `description` string, nullable: Optional description
  - `expires_at` string, nullable: Optional expiration date in ISO format (e.g. 2024-12-31T23:59:59Z)
  - `graph_id` string, nullable: 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.

## Response `201`

Successful Response

- CreateAPIKeyResponse: Response model for creating a new API key.
  - `api_key` APIKeyInfo, required: API key information response model.
    - `id` string, required: API key ID
    - `name` string, required: API key name
    - `description` string, nullable: API key description
    - `prefix` string, required: API key prefix for identification
    - `is_active` boolean, required: Whether the key is active
    - `last_used_at` string, nullable: Last used timestamp
    - `expires_at` string, nullable: Expiration timestamp
    - `created_at` string, required: Creation timestamp
    - `graph_id` string, nullable: Graph scope; null means account-wide
  - `key` string, required: The actual API key (only shown once)

## Other responses

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

---

[API](https://skmtc.dev/robosystems/apis/robosystems-api.md) · [All operations](https://skmtc.dev/robosystems/apis/robosystems-api/llms.txt) · [OpenAPI document](https://skmtc.dev/robosystems/apis/robosystems-api/revisions/e661e2d5ca6a?raw)
