Skip to main content
POST
/
extractions
/
templates
/
{templateId}
/
sessions
/
batch
/
execute
Batch Execute
curl --request POST \
  --url https://api.raydocs.com/extractions/templates/{templateId}/sessions/batch/execute \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "session_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'

Authentication & Scope

Requires the sessions-write ability.
If you used auto_extract: true when creating sessions via Batch Create, extraction starts automatically — you don’t need to call this endpoint.

Request

POST /extractions/templates/550e8400-e29b-41d4-a716-446655440000/sessions/batch/execute HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
Content-Type: application/json

{
  "session_ids": [
    "770e8400-e29b-41d4-a716-446655440001",
    "770e8400-e29b-41d4-a716-446655440002",
    "770e8400-e29b-41d4-a716-446655440003"
  ]
}

Path Parameters

ParameterTypeRequiredDescription
templateIduuidYesThe template ID

Body Parameters

ParameterTypeRequiredDescription
session_idsarrayYesArray of session IDs to execute

Response

200 OK – Extractions queued.
{
  "message": "Extractions queued",
  "queued_count": 3
}
Extractions run asynchronously. Poll the session or result endpoints to check status, or use webhooks for notifications.

Authorizations

Authorization
string
header
required

Personal Access Token created from the Raydocs dashboard. Include in the Authorization header: Bearer <your_token> See API Keys for token creation and management.

Path Parameters

templateId
string<uuid>
required

Body

application/json
session_ids
string<uuid>[]
required

Response

Extraction started