curl --request PATCH \
--url https://api.embedreach.com/api/automations/{id} \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"trigger": {
"triggerType": "one_time",
"scheduledAt": "<string>",
"timezone": "<string>"
},
"includeSegments": [
"<string>"
],
"excludeSegments": [
"<string>"
],
"action": [
{
"actionType": "send_communication",
"actionMetadata": {
"currentActionId": "<string>",
"nextActionId": "<string>",
"actionType": "send_communication",
"communicationGroupId": "<string>"
}
}
],
"status": "draft"
}'
{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"triggerMetadata": {
"triggerType": "one_time",
"scheduledAt": "<string>",
"timezone": "<string>"
},
"triggerType": "one_time",
"actionData": [
{
"actionType": "send_communication",
"actionMetadata": {
"currentActionId": "<string>",
"nextActionId": "<string>",
"actionType": "send_communication",
"communicationGroupId": "<string>"
}
}
],
"status": "draft",
"businessId": "<string>"
}
}
Update a tenant automation
curl --request PATCH \
--url https://api.embedreach.com/api/automations/{id} \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"trigger": {
"triggerType": "one_time",
"scheduledAt": "<string>",
"timezone": "<string>"
},
"includeSegments": [
"<string>"
],
"excludeSegments": [
"<string>"
],
"action": [
{
"actionType": "send_communication",
"actionMetadata": {
"currentActionId": "<string>",
"nextActionId": "<string>",
"actionType": "send_communication",
"communicationGroupId": "<string>"
}
}
],
"status": "draft"
}'
{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"triggerMetadata": {
"triggerType": "one_time",
"scheduledAt": "<string>",
"timezone": "<string>"
},
"triggerType": "one_time",
"actionData": [
{
"actionType": "send_communication",
"actionMetadata": {
"currentActionId": "<string>",
"nextActionId": "<string>",
"actionType": "send_communication",
"communicationGroupId": "<string>"
}
}
],
"status": "draft",
"businessId": "<string>"
}
}
If using a platform scoped JWT, you can pass in a header to impersonate a specific tenant to impersonate the request as.
Status 200 response
The response is of type object
.