Update a task
PATCH/api/promptly/tasks/{taskId}
Update an existing task
Path Parameters
taskId: string
formatuuid
Body Parameters
deliveryEmail: optional boolean
deliveryEmailAddress: optional string
formatemail
deliveryPhoneNumber: optional string
deliverySms: optional boolean
model: optional string
name: optional string
prompt: optional string
scheduleTime: optional string
skillIds: optional array of string
Replace all attached skills with these IDs
sourceIds: optional array of string
Replace all attached sources with these IDs
timezone: optional string
Returns
Update a task
curl https://0ct.com/api/promptly/tasks/$TASK_ID \
-X PATCH \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $0CT_API_KEY" \
-d '{}'{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"createdAt": "2019-12-27T18:11:19.117Z",
"model": "model",
"name": "name",
"prompt": "prompt",
"schedule": "once",
"status": "active",
"cronExpression": "cronExpression",
"deliveryEmail": true,
"deliveryEmailAddress": "dev@stainless.com",
"deliveryPhoneNumber": "deliveryPhoneNumber",
"deliverySms": true,
"destinations": [
{
"type": "email",
"value": "value",
"label": "label"
}
],
"lastRunAt": "2019-12-27T18:11:19.117Z",
"nextRunAt": "2019-12-27T18:11:19.117Z",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"scheduleDays": [
"monday"
],
"scheduleTime": "06:56",
"skillIds": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"skills": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"content": "content",
"name": "name",
"category": "category",
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"frontmatter": {
"author": "author",
"requiredSources": [
"string"
],
"tags": [
"string"
]
},
"iconUrl": "https://example.com",
"isPublic": true,
"isUserInvocable": true,
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"updatedAt": "2019-12-27T18:11:19.117Z",
"version": 0
}
],
"sourceIds": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"sources": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"config": {
"args": [
"string"
],
"baseUrl": "https://example.com",
"command": "command",
"env": {
"foo": "string"
},
"transport": "stdio",
"url": "https://example.com"
},
"name": "name",
"type": "mcp",
"authConfig": {
"headerName": "headerName",
"prefix": "prefix",
"provider": "provider"
},
"authType": "none",
"composioConnected": true,
"composioToolkit": "composioToolkit",
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"iconUrl": "https://example.com",
"isActive": true,
"lastConnectedAt": "2019-12-27T18:11:19.117Z",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"tools": [
{
"description": "description",
"inputSchema": {},
"name": "name"
}
],
"updatedAt": "2019-12-27T18:11:19.117Z"
}
],
"timezone": "timezone",
"updatedAt": "2019-12-27T18:11:19.117Z",
"userId": "userId"
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"createdAt": "2019-12-27T18:11:19.117Z",
"model": "model",
"name": "name",
"prompt": "prompt",
"schedule": "once",
"status": "active",
"cronExpression": "cronExpression",
"deliveryEmail": true,
"deliveryEmailAddress": "dev@stainless.com",
"deliveryPhoneNumber": "deliveryPhoneNumber",
"deliverySms": true,
"destinations": [
{
"type": "email",
"value": "value",
"label": "label"
}
],
"lastRunAt": "2019-12-27T18:11:19.117Z",
"nextRunAt": "2019-12-27T18:11:19.117Z",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"scheduleDays": [
"monday"
],
"scheduleTime": "06:56",
"skillIds": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"skills": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"content": "content",
"name": "name",
"category": "category",
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"frontmatter": {
"author": "author",
"requiredSources": [
"string"
],
"tags": [
"string"
]
},
"iconUrl": "https://example.com",
"isPublic": true,
"isUserInvocable": true,
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"updatedAt": "2019-12-27T18:11:19.117Z",
"version": 0
}
],
"sourceIds": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"sources": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"config": {
"args": [
"string"
],
"baseUrl": "https://example.com",
"command": "command",
"env": {
"foo": "string"
},
"transport": "stdio",
"url": "https://example.com"
},
"name": "name",
"type": "mcp",
"authConfig": {
"headerName": "headerName",
"prefix": "prefix",
"provider": "provider"
},
"authType": "none",
"composioConnected": true,
"composioToolkit": "composioToolkit",
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"iconUrl": "https://example.com",
"isActive": true,
"lastConnectedAt": "2019-12-27T18:11:19.117Z",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"tools": [
{
"description": "description",
"inputSchema": {},
"name": "name"
}
],
"updatedAt": "2019-12-27T18:11:19.117Z"
}
],
"timezone": "timezone",
"updatedAt": "2019-12-27T18:11:19.117Z",
"userId": "userId"
}