Skip to main content
POST
https://api.clay.com/public/v0
/
routines
/
{routine_id}
/
run
Execute a routine against 1-100 items
curl --request POST \
  --url https://api.clay.com/public/v0/routines/{routine_id}/run \
  --header 'Content-Type: application/json' \
  --header 'clay-api-key: <api-key>' \
  --data '
{
  "items": [
    {
      "id": "<string>",
      "inputs": {}
    }
  ]
}
'
const options = {
  method: 'POST',
  headers: {'clay-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({items: [{id: '<string>', inputs: {}}]})
};

fetch('https://api.clay.com/public/v0/routines/{routine_id}/run', 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"

payload = { "items": [
        {
            "id": "<string>",
            "inputs": {}
        }
    ] }
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

items
object[]
required
Required array length: 1 - 100 elements
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"