POST
/
triggers
/
{id}
/
deactivate
Deactivate a trigger
curl --request POST \
  --url https://api.pocketflows.com/triggers/{id}/deactivate \
  --header 'Authorization: Basic <encoded-value>'
{
  "id": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "name": "<string>",
  "project_defined_event": "<string>",
  "internal_event_definition": {
    "type": "customer_created",
    "segment": "<string>"
  },
  "trigger": "<string>",
  "steps": [
    {
      "type": "email",
      "custom_step_id": "<string>",
      "email_template_id": "<string>"
    }
  ],
  "status": "draft",
  "filter": "<string>",
  "email_address": "<string>",
  "phone_number": "<string>",
  "attributed_revenue": 123,
  "statistics": {
    "total_customers_enrolled": 123,
    "total_customers_started": 123,
    "total_customers_finished": 123,
    "emails": {
      "sent": 123,
      "delivered": 123,
      "opened": 123,
      "soft_bounced": 123,
      "hard_bounced": 123,
      "clicked": 123
    },
    "custom_steps": [
      {
        "custom_step": "<string>",
        "sent": 123
      }
    ]
  }
}

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 trigger

Response

200 - application/json

A Trigger object

id
string
required

The ID of the trigger

created_at
string
required

The time when the trigger was created in ISO 8601 format

updated_at
string
required

The time when the trigger was last updated in ISO 8601 format

name
string
required

The name of the trigger

project_defined_event
string | null
required

The ID of the project-defined event that triggers the trigger

internal_event_definition
object
required

The internal event definition that triggers the trigger

steps
object[]
required

The steps of the trigger

status
enum<string>
required

The status of the trigger. One of "draft", "active", or "inactive"

Available options:
draft,
active,
inactive
filter
string | null
required

An additional filter that determines if the trigger should be run

email_address
string | null
required

The ID of the email address or project email address associated with the trigger. Will be used to send emails as part of this trigger

phone_number
string | null
required

The ID of the phone number or project phone number associated with the trigger. Will be used to send SMS messages as part of this trigger

attributed_revenue
number | null
required

The revenue attributed to the trigger

statistics
object
required

The statistics of the trigger. Includes information about customers enrolled, email statistics, and custom step statistics

trigger
string | null

Deprecated. Will always be null