Skip to main content
POST
https://api.clay.com/public/v0
/
routines
/
{routine_id}
/
run-batch
/
start
Start an async routine run-batch over an uploaded JSONL file
curl --request POST \
  --url https://api.clay.com/public/v0/routines/{routine_id}/run-batch/start \
  --header 'Content-Type: application/json' \
  --header 'clay-api-key: <api-key>' \
  --data '
{
  "file_id": "<string>"
}
'
const options = {
  method: 'POST',
  headers: {'clay-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({file_id: '<string>'})
};

fetch('https://api.clay.com/public/v0/routines/{routine_id}/run-batch/start', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.clay.com/public/v0/routines/{routine_id}/run-batch/start"

payload = { "file_id": "<string>" }
headers = {
    "clay-api-key": "<api-key>",
    "Content-Type": "application/json"
}

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

print(response.text)
{
  "routine_run_id": "<string>",
  "status": "<string>"
}
{
  "message": "<string>"
}
{
  "message": "<string>"
}
{
  "message": "<string>"
}
{
  "message": "<string>"
}
{
  "message": "<string>"
}

Authorizations

clay-api-key
string
header
required

Personal API key tied to your Clay user. Create one under Settings → Account in the Clay app.

Path Parameters

routine_id
string
required

Body

application/json

Body

file_id
string
required
webhook_id
string

ID of a registered Clay webhook to notify when the run finishes.

Required string length: 1 - 64

Response

202

routine_run_id
string
required
status
string
required
Allowed value: "in_progress"