CommonPaper API Docs
API Documentation

Upload and manage file attachments for agreements


Archive Attachment

DELETE
https://api.commonpaper.com
/v1/attachments/{id}

This endpoint archives a file attachment within Common Paper. Archived attachments are removed from the active attachment list but can be restored from the Common Paper UI.

Archive Attachment › path Parameters

id
​string · uuid · required

The UUID of the attachment to archive.

Archive Attachment › 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.

Archive Attachment › Responses

No Content. The attachment was archived successfully.

No data returned

Upload Attachment

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

Upload a PDF attachment to Common Paper.

API clients (API key):

  • application/json: send attachment.pdf as a base64-encoded string of the PDF bytes.
  • multipart/form-data: send the file as attachment[pdf] plus text fields.
  • Required: pdf, name, and uploaded_by (email of a Common Paper user associated with your organization).

MCP clients (OAuth):

  • Send attachment.filename (local path). Optional: name / description.
  • Do not send uploaded_by — the authenticated OAuth user is recorded as the uploader.
  • Returns { curl_command } — run it to POST the PDF bytes to the signed URL. Do not send file bytes through the MCP tool.
  • Required for MCP mint: filename only.

Upload Attachment › 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.

Upload Attachment › Request Body

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: attachment
type = object · requires: attachment
type = object · requires: attachment
Properties for MCP signed upload (mint curl):
MCP clients: send metadata only. Returns a curl_command to POST the local PDF bytes. Do not send pdf/base64. uploaded_by is taken from the OAuth-authenticated MCP user — do not pass it.
​object · required

Upload Attachment › Responses

API clients receive the created attachment (JSON:API). MCP clients receive a curl_command to POST the local PDF bytes.