> For the complete documentation index, see [llms.txt](https://ro-proxy.gitbook.io/integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ro-proxy.gitbook.io/integration/api-keys.md).

# API Keys

Create, list, and revoke API keys.

## List API keys

> Return metadata for every API key owned by the caller. The token value is \*\*not\*\* included.

```json
{"openapi":"3.0.3","info":{"title":"RoProxy Integration API","version":"1.0.0"},"tags":[{"name":"API Keys","description":"Create, list, and revoke API keys."}],"servers":[{"url":"https://integration-api.ro-proxy.com","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"API key minted via `POST /api/key`, sent as\n`Authorization: Bearer <token>`.\n"}},"schemas":{"KeyListEnvelope":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/KeyItem"}}}},"KeyItem":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"ErrorEnvelope":{"type":"object","properties":{"message":{"type":"string"},"data":{"nullable":true}},"required":["message"]}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"ServerError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"paths":{"/api/key":{"get":{"tags":["API Keys"],"summary":"List API keys","description":"Return metadata for every API key owned by the caller. The token value is **not** included.","responses":{"200":{"description":"List of keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## Create a new API key

> Mint a new API key for the authenticated user.\
> \
> \> \*\*Important:\*\* the \`token\` field in the response is shown \*\*only once\*\*.\
> \> Copy it to your secret store immediately — there is no way to retrieve it later.\
> \>\
> \> A key inherits the full permissions of the calling user and never expires\
> \> until it is deleted via \`DELETE /api/key/{id}\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"RoProxy Integration API","version":"1.0.0"},"tags":[{"name":"API Keys","description":"Create, list, and revoke API keys."}],"servers":[{"url":"https://integration-api.ro-proxy.com","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"API key minted via `POST /api/key`, sent as\n`Authorization: Bearer <token>`.\n"}},"schemas":{"CreateKeyRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":100,"description":"Human-readable label for the key (shown in the dashboard)."}}},"KeyCreatedEnvelope":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/KeyCreatedResponse"}}},"KeyCreatedResponse":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"token":{"type":"string","description":"The API key itself. Shown only at creation time."},"created_at":{"type":"string","format":"date-time"}}},"ErrorEnvelope":{"type":"object","properties":{"message":{"type":"string"},"data":{"nullable":true}},"required":["message"]}},"responses":{"BadRequest":{"description":"Invalid request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"ServerError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"paths":{"/api/key":{"post":{"tags":["API Keys"],"summary":"Create a new API key","description":"Mint a new API key for the authenticated user.\n\n> **Important:** the `token` field in the response is shown **only once**.\n> Copy it to your secret store immediately — there is no way to retrieve it later.\n>\n> A key inherits the full permissions of the calling user and never expires\n> until it is deleted via `DELETE /api/key/{id}`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}}},"responses":{"201":{"description":"Key created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreatedEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## Delete an API key

> Revoke an API key. Revocation is effective immediately.

```json
{"openapi":"3.0.3","info":{"title":"RoProxy Integration API","version":"1.0.0"},"tags":[{"name":"API Keys","description":"Create, list, and revoke API keys."}],"servers":[{"url":"https://integration-api.ro-proxy.com","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"API key minted via `POST /api/key`, sent as\n`Authorization: Bearer <token>`.\n"}},"parameters":{"KeyId":{"in":"path","name":"id","required":true,"schema":{"type":"integer","minimum":1},"description":"API key ID."}},"schemas":{"EmptyEnvelope":{"type":"object","properties":{"message":{"type":"string"},"data":{"nullable":true}},"required":["message"]},"ErrorEnvelope":{"type":"object","properties":{"message":{"type":"string"},"data":{"nullable":true}},"required":["message"]}},"responses":{"BadRequest":{"description":"Invalid request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"NotFound":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"ServerError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"paths":{"/api/key/{id}":{"delete":{"tags":["API Keys"],"summary":"Delete an API key","description":"Revoke an API key. Revocation is effective immediately.","parameters":[{"$ref":"#/components/parameters/KeyId"}],"responses":{"200":{"description":"Key deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ro-proxy.gitbook.io/integration/api-keys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
