Update Automation
Update Automation
Body (JSON):
{
"name": "Updated Marketing Analysis",
"description": "Enhanced automation with schedule and new assistant type",
"isActive": true,
"runType": "schedule",
"schedule": {
"timePeriod": "last7days",
"repeatAt": "09:30"
},
"trigger": {
"type": "folders",
"folderIds": ["folder123", "folder456"]
},
"action": {
"type": "magic-prompt",
"magicPrompt": {
"title": "Weekly Marketing Report",
"assistantType": "marketer",
"prompt": "Analyze marketing data and provide insights, trends, and recommendations",
"assistantTemplateId": "marketing-template-001"
}
},
"fieldId": "marketing-field-123"
}
Key Points:
• Path Parameter Required: automationId must be included in the URL path • Partial Updates Supported: You can update only specific fields, not all fields are required • Run Type Changes: When changing to "schedule", include the schedule object with timePeriod and repeatAt • Trigger & Action Required: Both trigger and action objects appear to be required in the request body • Assistant Type: The assistantType is for custom Assistant selected • Status Control: Use isActive: true/false to enable or disable the automation • Optional Fields: fieldId is optional and only used with magic-prompt actions • Schedule Time Periods: Available options - "today", "yesterday", "last7days", "last14days", "thisWeek" • Action Types: Support for "magic-prompt" and "translation" action types • Trigger Types: Support for "folders", "tags", and "keywords" trigger types • Assistant Types: Available options - "researcher", "marketer", "sales", "general", "recruiter", "custom"
Request rules. The same rules as creating an automation. schedule is required only when runType is schedule, and then both schedule.timePeriod and schedule.repeatAt are required. Each step's config object has to match that step's stepType.
Request
- Base URL: https://api.speakai.co/v1
- URL: https://api.speakai.co/v1/automations/{automationId}
- Auth: API key in header x-speakai-key and API key in header x-access-token
Path parameters
Request body
Response
Success
Changes
No recorded changes to this operation across all 2 revisions of this API.