cURL
curl --request POST \ --url https://api.raydocs.com/extractions/sessions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "extraction_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "Q1 2024 Invoices" } '
{ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "<string>", "extraction_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "settings": {}, "status": "pending", "created_at": "2023-11-07T05:31:56Z", "updated_at": "2023-11-07T05:31:56Z", "documents": [ { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "filename": "<string>", "mime_type": "<string>", "size": 123, "status": "pending", "extraction_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "created_at": "2023-11-07T05:31:56Z" } ], "results": [ { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "extraction_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "status": "pending", "data": {}, "reasoning": {}, "created_at": "2023-11-07T05:31:56Z", "updated_at": "2023-11-07T05:31:56Z" } ] }
Create a new extraction session for a template.
sessions-write
POST /extractions/sessions HTTP/1.1 Host: api.raydocs.com Authorization: Bearer <token> Content-Type: application/json { "name": "Q1 2024 Invoices", "extraction_template_id": "550e8400-e29b-41d4-a716-446655440000" }
name
extraction_template_id
201 Created
{ "id": "770e8400-e29b-41d4-a716-446655440000", "name": "Q1 2024 Invoices", "extraction_template_id": "550e8400-e29b-41d4-a716-446655440000", "settings": {}, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z", "documents": [], "results": [] }
Personal Access Token created from the Raydocs dashboard. Include in the Authorization header: Bearer <your_token> See API Keys for token creation and management.
Bearer <your_token>
"Q1 2024 Invoices"
Created
pending
processing
completed
failed
Show child attributes