> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cloudraker.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cloudraker.com/_mcp/server.

# Detect a template’s fillable fields

POST https://api.cloudraker.com/v1/templates/{id}/inspect

Enumerates the fillable fields in a `pdf-form` template, with the page geometry to draw them on.

The response is `{ fields, pageBoxes, pageCount, detected }`. Each field carries its name, type, label, page and bounding box — the names you see here are exactly the keys [POST /v1/runs/{id}/task](https://docs.cloudraker.com/api/cloud-raker-api/runs/submit-run-task) expects when submitting a review.

If the PDF carries no form fields of its own, they are detected from the page instead and `detected` says so.

<Note>
Idempotent, but the first call on a template can be slow while the document is analyzed. Later calls reuse that result and return promptly.
</Note>

**Learn more:** [Form filling guide](https://docs.cloudraker.com/capabilities/fill)

Reference: https://docs.cloudraker.com/api/cloud-raker-api/templates/inspect-template

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: CloudRaker API
  version: 1.0.0
paths:
  /v1/templates/{id}/inspect:
    post:
      operationId: inspect-template
      summary: Detect a template’s fillable fields
      description: >-
        Enumerates the fillable fields in a `pdf-form` template, with the page
        geometry to draw them on.


        The response is `{ fields, pageBoxes, pageCount, detected }`. Each field
        carries its name, type, label, page and bounding box — the names you see
        here are exactly the keys [POST
        /v1/runs/{id}/task](https://docs.cloudraker.com/api/cloud-raker-api/runs/submit-run-task)
        expects when submitting a review.


        If the PDF carries no form fields of its own, they are detected from the
        page instead and `detected` says so.


        <Note>

        Idempotent, but the first call on a template can be slow while the
        document is analyzed. Later calls reuse that result and return promptly.

        </Note>


        **Learn more:** [Form filling
        guide](https://docs.cloudraker.com/capabilities/fill)
      tags:
        - templates
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Field inventory + page geometry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Templates_inspectTemplate_Response_200'
        '409':
          description: The template is still uploading (`file_not_ready`).
          content:
            application/json:
              schema:
                description: Any type
        '422':
          description: The template is not a PDF (`template_not_inspectable`).
          content:
            application/json:
              schema:
                description: Any type
        '429':
          description: >-
            Rate limited. The `/v1` API allows at least **67 requests per minute
            per organization** (about 1,000 requests per 15 minutes) — a
            guaranteed floor, enforced per edge location, so a geographically
            spread caller may get more. Wait for the `Retry-After` interval and
            retry — the error is `retryable`.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/InspectTemplateRequestTooManyRequestsError
servers:
  - url: https://api.cloudraker.com
    description: Production
  - url: https://api.staging.raker.one
    description: Staging
  - url: https://api.dev.raker.one
    description: Development
components:
  schemas:
    Templates_inspectTemplate_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Templates_inspectTemplate_Response_200
    V1TemplatesIdInspectPostResponsesContentApplicationJsonSchemaCode:
      type: string
      enum:
        - rate_limited
      title: V1TemplatesIdInspectPostResponsesContentApplicationJsonSchemaCode
    InspectTemplateRequestTooManyRequestsError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1TemplatesIdInspectPostResponsesContentApplicationJsonSchemaCode
        message:
          type: string
        retryable:
          type: boolean
        requestId:
          type: string
        docUrl:
          type: string
      required:
        - code
        - message
        - retryable
        - requestId
      title: InspectTemplateRequestTooManyRequestsError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "fields": [
    {
      "name": "fullName",
      "type": "text",
      "label": "Full Name",
      "page": 1,
      "bbox": [
        72,
        720,
        300,
        740
      ]
    },
    {
      "name": "emailAddress",
      "type": "email",
      "label": "Email Address",
      "page": 1,
      "bbox": [
        72,
        680,
        300,
        700
      ]
    },
    {
      "name": "dateOfBirth",
      "type": "date",
      "label": "Date of Birth",
      "page": 2,
      "bbox": [
        72,
        650,
        200,
        670
      ]
    },
    {
      "name": "subscribeNewsletter",
      "type": "checkbox",
      "label": "Subscribe to newsletter",
      "page": 2,
      "bbox": [
        72,
        600,
        90,
        620
      ]
    }
  ],
  "pageBoxes": [
    {
      "page": 1,
      "width": 612,
      "height": 792
    },
    {
      "page": 2,
      "width": 612,
      "height": 792
    }
  ],
  "pageCount": 2,
  "detected": false
}
```

**SDK Code**

```python
import requests

url = "https://api.cloudraker.com/v1/templates/id/inspect"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.cloudraker.com/v1/templates/id/inspect';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cloudraker.com/v1/templates/id/inspect"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/v1/templates/id/inspect")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.cloudraker.com/v1/templates/id/inspect")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.cloudraker.com/v1/templates/id/inspect', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/v1/templates/id/inspect");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/v1/templates/id/inspect")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```