Unturned
  • Quick Start
  • References
    • Authentication
    • Health
    • Documents
    • Projects
    • Models
Powered by GitBook

© 2025 Unturned

On this page
  1. References

Documents

PreviousHealthNextProjects

Get Document Status

get

Get document metadata and processing status.

Authorizations
Path parameters
document_idstring · uuidRequired
project_idstring · uuidRequired

Project ID to operate on

Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /projects/{project_id}/documents/{document_id} HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "success": true,
  "data": {
    "document_id": "text",
    "original_name": "text",
    "status": "pending",
    "project_id": "text",
    "abstract": "text",
    "error_message": "text",
    "created_at": "2025-05-13T11:44:20.043Z",
    "updated_at": "2025-05-13T11:44:20.043Z",
    "completed_at": "2025-05-13T11:44:20.043Z",
    "file_size": 1,
    "mime_type": "text",
    "s3_object_key": "text"
  },
  "error": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

Get Document Download Url

get

Get document presigned download URL.

Authorizations
Path parameters
project_idstring · uuidRequired

Project ID to operate on

document_idstring · uuidRequired
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /projects/{project_id}/documents/{document_id}/download HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "success": true,
  "data": {
    "document_id": "text",
    "s3_object_key": "text",
    "presigned_url": "text"
  },
  "error": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
  • POSTUpload Document
  • POSTBatch Upload Documents
  • POSTIngest From Url
  • GETGet Document Status
  • GETGet Document Download Url

Upload Document

post

Upload a single document for processing.

Authorizations
Path parameters
project_idstringRequiredExample: {{project_id}}
Body
filestring · binaryRequiredExample: file:///Users/ryota/Desktop/sample_document.pdf
Responses
202
Successful Response
application/json
Responseobject
422
Validation Error
application/json
post
POST /projects/{project_id}/documents/upload HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 58

{
  "file": "file:///Users/ryota/Desktop/sample_document.pdf"
}
{}

Batch Upload Documents

post

Upload multiple documents for processing.

Authorizations
Path parameters
project_idstringRequired
Query parameters
storage_typestring · enumOptionalDefault: persistencePossible values:
Body
filesstring · binary[]Required
Responses
202
Successful Response
application/json
422
Validation Error
application/json
post
POST /projects/{project_id}/documents/batch-upload HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 12

{
  "files": ""
}
{
  "success": true,
  "data": {
    "documents": [
      {
        "document_id": "text",
        "original_name": "text",
        "status": "pending"
      }
    ]
  },
  "error": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

Ingest From Url

post

Ingest a document from a public URL.

Authorizations
Path parameters
project_idstringRequired
Query parameters
storage_typestring · enumOptionalDefault: persistencePossible values:
Body

Request to ingest a document from URL.

urlstring · uri · min: 1 · max: 2083Required

URL to ingest document from

filenameany ofOptional

Custom filename to use

stringOptional
or
nullOptional
Responses
202
Successful Response
application/json
422
Validation Error
application/json
post
POST /projects/{project_id}/documents/ingest-url HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 47

{
  "url": "https://example.com",
  "filename": "text"
}
{
  "success": true,
  "data": {
    "document_id": "text",
    "original_name": "text",
    "status": "pending"
  },
  "error": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}