Skip to main content
PATCH
/
v2
/
workspaces
/
{workspaceId}
/
automations
/
{automationSlug}
Update Automation
curl --request PATCH \
  --url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/automations/{automationSlug} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": {
    "en": "Send welcome email",
    "fr": "Envoyer email de bienvenue"
  },
  "do": [
    {
      "set": {
        "name": "user.welcomed",
        "value": true
      }
    },
    {
      "emit": {
        "event": "user.welcomed",
        "payload": {
          "userId": "{{userId}}"
        }
      }
    }
  ]
}
'
{
  "slug": "send-welcome-email",
  "name": {
    "en": "Send welcome email",
    "fr": "Envoyer email de bienvenue"
  },
  "description": {
    "en": "Sends a welcome email when a user signs up"
  },
  "arguments": {
    "userId": {
      "type": "string"
    }
  },
  "do": [
    {
      "set": {
        "name": "user.welcomed",
        "value": true
      }
    },
    {
      "emit": {
        "event": "user.welcomed",
        "payload": {
          "userId": "{{userId}}"
        }
      }
    }
  ],
  "output": "{{result}}"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required

Workspace id

automationSlug
string
required

Automation slug

Body

application/json
name
required
Example:
{ "fr": "Bonjour", "en": "Hello" }
do
object[]
required
Example:
[
{
"set": { "name": "user.welcomed", "value": true }
},
{
"emit": {
"event": "user.welcomed",
"payload": { "userId": "{{userId}}" }
}
}
]
description
Example:
{ "fr": "Bonjour", "en": "Hello" }
private
boolean

Set this to true if you don't want your automation to be accessible outside of your app. Default is false.

Example:

false

disabled
boolean

Set this to true if you want to turn off this automation.

Example:

true

slug
string

Unique & human readable id across current workspace's automations

arguments
object
validateArguments
boolean
when
object
labels
string[]
Pattern: ^[0-9A-Za-z._:-]{2,60}$
events
object
updatedAt
string
createdAt
string
updatedBy
string
createdBy
string
checksum
string
output
any

Automation result expression. Might be a variable reference, an object/array with variables inside ...

Example:

"{{result}}"

authorizations
object

Response

Success Response

name
required
Example:
{ "fr": "Bonjour", "en": "Hello" }
do
object[]
required
Example:
[
{
"set": { "name": "user.welcomed", "value": true }
},
{
"emit": {
"event": "user.welcomed",
"payload": { "userId": "{{userId}}" }
}
}
]
description
Example:
{ "fr": "Bonjour", "en": "Hello" }
private
boolean

Set this to true if you don't want your automation to be accessible outside of your app. Default is false.

Example:

false

disabled
boolean

Set this to true if you want to turn off this automation.

Example:

true

slug
string

Unique & human readable id across current workspace's automations

arguments
object
validateArguments
boolean
when
object
labels
string[]
Pattern: ^[0-9A-Za-z._:-]{2,60}$
events
object
updatedAt
string
createdAt
string
updatedBy
string
createdBy
string
checksum
string
output
any

Automation result expression. Might be a variable reference, an object/array with variables inside ...

Example:

"{{result}}"

authorizations
object