Skip to main content
PATCH
Update a scheduled task
Updates one scheduled task owned by this workspace API key. Send at least one field. The response does not include runCount. Omitted fields stay as they are. The schedule is checked after your fields are merged with the stored clock. Changing only frequency can reuse the stored timeOfDay. A merged clock that is incomplete returns 400. Sending attachmentIds replaces the attachment list. Omitting attachmentIds leaves attachments unchanged. Sending a tag array replaces that array. An empty array clears it. Inaccessible tagged ids and slugs are dropped.

Base URL

Dedicated deploymentsReplace api.langdock.com with <your-deployment-url>/api/public in all requests.

Required scopes

This endpoint requires the AUTOMATION_API scope (Scheduled Tasks API) on a workspace API key.

Parameters

Unknown body fields are rejected. An invalid body returns 400 with message Invalid request and an errors array. An empty body returns 400 with message At least one field must be provided. A merged schedule that is still incomplete returns 400 with message automation_time_of_day_required, automation_day_of_week_required, automation_day_of_month_required, or automation_days_of_week_required.

Example

Response format

Success response (200 OK)

automation matches the scheduled task object without runCount.

Error handling

Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

Authorizations

Authorization
string
header
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Path Parameters

automationId
string<uuid>
required

Body

application/json
name
string
Required string length: 1 - 200
prompt
string
Required string length: 1 - 120000
frequency
enum<string>
Available options:
MANUAL,
DAILY,
WEEKDAYS,
WEEKLY,
MONTHLY,
SELECTED_WEEKDAYS
timeOfDay
string | null

24 hour HH:mm. Omitted keeps the stored value.

dayOfWeek
integer | null

0 is Sunday and 6 is Saturday. Omitted keeps the stored value.

Required range: 0 <= x <= 6
dayOfMonth
integer | null

Omitted keeps the stored value.

Required range: 1 <= x <= 31
daysOfWeek
integer[]

Omitted keeps the stored value.

Maximum array length: 7
Required range: 0 <= x <= 6
timezone
string | null

IANA timezone. Omitted keeps the stored value. Empty is stored as UTC on a scheduled frequency.

Maximum string length: 64
modelMode
enum<string>
Available options:
UNSET,
EXPLICIT,
AUTO
modelId
string<uuid> | null

Required in this request when modelMode is EXPLICIT.

assistantId
string<uuid> | null
taggedAssistantId
string<uuid> | null
taggedIntegrationIds
string<uuid>[]
Maximum array length: 20
taggedKnowledgeFolderIds
string<uuid>[]
Maximum array length: 20
taggedWorkflowIds
string<uuid>[]
Maximum array length: 20
taggedSkillSlugs
string[]
Maximum array length: 20
Maximum string length: 100
attachmentIds
string<uuid>[]
Maximum array length: 20

Response

Scheduled task updated. The automation object does not include runCount.