Update an automation's status
POST
/api/v3/automations/{automationUniqueId}/actions/update-status
const url = 'https://api.tryletterhead.com/api/v3/automations/example/actions/update-status';const form = new FormData();form.append('api', 'true');form.append('status', '2');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tryletterhead.com/api/v3/automations/example/actions/update-status \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form api=true \ --form status=2Set an automation to draft, paused, or running. This is the same status change the
Letterhead app makes when you pause or activate an automation from the automations list โ you
cannot set an automation directly to processing or error, since those are states the system
derives on its own.
v3 endpoints expect a company API key.
Authorizations
Section titled โAuthorizations โParameters
Section titled โ Parameters โPath Parameters
Section titled โPath Parameters โ automationUniqueId
required
string
The automationโs unique identifier.
Request Body required
Section titled โRequest Body required โ Media type multipart/form-data
object
api
required
When set to true, this endpoint will accept authorization with your API Key.
string
Example
true status
required
The new status: 0=draft, 1=running, 2=paused.
integer
Example
2Responses
Section titled โ Responses โ202 Accepted
Media type application/json
object
items
string
message
string
total
integer
Example
{ "items": null, "message": "Automation status has been updated", "total": 0}Still can’t find what you need? Contact support.