Objects
Bulk operations
Create schedules in bulk
Bulk creates up to 1,000 schedules at a time. This endpoint also handles inline identifications for the actor, recipient, and tenant fields.
post/v1/schedules/bulk/create
Request body
Example request
{
"schedules": [
{
"data": {
"key": "value"
},
"ending_at": null,
"recipient": "dnedry",
"repeats": [
{
"__typename": "ScheduleRepeat",
"day_of_month": null,
"days": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
"sun"
],
"frequency": "daily",
"hours": null,
"interval": 1,
"minutes": null
}
],
"scheduled_at": null,
"tenant": "acme_corp",
"workflow": "comment-created"
},
{
"data": {
"key": "value"
},
"ending_at": null,
"recipient": "esattler",
"repeats": [
{
"__typename": "ScheduleRepeat",
"day_of_month": null,
"days": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
"sun"
],
"frequency": "daily",
"hours": null,
"interval": 1,
"minutes": null
}
],
"scheduled_at": null,
"tenant": "acme_corp",
"workflow": "comment-created"
}
]
}Response
OK
Example response
{
"__typename": "BulkOperation",
"completed_at": null,
"error_count": 0,
"error_items": [],
"estimated_total_rows": 1000,
"failed_at": null,
"id": "123e4567-e89b-12d3-a456-426614174000",
"inserted_at": "2024-05-22T12:00:00Z",
"name": "Bulk operation name",
"processed_rows": 0,
"progress_path": "https://api.switchboard.com/v1/bulk_operations/123e4567-e89b-12d3-a456-426614174000",
"started_at": null,
"status": "processing",
"success_count": 0,
"updated_at": "2024-05-22T12:00:00Z"
}