Skip to main content

Schedule APIs

These APIs are in beta

The schedule APIs are in beta and may have future breaking changes.

The schedule APIs allow you to manage and interact with schedules within your Omni organization.

Trigger schedule

Triggers the execution of a schedule on demand, outside of its regular schedule.

POST /api/unstable/schedules/:scheduleId/trigger
curl -X POST 'https://myorg.omniapp.co/api/unstable/schedules/123e4567-e89b-12d3-a456-426614174000/trigger' \
--H 'Authorization: Bearer <TOKEN>'

Parameters

Note: The scheduleId must be provided as a path parameter.

Loading parameters...

Response

200 OK

Successful requests will return a 200 OK status and a response body similar to the following:

{
"success": true
}
FieldTypeDescription
successbooleanIndicates schedule has been triggered successfully
400 Bad Request
{
"detail": "<errorReason>",
"status": 400
}
IssueError detail
Invalid UUID formatBad Request: scheduleId: Invalid uuid
Invalid methodInvalid method
404 Not Found
{
"detail": "<errorReason>",
"status": 404
}
IssueError detail
Schedule not foundScheduled task with id {scheduleId} does not exist
429 Too Many Requests

Results from too many requests in a given time frame. Refer to the Rate limiting documentation for more information.

500 Internal Server Error
{
"detail": "<errorReason>",
"status": 500
}
IssueError detail
Dispatcher errorVarious error messages related to dispatch failures

Add recipients to schedule

Adds one or more recipients to an existing scheduled task.

POST /api/unstable/schedules/:scheduleId/add-recipients
curl -X POST 'https://myorg.omniapp.co/api/unstable/schedules/123e4567-e89b-12d3-a456-426614174000/add-recipients' \
--H 'Authorization: Bearer <TOKEN>' \
--H 'Content-Type: application/json' \
--d '{
"recipients": "987fcdeb-51a2-43d7-9b56-254415f67890"
}'

Parameters

Loading parameters...

Response

200 OK

Successful requests will return a 200 OK status and a response body similar to the following:

{
"success": true
}
FieldTypeDescription
successbooleanIndicates recipients have been added successfully
400 Bad Request
{
"detail": "<errorReason>",
"status": 400
}
IssueError detail
Invalid UUID formatBad Request: scheduleId: Invalid uuid
Missing recipientsBad Request: recipients: recipients is required
Invalid recipient IDsBad Request: recipients: All recipient IDs must be valid UUIDs
Invalid membersInvalid recipient(s): The following members do not exist or do not have access to this organization: {userId}
Unsupported destinationCannot add recipients to destination type {destinationType}
404 Not Found
{
"detail": "<errorReason>",
"status": 404
}
IssueError detail
Schedule not foundScheduled task with id {scheduleId} does not exist
429 Too Many Requests

Results from too many requests in a given time frame. Refer to the Rate limiting documentation for more information.