Tags

Endpoints to list, create, and delete tags. Tags are flexible cross-cutting labels that complement categories on every document in your Paperarchive archive.

GET https://api.paperarchive.io/v1/tags
Scope:tags:read

List all tags available in the spaces your API key can access: tags assigned to a space and tags used on documents in it. Each tag lists the spaces it is available in.

Query parameters

NameTypeRequiredDescription
space_iduuid optional Only tags available in this space.

Code examples

curl -X GET "https://api.paperarchive.io/v1/tags" \
  -H "Authorization: Bearer pa_live_abc123def456"
POST https://api.paperarchive.io/v1/tags
Scope:tags:write

Create a new tag in a space. Tag names are unique per user, ignoring case: if you already have a tag with this name, it is returned with status 200 instead of 201 and becomes available in the given space.

Request body

NameTypeRequiredDescription
namestring required Tag name.
space_iduuid required Space to create the tag in.

Code examples

curl -X POST "https://api.paperarchive.io/v1/tags" \
  -H "Authorization: Bearer pa_live_abc123def456" \
  -H "Content-Type: application/json" \
  -d '{"name": "important", "space_id": "space-uuid-1"}'
DELETE https://api.paperarchive.io/v1/tags/:id
Scope:tags:write

Delete a tag. Only works for tags in spaces accessible by your API key.

Path parameters

NameTypeRequiredDescription
iduuid required The tag ID to delete.

Code examples

curl -X DELETE "https://api.paperarchive.io/v1/tags/tag-uuid-1" \
  -H "Authorization: Bearer pa_live_abc123def456"