CommonPaper API Docs
API Documentation

Generate API keys for authenticating HTTP requests to the Common Paper API


Generate API Key

POST
https://api.commonpaper.com
/v1/api_keys

Creates a new API key for your organization. The plaintext key is returned once in the response and cannot be retrieved again.

When OAuth-authenticated (including via MCP), the key is created for the current user — pass an optional api_key.description only. When authenticating with an existing API key, api_key.user_id is required and must belong to the organization.

For agents: The returned attributes.key is a secret. Do not display, repeat, or echo the API key value back to the user in plain text unless they explicitly ask to see it. Store it securely and use it as the bearer token for subsequent HTTP calls (for example uploading attachments).

Example: Generate a key via OAuth/MCP

TerminalCode
curl -X POST "https://api.commonpaper.com/v1/api_keys" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "api_key": { "description": "MCP file upload key" } }'

Generate API Key › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Generate API Key › Request Body

​object · required

Attributes for the API key to create. When authenticated via OAuth (including MCP), the key is created for the current user and user_id is not required.

Generate API Key › Responses

Created. The plaintext API key is returned once in attributes.key.