Skip to content

Create Workbook

POST
/api/workbooks/
curl --request POST \
--url http://localhost:8000/api/workbooks/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "columns_config": [ { "channels": {}, "condition": "example", "destination": "example", "destination_config": {}, "formula": "example", "http_body": "example", "http_extract": "example", "http_headers": {}, "http_method": "example", "http_url": "example", "icp": {}, "id": "example", "input_columns": [ "example" ], "lead_field": "example", "max_steps": 1, "name": "example", "output_format": "example", "prompt": "example", "provider": "example", "target_field": "example", "target_rows": 1, "type": "lead_field", "verify": true, "waterfall": [ "example" ], "width": 200 } ], "description": "", "filter_criteria": { "city": "example", "company_size": "example", "has_email": true, "has_phone": true, "has_website": true, "job_ids": [ "example" ], "max_score": 1, "min_score": 1, "score_tier": "example", "search": "example", "source": "example", "specialization": "example", "state": "example", "status": "example" }, "max_rows": 1000, "name": "example", "source": "empty", "source_config": {} }'

Create a new workbook — Clay-style with source selection.

source=“empty”: blank table source=“leads_filter”: snapshot leads matching filter into WorkbookRow source=“csv”: rows provided in source_config.rows source=“job_results”: snapshot leads from specific jobs

x-workspace-id
Any of:
string
Media typeapplication/json
WorkbookCreate

Create a new workbook — Clay-style with source selection.

object
columns_config
Columns Config
Array<object>
ColumnConfig

Configuration for a single workbook column.

object
channels
Any of:
object
key
additional properties
any
condition
Any of:
string
destination
Any of:
string
destination_config
Any of:
object
key
additional properties
any
formula
Any of:
string
http_body
Any of:
Http Body

Request body template (dict/str) for POST/PUT

http_extract
Any of:
string
http_headers
Any of:
object
key
additional properties
any
http_method
Any of:
string
http_url
Any of:
string
icp
Any of:
object
key
additional properties
any
id
required
Id

Unique column identifier

string
input_columns
Any of:
Array<string>
lead_field
Any of:
string
max_steps
Any of:
integer
name
required
Name

Display name

string
output_format
Any of:
string
prompt
Any of:
string
provider
Any of:
string
target_field
Any of:
string
target_rows
Any of:
integer
type
Type

Column type: lead_field, enrichment, waterfall, ai_formula, conditional, output

string
default: lead_field
verify
Any of:
boolean
waterfall
Any of:
Array<string>
width
Width

Column width in pixels

integer
default: 200
description
Description
string
"" <= 2000 characters
filter_criteria
Any of:
FilterCriteria

Filter to select which leads to snapshot into a workbook.

object
city
Any of:
string
company_size
Any of:
string
has_email
Any of:
boolean
has_phone
Any of:
boolean
has_website
Any of:
boolean
job_ids
Any of:
Array<string>
max_score
Any of:
integer
min_score
Any of:
integer
score_tier
Any of:
string
search
Any of:
string
source
Any of:
string
specialization
Any of:
string
state
Any of:
string
status
Any of:
string
max_rows
Max Rows

Max rows to snapshot from source

integer
default: 1000 >= 1 <= 50000
name
required
Name
string
>= 1 characters <= 255 characters
source
Source

Source type: empty, csv, leads_filter, job_results

string
default: empty
source_config
Any of:
object
key
additional properties
any

Successful Response

Media typeapplication/json
WorkbookResponse

Workbook response — returned from API.

object
columns_config
required
Columns Config
Array<object>
object
key
additional properties
any
completed_rows
required
Completed Rows
integer
created_at
Any of:
string format: date-time
description
required
Description
string
filter_criteria
Any of:
object
key
additional properties
any
id
required
Id
string
last_run_at
Any of:
string format: date-time
name
required
Name
string
source_config
Any of:
object
key
additional properties
any
source_type
Source Type
string
default: empty
status
required
Status
string
sync_to_leads
Sync To Leads
boolean
default: true
total_rows
required
Total Rows
integer
updated_at
Any of:
string format: date-time
Example
{
"source_type": "empty",
"sync_to_leads": true
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}