POST
/
businesses
/
{id}
/
triggers
curl --request POST \
  --url https://api.pocketflows.com/businesses/{id}/triggers \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "trigger": "<string>",
  "filter": "<string>",
  "metadata": {},
  "steps": [
    {
      "type": "email",
      "custom_step_id": "<string>",
      "email_template_id": "<string>"
    }
  ],
  "email_address": "<string>",
  "phone_number": "<string>"
}'
{
  "id": "<string>",
  "name": "<string>",
  "trigger": "<string>",
  "steps": [
    {
      "type": "email",
      "custom_step_id": "<string>",
      "email_template_id": "<string>"
    }
  ],
  "status": "draft",
  "filter": "<string>",
  "email_address": "<string>",
  "phone_number": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

The ID of the business

Body

application/json

Response

200 - application/json

The created Trigger object

The response is of type object.