---
title: "Start a processing pipeline"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Start a processing pipeline

Path: CloudRaker Paperwork API › Process

`POST /process`

Multipart upload of one or more files plus a JSON `options` part (declared files, actions, webhook URL, TTL). Files are sent as repeated parts named `files` (matched to `options.files[].field` by filename; undeclared ones get default processing), or — outside the generated SDKs — as one part per `options.files[].field`. The platform parses the files, runs the requested actions, emits signed webhooks, and holds the result until the TTL expires.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Request body

_Required._

- `options` (`startProcess.options`; object, required) — The JSON-encoded `options` multipart part.
  - `files` (`startProcess.options.files`; array<object>, optional) — Per-file processing declarations. Optional when every file is sent as a repeated `files` part and default processing is fine.
    - `field` (`startProcess.options.files.field`; string, required) — Multipart part name of the file (named-part layout), or its filename when the file is sent as a repeated `files` part.
      - minLength 1
    - `processingKind` (`startProcess.options.files.processingKind`; string, optional) — How to preprocess this file; omitted = automatic by mime type.
      - one of `"doc-simple"`, `"doc-ocr"`, `"doc-auto"`, `"audio-transcribe"`, `"audio-transcribe-and-diarize"`
  - `actions` (`startProcess.options.actions`; array<string>, optional) — Installed-action slugs (or ids) to run once preprocessing completes.
    - minLength 1
  - `callbackUrl` (`startProcess.options.callbackUrl`; string, optional) — Webhook URL. Deliveries are signed: `x-rk1-signature` is a compact ES256 JWT (claims processingId, eventId, type, bodySha256) verifiable against GET /process/jwks.json.
    - format `uri`
  - `durationSeconds` (`startProcess.options.durationSeconds`; integer, optional) — Retention TTL in seconds before auto-purge. Max 604800 (7d).
    - min 1; max 604800; default `86400`
- `files` (`startProcess.files`; array<string>, required) — The files to process, one multipart part each (part name `files`).
  - format `binary`

## Example request

```text
{
  "options": {
    "files": [
      {
        "field": "string",
        "processingKind": "doc-simple"
      }
    ],
    "actions": [
      "string"
    ],
    "callbackUrl": "http://example.com",
    "durationSeconds": 86400
  },
  "files": [
    "<files>",
    "<files>"
  ]
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.cloudraker.com/process \
  --header 'Authorization: Bearer <token>' \
  --form 'options="{\"files\":[{\"field\":\"string\",\"processingKind\":\"doc-simple\"}],\"actions\":[\"string\"],\"callbackUrl\":\"http://example.com\",\"durationSeconds\":86400}";type=application/json' \
  --form 'files=@<files>;type=application/octet-stream' \
  --form 'files=@<files>;type=application/octet-stream'
```

### TypeScript

```typescript
import { readFile } from 'node:fs/promises';

const formData = new FormData();
formData.append('options', new Blob([JSON.stringify({
  files: [{field: 'string', processingKind: 'doc-simple'}],
  actions: ['string'],
  callbackUrl: 'http://example.com',
  durationSeconds: 86400
})], { type: 'application/json' }));
formData.append('files', new Blob([await readFile('<files>')]), '<files>');
formData.append('files', new Blob([await readFile('<files>')]), '<files>');

const url = 'https://api.cloudraker.com/process';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}, body: formData};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import json
import requests

url = "https://api.cloudraker.com/process"

files = [
    ("options", (None, json.dumps({
        "files": [
            {
                "field": "string",
                "processingKind": "doc-simple"
            }
        ],
        "actions": ["string"],
        "callbackUrl": "http://example.com",
        "durationSeconds": 86400
    }), "application/json")),
    ("files", ("<files>", open("<files>", "rb"), "application/octet-stream")),
    ("files", ("<files>", open("<files>", "rb"), "application/octet-stream"))
]
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, files=files, headers=headers)

print(response.text)
```

## Responses

### 201

Pipeline accepted.

#### Example

```json
{
  "processingId": "a1b2c3d4-...",
  "expiresAt": "2019-08-24T14:15:22Z",
  "statusUrl": "/process/a1b2c3d4-..."
}
```

- `processingId` (`startProcess.response.201.processingId`; string, required)
  - example `"a1b2c3d4-..."`
- `expiresAt` (`startProcess.response.201.expiresAt`; string, required)
  - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
- `statusUrl` (`startProcess.response.201.statusUrl`; string, required)
  - example `"/process/a1b2c3d4-..."`

### 400

Malformed multipart body or options.

### 403

Caller is neither an org admin nor an org API key.


Source: https://docs.cloudraker.com/paperwork/api/process/start-process/index.md
