Categories
Endpoints for listing, creating, and deleting categories.
GET
https://api.paperarchive.io/v1/categoriesScope:
categories:readList all categories across accessible spaces. Categories are used to organize documents (e.g. "Invoices", "Contracts", "Tax Documents").
Code examples
curl -X GET "https://api.paperarchive.io/v1/categories" \
-H "Authorization: Bearer pa_live_abc123def456"POST
https://api.paperarchive.io/v1/categoriesScope:
categories:writeCreate a new category in a space.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
name | string | required | Category name. |
space_id | uuid | required | Space to create the category in. |
color | string | optional | Hex color code (e.g. "#ef4444"). |
icon | string | optional | Icon name. |
Code examples
curl -X POST "https://api.paperarchive.io/v1/categories" \
-H "Authorization: Bearer pa_live_abc123def456" \
-H "Content-Type: application/json" \
-d '{"name": "Receipts", "space_id": "space-uuid-1", "color": "#f59e0b"}'DELETE
https://api.paperarchive.io/v1/categories/:idScope:
categories:writeDelete a category. Only works for categories in spaces accessible by your API key.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | required | The category ID to delete. |
Code examples
curl -X DELETE "https://api.paperarchive.io/v1/categories/cat-uuid-1" \
-H "Authorization: Bearer pa_live_abc123def456"