curl --request POST \
--url https://paradigm.lighton.ai/api/v3/files/{id}/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tags": [
1
]
}
'{
"id": 123,
"filename": "project_proposal.pdf",
"workspace": {
"id": 1,
"name": "Engineering Team"
},
"summaries": [
{
"language": "en",
"summary": "This document outlines Q4 initiatives..."
}
],
"title": "Q4 Project Proposal",
"extension": "pdf",
"status": "embedded",
"status_vision": "embedded",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T11:45:00Z",
"total_pages": 25,
"size": 2458624,
"tags": [
{
"id": 1,
"name": "Compliance",
"auto_assigned": false
},
{
"id": 2,
"name": "Legal",
"auto_assigned": false
}
],
"created_by": {
"id": 42,
"first_name": "Jane",
"last_name": "Doe",
"username": "jdoe"
},
"signature": "T1A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1V2W3X4Y5Z6A7B8C9D0E1F2",
"parser": "v2.2.1",
"message": "Added 2 tag(s) to file (duplicates ignored)"
}{
"id": null,
"code": 401,
"error": "unauthorized",
"detail": "Authentication credentials were not provided or are invalid.",
"doc_url": "https://developers.lighton.ai/errors#unauthorized"
}{
"id": null,
"code": 403,
"error": "insufficient_permissions",
"detail": "You do not have permission to perform this action.",
"doc_url": "https://developers.lighton.ai/errors#insufficient_permissions"
}{
"id": null,
"code": 404,
"error": "not_found",
"detail": "The requested resource was not found.",
"doc_url": "https://developers.lighton.ai/errors#not_found"
}{
"id": null,
"code": 422,
"error": "validation_error",
"detail": "One or more fields failed validation.",
"doc_url": "https://developers.lighton.ai/errors#validation_error",
"fields": {
"<field_name>": [
{
"error": "required",
"detail": "This field is required."
}
]
}
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Add tags to a file
Add one or more tags to a file without affecting existing tags.
Behavior:
- Adds new tags to the document while preserving existing ones
- New tags are marked as manually assigned (
auto_assigned=False) - Duplicate tags are ignored (no error if tag already exists on document)
Validation:
- Returns 400 if tag IDs are invalid or don’t belong to user’s company
- Returns 403 if user doesn’t have permission to edit the document
- Returns 404 if document doesn’t exist
curl --request POST \
--url https://paradigm.lighton.ai/api/v3/files/{id}/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tags": [
1
]
}
'{
"id": 123,
"filename": "project_proposal.pdf",
"workspace": {
"id": 1,
"name": "Engineering Team"
},
"summaries": [
{
"language": "en",
"summary": "This document outlines Q4 initiatives..."
}
],
"title": "Q4 Project Proposal",
"extension": "pdf",
"status": "embedded",
"status_vision": "embedded",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T11:45:00Z",
"total_pages": 25,
"size": 2458624,
"tags": [
{
"id": 1,
"name": "Compliance",
"auto_assigned": false
},
{
"id": 2,
"name": "Legal",
"auto_assigned": false
}
],
"created_by": {
"id": 42,
"first_name": "Jane",
"last_name": "Doe",
"username": "jdoe"
},
"signature": "T1A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1V2W3X4Y5Z6A7B8C9D0E1F2",
"parser": "v2.2.1",
"message": "Added 2 tag(s) to file (duplicates ignored)"
}{
"id": null,
"code": 401,
"error": "unauthorized",
"detail": "Authentication credentials were not provided or are invalid.",
"doc_url": "https://developers.lighton.ai/errors#unauthorized"
}{
"id": null,
"code": 403,
"error": "insufficient_permissions",
"detail": "You do not have permission to perform this action.",
"doc_url": "https://developers.lighton.ai/errors#insufficient_permissions"
}{
"id": null,
"code": 404,
"error": "not_found",
"detail": "The requested resource was not found.",
"doc_url": "https://developers.lighton.ai/errors#not_found"
}{
"id": null,
"code": 422,
"error": "validation_error",
"detail": "One or more fields failed validation.",
"doc_url": "https://developers.lighton.ai/errors#validation_error",
"fields": {
"<field_name>": [
{
"error": "required",
"detail": "This field is required."
}
]
}
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Request serializer for adding tags to a file.
List of tag IDs to add to the file
1Response
Tags added successfully
Filename of the document
Workspace the document belongs to
Show child attributes
Show child attributes
Document summaries (all languages)
Show child attributes
Show child attributes
File extension of the document
Creation date of the resource
Total number of pages
List of tags associated with the document
Show child attributes
Show child attributes
User who created the file. Null when the file was created by the system.
Show child attributes
Show child attributes
Upload session UUID associated with this document
TLSH hash for duplicate detection.
Facet content types with nested attribute values. Excludable via ?exclude=content_types.
Show child attributes
Show child attributes
Thumbnail preview of the document (256x256 WebP).
Show child attributes
Show child attributes
255pending- Pendingpending_conversion- Pending Conversionconverting- Convertingparsing- Parsingparsing_failed- Parsing Failedembedding- Embeddingembedding_failed- Embedding Failedembedded- Embeddedparsed- Parsedfail- Failupdating- Updating
pending, pending_conversion, converting, parsing, parsing_failed, embedding, embedding_failed, embedded, parsed, fail, updating pending- Pendingprocessing- Processingembedded- Embeddedfail- Fail-- Not available
pending, processing, embedded, fail, - Size of the file in bytes.
Deprecated — use pages[] instead. Full text content of the document, derived from per-page text, as a single flat string. Only included when include_content=true query parameter is provided. Will be removed in a future release.
Per-page document text in the canonical { index, markdown } shape shared with /parse and /ocr. Only included when include_content=true. Intended replacement for the flat content string. For documents ingested before per-page text was stored, the full content is returned as a single page (index 1); empty only when there is no content at all.
Show child attributes
Show child attributes
Detailed error information. Only present when document processing has failed.
Parser/ingestion pipeline used for document processing (e.g., 'v2.1', 'v3.0').
External document metadata
Show child attributes
Show child attributes