Skip to main content
GET
/
extractions
/
templates
/
{templateId}
Get Template
curl --request GET \
  --url https://api.raydocs.com/extractions/templates/{templateId} \
  --header 'Authorization: Bearer <token>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "schema_json": {
    "config": {
      "reasoning_enabled": true,
      "system_message": "<string>"
    },
    "definitions": {},
    "groups": {}
  },
  "settings": {
    "parsing": {
      "contextual_embedding": true
    }
  },
  "workspace_id": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authentication & Scope

Requires the templates-read ability.

Request

GET /extractions/templates/550e8400-e29b-41d4-a716-446655440000 HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>

Path Parameters

ParameterTypeRequiredDescription
templateIduuidYesThe template ID

Response

200 OK – The template with full details.
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Invoice Extraction",
  "description": "Extract key fields from invoices",
  "schema_json": {
    "config": {
      "reasoning_enabled": true
    },
    "groups": {
      "invoice_details": {
        "search_query": "invoice number, date, amount",
        "fields": {
          "invoice_number": {
            "type": "string",
            "extraction_prompt": "Extract the invoice number"
          },
          "total_amount": {
            "type": "number",
            "extraction_prompt": "Extract the total amount"
          }
        }
      }
    }
  },
  "settings": {
    "parsing": {
      "contextual_embedding": false
    }
  },
  "workspace_id": 1,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}
404 Not Found – Template does not exist or you don’t have access.

Authorizations

Authorization
string
header
required

Personal Access Token

Path Parameters

templateId
string<uuid>
required

Response

Successful

id
string<uuid>
name
string
description
string
schema_json
object

JSON schema defining extraction fields and groups

settings
object
workspace_id
integer
created_at
string<date-time>
updated_at
string<date-time>