Create Workbook
POST
/api/workbooks/
const url = 'http://localhost:8000/api/workbooks/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
WorkbookCreate
Create a new workbook — Clay-style with source selection.
object
columns_config
Columns Config
Array<object>
ColumnConfigConfiguration for a single workbook column.
object
id
required
Id
Unique column identifier
string
input_columns
Any of:
Array<string>
null
name
required
Name
Display name
string
type
Type
Column type: lead_field, enrichment, waterfall, ai_formula, conditional, output
string
waterfall
Any of:
Array<string>
null
width
Width
Column width in pixels
integer
description
Description
string
filter_criteria
Any of:
FilterCriteria
Filter to select which leads to snapshot into a workbook.
object
job_ids
Any of:
Array<string>
null
null
max_rows
Max Rows
Max rows to snapshot from source
integer
name
required
Name
string
source
Source
Source type: empty, csv, leads_filter, job_results
string
Responses
Section titled “Responses”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
description
required
Description
string
id
required
Id
string
name
required
Name
string
source_type
Source Type
string
status
required
Status
string
sync_to_leads
Sync To Leads
boolean
total_rows
required
Total Rows
integer
Example
{ "source_type": "empty", "sync_to_leads": true}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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" } ]}