Skip to main content
PUT
/
v1
/
automations
/
{id}
Update automation
curl --request PUT \
  --url https://api.shingleai.com/v1/automations/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Auto-reply to inquiries",
  "description": "Sends an auto-reply to new inquiries",
  "triggerEvent": "message.received",
  "cronExpression": "0 9 * * MON-FRI",
  "condition": {},
  "instructions": "Reply to the sender thanking them for their inquiry and let them know we will respond within 24 hours.",
  "enabled": true,
  "groupId": "123e4567-e89b-12d3-a456-426614174000",
  "groupName": "Customer Support",
  "groupMetadata": {
    "purpose": "<string>",
    "createdBy": "<string>",
    "aiTaskId": "<string>",
    "tags": [
      "<string>"
    ]
  },
  "maxExecutions": 100,
  "currentExecutions": 0,
  "expiresAt": "2025-12-31T23:59:59Z",
  "status": "active"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z",
    "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "description": "<string>",
    "triggerEvent": "<string>",
    "cronExpression": "<string>",
    "condition": {},
    "instructions": "<string>",
    "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "enabled": true,
    "permissions": {},
    "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "groupName": "<string>",
    "groupMetadata": {},
    "maxExecutions": 123,
    "currentExecutions": 123,
    "expiresAt": "2023-11-07T05:31:56Z",
    "status": "active"
  },
  "meta": {
    "pagination": {
      "limit": 123,
      "offset": 123,
      "hasMore": true,
      "total": 123
    }
  }
}

Authorizations

Authorization
string
header
required

API key authentication via Bearer token

Path Parameters

id
string<uuid>
required

Automation UUID

Example:

"123e4567-e89b-12d3-a456-426614174000"

Body

application/json
name
string
Example:

"Auto-reply to inquiries"

description
string
Example:

"Sends an auto-reply to new inquiries"

triggerEvent
string
Example:

"message.received"

cronExpression
string
Example:

"0 9 * * MON-FRI"

condition
object
instructions
string
Example:

"Reply to the sender thanking them for their inquiry and let them know we will respond within 24 hours."

enabled
boolean
Example:

true

groupId
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

groupName
string
Example:

"Customer Support"

groupMetadata
object
maxExecutions
integer
Example:

100

currentExecutions
integer
Required range: x >= 0
Example:

0

expiresAt
string<date-time>
Example:

"2025-12-31T23:59:59Z"

status
enum<string>
Available options:
active,
paused,
completed,
expired
Example:

"active"

Response

Automation updated successfully

data
object
required
meta
object