API
Scheduled tasks
Create scheduled tasks, which start a recurring mission from a stored prompt and a schedule.
GET
projectId?stringOnly the scheduled tasks of this project. A project that the caller cannot reach gives an empty list.
Length
1 <= lengthScheduled tasks
application/json- response
data*array<>nextCursor*string|nullcurl -X GET 'https://api.letsship.ai/v1/scheduled-tasks'Example Response
{ "data": [ { "createdByUserId": "string", "id": "string", "orgId": "string", "projectId": "string", "name": "string", "prompt": "string", "templateKey": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ], "labels": [ "string" ], "skipIfPreviousOpen": true, "enabled": true, "nextRunAt": 0, "lastRunAt": 0, "createdAt": 0, "updatedAt": 0 } ], "nextCursor": "string"}POST
application/json- body
projectId*stringLength
1 <= lengthname*stringLength
1 <= length <= 120prompt*stringLength
1 <= length <= 20000triggers*array<>Items
1 <= items <= 1labels?array<>Items
items <= 10templateKey?stringLength
1 <= length <= 120skipIfPreviousOpen?booleanenabled?booleanCreated
application/json- response
createdByUserId?string|nullid*stringorgId*stringprojectId*stringname*stringprompt*stringtemplateKey*string|nulltriggers*array<>labels*array<>Items
items <= 10skipIfPreviousOpen*booleanenabled*booleannextRunAt*integer|nulllastRunAt*integer|nullcreatedAt*integerupdatedAt*integercurl -X POST 'https://api.letsship.ai/v1/scheduled-tasks' \ -H 'Content-Type: application/json' \ -d '{ "projectId": "string", "name": "string", "prompt": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string" } } ]}'Example Response
{ "createdByUserId": "string", "id": "string", "orgId": "string", "projectId": "string", "name": "string", "prompt": "string", "templateKey": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ], "labels": [ "string" ], "skipIfPreviousOpen": true, "enabled": true, "nextRunAt": 0, "lastRunAt": 0, "createdAt": 0, "updatedAt": 0}GET
Templates
application/json- response
data*array<>curl -X GET 'https://api.letsship.ai/v1/scheduled-tasks/templates'Example Response200
{ "data": [ { "key": "string", "name": "string", "blurb": "string", "prompt": "string", "suggestedSchedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ]}GET
scheduledTaskId*stringLength
1 <= lengthScheduled task
application/json- response
createdByUserId?string|nullid*stringorgId*stringprojectId*stringname*stringprompt*stringtemplateKey*string|nulltriggers*array<>labels*array<>Items
items <= 10skipIfPreviousOpen*booleanenabled*booleannextRunAt*integer|nulllastRunAt*integer|nullcreatedAt*integerupdatedAt*integercurl -X GET 'https://api.letsship.ai/v1/scheduled-tasks/string'Example Response
{ "createdByUserId": "string", "id": "string", "orgId": "string", "projectId": "string", "name": "string", "prompt": "string", "templateKey": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ], "labels": [ "string" ], "skipIfPreviousOpen": true, "enabled": true, "nextRunAt": 0, "lastRunAt": 0, "createdAt": 0, "updatedAt": 0}PATCH
scheduledTaskId*stringLength
1 <= lengthapplication/json- body
name?stringLength
1 <= length <= 120prompt?stringLength
1 <= length <= 20000triggers?array<>Items
1 <= items <= 1labels?array<>Items
items <= 10skipIfPreviousOpen?booleanenabled?booleanUpdated
application/json- response
createdByUserId?string|nullid*stringorgId*stringprojectId*stringname*stringprompt*stringtemplateKey*string|nulltriggers*array<>labels*array<>Items
items <= 10skipIfPreviousOpen*booleanenabled*booleannextRunAt*integer|nulllastRunAt*integer|nullcreatedAt*integerupdatedAt*integercurl -X PATCH 'https://api.letsship.ai/v1/scheduled-tasks/string' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "createdByUserId": "string", "id": "string", "orgId": "string", "projectId": "string", "name": "string", "prompt": "string", "templateKey": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ], "labels": [ "string" ], "skipIfPreviousOpen": true, "enabled": true, "nextRunAt": 0, "lastRunAt": 0, "createdAt": 0, "updatedAt": 0}DELETE
scheduledTaskId*stringLength
1 <= lengthDeleted
application/json- response
ok*booleanid*stringcurl -X DELETE 'https://api.letsship.ai/v1/scheduled-tasks/string'Example Response
{ "ok": true, "id": "string"}GET
scheduledTaskId*stringLength
1 <= lengthlimit?integerRuns on one page, 1 to 200 (default 50).
Range
1 <= value <= 200Default
50cursor?stringnextCursor from the previous page. Leave it out for the newest runs.
Length
1 <= lengthRuns
application/json- response
data*array<>nextCursor*string|nullcurl -X GET 'https://api.letsship.ai/v1/scheduled-tasks/string/runs'Example Response
{ "data": [ { "billingActorUserId": "string", "id": "string", "scheduledTaskId": "string", "projectId": "string", "scheduledFor": 0, "kind": "scheduled", "status": "dispatching", "issueId": "string", "issueUrl": "string", "reason": "string", "lastError": "string", "createdAt": 0, "updatedAt": 0, "missionProgress": "string", "missionActivity": "string", "missionCostUsd": 0, "missionCostIncomplete": true, "missionTitle": "string" } ], "nextCursor": "string"}POST
scheduledTaskId*stringLength
1 <= lengthDispatched
application/json- response
ok*booleanrunId*stringissueId*string|nullstatus*ScheduledTaskRunStatusValue in
"dispatching""dispatched""skipped""failed"curl -X POST 'https://api.letsship.ai/v1/scheduled-tasks/string/run'Example Response
{ "ok": true, "runId": "string", "issueId": "string", "status": "dispatching"}How is this page?