DEVELOPER DOCUMENTATION

Connect Automyc to your tools.

Publish to connected social accounts, send and reply to emails, control campaigns, and manage the resources behind your Automyc workflows.

Quick start

  1. Connect your email and social accounts in Automyc using the provider’s OAuth screens.
  2. Create a key in Settings → Platform API. Select only the scopes your integration needs. The secret appears once.
  3. Store the secret on your server. Discover available operations and account IDs before sending.
export AUTOMYC_API_KEY='gml_live_replace_with_your_key'
curl 'https://api.automyc.com/api/platform-api/v1/capabilities' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY"

The key fixes the workspace. X-Organization-ID cannot switch it. The key owner must remain an active member, and their current app permissions and subscription limits still apply. Existing dataset keys keep their original permissions; create a key with additional scopes when needed.

datasets:read

Datasets, fields, records, imports and exports

datasets:write

Datasets, fields, records, imports and exports

accounts:read

Account settings and sync; connect using OAuth in Automyc

accounts:write

Account settings and sync; connect using OAuth in Automyc

social:read

Posts, drafts, scheduling, media and publishing

social:write

Posts, drafts, scheduling, media and publishing

social:publish

Posts, drafts, scheduling, media and publishing

email:read

Email threads, inbox, schedules, sending and replies

email:write

Email threads, inbox, schedules, sending and replies

email:send

Email threads, inbox, schedules, sending and replies

campaigns:read

Campaigns, recipients, schedules and lifecycle controls

campaigns:write

Campaigns, recipients, schedules and lifecycle controls

templates:read

Reusable email templates and follow-ups

templates:write

Reusable email templates and follow-ups

media:read

Upload and retrieve email attachments

media:write

Upload and retrieve email attachments

brand:read

Workspace brand and knowledge settings

brand:write

Workspace brand and knowledge settings

inbox:read

Comments, WhatsApp replies, labels, assignment and notes

inbox:write

Comments, WhatsApp replies, labels, assignment and notes

automations:read

Rules, activation, testing and execution history

automations:write

Rules, activation, testing and execution history

analytics:read

Social performance and provider insights

audit:read

Request receipts without bodies, keys or provider tokens

Working request examples

Replace example IDs with IDs returned by your account and resource lists. Media URLs must be accessible to the provider. Generate a new idempotency key for each new action; reuse it only when retrying that same action.

Discover connected social accounts accounts:read

curl -X GET 'https://api.automyc.com/api/platform-api/v1/social/accounts' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY"

Publish an Instagram or Facebook post social:publish

curl -X POST 'https://api.automyc.com/api/platform-api/v1/social/posts?publish_now=true' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-1' \
  -H 'Content-Type: application/json' \
  --data '{
  "caption": "A new chapter for our brand.",
  "media_urls_json": [
    "https://your-cdn.example.com/photo.jpg"
  ],
  "post_type": "post",
  "social_account_ids": [
    42
  ]
}'

Upload a YouTube video social:publish

curl -X POST 'https://api.automyc.com/api/platform-api/v1/social/posts?publish_now=true' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-2' \
  -H 'Content-Type: application/json' \
  --data '{
  "title": "Our product walkthrough",
  "caption": "A tour of our latest release.",
  "media_urls_json": [
    "https://your-cdn.example.com/walkthrough.mp4"
  ],
  "post_type": "video",
  "social_account_ids": [
    43
  ],
  "platform_options_json": {
    "youtube": {
      "privacy_status": "private",
      "made_for_kids": false
    }
  }
}'

Schedule a social post social:publish

curl -X POST 'https://api.automyc.com/api/platform-api/v1/social/posts?publish_now=false' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-3' \
  -H 'Content-Type: application/json' \
  --data '{
  "caption": "Scheduled update",
  "media_urls_json": [
    "https://your-cdn.example.com/photo.jpg"
  ],
  "post_type": "post",
  "social_account_ids": [
    42
  ],
  "scheduled_at": "2026-12-01T09:00:00+11:00"
}'

Send an email email:send

curl -X POST 'https://api.automyc.com/api/platform-api/v1/email/send' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-4' \
  -H 'Content-Type: application/json' \
  --data '{
  "account_id": 12,
  "to": "jane@example.com",
  "subject": "Hello Jane",
  "body": "<p>Hello from Automyc!</p>"
}'

Reply to an email thread email:send

curl -X POST 'https://api.automyc.com/api/platform-api/v1/email/reply/91' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-5' \
  -H 'Content-Type: application/json' \
  --data '{
  "body": "<p>Thanks for your reply. Here are the details.</p>"
}'

Create an email campaign draft campaigns:write

curl -X POST 'https://api.automyc.com/api/platform-api/v1/campaigns' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-6' \
  -H 'Content-Type: application/json' \
  --data '{
  "name": "Product launch",
  "dataset_id": 8,
  "channel": "email",
  "flow_type": "template",
  "subject": "Meet our new release",
  "body": "<p>Here is what is new.</p>",
  "connected_account_ids": [
    12
  ],
  "emails_per_day": 50,
  "status": "draft"
}'

Start a campaign campaigns:write

curl -X POST 'https://api.automyc.com/api/platform-api/v1/campaigns/17/start' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-7' \
  -H 'Content-Type: application/json'

Pause a campaign campaigns:write

curl -X POST 'https://api.automyc.com/api/platform-api/v1/campaigns/17/pause' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-8' \
  -H 'Content-Type: application/json'

Resume a campaign campaigns:write

curl -X POST 'https://api.automyc.com/api/platform-api/v1/campaigns/17/resume' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-9' \
  -H 'Content-Type: application/json'

Stop and cancel a campaign campaigns:write

curl -X POST 'https://api.automyc.com/api/platform-api/v1/campaigns/17/stop' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-unique-action-id-10' \
  -H 'Content-Type: application/json'

Server-side JavaScript client

// Run on your server; keep the key in an environment variable.
const api = 'https://api.automyc.com/api/platform-api/v1';
async function automyc(path, method = 'GET', body, actionId) {
  const response = await fetch(api + path, {
    method,
    headers: {
      Authorization: 'Bearer ' + process.env.AUTOMYC_API_KEY,
      ...(method !== 'GET' ? {
        'Content-Type': 'application/json',
        'Idempotency-Key': actionId,
      } : {}),
    },
    ...(body ? { body: JSON.stringify(body) } : {}),
  });
  const result = await response.json();
  if (!response.ok) throw new Error(JSON.stringify(result.detail));
  return result;
}

// Keep this action ID if you need to retry the same request.
const actionId = crypto.randomUUID();
const post = await automyc('/social/posts', 'POST', {
  caption: 'Our latest release', post_type: 'post',
  media_urls_json: ['https://your-cdn.example.com/photo.jpg'],
  social_account_ids: [42],
}, actionId);

// Inspect provider status after the publishing worker processes it.
const current = await automyc('/social/posts/' + post.id);
console.log(current.status, current.channels);

Upload media

curl -X POST 'https://api.automyc.com/api/platform-api/v1/social/posts/upload-media' \
  -H "Authorization: Bearer $AUTOMYC_API_KEY" \
  -F 'file=@./photo.jpg'

# Use the returned media URL in media_urls_json.
# Requires social:write for social media uploads.
# Email attachments: POST /attachments/upload (media:write), then use attachment_ids.

Uploads use multipart/form-data and do not use idempotency receipts. JSON mutations require the Idempotency-Key header. A post response means the operation was accepted: poll GET /social/posts/{post_id} and inspect each channel’s status, external_post_url, and error_message. Scheduled emails and campaigns require the existing Celery worker and scheduler.

Instagram requires an eligible professional account and publishing permissions. Facebook publishes to connected Pages. YouTube accepts video and requires a title; unverified projects may restrict uploads to private visibility. TikTok requires approved publishing permissions, current creator settings, explicit consent and verified media domains where applicable. Supply the same platform_options_json choices collected by Automyc’s composer. YouTube requirements · TikTok requirements

Pause preserves a campaign for resume. Stop marks it deleted and cancels pending work; messages already delivered cannot be recalled. A draft start may return initializing while background preparation runs. Poll GET /campaigns/{campaign_id}.

Endpoint reference

142 operations generated from the backend contract. Expand an endpoint for parameters, request fields and response schemas. Pagination and filters are listed per endpoint; some resources return arrays and others return paginated objects.

142 matching operations

POST/datasetsdatasets:write

Create dataset

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "dataset_name (required)": {
    "type": "string"
  },
  "dataset_status": {
    "type": "string",
    "default": "active"
  },
  "audience_type": {
    "type": "string",
    "default": "email"
  },
  "organization_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "dataset_name (required)": {
          "type": "string"
        },
        "dataset_status": {
          "type": "string",
          "default": "active"
        },
        "audience_type": {
          "type": "string",
          "default": "email"
        },
        "id (required)": {
          "type": "integer"
        },
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "fields": [
          {
            "field_key (required)": {
              "type": "string"
            },
            "field_name (required)": {
              "type": "string"
            },
            "field_type (required)": {
              "type": "string"
            },
            "is_required": {
              "type": "boolean",
              "default": false
            },
            "id (required)": {
              "type": "integer"
            },
            "dataset_id (required)": {
              "type": "integer"
            }
          }
        ],
        "records": [
          {
            "id (required)": {
              "type": "integer"
            },
            "dataset_id (required)": {
              "type": "integer"
            },
            "created_at (required)": {
              "type": "string"
            },
            "values (required)": [
              {
                "dataset_field_id (required)": "integer",
                "value": "object",
                "id (required)": "integer",
                "dataset_record_id (required)": "integer",
                "field (required)": "object"
              }
            ]
          }
        ],
        "record_count": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "owner_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/datasets/{dataset_id}datasets:read

Get dataset

Required platform scope: `datasets:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "dataset_name (required)": {
          "type": "string"
        },
        "dataset_status": {
          "type": "string",
          "default": "active"
        },
        "audience_type": {
          "type": "string",
          "default": "email"
        },
        "id (required)": {
          "type": "integer"
        },
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "fields": [
          {
            "field_key (required)": {
              "type": "string"
            },
            "field_name (required)": {
              "type": "string"
            },
            "field_type (required)": {
              "type": "string"
            },
            "is_required": {
              "type": "boolean",
              "default": false
            },
            "id (required)": {
              "type": "integer"
            },
            "dataset_id (required)": {
              "type": "integer"
            }
          }
        ],
        "records": [
          {
            "id (required)": {
              "type": "integer"
            },
            "dataset_id (required)": {
              "type": "integer"
            },
            "created_at (required)": {
              "type": "string"
            },
            "values (required)": [
              {
                "dataset_field_id (required)": "integer",
                "value": "object",
                "id (required)": "integer",
                "dataset_record_id (required)": "integer",
                "field (required)": "object"
              }
            ]
          }
        ],
        "record_count": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "owner_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/datasetsdatasets:read

List datasets

Required platform scope: `datasets:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "page",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 1,
      "title": "Page"
    }
  },
  {
    "name": "size",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 20,
      "title": "Size"
    }
  },
  {
    "name": "organization_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Organization Id"
    }
  },
  {
    "name": "has_records",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Has Records"
    }
  },
  {
    "name": "all_members",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "All Members"
    }
  },
  {
    "name": "search",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Search"
    }
  },
  {
    "name": "audience_type",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Audience Type"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "items (required)": [
          {
            "dataset_name (required)": {
              "type": "string"
            },
            "dataset_status": {
              "type": "string",
              "default": "active"
            },
            "audience_type": {
              "type": "string",
              "default": "email"
            },
            "id (required)": {
              "type": "integer"
            },
            "user_id (required)": {
              "type": "integer"
            },
            "organization_id (required)": {
              "type": "integer"
            },
            "created_at (required)": {
              "type": "string"
            },
            "fields": [
              {
                "field_key (required)": "string",
                "field_name (required)": "string",
                "field_type (required)": "string",
                "is_required": "boolean",
                "id (required)": "integer",
                "dataset_id (required)": "integer"
              }
            ],
            "record_count": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "owner_name": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        ],
        "total (required)": {
          "type": "integer"
        },
        "page (required)": {
          "type": "integer"
        },
        "size (required)": {
          "type": "integer"
        }
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/datasets/{dataset_id}/bulk-fieldsdatasets:write

Bulk add dataset fields

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

[
  {
    "field_key (required)": {
      "type": "string"
    },
    "field_name (required)": {
      "type": "string"
    },
    "field_type (required)": {
      "type": "string"
    },
    "is_required": {
      "type": "boolean",
      "default": false
    }
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/datasets/{dataset_id}/fieldsdatasets:write

Add dataset field

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "field_key (required)": {
    "type": "string"
  },
  "field_name (required)": {
    "type": "string"
  },
  "field_type (required)": {
    "type": "string"
  },
  "is_required": {
    "type": "boolean",
    "default": false
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "field_key (required)": {
          "type": "string"
        },
        "field_name (required)": {
          "type": "string"
        },
        "field_type (required)": {
          "type": "string"
        },
        "is_required": {
          "type": "boolean",
          "default": false
        },
        "id (required)": {
          "type": "integer"
        },
        "dataset_id (required)": {
          "type": "integer"
        }
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/datasets/{dataset_id}/fieldsdatasets:read

List dataset fields

Required platform scope: `datasets:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "field_key (required)": {
            "type": "string"
          },
          "field_name (required)": {
            "type": "string"
          },
          "field_type (required)": {
            "type": "string"
          },
          "is_required": {
            "type": "boolean",
            "default": false
          },
          "id (required)": {
            "type": "integer"
          },
          "dataset_id (required)": {
            "type": "integer"
          }
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/datasets/{dataset_id}datasets:write

Delete dataset

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PUT/datasets/{dataset_id}datasets:write

Update dataset

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "dataset_name (required)": {
    "type": "string"
  },
  "dataset_status": {
    "type": "string",
    "default": "active"
  },
  "audience_type": {
    "type": "string",
    "default": "email"
  },
  "organization_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "dataset_name (required)": {
          "type": "string"
        },
        "dataset_status": {
          "type": "string",
          "default": "active"
        },
        "audience_type": {
          "type": "string",
          "default": "email"
        },
        "id (required)": {
          "type": "integer"
        },
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "fields": [
          {
            "field_key (required)": {
              "type": "string"
            },
            "field_name (required)": {
              "type": "string"
            },
            "field_type (required)": {
              "type": "string"
            },
            "is_required": {
              "type": "boolean",
              "default": false
            },
            "id (required)": {
              "type": "integer"
            },
            "dataset_id (required)": {
              "type": "integer"
            }
          }
        ],
        "records": [
          {
            "id (required)": {
              "type": "integer"
            },
            "dataset_id (required)": {
              "type": "integer"
            },
            "created_at (required)": {
              "type": "string"
            },
            "values (required)": [
              {
                "dataset_field_id (required)": "integer",
                "value": "object",
                "id (required)": "integer",
                "dataset_record_id (required)": "integer",
                "field (required)": "object"
              }
            ]
          }
        ],
        "record_count": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "owner_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/datasets/{dataset_id}/fields/{field_id}datasets:write

Delete dataset field

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "field_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Field Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/datasets/{dataset_id}/recordsdatasets:write

Add dataset record

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "values (required)": [
    {
      "dataset_field_id (required)": {
        "type": "integer"
      },
      "value": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/datasets/{dataset_id}/recordsdatasets:read

List dataset records

Required platform scope: `datasets:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "page",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 1,
      "title": "Page"
    }
  },
  {
    "name": "size",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 10,
      "title": "Size"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/datasets/{dataset_id}/exportdatasets:read

Export dataset csv

Required platform scope: `datasets:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/datasets/{dataset_id}/records/{record_id}datasets:write

Delete dataset record

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "record_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Record Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PUT/datasets/{dataset_id}/records/{record_id}datasets:write

Update dataset record

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "record_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Record Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "values (required)": [
    {
      "dataset_field_id (required)": {
        "type": "integer"
      },
      "value": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/datasets/{dataset_id}/import-csvdatasets:write

Import csv

Required platform scope: `datasets:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "auto_create_fields",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Auto Create Fields"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: multipart/form-data

{
  "file (required)": {
    "type": "string"
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/datasets/contacts/listdatasets:read

List contacts

Get all unique contacts (emails) from the user's datasets with their associated data. - By default: shows only contacts from datasets owned by the current user - If all_members=true and user has permission: shows contacts from all team datasets - If unsubscribed_only=true: shows only contacts who have unsubscribed Returns contacts with name, email, company (if available), and source dataset info. Required platform scope: `datasets:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "page",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 1,
      "title": "Page"
    }
  },
  {
    "name": "size",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 20,
      "title": "Size"
    }
  },
  {
    "name": "search",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Search"
    }
  },
  {
    "name": "all_members",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "All Members"
    }
  },
  {
    "name": "unsubscribed_only",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Unsubscribed Only"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaigns/datasets/import-csvcampaigns:write

Create campaign dataset from csv

Required platform scope: `campaigns:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: multipart/form-data

{
  "file (required)": {
    "type": "string"
  },
  "dataset_name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "audience_type": {
    "type": "string",
    "default": "email"
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaigns/datasets/import-phonescampaigns:write

Create campaign dataset from phones

Required platform scope: `campaigns:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "phone_numbers (required)": [
    {
      "type": "string"
    }
  ],
  "dataset_name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaigns/datasets/import-emailscampaigns:write

Create campaign dataset from emails

Required platform scope: `campaigns:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "emails (required)": [
    {
      "type": "string"
    }
  ],
  "dataset_name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaignscampaigns:write

Create campaign

Required platform scope: `campaigns:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name (required)": {
    "type": "string"
  },
  "channel": {
    "type": "string",
    "default": "email"
  },
  "type": {
    "type": "string",
    "enum": [
      "sales"
    ]
  },
  "flow_type": {
    "type": "string",
    "enum": [
      "template",
      "ai_powered"
    ]
  },
  "dataset_id (required)": {
    "type": "integer"
  },
  "template_id": [
    {},
    {
      "type": "null"
    }
  ],
  "template_variants": [
    [
      {
        "source_template_id": [
          "integer",
          "null"
        ],
        "label (required)": {
          "type": "string"
        },
        "subject": {
          "type": "string",
          "default": ""
        },
        "body": {
          "type": "string",
          "default": ""
        },
        "followups": [
          "object"
        ]
      }
    ],
    {
      "type": "null"
    }
  ],
  "ai_objective": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "ai_fields": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "emails_per_day": {
    "type": "integer",
    "default": 50
  },
  "interval_minutes": {
    "type": "integer",
    "default": 0
  },
  "auto_reply_enabled": {
    "type": "boolean",
    "default": false
  },
  "followup_objectives": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "style_tune": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "min_reply_minutes": {
    "type": "integer",
    "default": 60
  },
  "max_reply_minutes": {
    "type": "integer",
    "default": 300
  },
  "show_unsubscribe": {
    "type": "boolean",
    "default": false
  },
  "unsubscribe_text": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "attachment_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ],
  "scheduled_start_at": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "schedule_config": [
    {
      "type": "object"
    },
    {
      "type": "null"
    }
  ],
  "timezone": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "connected_account_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ],
  "whatsapp_template_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "whatsapp_integration_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ],
  "ai_followups": [
    [
      {
        "type": "object"
      }
    ],
    {
      "type": "null"
    }
  ],
  "followups": [
    [
      {
        "type": "object"
      }
    ],
    {
      "type": "null"
    }
  ],
  "subject": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "body": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "status": {
    "type": "string",
    "enum": [
      "draft",
      "active",
      "paused",
      "paused_limit",
      "paused_by_user",
      "completed",
      "scheduled",
      "initializing",
      "deleted",
      "failed",
      "failed_init"
    ]
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "channel": {
          "type": "string",
          "default": "email"
        },
        "type": {
          "type": "string",
          "enum": [
            "sales"
          ]
        },
        "flow_type": {
          "type": "string",
          "enum": [
            "template",
            "ai_powered"
          ]
        },
        "dataset_id (required)": {
          "type": "integer"
        },
        "template_id": [
          {},
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_objective": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "ai_fields": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "emails_per_day": {
          "type": "integer",
          "default": 50
        },
        "interval_minutes": {
          "type": "integer",
          "default": 0
        },
        "auto_reply_enabled": {
          "type": "boolean",
          "default": false
        },
        "followup_objectives": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "style_tune": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "min_reply_minutes": {
          "type": "integer",
          "default": 60
        },
        "max_reply_minutes": {
          "type": "integer",
          "default": 300
        },
        "show_unsubscribe": {
          "type": "boolean",
          "default": false
        },
        "unsubscribe_text": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scheduled_start_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "schedule_config": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "timezone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "connected_account_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "whatsapp_template_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "whatsapp_integration_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "status (required)": {
          "type": "string",
          "enum": [
            "draft",
            "active",
            "paused",
            "paused_limit",
            "paused_by_user",
            "completed",
            "scheduled",
            "initializing",
            "deleted",
            "failed",
            "failed_init"
          ]
        },
        "status_message": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          {
            "type": "object"
          }
        ],
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/campaignscampaigns:read

List campaigns

Required platform scope: `campaigns:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "all_members",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "All Members"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "name (required)": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "default": "email"
          },
          "type": {
            "type": "string",
            "enum": [
              "sales"
            ]
          },
          "flow_type": {
            "type": "string",
            "enum": [
              "template",
              "ai_powered"
            ]
          },
          "dataset_id (required)": {
            "type": "integer"
          },
          "template_id": [
            {},
            {
              "type": "null"
            }
          ],
          "template_variants": [
            [
              {
                "source_template_id": "object",
                "label (required)": "string",
                "subject": "string",
                "body": "string",
                "followups": "array"
              }
            ],
            {
              "type": "null"
            }
          ],
          "ai_objective": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "ai_fields": [
            [
              {
                "type": "string"
              }
            ],
            {
              "type": "null"
            }
          ],
          "emails_per_day": {
            "type": "integer",
            "default": 50
          },
          "interval_minutes": {
            "type": "integer",
            "default": 0
          },
          "auto_reply_enabled": {
            "type": "boolean",
            "default": false
          },
          "followup_objectives": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "style_tune": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "min_reply_minutes": {
            "type": "integer",
            "default": 60
          },
          "max_reply_minutes": {
            "type": "integer",
            "default": 300
          },
          "show_unsubscribe": {
            "type": "boolean",
            "default": false
          },
          "unsubscribe_text": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "attachment_ids": [
            [
              {
                "type": "integer"
              }
            ],
            {
              "type": "null"
            }
          ],
          "scheduled_start_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "schedule_config": [
            {
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "timezone": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "connected_account_ids": [
            [
              {
                "type": "integer"
              }
            ],
            {
              "type": "null"
            }
          ],
          "whatsapp_template_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "whatsapp_integration_ids": [
            [
              {
                "type": "integer"
              }
            ],
            {
              "type": "null"
            }
          ],
          "ai_followups": [
            [
              {
                "type": "object"
              }
            ],
            {
              "type": "null"
            }
          ],
          "brand_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "id (required)": {
            "type": "integer"
          },
          "status (required)": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "paused",
              "paused_limit",
              "paused_by_user",
              "completed",
              "scheduled",
              "initializing",
              "deleted",
              "failed",
              "failed_init"
            ]
          },
          "status_message": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "user_id (required)": {
            "type": "integer"
          },
          "organization_id (required)": {
            "type": "integer"
          },
          "created_at (required)": {
            "type": "string"
          },
          "updated_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "subject": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "body": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "followups": [
            {
              "type": "object"
            }
          ],
          "attachments": [
            [
              {
                "filename (required)": "string",
                "content_type": "object",
                "file_size": "object",
                "id (required)": "integer",
                "created_at (required)": "string",
                "file_url": "object"
              }
            ],
            {
              "type": "null"
            }
          ],
          "brand_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "total_emails (required)": {
            "type": "integer"
          },
          "sent_emails (required)": {
            "type": "integer"
          },
          "opened_emails (required)": {
            "type": "integer"
          },
          "replied_emails (required)": {
            "type": "integer"
          },
          "total_whatsapp": {
            "type": "integer",
            "default": 0
          },
          "sent_whatsapp": {
            "type": "integer",
            "default": 0
          },
          "read_whatsapp": {
            "type": "integer",
            "default": 0
          },
          "replied_whatsapp": {
            "type": "integer",
            "default": 0
          },
          "org_emails_limit": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "org_emails_sent_today": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/campaigns/{campaign_id}campaigns:read

Get campaign

Required platform scope: `campaigns:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "channel": {
          "type": "string",
          "default": "email"
        },
        "type": {
          "type": "string",
          "enum": [
            "sales"
          ]
        },
        "flow_type": {
          "type": "string",
          "enum": [
            "template",
            "ai_powered"
          ]
        },
        "dataset_id (required)": {
          "type": "integer"
        },
        "template_id": [
          {},
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_objective": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "ai_fields": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "emails_per_day": {
          "type": "integer",
          "default": 50
        },
        "interval_minutes": {
          "type": "integer",
          "default": 0
        },
        "auto_reply_enabled": {
          "type": "boolean",
          "default": false
        },
        "followup_objectives": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "style_tune": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "min_reply_minutes": {
          "type": "integer",
          "default": 60
        },
        "max_reply_minutes": {
          "type": "integer",
          "default": 300
        },
        "show_unsubscribe": {
          "type": "boolean",
          "default": false
        },
        "unsubscribe_text": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scheduled_start_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "schedule_config": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "timezone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "connected_account_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "whatsapp_template_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "whatsapp_integration_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "status (required)": {
          "type": "string",
          "enum": [
            "draft",
            "active",
            "paused",
            "paused_limit",
            "paused_by_user",
            "completed",
            "scheduled",
            "initializing",
            "deleted",
            "failed",
            "failed_init"
          ]
        },
        "status_message": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          {
            "type": "object"
          }
        ],
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "total_emails (required)": {
          "type": "integer"
        },
        "sent_emails (required)": {
          "type": "integer"
        },
        "opened_emails (required)": {
          "type": "integer"
        },
        "replied_emails (required)": {
          "type": "integer"
        },
        "total_whatsapp": {
          "type": "integer",
          "default": 0
        },
        "sent_whatsapp": {
          "type": "integer",
          "default": 0
        },
        "read_whatsapp": {
          "type": "integer",
          "default": 0
        },
        "replied_whatsapp": {
          "type": "integer",
          "default": 0
        },
        "org_emails_limit": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "org_emails_sent_today": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/campaigns/{campaign_id}/schedulescampaigns:read

Get campaign schedules

Required platform scope: `campaigns:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/campaigns/{campaign_id}campaigns:write

Update campaign

Required platform scope: `campaigns:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "channel": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "status": [
    {
      "type": "string",
      "enum": [
        "draft",
        "active",
        "paused",
        "paused_limit",
        "paused_by_user",
        "completed",
        "scheduled",
        "initializing",
        "deleted",
        "failed",
        "failed_init"
      ]
    },
    {
      "type": "null"
    }
  ],
  "type": [
    {
      "type": "string",
      "enum": [
        "sales"
      ]
    },
    {
      "type": "null"
    }
  ],
  "flow_type": [
    {
      "type": "string",
      "enum": [
        "template",
        "ai_powered"
      ]
    },
    {
      "type": "null"
    }
  ],
  "dataset_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "connected_account_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ],
  "whatsapp_template_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "whatsapp_integration_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ],
  "template_id": [
    {},
    {
      "type": "null"
    }
  ],
  "template_variants": [
    [
      {
        "source_template_id": [
          "integer",
          "null"
        ],
        "label (required)": {
          "type": "string"
        },
        "subject": {
          "type": "string",
          "default": ""
        },
        "body": {
          "type": "string",
          "default": ""
        },
        "followups": [
          "object"
        ]
      }
    ],
    {
      "type": "null"
    }
  ],
  "subject": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "body": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "followups": [
    [
      {
        "type": "object"
      }
    ],
    {
      "type": "null"
    }
  ],
  "ai_followups": [
    [
      {
        "type": "object"
      }
    ],
    {
      "type": "null"
    }
  ],
  "emails_per_day": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "ai_objective": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "ai_fields": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "interval_minutes": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "auto_reply_enabled": [
    {
      "type": "boolean"
    },
    {
      "type": "null"
    }
  ],
  "followup_objectives": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "style_tune": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "min_reply_minutes": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "max_reply_minutes": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "show_unsubscribe": [
    {
      "type": "boolean"
    },
    {
      "type": "null"
    }
  ],
  "unsubscribe_text": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "attachment_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ],
  "scheduled_start_at": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "schedule_config": [
    {
      "type": "object"
    },
    {
      "type": "null"
    }
  ],
  "timezone": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "channel": {
          "type": "string",
          "default": "email"
        },
        "type": {
          "type": "string",
          "enum": [
            "sales"
          ]
        },
        "flow_type": {
          "type": "string",
          "enum": [
            "template",
            "ai_powered"
          ]
        },
        "dataset_id (required)": {
          "type": "integer"
        },
        "template_id": [
          {},
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_objective": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "ai_fields": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "emails_per_day": {
          "type": "integer",
          "default": 50
        },
        "interval_minutes": {
          "type": "integer",
          "default": 0
        },
        "auto_reply_enabled": {
          "type": "boolean",
          "default": false
        },
        "followup_objectives": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "style_tune": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "min_reply_minutes": {
          "type": "integer",
          "default": 60
        },
        "max_reply_minutes": {
          "type": "integer",
          "default": 300
        },
        "show_unsubscribe": {
          "type": "boolean",
          "default": false
        },
        "unsubscribe_text": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scheduled_start_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "schedule_config": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "timezone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "connected_account_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "whatsapp_template_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "whatsapp_integration_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "status (required)": {
          "type": "string",
          "enum": [
            "draft",
            "active",
            "paused",
            "paused_limit",
            "paused_by_user",
            "completed",
            "scheduled",
            "initializing",
            "deleted",
            "failed",
            "failed_init"
          ]
        },
        "status_message": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          {
            "type": "object"
          }
        ],
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/campaigns/{campaign_id}campaigns:write

Delete campaign

Required platform scope: `campaigns:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaigns/{campaign_id}/check-completioncampaigns:write

Check campaign completion endpoint

Manually trigger campaign completion check Required platform scope: `campaigns:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaigns/{campaign_id}/duplicatecampaigns:write

Duplicate campaign

Required platform scope: `campaigns:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "channel": {
          "type": "string",
          "default": "email"
        },
        "type": {
          "type": "string",
          "enum": [
            "sales"
          ]
        },
        "flow_type": {
          "type": "string",
          "enum": [
            "template",
            "ai_powered"
          ]
        },
        "dataset_id (required)": {
          "type": "integer"
        },
        "template_id": [
          {},
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_objective": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "ai_fields": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "emails_per_day": {
          "type": "integer",
          "default": 50
        },
        "interval_minutes": {
          "type": "integer",
          "default": 0
        },
        "auto_reply_enabled": {
          "type": "boolean",
          "default": false
        },
        "followup_objectives": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "style_tune": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "min_reply_minutes": {
          "type": "integer",
          "default": 60
        },
        "max_reply_minutes": {
          "type": "integer",
          "default": 300
        },
        "show_unsubscribe": {
          "type": "boolean",
          "default": false
        },
        "unsubscribe_text": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scheduled_start_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "schedule_config": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "timezone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "connected_account_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "whatsapp_template_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "whatsapp_integration_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "status (required)": {
          "type": "string",
          "enum": [
            "draft",
            "active",
            "paused",
            "paused_limit",
            "paused_by_user",
            "completed",
            "scheduled",
            "initializing",
            "deleted",
            "failed",
            "failed_init"
          ]
        },
        "status_message": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          {
            "type": "object"
          }
        ],
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/campaigns/{campaign_id}/emailscampaigns:read

List campaign emails

Required platform scope: `campaigns:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "page",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 1,
      "title": "Page"
    }
  },
  {
    "name": "size",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 20,
      "title": "Size"
    }
  },
  {
    "name": "status",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status"
    }
  },
  {
    "name": "engagement",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Engagement"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "type": "object"
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/email/sendemail:send

Send email

Required platform scope: `email:send`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "account_id (required)": {
    "type": "integer"
  },
  "to (required)": {
    "type": "string"
  },
  "subject (required)": {
    "type": "string"
  },
  "body (required)": {
    "type": "string"
  },
  "recipient_name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "dataset_record_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "scheduled_followups": [
    [
      {
        "delay_minutes (required)": {
          "type": "integer"
        },
        "subject": [
          "string",
          "null"
        ],
        "body (required)": {
          "type": "string"
        }
      }
    ],
    {
      "type": "null"
    }
  ],
  "test_mode": {
    "type": "boolean",
    "default": false
  },
  "auto_reply_enabled": {
    "type": "boolean",
    "default": false
  },
  "followup_objectives": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "style_tune": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "min_reply_minutes": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "max_reply_minutes": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "scheduled_at": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "show_unsubscribe": {
    "type": "boolean",
    "default": false
  },
  "unsubscribe_text": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "attachment_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "type": "object"
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/email/sentemail:read

Get sent emails

Required platform scope: `email:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "search",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Search"
    }
  },
  {
    "name": "label_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Label Id"
    }
  },
  {
    "name": "show_assigned",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Show Assigned"
    }
  },
  {
    "name": "needs_reply",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Needs Reply"
    }
  },
  {
    "name": "assigned_to_others",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Assigned To Others"
    }
  },
  {
    "name": "bounce_only",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Bounce Only"
    }
  },
  {
    "name": "all_members",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "All Members"
    }
  },
  {
    "name": "show_archived",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Show Archived"
    }
  },
  {
    "name": "show_deleted",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Show Deleted"
    }
  },
  {
    "name": "page",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 1,
      "title": "Page"
    }
  },
  {
    "name": "size",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 20,
      "title": "Size"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "items (required)": [
          {
            "id (required)": {
              "type": "integer"
            },
            "message_id (required)": {
              "type": "string"
            },
            "subject (required)": {
              "type": "string"
            },
            "recipient_email (required)": {
              "type": "string"
            },
            "recipient_name (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "body (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "snippet": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "sent_at (required)": {
              "type": "string"
            },
            "opened (required)": {
              "type": "boolean"
            },
            "opened_at (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "replied (required)": {
              "type": "boolean"
            },
            "reply_count (required)": {
              "type": "integer"
            },
            "last_reply_at (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "is_reply_needed": {
              "type": "boolean",
              "default": false
            },
            "is_ai_intervention_needed": {
              "type": "boolean",
              "default": false
            },
            "ai_intervention_reason": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "is_unsubscribed": {
              "type": "boolean",
              "default": false
            },
            "is_read (required)": {
              "type": "boolean"
            },
            "is_archived": {
              "type": "boolean",
              "default": false
            },
            "is_deleted": {
              "type": "boolean",
              "default": false
            },
            "is_bounce": {
              "type": "boolean",
              "default": false
            },
            "bounced_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "assigned_to_id (required)": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "assigned_user_email": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "sender_email": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "sender_name": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "sender_signature": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "template_variant_index": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "template_variant_label": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "source_template_id": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "labels": [
              {
                "id (required)": "integer",
                "name (required)": "string",
                "color (required)": "string"
              }
            ],
            "auto_reply_enabled": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "brand_id": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "brand_name": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "followup_objectives": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "style_tune": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "min_reply_minutes": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "max_reply_minutes": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "show_unsubscribe": {
              "type": "boolean",
              "default": false
            },
            "unsubscribe_text": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "attachments": [
              {
                "filename (required)": "string",
                "content_type": "object",
                "file_size": "object",
                "id (required)": "integer",
                "created_at (required)": "string",
                "file_url": "object"
              }
            ]
          }
        ],
        "total (required)": {
          "type": "integer"
        },
        "page (required)": {
          "type": "integer"
        },
        "size (required)": {
          "type": "integer"
        },
        "pages (required)": {
          "type": "integer"
        }
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/email/countsemail:read

Get email counts

Required platform scope: `email:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "all_members",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "All Members"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/email/sent/{email_id}/reademail:write

Mark email read

Required platform scope: `email:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Email Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/email/sent/{email_id}/assignemail:write

Assign email

Required platform scope: `email:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Email Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "user_id (required)": {
    "type": "integer"
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/email/sent/{email_id}/dismiss-replyemail:write

Dismiss reply

Required platform scope: `email:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Email Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/email/sent/{email_id}/archiveemail:write

Archive email

Required platform scope: `email:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Email Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/email/sent/{email_id}/deleteemail:write

Delete email

Required platform scope: `email:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Email Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/email/sent/{email_id}/settingsemail:write

Update email settings

Required platform scope: `email:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Email Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "type": "object"
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/email/sent/{email_id}email:read

Get sent email details

Required platform scope: `email:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Email Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "email (required)": {
          "id (required)": {
            "type": "integer"
          },
          "message_id (required)": {
            "type": "string"
          },
          "subject (required)": {
            "type": "string"
          },
          "recipient_email (required)": {
            "type": "string"
          },
          "recipient_name (required)": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "body (required)": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "snippet": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "sent_at (required)": {
            "type": "string"
          },
          "opened (required)": {
            "type": "boolean"
          },
          "opened_at (required)": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "replied (required)": {
            "type": "boolean"
          },
          "reply_count (required)": {
            "type": "integer"
          },
          "last_reply_at (required)": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "is_reply_needed": {
            "type": "boolean",
            "default": false
          },
          "is_ai_intervention_needed": {
            "type": "boolean",
            "default": false
          },
          "ai_intervention_reason": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "is_unsubscribed": {
            "type": "boolean",
            "default": false
          },
          "is_read (required)": {
            "type": "boolean"
          },
          "is_archived": {
            "type": "boolean",
            "default": false
          },
          "is_deleted": {
            "type": "boolean",
            "default": false
          },
          "is_bounce": {
            "type": "boolean",
            "default": false
          },
          "bounced_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "assigned_to_id (required)": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "assigned_user_email": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "sender_email": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "sender_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "sender_signature": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "template_variant_index": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "template_variant_label": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "source_template_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "labels": [
            {
              "id (required)": {
                "type": "integer"
              },
              "name (required)": {
                "type": "string"
              },
              "color (required)": {
                "type": "string"
              }
            }
          ],
          "auto_reply_enabled": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "brand_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "brand_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "followup_objectives": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "style_tune": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "min_reply_minutes": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "max_reply_minutes": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "show_unsubscribe": {
            "type": "boolean",
            "default": false
          },
          "unsubscribe_text": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "attachments": [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ]
        },
        "tracking_events (required)": [
          {
            "id (required)": {
              "type": "integer"
            },
            "event_type (required)": {
              "type": "string"
            },
            "event_data (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "ip_address (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "user_agent (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "timestamp (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/email/thread/{email_id}email:read

Get thread history

Fetches all messages in an email thread from our local database, verified by organization scoping. Required platform scope: `email:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Email Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "email_details (required)": {
          "id (required)": {
            "type": "integer"
          },
          "message_id (required)": {
            "type": "string"
          },
          "subject (required)": {
            "type": "string"
          },
          "recipient_email (required)": {
            "type": "string"
          },
          "recipient_name (required)": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "body (required)": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "snippet": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "sent_at (required)": {
            "type": "string"
          },
          "opened (required)": {
            "type": "boolean"
          },
          "opened_at (required)": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "replied (required)": {
            "type": "boolean"
          },
          "reply_count (required)": {
            "type": "integer"
          },
          "last_reply_at (required)": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "is_reply_needed": {
            "type": "boolean",
            "default": false
          },
          "is_ai_intervention_needed": {
            "type": "boolean",
            "default": false
          },
          "ai_intervention_reason": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "is_unsubscribed": {
            "type": "boolean",
            "default": false
          },
          "is_read (required)": {
            "type": "boolean"
          },
          "is_archived": {
            "type": "boolean",
            "default": false
          },
          "is_deleted": {
            "type": "boolean",
            "default": false
          },
          "is_bounce": {
            "type": "boolean",
            "default": false
          },
          "bounced_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "assigned_to_id (required)": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "assigned_user_email": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "sender_email": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "sender_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "sender_signature": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "template_variant_index": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "template_variant_label": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "source_template_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "labels": [
            {
              "id (required)": {
                "type": "integer"
              },
              "name (required)": {
                "type": "string"
              },
              "color (required)": {
                "type": "string"
              }
            }
          ],
          "auto_reply_enabled": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "brand_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "brand_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "followup_objectives": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "style_tune": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "min_reply_minutes": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "max_reply_minutes": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "show_unsubscribe": {
            "type": "boolean",
            "default": false
          },
          "unsubscribe_text": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "attachments": [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ]
        },
        "messages (required)": [
          {
            "id (required)": {
              "type": "integer"
            },
            "subject (required)": {
              "type": "string"
            },
            "from_email (required)": {
              "type": "string"
            },
            "from_name (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "to_email (required)": {
              "type": "string"
            },
            "body_text (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "body_html (required)": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "is_from_me (required)": {
              "type": "boolean"
            },
            "received_at (required)": {
              "type": "string"
            },
            "attachments": [
              {
                "filename (required)": "string",
                "content_type": "object",
                "file_size": "object",
                "id (required)": "integer",
                "created_at (required)": "string",
                "file_url": "object"
              }
            ]
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/email/reply/{email_id}email:send

Reply to email

Required platform scope: `email:send`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Email Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "body (required)": {
    "type": "string"
  },
  "scheduled_at": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "followups": [
    [
      {
        "delay_minutes (required)": {
          "type": "integer"
        },
        "subject": [
          "string",
          "null"
        ],
        "body (required)": {
          "type": "string"
        }
      }
    ],
    {
      "type": "null"
    }
  ],
  "show_unsubscribe": {
    "type": "boolean",
    "default": false
  },
  "unsubscribe_text": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "attachment_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/email/contact-historyemail:read

Get contact history

Fetches email threads for a contact, securely scoped by organization. Supports 'individual' (current user's accounts) and 'org' (entire organization) views. Required platform scope: `email:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "email",
    "in": "query",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Email"
    }
  },
  {
    "name": "scope",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "default": "individual",
      "title": "Scope"
    }
  },
  {
    "name": "page",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 1,
      "title": "Page"
    }
  },
  {
    "name": "size",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 10,
      "title": "Size"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "items (required)": [
          {
            "email_details (required)": {
              "id (required)": {
                "type": "integer"
              },
              "message_id (required)": {
                "type": "string"
              },
              "subject (required)": {
                "type": "string"
              },
              "recipient_email (required)": {
                "type": "string"
              },
              "recipient_name (required)": [
                "string",
                "null"
              ],
              "body (required)": [
                "string",
                "null"
              ],
              "snippet": [
                "string",
                "null"
              ],
              "sent_at (required)": {
                "type": "string"
              },
              "opened (required)": {
                "type": "boolean"
              },
              "opened_at (required)": [
                "string",
                "null"
              ],
              "replied (required)": {
                "type": "boolean"
              },
              "reply_count (required)": {
                "type": "integer"
              },
              "last_reply_at (required)": [
                "string",
                "null"
              ],
              "is_reply_needed": {
                "type": "boolean",
                "default": false
              },
              "is_ai_intervention_needed": {
                "type": "boolean",
                "default": false
              },
              "ai_intervention_reason": [
                "string",
                "null"
              ],
              "is_unsubscribed": {
                "type": "boolean",
                "default": false
              },
              "is_read (required)": {
                "type": "boolean"
              },
              "is_archived": {
                "type": "boolean",
                "default": false
              },
              "is_deleted": {
                "type": "boolean",
                "default": false
              },
              "is_bounce": {
                "type": "boolean",
                "default": false
              },
              "bounced_at": [
                "string",
                "null"
              ],
              "assigned_to_id (required)": [
                "integer",
                "null"
              ],
              "assigned_user_email": [
                "string",
                "null"
              ],
              "sender_email": [
                "string",
                "null"
              ],
              "sender_name": [
                "string",
                "null"
              ],
              "sender_signature": [
                "string",
                "null"
              ],
              "template_variant_index": [
                "integer",
                "null"
              ],
              "template_variant_label": [
                "string",
                "null"
              ],
              "source_template_id": [
                "integer",
                "null"
              ],
              "labels": [
                "object"
              ],
              "auto_reply_enabled": [
                "boolean",
                "null"
              ],
              "brand_id": [
                "integer",
                "null"
              ],
              "brand_name": [
                "string",
                "null"
              ],
              "followup_objectives": [
                "string",
                "null"
              ],
              "style_tune": [
                "string",
                "null"
              ],
              "min_reply_minutes": [
                "integer",
                "null"
              ],
              "max_reply_minutes": [
                "integer",
                "null"
              ],
              "show_unsubscribe": {
                "type": "boolean",
                "default": false
              },
              "unsubscribe_text": [
                "string",
                "null"
              ],
              "attachments": [
                "object"
              ]
            },
            "messages (required)": [
              {
                "id (required)": "integer",
                "subject (required)": "string",
                "from_email (required)": "string",
                "from_name (required)": "object",
                "to_email (required)": "string",
                "body_text (required)": "object",
                "body_html (required)": "object",
                "is_from_me (required)": "boolean",
                "received_at (required)": "string",
                "attachments": "array"
              }
            ]
          }
        ],
        "total (required)": {
          "type": "integer"
        },
        "page (required)": {
          "type": "integer"
        },
        "size (required)": {
          "type": "integer"
        },
        "pages (required)": {
          "type": "integer"
        },
        "total_opens": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "total_replies": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/email/accountsaccounts:read

List connected accounts

Required platform scope: `accounts:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "include_inactive",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Include Inactive"
    }
  },
  {
    "name": "all_members",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "All Members"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/email/accounts/{account_id}/statusaccounts:write

Toggle account status

Required platform scope: `accounts:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "status",
    "in": "query",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Status"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/email/accounts/{account_id}accounts:write

Update account settings

Required platform scope: `accounts:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "type": "object"
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/email/accounts/{account_id}/send-asaccounts:read

Get account send as options

Required platform scope: `accounts:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/scheduled-emailsemail:read

Get scheduled emails

Required platform scope: `email:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "page",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "minimum": 1,
      "default": 1,
      "title": "Page"
    }
  },
  {
    "name": "page_size",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "maximum": 100,
      "minimum": 1,
      "default": 20,
      "title": "Page Size"
    }
  },
  {
    "name": "search",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Search"
    }
  },
  {
    "name": "sent_email_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sent Email Id"
    }
  },
  {
    "name": "account_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Account Id"
    }
  },
  {
    "name": "all_members",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "All Members"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "type": "object"
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/scheduled-emails/{schedule_id}email:write

Delete scheduled email

Required platform scope: `email:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "schedule_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Schedule Id"
    }
  },
  {
    "name": "type",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "default": "followup",
      "title": "Type"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PUT/scheduled-emails/{schedule_id}email:write

Update scheduled email

Required platform scope: `email:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "schedule_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Schedule Id"
    }
  },
  {
    "name": "type",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "default": "followup",
      "title": "Type"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "subject": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "body": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "scheduled_at": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/templatestemplates:write

Create template

Required platform scope: `templates:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name (required)": {
    "type": "string"
  },
  "subject": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "body": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "dataset_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "followups": [
    [
      {
        "type": "object"
      }
    ],
    {
      "type": "null"
    }
  ],
  "template_variants": [
    [
      {
        "source_template_id": [
          "integer",
          "null"
        ],
        "label (required)": {
          "type": "string"
        },
        "subject": {
          "type": "string",
          "default": ""
        },
        "body": {
          "type": "string",
          "default": ""
        },
        "followups": [
          "object"
        ]
      }
    ],
    {
      "type": "null"
    }
  ],
  "attachment_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "dataset_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/templatestemplates:read

List templates

Required platform scope: `templates:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "all_members",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "All Members"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "name (required)": {
            "type": "string"
          },
          "subject": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "body": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "dataset_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "followups": [
            [
              {
                "type": "object"
              }
            ],
            {
              "type": "null"
            }
          ],
          "template_variants": [
            [
              {
                "source_template_id": "object",
                "label (required)": "string",
                "subject": "string",
                "body": "string",
                "followups": "array"
              }
            ],
            {
              "type": "null"
            }
          ],
          "attachment_ids": [
            [
              {
                "type": "integer"
              }
            ],
            {
              "type": "null"
            }
          ],
          "id (required)": {
            "type": "integer"
          },
          "organization_id (required)": {
            "type": "integer"
          },
          "created_at (required)": {
            "type": "string"
          },
          "attachments": [
            [
              {
                "filename (required)": "string",
                "content_type": "object",
                "file_size": "object",
                "id (required)": "integer",
                "created_at (required)": "string",
                "file_url": "object"
              }
            ],
            {
              "type": "null"
            }
          ]
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/templates/{template_id}templates:read

Get template

Required platform scope: `templates:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "template_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Template Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "dataset_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PUT/templates/{template_id}templates:write

Update template

Required platform scope: `templates:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "template_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Template Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "subject": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "body": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "dataset_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "followups": [
    [
      {
        "type": "object"
      }
    ],
    {
      "type": "null"
    }
  ],
  "template_variants": [
    [
      {
        "source_template_id": [
          "integer",
          "null"
        ],
        "label (required)": {
          "type": "string"
        },
        "subject": {
          "type": "string",
          "default": ""
        },
        "body": {
          "type": "string",
          "default": ""
        },
        "followups": [
          "object"
        ]
      }
    ],
    {
      "type": "null"
    }
  ],
  "attachment_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "dataset_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/templates/{template_id}templates:write

Delete template

Required platform scope: `templates:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "template_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Template Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/attachments/uploadmedia:write

Upload attachment

Required platform scope: `media:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "campaign_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: multipart/form-data

{
  "file (required)": {
    "type": "string"
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "filename (required)": {
          "type": "string"
        },
        "content_type": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "file_size": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "file_url": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/attachments/{attachment_id}media:read

Get attachment

Required platform scope: `media:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "attachment_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Attachment Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "filename (required)": {
          "type": "string"
        },
        "content_type": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "file_size": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "file_url": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/attachments/{attachment_id}/downloadmedia:read

Download attachment

Required platform scope: `media:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "attachment_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Attachment Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/brandbrand:read

Get brand

Required platform scope: `brand:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "name (required)": {
          "type": "string"
        },
        "business_types (required)": [
          {
            "type": "string"
          }
        ],
        "custom_business_category (required)": {
          "type": "string"
        },
        "identity (required)": {
          "type": "string"
        },
        "offerings (required)": {
          "type": "string"
        },
        "voice (required)": {
          "type": "string"
        },
        "guided_data": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "design_data": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "faq (required)": {
          "type": "string"
        },
        "policies (required)": {
          "type": "string"
        },
        "brand_context (required)": {
          "type": "string"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "user_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PUT/brandbrand:write

Update brand

Required platform scope: `brand:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "business_types": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "custom_business_category": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "identity": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "offerings": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "voice": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "guided_data": [
    {
      "type": "object"
    },
    {
      "type": "null"
    }
  ],
  "design_data": [
    {
      "type": "object"
    },
    {
      "type": "null"
    }
  ],
  "faq": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "policies": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "name (required)": {
          "type": "string"
        },
        "business_types (required)": [
          {
            "type": "string"
          }
        ],
        "custom_business_category (required)": {
          "type": "string"
        },
        "identity (required)": {
          "type": "string"
        },
        "offerings (required)": {
          "type": "string"
        },
        "voice (required)": {
          "type": "string"
        },
        "guided_data": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "design_data": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "faq (required)": {
          "type": "string"
        },
        "policies (required)": {
          "type": "string"
        },
        "brand_context (required)": {
          "type": "string"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "user_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/inbox-labelsinbox:read

List labels

Every label, with how many conversations carry it in each inbox. Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/inbox-labelsinbox:write

Create label

Creates a label, or hands back the one with that name. Idempotent because the pickers create as you type: asking twice for "Refund" has to give the same label back, not a second one that looks identical and filters differently. Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name (required)": {
    "type": "string"
  },
  "color": {
    "type": "string",
    "default": "#6366f1"
  }
}

Responses

{
  "201": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/inbox-labels/{label_id}inbox:write

Update label

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "label_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Label Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "color": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/inbox-labels/{label_id}inbox:write

Delete label

Removes a label from every inbox at once. Links cascade. Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "label_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Label Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/inbox-labels/items/{item_type}/{item_id}inbox:read

Labels on item

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "item_type",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Item Type"
    }
  },
  {
    "name": "item_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Item Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PUT/inbox-labels/items/{item_type}/{item_id}inbox:write

Set labels on item

Replaces an item's labels with exactly the ids given. Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "item_type",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Item Type"
    }
  },
  {
    "name": "item_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Item Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "label_ids": [
    {
      "type": "integer"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/inbox-labels/{label_id}/itemsinbox:read

Items with label

Everything carrying this label, across every inbox. The point of one shared label set: a row from each inbox in one list, newest first, each saying where it came from so the client can link back to it. Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "label_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Label Id"
    }
  },
  {
    "name": "item_type",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Limit to one inbox: email, whatsapp or social.",
      "title": "Item Type"
    },
    "description": "Limit to one inbox: email, whatsapp or social."
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/accountsaccounts:read

List social accounts

Every account the workspace has connected - any number per platform. Expired connections are included (they need a reconnect, and the UI says so); disconnected ones are not, unless asked for. Required platform scope: `accounts:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "platform",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    }
  },
  {
    "name": "include_disconnected",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "description": "Also return accounts the workspace disconnected. They keep their post history.",
      "default": false,
      "title": "Include Disconnected"
    },
    "description": "Also return accounts the workspace disconnected. They keep their post history."
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "platform (required)": {
            "type": "string"
          },
          "account_name (required)": {
            "type": "string"
          },
          "account_handle": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "avatar_url": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "id (required)": {
            "type": "integer"
          },
          "organization_id (required)": {
            "type": "integer"
          },
          "connected_by_user_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "platform_account_id (required)": {
            "type": "string"
          },
          "connection_status": {
            "type": "string",
            "default": "connected"
          },
          "is_active": {
            "type": "boolean",
            "default": true
          },
          "token_expires_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "created_at (required)": {
            "type": "string"
          },
          "updated_at (required)": {
            "type": "string"
          }
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/social/accounts/{account_id}accounts:write

Update social account

Required platform scope: `accounts:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "account_name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "account_handle": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "avatar_url": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "is_active": [
    {
      "type": "boolean"
    },
    {
      "type": "null"
    }
  ],
  "connection_status": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "platform (required)": {
          "type": "string"
        },
        "account_name (required)": {
          "type": "string"
        },
        "account_handle": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "avatar_url": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "connected_by_user_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "platform_account_id (required)": {
          "type": "string"
        },
        "connection_status": {
          "type": "string",
          "default": "connected"
        },
        "is_active": {
          "type": "boolean",
          "default": true
        },
        "token_expires_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "created_at (required)": {
          "type": "string"
        },
        "updated_at (required)": {
          "type": "string"
        }
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/accounts/{account_id}/syncaccounts:read

Get account sync status

Required platform scope: `accounts:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/accounts/{account_id}/syncaccounts:write

Request account sync

Resume failed work, or explicitly restart an import with a selected range. Required platform scope: `accounts:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "days",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 3650,
          "minimum": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Days"
    }
  },
  {
    "name": "restart",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Restart"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "202": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/postssocial:read

List social posts

Lists the composer's posts, optionally windowed to what a calendar is showing. The calendar asks for one month or week at a time, so the window is applied in SQL rather than by fetching the whole history and filtering in the browser - an account with a year of posts would otherwise ship all of it to render a single week. The window is matched against the time a post actually occupies on the calendar: `scheduled_at` while it is still waiting, `published_at` once it has gone out. Matching only one of the two dropped sent posts out of the month they were sent in. Required platform scope: `social:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "status",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "One status, or several comma-separated (draft,scheduled,published,failed).",
      "title": "Status"
    },
    "description": "One status, or several comma-separated (draft,scheduled,published,failed)."
  },
  {
    "name": "from",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "description": "Only posts landing at or after this instant.",
      "title": "From"
    },
    "description": "Only posts landing at or after this instant."
  },
  {
    "name": "to",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "description": "Only posts landing strictly before this instant.",
      "title": "To"
    },
    "description": "Only posts landing strictly before this instant."
  },
  {
    "name": "kind",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "`post` for posts only, `idea` for calendar ideas only; both when omitted.",
      "title": "Kind"
    },
    "description": "`post` for posts only, `idea` for calendar ideas only; both when omitted."
  },
  {
    "name": "account_ids",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Comma-separated account ids: only posts going to at least one of them. Ideas are not filtered.",
      "title": "Account Ids"
    },
    "description": "Comma-separated account ids: only posts going to at least one of them. Ideas are not filtered."
  },
  {
    "name": "sort",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "pattern": "^(calendar|updated)$",
      "default": "calendar",
      "title": "Sort"
    }
  },
  {
    "name": "order",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "pattern": "^(asc|desc)$",
      "default": "asc",
      "title": "Order"
    }
  },
  {
    "name": "offset",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "title": "Offset"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "maximum": 5000,
      "minimum": 1,
      "default": 1000,
      "title": "Limit"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "id (required)": {
            "type": "integer"
          },
          "organization_id (required)": {
            "type": "integer"
          },
          "created_by_user_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "caption (required)": {
            "type": "string"
          },
          "media_urls_json (required)": [
            {
              "type": "string"
            }
          ],
          "post_type": {
            "type": "string",
            "default": "reel"
          },
          "platform_options_json": [
            {
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "scheduled_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "published_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "status": {
            "type": "string",
            "default": "draft"
          },
          "created_at (required)": {
            "type": "string"
          },
          "updated_at (required)": {
            "type": "string"
          },
          "channels": [
            {
              "id (required)": {
                "type": "integer"
              },
              "post_id (required)": {
                "type": "integer"
              },
              "social_account_id (required)": {
                "type": "integer"
              },
              "platform (required)": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "default": "pending"
              },
              "external_post_id": [
                "string",
                "null"
              ],
              "external_post_url": [
                "string",
                "null"
              ],
              "error_message": [
                "string",
                "null"
              ],
              "metrics_json": [
                "object",
                "null"
              ],
              "published_at": [
                "string",
                "null"
              ]
            }
          ]
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/posts/countssocial:read

Count social posts

How many posts each tab of the list view holds. Required platform scope: `social:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_ids",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Comma-separated account ids, as for the list.",
      "title": "Account Ids"
    },
    "description": "Comma-separated account ids, as for the list."
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/posts/distributionsocial:read

Get post distribution

Reports which platforms each post actually reached. The per-platform insights endpoints only know about their own platform, so a caller holding an Instagram media id has no way to tell whether the same post also went to Facebook or YouTube. This resolves any platform post id back to its AUTOMYC post and returns every channel on it. Required platform scope: `social:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "external_ids",
    "in": "query",
    "required": true,
    "schema": {
      "type": "string",
      "description": "Comma-separated platform post ids.",
      "title": "External Ids"
    },
    "description": "Comma-separated platform post ids."
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/posts/platformsocial:read

List platform posts

Lists the posts that exist on the platform, not just the ones we published. `/posts` is the composer's history, so scoping an automation to a specific post could only ever offer posts created in this app - on an account whose posts were made directly on the platform, that list is empty. This serves the synced catalogue instead, which covers the account's real history. YouTube entries are checked against current visibility so older imports that have become private or unavailable are no longer offered. Required platform scope: `social:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Restrict to one connected account.",
      "title": "Account Id"
    },
    "description": "Restrict to one connected account."
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "maximum": 200,
      "default": 100,
      "title": "Limit"
    }
  },
  {
    "name": "offset",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "title": "Offset"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "id (required)": {
            "type": "integer"
          },
          "social_account_id (required)": {
            "type": "integer"
          },
          "platform (required)": {
            "type": "string"
          },
          "external_post_id (required)": {
            "type": "string"
          },
          "title_preview": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "caption": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "media_type": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "thumbnail_url": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "permalink": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "published_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "like_count": {
            "type": "integer",
            "default": 0
          },
          "comment_count": {
            "type": "integer",
            "default": 0
          },
          "source": {
            "type": "string",
            "default": "platform"
          },
          "last_synced_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "post_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/posts/platform/{account_id}/{external_post_id}/mediasocial:read

Get platform post media

Fresh cover, link and playable media for one post on a connected account. Meta's CDN links stop working within days, so the comments page asks for this when a post's cover is missing or fails to load, and when someone opens the post to watch it. The answer is written back to the catalogue, so the next page load has the cover without asking again. Required platform scope: `social:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "external_post_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "title": "External Post Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/posts/platform/refreshsocial:write

Refresh platform posts

Asks for a fresh pull of the post catalogue without making the caller wait. Same shape as the comments refresh: the request queues the work and returns, so opening the automation builder shows what we already have immediately and picks up anything new on the next load. Required platform scope: `social:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Refresh one account instead of all.",
      "title": "Account Id"
    },
    "description": "Refresh one account instead of all."
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/posts/upload-videosocial:write

Upload social video

Uploads a video or photo file and returns an accessible URL for cross-posting. Required platform scope: `social:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: multipart/form-data

{
  "file (required)": {
    "type": "string"
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/posts/upload-mediasocial:write

Upload social video

Uploads a video or photo file and returns an accessible URL for cross-posting. Required platform scope: `social:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: multipart/form-data

{
  "file (required)": {
    "type": "string"
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/postssocial:publish

Create social post

Required platform scope: `social:publish`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "publish_now",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": true,
      "title": "Publish Now"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "title": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "caption (required)": {
    "type": "string"
  },
  "media_urls_json (required)": [
    {
      "type": "string"
    }
  ],
  "post_type": {
    "type": "string",
    "default": "reel"
  },
  "social_account_ids (required)": [
    {
      "type": "integer"
    }
  ],
  "scheduled_at": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "platform_options_json": [
    {
      "type": "object"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "201": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_by_user_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "title": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "caption (required)": {
          "type": "string"
        },
        "media_urls_json (required)": [
          {
            "type": "string"
          }
        ],
        "post_type": {
          "type": "string",
          "default": "reel"
        },
        "platform_options_json": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "scheduled_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "published_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "status": {
          "type": "string",
          "default": "draft"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at (required)": {
          "type": "string"
        },
        "channels": [
          {
            "id (required)": {
              "type": "integer"
            },
            "post_id (required)": {
              "type": "integer"
            },
            "social_account_id (required)": {
              "type": "integer"
            },
            "platform (required)": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "default": "pending"
            },
            "external_post_id": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "external_post_url": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "error_message": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "metrics_json": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "published_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/posts/{post_id}social:read

Get social post

One post with its channels. Publishing runs in the background, so a caller that just sent a post follows it here to see each channel land - reading the whole list for that would ship the organization's history on every poll. Required platform scope: `social:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "post_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Post Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_by_user_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "title": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "caption (required)": {
          "type": "string"
        },
        "media_urls_json (required)": [
          {
            "type": "string"
          }
        ],
        "post_type": {
          "type": "string",
          "default": "reel"
        },
        "platform_options_json": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "scheduled_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "published_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "status": {
          "type": "string",
          "default": "draft"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at (required)": {
          "type": "string"
        },
        "channels": [
          {
            "id (required)": {
              "type": "integer"
            },
            "post_id (required)": {
              "type": "integer"
            },
            "social_account_id (required)": {
              "type": "integer"
            },
            "platform (required)": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "default": "pending"
            },
            "external_post_id": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "external_post_url": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "error_message": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "metrics_json": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "published_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/social/posts/{post_id}social:publish

Update social post

Applies a partial edit - typically just a new time from the calendar. Only the fields actually present in the request body are touched: a drag sends `scheduled_at` alone and must leave the caption, media and channels exactly as they were. Required platform scope: `social:publish`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "post_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Post Id"
    }
  },
  {
    "name": "publish_now",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "Publish Now"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "title": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "caption": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "media_urls_json": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "post_type": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "scheduled_at": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "status": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "social_account_ids": [
    [
      {
        "type": "integer"
      }
    ],
    {
      "type": "null"
    }
  ],
  "platform_options_json": [
    {
      "type": "object"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_by_user_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "title": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "caption (required)": {
          "type": "string"
        },
        "media_urls_json (required)": [
          {
            "type": "string"
          }
        ],
        "post_type": {
          "type": "string",
          "default": "reel"
        },
        "platform_options_json": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "scheduled_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "published_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "status": {
          "type": "string",
          "default": "draft"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at (required)": {
          "type": "string"
        },
        "channels": [
          {
            "id (required)": {
              "type": "integer"
            },
            "post_id (required)": {
              "type": "integer"
            },
            "social_account_id (required)": {
              "type": "integer"
            },
            "platform (required)": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "default": "pending"
            },
            "external_post_id": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "external_post_url": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "error_message": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "metrics_json": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "published_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/social/posts/{post_id}social:write

Delete social post

Removes a post from the queue. A post still waiting to go out is cancelled by this. One that has already published is only removed from AUTOMYC - what is live on Instagram or YouTube stays there, because we are deleting our record, not their copy. Required platform scope: `social:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "post_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Post Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/posts/{post_id}/duplicatesocial:write

Duplicate social post

Copies a post, including its channels, as a new draft or scheduled post. The copy never inherits the original's publish history - no `published_at`, and fresh pending channels - so duplicating something already live cannot produce a post that looks sent but never was. Required platform scope: `social:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "post_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Post Id"
    }
  },
  {
    "name": "scheduled_at",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "description": "Time for the copy. Omitted, the copy is left as a draft.",
      "title": "Scheduled At"
    },
    "description": "Time for the copy. Omitted, the copy is left as a draft."
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "201": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_by_user_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "title": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "caption (required)": {
          "type": "string"
        },
        "media_urls_json (required)": [
          {
            "type": "string"
          }
        ],
        "post_type": {
          "type": "string",
          "default": "reel"
        },
        "platform_options_json": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "scheduled_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "published_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "status": {
          "type": "string",
          "default": "draft"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at (required)": {
          "type": "string"
        },
        "channels": [
          {
            "id (required)": {
              "type": "integer"
            },
            "post_id (required)": {
              "type": "integer"
            },
            "social_account_id (required)": {
              "type": "integer"
            },
            "platform (required)": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "default": "pending"
            },
            "external_post_id": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "external_post_url": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "error_message": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "metrics_json": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "published_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/comments/feedinbox:read

Get comments feed

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "platform",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    }
  },
  {
    "name": "status",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "responded, not_responded, or all",
      "title": "Status"
    },
    "description": "responded, not_responded, or all"
  },
  {
    "name": "search",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Search"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "maximum": 100,
      "minimum": 1,
      "default": 30,
      "title": "Limit"
    }
  },
  {
    "name": "offset",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "title": "Offset"
    }
  },
  {
    "name": "account_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Account Id"
    }
  },
  {
    "name": "post_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Post Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/comments/summaryinbox:read

Get comments summary

Totals behind the inbox stat cards, plus how many channels are connected. Declared before `/comments/{account_id}` so "summary" is not read as an account id. Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/comments/account/{account_id}inbox:read

Get social account comments

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "platform",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    }
  },
  {
    "name": "video_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Video Id"
    }
  },
  {
    "name": "media_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Media Id"
    }
  },
  {
    "name": "post_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Post Id"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 50,
      "title": "Limit"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/comments/{account_id}inbox:read

Get social account comments

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "platform",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    }
  },
  {
    "name": "video_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Video Id"
    }
  },
  {
    "name": "media_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Media Id"
    }
  },
  {
    "name": "post_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Post Id"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 50,
      "title": "Limit"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/comments/replyinbox:write

Reply to social comment

Sends a reply either to a stored inbox thread (thread_id) or straight to a platform comment (comment_id). A reply that the platform rejects is reported as a failure - it is never recorded as sent. Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "account_id (required)": {
    "type": "integer"
  },
  "platform (required)": {
    "type": "string"
  },
  "message": {
    "type": "string",
    "default": ""
  },
  "thread_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "comment_id": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "video_id": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "media_url": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "media_type": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/comments/likeinbox:write

Like social comment

Likes or unlikes a platform comment on Instagram, Facebook, etc. Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "account_id (required)": {
    "type": "integer"
  },
  "platform (required)": {
    "type": "string"
  },
  "comment_id (required)": {
    "type": "string"
  },
  "action": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/inbox/syncinbox:write

Sync social inbox now

Triggers live comment and message sync for connected social accounts in parallel. Skips non-messaging platforms (TikTok, YouTube) when thread_type is direct_message. Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "platform",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    }
  },
  {
    "name": "thread_type",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Thread Type"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/inbox/threadsinbox:read

Get social inbox threads

Returns unified conversation threads across connected social channels with platform filtering, pagination, and fast DB-first loading. Restricts DM threads to platforms that support DMs (Facebook, Instagram). Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "platform",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    }
  },
  {
    "name": "thread_type",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Thread Type"
    }
  },
  {
    "name": "thread_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Thread Id"
    }
  },
  {
    "name": "sync",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "description": "Pull fresh comments from platform before returning.",
      "default": false,
      "title": "Sync"
    },
    "description": "Pull fresh comments from platform before returning."
  },
  {
    "name": "search",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Match participant, handle or message text.",
      "title": "Search"
    },
    "description": "Match participant, handle or message text."
  },
  {
    "name": "thread_status",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "open, pending, snoozed, closed, archived.",
      "title": "Thread Status"
    },
    "description": "open, pending, snoozed, closed, archived."
  },
  {
    "name": "assigned_to",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "A user id, 'me', or 'unassigned'.",
      "title": "Assigned To"
    },
    "description": "A user id, 'me', or 'unassigned'."
  },
  {
    "name": "label_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Label Id"
    }
  },
  {
    "name": "unread_only",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "description": "Only threads this user has not read.",
      "default": false,
      "title": "Unread Only"
    },
    "description": "Only threads this user has not read."
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "maximum": 200,
      "minimum": 1,
      "default": 50,
      "title": "Limit"
    }
  },
  {
    "name": "offset",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "title": "Offset"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/social/inbox/threads/{thread_id}/statusinbox:write

Update social thread status

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "thread_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Thread Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "status (required)": {
    "type": "string"
  },
  "snoozed_until": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/inbox/assigneesinbox:read

List assignable users

Members who can own a conversation, for the assignment picker. Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/inbox/threads/{thread_id}/assigninbox:write

Assign thread

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "thread_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Thread Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "user_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/inbox/threads/{thread_id}/notesinbox:write

Add internal note

Adds a note visible to the team and never sent to the customer. It is stored as a SocialMessage so it appears inline in the conversation at the moment it was written, which is the only place a note is useful. `sender_type` is "note", and every dispatch path keys on "me"/"ai", so there is no route by which this reaches the platform. Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "thread_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Thread Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "body (required)": {
    "type": "string"
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/inbox/threads/{thread_id}/readinbox:write

Mark thread read

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "thread_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Thread Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/inbox/messages/{message_id}/media/refreshinbox:write

Refresh message media

Copies a message's story, reel or photo into our storage on demand. New messages are copied when they arrive. This is the repair path for older ones and for any copy that missed: the inbox calls it when a Meta-hosted file fails to load, and it asks the platform for a freshly signed link if the stored one has stopped working. Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "message_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Message Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/inbox/labelsinbox:read

List labels

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/inbox/labelsinbox:write

Create label

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name (required)": {
    "type": "string"
  },
  "color": {
    "type": "string",
    "default": "#64748b"
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/social/inbox/labels/{label_id}inbox:write

Delete label

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "label_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Label Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PUT/social/inbox/threads/{thread_id}/labelsinbox:write

Set thread labels

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "thread_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Thread Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "label_ids": [
    {
      "type": "integer"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/inbox/saved-repliesinbox:read

List saved replies

The org's snippets, most-used first. With `thread_id`, each one comes back rendered as well as raw, so the picker can show what will actually be sent rather than "Hi {{name}}". Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "thread_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Render placeholders against this thread.",
      "title": "Thread Id"
    },
    "description": "Render placeholders against this thread."
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/inbox/saved-repliesinbox:write

Create saved reply

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "title (required)": {
    "type": "string"
  },
  "body (required)": {
    "type": "string"
  },
  "shortcut": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PUT/social/inbox/saved-replies/{reply_id}inbox:write

Update saved reply

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "reply_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Reply Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "title (required)": {
    "type": "string"
  },
  "body (required)": {
    "type": "string"
  },
  "shortcut": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/social/inbox/saved-replies/{reply_id}inbox:write

Delete saved reply

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "reply_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Reply Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/inbox/metricsinbox:read

Inbox metrics

First-response and resolution times over the window. Median rather than mean: one conversation answered three days late drags an average far enough to make a healthy queue look broken, which is why every inbox product reports the median. Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "days",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "maximum": 365,
      "minimum": 1,
      "default": 30,
      "title": "Days"
    }
  },
  {
    "name": "platform",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/automations/capabilitiesautomations:read

Get automation capabilities

What this organization can automate, per connected account. The frontend builds its whole create-automation catalog from this, so a platform the backend cannot serve is structurally impossible to offer in the UI. Required platform scope: `automations:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/automationsautomations:read

List social automations

Required platform scope: `automations:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Account Id"
    }
  },
  {
    "name": "trigger",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Trigger"
    }
  },
  {
    "name": "status",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "id (required)": {
            "type": "string"
          },
          "name (required)": {
            "type": "string"
          },
          "trigger (required)": {
            "type": "string"
          },
          "status (required)": {
            "type": "string"
          },
          "platform (required)": {
            "type": "string"
          },
          "account_id (required)": {
            "type": "integer"
          },
          "account_name (required)": {
            "type": "string"
          },
          "account_handle": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "account_avatar": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "account_connected": {
            "type": "boolean",
            "default": true
          },
          "scope (required)": {
            "type": "string"
          },
          "scope_post_ids": [
            [
              {
                "type": "string"
              }
            ],
            {
              "type": "null"
            }
          ],
          "scope_post_titles": [
            [
              {
                "type": "string"
              }
            ],
            {
              "type": "null"
            }
          ],
          "match_mode (required)": {
            "type": "string"
          },
          "keywords": [
            [
              {
                "type": "string"
              }
            ],
            {
              "type": "null"
            }
          ],
          "negative_keywords": [
            [
              {
                "type": "string"
              }
            ],
            {
              "type": "null"
            }
          ],
          "case_sensitive": {
            "type": "boolean",
            "default": false
          },
          "priority (required)": {
            "type": "integer"
          },
          "stop_on_match (required)": {
            "type": "boolean"
          },
          "cooldown_seconds (required)": {
            "type": "integer"
          },
          "max_triggers_per_day (required)": {
            "type": "integer"
          },
          "once_per_participant (required)": {
            "type": "boolean"
          },
          "actions": [
            {
              "id (required)": {
                "type": "integer"
              },
              "position (required)": {
                "type": "integer"
              },
              "action_type (required)": {
                "type": "string"
              },
              "message_text": [
                "string",
                "null"
              ],
              "message_variants": [
                "array",
                "null"
              ],
              "delay_seconds": {
                "type": "integer",
                "default": 0
              },
              "config": [
                "object",
                "null"
              ]
            }
          ],
          "trigger_count": {
            "type": "integer",
            "default": 0
          },
          "last_triggered_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "created_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "delivery": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "delivery_note": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/automations/{automation_id}automations:read

Get social automation

Required platform scope: `automations:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "automation_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Automation Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "string"
        },
        "name (required)": {
          "type": "string"
        },
        "trigger (required)": {
          "type": "string"
        },
        "status (required)": {
          "type": "string"
        },
        "platform (required)": {
          "type": "string"
        },
        "account_id (required)": {
          "type": "integer"
        },
        "account_name (required)": {
          "type": "string"
        },
        "account_handle": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "account_avatar": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "account_connected": {
          "type": "boolean",
          "default": true
        },
        "scope (required)": {
          "type": "string"
        },
        "scope_post_ids": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scope_post_titles": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "match_mode (required)": {
          "type": "string"
        },
        "keywords": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "negative_keywords": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "case_sensitive": {
          "type": "boolean",
          "default": false
        },
        "priority (required)": {
          "type": "integer"
        },
        "stop_on_match (required)": {
          "type": "boolean"
        },
        "cooldown_seconds (required)": {
          "type": "integer"
        },
        "max_triggers_per_day (required)": {
          "type": "integer"
        },
        "once_per_participant (required)": {
          "type": "boolean"
        },
        "actions": [
          {
            "id (required)": {
              "type": "integer"
            },
            "position (required)": {
              "type": "integer"
            },
            "action_type (required)": {
              "type": "string"
            },
            "message_text": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "message_variants": [
              [
                "string"
              ],
              {
                "type": "null"
              }
            ],
            "delay_seconds": {
              "type": "integer",
              "default": 0
            },
            "config": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          }
        ],
        "trigger_count": {
          "type": "integer",
          "default": 0
        },
        "last_triggered_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivery": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivery_note": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/automationsautomations:write

Create social automation

Required platform scope: `automations:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name (required)": {
    "type": "string"
  },
  "trigger (required)": {
    "type": "string"
  },
  "status": {
    "type": "string",
    "default": "active"
  },
  "scope": {
    "type": "string",
    "default": "all"
  },
  "scope_post_ids": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "scope_post_titles": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "match_mode": {
    "type": "string",
    "default": "word"
  },
  "keywords": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "negative_keywords": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "case_sensitive": {
    "type": "boolean",
    "default": false
  },
  "priority": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "stop_on_match": {
    "type": "boolean",
    "default": true
  },
  "cooldown_seconds": {
    "type": "integer",
    "default": 0
  },
  "max_triggers_per_day": {
    "type": "integer",
    "default": 0
  },
  "once_per_participant": {
    "type": "boolean",
    "default": false
  },
  "actions": [
    {
      "action_type (required)": {
        "type": "string"
      },
      "message_text": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "message_variants": [
        [
          "string"
        ],
        {
          "type": "null"
        }
      ],
      "delay_seconds": {
        "type": "integer",
        "default": 0
      },
      "config": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    }
  ],
  "account_id (required)": {
    "type": "integer"
  }
}

Responses

{
  "201": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "string"
        },
        "name (required)": {
          "type": "string"
        },
        "trigger (required)": {
          "type": "string"
        },
        "status (required)": {
          "type": "string"
        },
        "platform (required)": {
          "type": "string"
        },
        "account_id (required)": {
          "type": "integer"
        },
        "account_name (required)": {
          "type": "string"
        },
        "account_handle": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "account_avatar": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "account_connected": {
          "type": "boolean",
          "default": true
        },
        "scope (required)": {
          "type": "string"
        },
        "scope_post_ids": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scope_post_titles": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "match_mode (required)": {
          "type": "string"
        },
        "keywords": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "negative_keywords": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "case_sensitive": {
          "type": "boolean",
          "default": false
        },
        "priority (required)": {
          "type": "integer"
        },
        "stop_on_match (required)": {
          "type": "boolean"
        },
        "cooldown_seconds (required)": {
          "type": "integer"
        },
        "max_triggers_per_day (required)": {
          "type": "integer"
        },
        "once_per_participant (required)": {
          "type": "boolean"
        },
        "actions": [
          {
            "id (required)": {
              "type": "integer"
            },
            "position (required)": {
              "type": "integer"
            },
            "action_type (required)": {
              "type": "string"
            },
            "message_text": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "message_variants": [
              [
                "string"
              ],
              {
                "type": "null"
              }
            ],
            "delay_seconds": {
              "type": "integer",
              "default": 0
            },
            "config": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          }
        ],
        "trigger_count": {
          "type": "integer",
          "default": 0
        },
        "last_triggered_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivery": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivery_note": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PUT/social/automations/{automation_id}automations:write

Update social automation

Required platform scope: `automations:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "automation_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Automation Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "status": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "scope": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "scope_post_ids": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "scope_post_titles": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "match_mode": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "keywords": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "negative_keywords": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "case_sensitive": [
    {
      "type": "boolean"
    },
    {
      "type": "null"
    }
  ],
  "priority": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "stop_on_match": [
    {
      "type": "boolean"
    },
    {
      "type": "null"
    }
  ],
  "cooldown_seconds": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "max_triggers_per_day": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "once_per_participant": [
    {
      "type": "boolean"
    },
    {
      "type": "null"
    }
  ],
  "actions": [
    [
      {
        "action_type (required)": {
          "type": "string"
        },
        "message_text": [
          "string",
          "null"
        ],
        "message_variants": [
          "array",
          "null"
        ],
        "delay_seconds": {
          "type": "integer",
          "default": 0
        },
        "config": [
          "object",
          "null"
        ]
      }
    ],
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "string"
        },
        "name (required)": {
          "type": "string"
        },
        "trigger (required)": {
          "type": "string"
        },
        "status (required)": {
          "type": "string"
        },
        "platform (required)": {
          "type": "string"
        },
        "account_id (required)": {
          "type": "integer"
        },
        "account_name (required)": {
          "type": "string"
        },
        "account_handle": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "account_avatar": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "account_connected": {
          "type": "boolean",
          "default": true
        },
        "scope (required)": {
          "type": "string"
        },
        "scope_post_ids": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scope_post_titles": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "match_mode (required)": {
          "type": "string"
        },
        "keywords": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "negative_keywords": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "case_sensitive": {
          "type": "boolean",
          "default": false
        },
        "priority (required)": {
          "type": "integer"
        },
        "stop_on_match (required)": {
          "type": "boolean"
        },
        "cooldown_seconds (required)": {
          "type": "integer"
        },
        "max_triggers_per_day (required)": {
          "type": "integer"
        },
        "once_per_participant (required)": {
          "type": "boolean"
        },
        "actions": [
          {
            "id (required)": {
              "type": "integer"
            },
            "position (required)": {
              "type": "integer"
            },
            "action_type (required)": {
              "type": "string"
            },
            "message_text": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "message_variants": [
              [
                "string"
              ],
              {
                "type": "null"
              }
            ],
            "delay_seconds": {
              "type": "integer",
              "default": 0
            },
            "config": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          }
        ],
        "trigger_count": {
          "type": "integer",
          "default": 0
        },
        "last_triggered_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivery": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivery_note": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/social/automations/{automation_id}/toggleautomations:write

Toggle social automation

Required platform scope: `automations:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "automation_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Automation Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "string"
        },
        "name (required)": {
          "type": "string"
        },
        "trigger (required)": {
          "type": "string"
        },
        "status (required)": {
          "type": "string"
        },
        "platform (required)": {
          "type": "string"
        },
        "account_id (required)": {
          "type": "integer"
        },
        "account_name (required)": {
          "type": "string"
        },
        "account_handle": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "account_avatar": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "account_connected": {
          "type": "boolean",
          "default": true
        },
        "scope (required)": {
          "type": "string"
        },
        "scope_post_ids": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scope_post_titles": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "match_mode (required)": {
          "type": "string"
        },
        "keywords": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "negative_keywords": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "case_sensitive": {
          "type": "boolean",
          "default": false
        },
        "priority (required)": {
          "type": "integer"
        },
        "stop_on_match (required)": {
          "type": "boolean"
        },
        "cooldown_seconds (required)": {
          "type": "integer"
        },
        "max_triggers_per_day (required)": {
          "type": "integer"
        },
        "once_per_participant (required)": {
          "type": "boolean"
        },
        "actions": [
          {
            "id (required)": {
              "type": "integer"
            },
            "position (required)": {
              "type": "integer"
            },
            "action_type (required)": {
              "type": "string"
            },
            "message_text": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "message_variants": [
              [
                "string"
              ],
              {
                "type": "null"
              }
            ],
            "delay_seconds": {
              "type": "integer",
              "default": 0
            },
            "config": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          }
        ],
        "trigger_count": {
          "type": "integer",
          "default": 0
        },
        "last_triggered_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivery": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivery_note": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
DELETE/social/automations/{automation_id}automations:write

Delete social automation

Required platform scope: `automations:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "automation_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Automation Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/social/automations/testautomations:write

Test social automations

Dry-runs a message against an account's automations without sending anything. Reports why each automation declined rather than only whether one matched, so a keyword that looks like it should fire can be diagnosed here instead of by posting a real comment and waiting. Required platform scope: `automations:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "account_id (required)": {
    "type": "integer"
  },
  "trigger": {
    "type": "string",
    "default": "comment_received"
  },
  "message_text": {
    "type": "string",
    "default": ""
  },
  "post_id": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "matched (required)": {
          "type": "boolean"
        },
        "match": [
          {
            "automation_id (required)": {
              "type": "string"
            },
            "automation_name (required)": {
              "type": "string"
            },
            "matched_keyword": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "would_run": [
              {
                "type": "object"
              }
            ]
          },
          {
            "type": "null"
          }
        ],
        "evaluated": [
          {
            "type": "object"
          }
        ],
        "info": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/automations/{automation_id}/executionsautomations:read

List automation executions

Recent runs and skips for one automation -- the answer to "why didn't it fire". Includes declined events with their reason (cooldown, negative keyword, expired messaging window), which previously vanished into a `continue` in the engine. Required platform scope: `automations:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "automation_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Automation Id"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "maximum": 200,
      "minimum": 1,
      "default": 50,
      "title": "Limit"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "id (required)": {
            "type": "integer"
          },
          "automation_id (required)": {
            "type": "string"
          },
          "trigger (required)": {
            "type": "string"
          },
          "status (required)": {
            "type": "string"
          },
          "skip_reason": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "matched_keyword": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "participant_id": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "error_detail": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "actions_run": [
            [
              {
                "type": "object"
              }
            ],
            {
              "type": "null"
            }
          ],
          "created_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/analytics/overviewanalytics:read

Get social analytics overview

Cross-platform analytics from saved reports; collection runs in Celery. Metrics a platform does not report come back as null with a matching entry in `notices`, so the dashboard can show what is missing and why. Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "range",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "description": "One of 7d, 28d, 30d, 90d, 365d",
      "default": "28d",
      "title": "Range"
    },
    "description": "One of 7d, 28d, 30d, 90d, 365d"
  },
  {
    "name": "platform",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Restrict to a single platform",
      "title": "Platform"
    },
    "description": "Restrict to a single platform"
  },
  {
    "name": "refresh",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "description": "Refresh the overview snapshot",
      "default": false,
      "title": "Refresh"
    },
    "description": "Refresh the overview snapshot"
  },
  {
    "name": "account_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1
        },
        {
          "type": "null"
        }
      ],
      "description": "Restrict to one account in this workspace",
      "title": "Account Id"
    },
    "description": "Restrict to one account in this workspace"
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/analytics/video/{account_id}/{video_id}analytics:read

Get social analytics video

Per-video deep dive, including the real YouTube audience retention curve. Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "video_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "title": "Video Id"
    }
  },
  {
    "name": "range",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "default": "28d",
      "title": "Range"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/youtube/insights/channel/{account_id}analytics:read

Get youtube channel insights

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/youtube/insights/videos/{account_id}analytics:read

Get youtube channel videos

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 25,
      "title": "Limit"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/instagram/insights/account/{account_id}analytics:read

Get instagram account insights

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "period",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "default": "day",
      "title": "Period"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/instagram/insights/media/{account_id}analytics:read

Get instagram media insights

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 25,
      "title": "Limit"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/instagram/insights/stories/{account_id}analytics:read

Get instagram stories insights

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/facebook/insights/page/{account_id}analytics:read

Get facebook page insights

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "period",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "default": "day",
      "title": "Period"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/facebook/insights/account/{account_id}analytics:read

Get facebook page insights

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "period",
    "in": "query",
    "required": false,
    "schema": {
      "type": "string",
      "default": "day",
      "title": "Period"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/facebook/insights/posts/{account_id}analytics:read

Get facebook posts insights

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 25,
      "title": "Limit"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/tiktok/insights/account/{account_id}analytics:read

Get tiktok account insights

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/social/tiktok/insights/videos/{account_id}analytics:read

Get tiktok user videos

Required platform scope: `analytics:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "account_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Account Id"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 20,
      "title": "Limit"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/whatsapp/overviewinbox:read

Get whatsapp overview

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "active_conversations (required)": {
          "type": "integer"
        },
        "unread_conversations (required)": {
          "type": "integer"
        },
        "templates_pending (required)": {
          "type": "integer"
        },
        "templates_approved (required)": {
          "type": "integer"
        },
        "contacts_count (required)": {
          "type": "integer"
        },
        "last_message_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/whatsapp/conversationsinbox:read

List whatsapp conversations

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "integration_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Integration Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "id (required)": {
            "type": "integer"
          },
          "contact_id (required)": {
            "type": "integer"
          },
          "contact_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_phone": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_username": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "linked_email": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "linked_sent_email_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "email_linked_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "status": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "last_message_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "last_message_preview": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "unread_count": {
            "type": "integer",
            "default": 0
          },
          "customer_service_window_expires_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "template_required": {
            "type": "boolean",
            "default": false
          },
          "assigned_user_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "assigned_user_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "ai_auto_reply_status": {
            "type": "string",
            "default": "active"
          },
          "ai_auto_reply_reason": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "ai_auto_reply_completed_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "window_active": {
            "type": "boolean",
            "default": false
          },
          "created_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "updated_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/whatsapp/conversations/{conversation_id}inbox:read

Get whatsapp conversation

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "conversation_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Conversation Id"
    }
  },
  {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 50,
      "title": "Limit"
    }
  },
  {
    "name": "offset",
    "in": "query",
    "required": false,
    "schema": {
      "type": "integer",
      "default": 0,
      "title": "Offset"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "conversation (required)": {
          "id (required)": {
            "type": "integer"
          },
          "contact_id (required)": {
            "type": "integer"
          },
          "contact_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_phone": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_username": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "linked_email": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "linked_sent_email_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "email_linked_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "status": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "last_message_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "last_message_preview": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "unread_count": {
            "type": "integer",
            "default": 0
          },
          "customer_service_window_expires_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "template_required": {
            "type": "boolean",
            "default": false
          },
          "assigned_user_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "assigned_user_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "ai_auto_reply_status": {
            "type": "string",
            "default": "active"
          },
          "ai_auto_reply_reason": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "ai_auto_reply_completed_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "window_active": {
            "type": "boolean",
            "default": false
          },
          "created_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "updated_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "contact (required)": {
          "id (required)": {
            "type": "integer"
          },
          "profile_picture_url": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_phone": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_user_id": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_username": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "linked_email": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "linked_sent_email_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "email_linked_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "tags": [
            {
              "type": "string"
            }
          ],
          "notes_summary": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "assigned_user_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "assigned_user_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "last_inbound_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "last_outbound_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "created_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "updated_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "messages (required)": [
          {
            "id (required)": {
              "type": "integer"
            },
            "meta_message_id": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "reply_to_message_id": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "reply_to_meta_message_id": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "reaction_target_message_id": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "reaction_target_meta_message_id": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "reaction_emoji": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "message_type": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "message_body": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "media_url": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "template_name": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "template_language": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "direction": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "status": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "sent_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "delivered_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "read_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "failed_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "customer_service_window_expires_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "created_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "updated_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        ],
        "notes (required)": [
          {
            "id (required)": {
              "type": "integer"
            },
            "conversation_id (required)": {
              "type": "integer"
            },
            "contact_id (required)": {
              "type": "integer"
            },
            "user_id": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "user_name": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "note_body (required)": {
              "type": "string"
            },
            "created_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "updated_at": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        ],
        "suggested_replies": [
          {
            "type": "string"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/whatsapp/conversations/{conversation_id}/replyinbox:write

Reply to whatsapp conversation

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "conversation_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Conversation Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "body": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "reply_to_message_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "media_url": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "media_type": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "meta_message_id": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "reply_to_message_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "reply_to_meta_message_id": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "reaction_target_message_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "reaction_target_meta_message_id": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "reaction_emoji": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "message_type": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "message_body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "media_url": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "template_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "template_language": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "direction": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "status": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "sent_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivered_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "read_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "failed_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "customer_service_window_expires_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/whatsapp/conversations/{conversation_id}inbox:write

Update whatsapp conversation

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "conversation_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Conversation Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "status": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "assigned_user_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "ai_auto_reply_status": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "ai_auto_reply_reason": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "contact_id (required)": {
          "type": "integer"
        },
        "contact_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_phone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_username": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "linked_email": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "linked_sent_email_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "email_linked_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "status": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "last_message_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "last_message_preview": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "unread_count": {
          "type": "integer",
          "default": 0
        },
        "customer_service_window_expires_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "template_required": {
          "type": "boolean",
          "default": false
        },
        "assigned_user_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "assigned_user_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "ai_auto_reply_status": {
          "type": "string",
          "default": "active"
        },
        "ai_auto_reply_reason": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "ai_auto_reply_completed_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "window_active": {
          "type": "boolean",
          "default": false
        },
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/whatsapp/contactsinbox:read

List whatsapp contacts

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "integration_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Integration Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "id (required)": {
            "type": "integer"
          },
          "profile_picture_url": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_phone": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_user_id": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_username": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "contact_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "linked_email": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "linked_sent_email_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "email_linked_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "tags": [
            {
              "type": "string"
            }
          ],
          "notes_summary": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "assigned_user_id": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "assigned_user_name": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "last_inbound_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "last_outbound_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "created_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "updated_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/whatsapp/contacts/{contact_id}inbox:read

Get whatsapp contact

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "contact_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Contact Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "profile_picture_url": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_phone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_user_id": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_username": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "linked_email": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "linked_sent_email_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "email_linked_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "tags": [
          {
            "type": "string"
          }
        ],
        "notes_summary": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "assigned_user_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "assigned_user_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "last_inbound_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "last_outbound_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
PATCH/whatsapp/contacts/{contact_id}inbox:write

Update whatsapp contact

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "contact_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Contact Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "contact_name": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "linked_email": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "tags": [
    [
      {
        "type": "string"
      }
    ],
    {
      "type": "null"
    }
  ],
  "notes_summary": [
    {
      "type": "string"
    },
    {
      "type": "null"
    }
  ],
  "assigned_user_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "profile_picture_url": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_phone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_user_id": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_username": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "contact_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "linked_email": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "linked_sent_email_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "email_linked_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "tags": [
          {
            "type": "string"
          }
        ],
        "notes_summary": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "assigned_user_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "assigned_user_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "last_inbound_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "last_outbound_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/whatsapp/contacts/{contact_id}/notesinbox:write

Create whatsapp note

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "contact_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Contact Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "note_body (required)": {
    "type": "string"
  }
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "conversation_id (required)": {
          "type": "integer"
        },
        "contact_id (required)": {
          "type": "integer"
        },
        "user_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "user_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "note_body (required)": {
          "type": "string"
        },
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/whatsapp/templatesinbox:read

List whatsapp templates

Required platform scope: `inbox:read`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "integration_id",
    "in": "query",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Integration Id"
    }
  },
  {
    "name": "all_integrations",
    "in": "query",
    "required": false,
    "schema": {
      "type": "boolean",
      "default": false,
      "title": "All Integrations"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": [
        {
          "id (required)": {
            "type": "integer"
          },
          "organization_id (required)": {
            "type": "integer"
          },
          "integration_id (required)": {
            "type": "integer"
          },
          "waba_id": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "meta_template_id": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "name (required)": {
            "type": "string"
          },
          "category (required)": {
            "type": "string"
          },
          "language (required)": {
            "type": "string"
          },
          "header": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "body (required)": {
            "type": "string"
          },
          "footer": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "buttons_json": [
            {
              "type": "object"
            }
          ],
          "variables_json": [
            {
              "type": "string"
            }
          ],
          "status (required)": {
            "type": "string"
          },
          "rejection_reason": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "last_submitted_at": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "created_at (required)": {
            "type": "string"
          },
          "updated_at (required)": {
            "type": "string"
          }
        }
      ]
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/whatsapp/messages/template-sendinbox:write

Send new whatsapp template message

Required platform scope: `inbox:write`. Uses the key's workspace and current owner permissions.

Parameters

[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Request: application/json

{
  "integration_id": [
    {
      "type": "integer"
    },
    {
      "type": "null"
    }
  ],
  "phone_number (required)": {
    "type": "string"
  },
  "template_id (required)": {
    "type": "integer"
  },
  "variables": [
    {
      "type": "string"
    }
  ]
}

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "meta_message_id": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "reply_to_message_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "reply_to_meta_message_id": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "reaction_target_message_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "reaction_target_meta_message_id": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "reaction_emoji": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "message_type": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "message_body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "media_url": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "template_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "template_language": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "direction": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "status": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "sent_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "delivered_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "read_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "failed_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "customer_service_window_expires_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "created_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
GET/datasets/{dataset_id}/records/{record_id}datasets:read

Get dataset record

Parameters

[
  {
    "name": "dataset_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Dataset Id"
    }
  },
  {
    "name": "record_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Record Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "id (required)": {
          "type": "integer"
        },
        "dataset_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "values (required)": [
          {
            "dataset_field_id (required)": {
              "type": "integer"
            },
            "value": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "id (required)": {
              "type": "integer"
            },
            "dataset_record_id (required)": {
              "type": "integer"
            },
            "field (required)": {
              "field_key (required)": {
                "type": "string"
              },
              "field_name (required)": {
                "type": "string"
              },
              "field_type (required)": {
                "type": "string"
              },
              "is_required": {
                "type": "boolean",
                "default": false
              },
              "id (required)": {
                "type": "integer"
              },
              "dataset_id (required)": {
                "type": "integer"
              }
            }
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaigns/{campaign_id}/startcampaigns:write

Start campaign

Stop cancels pending work and marks the campaign deleted. Pause preserves it for resume. Start launches a draft or resumes eligible campaigns.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "channel": {
          "type": "string",
          "default": "email"
        },
        "type": {
          "type": "string",
          "enum": [
            "sales"
          ]
        },
        "flow_type": {
          "type": "string",
          "enum": [
            "template",
            "ai_powered"
          ]
        },
        "dataset_id (required)": {
          "type": "integer"
        },
        "template_id": [
          {},
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_objective": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "ai_fields": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "emails_per_day": {
          "type": "integer",
          "default": 50
        },
        "interval_minutes": {
          "type": "integer",
          "default": 0
        },
        "auto_reply_enabled": {
          "type": "boolean",
          "default": false
        },
        "followup_objectives": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "style_tune": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "min_reply_minutes": {
          "type": "integer",
          "default": 60
        },
        "max_reply_minutes": {
          "type": "integer",
          "default": 300
        },
        "show_unsubscribe": {
          "type": "boolean",
          "default": false
        },
        "unsubscribe_text": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scheduled_start_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "schedule_config": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "timezone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "connected_account_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "whatsapp_template_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "whatsapp_integration_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "status (required)": {
          "type": "string",
          "enum": [
            "draft",
            "active",
            "paused",
            "paused_limit",
            "paused_by_user",
            "completed",
            "scheduled",
            "initializing",
            "deleted",
            "failed",
            "failed_init"
          ]
        },
        "status_message": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          {
            "type": "object"
          }
        ],
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaigns/{campaign_id}/pausecampaigns:write

Pause campaign

Stop cancels pending work and marks the campaign deleted. Pause preserves it for resume. Start launches a draft or resumes eligible campaigns.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "channel": {
          "type": "string",
          "default": "email"
        },
        "type": {
          "type": "string",
          "enum": [
            "sales"
          ]
        },
        "flow_type": {
          "type": "string",
          "enum": [
            "template",
            "ai_powered"
          ]
        },
        "dataset_id (required)": {
          "type": "integer"
        },
        "template_id": [
          {},
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_objective": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "ai_fields": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "emails_per_day": {
          "type": "integer",
          "default": 50
        },
        "interval_minutes": {
          "type": "integer",
          "default": 0
        },
        "auto_reply_enabled": {
          "type": "boolean",
          "default": false
        },
        "followup_objectives": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "style_tune": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "min_reply_minutes": {
          "type": "integer",
          "default": 60
        },
        "max_reply_minutes": {
          "type": "integer",
          "default": 300
        },
        "show_unsubscribe": {
          "type": "boolean",
          "default": false
        },
        "unsubscribe_text": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scheduled_start_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "schedule_config": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "timezone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "connected_account_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "whatsapp_template_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "whatsapp_integration_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "status (required)": {
          "type": "string",
          "enum": [
            "draft",
            "active",
            "paused",
            "paused_limit",
            "paused_by_user",
            "completed",
            "scheduled",
            "initializing",
            "deleted",
            "failed",
            "failed_init"
          ]
        },
        "status_message": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          {
            "type": "object"
          }
        ],
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaigns/{campaign_id}/resumecampaigns:write

Resume campaign

Stop cancels pending work and marks the campaign deleted. Pause preserves it for resume. Start launches a draft or resumes eligible campaigns.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {
        "name (required)": {
          "type": "string"
        },
        "channel": {
          "type": "string",
          "default": "email"
        },
        "type": {
          "type": "string",
          "enum": [
            "sales"
          ]
        },
        "flow_type": {
          "type": "string",
          "enum": [
            "template",
            "ai_powered"
          ]
        },
        "dataset_id (required)": {
          "type": "integer"
        },
        "template_id": [
          {},
          {
            "type": "null"
          }
        ],
        "template_variants": [
          [
            {
              "source_template_id": [
                "integer",
                "null"
              ],
              "label (required)": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "default": ""
              },
              "body": {
                "type": "string",
                "default": ""
              },
              "followups": [
                "object"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_objective": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "ai_fields": [
          [
            {
              "type": "string"
            }
          ],
          {
            "type": "null"
          }
        ],
        "emails_per_day": {
          "type": "integer",
          "default": 50
        },
        "interval_minutes": {
          "type": "integer",
          "default": 0
        },
        "auto_reply_enabled": {
          "type": "boolean",
          "default": false
        },
        "followup_objectives": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "style_tune": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "min_reply_minutes": {
          "type": "integer",
          "default": 60
        },
        "max_reply_minutes": {
          "type": "integer",
          "default": 300
        },
        "show_unsubscribe": {
          "type": "boolean",
          "default": false
        },
        "unsubscribe_text": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "attachment_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "scheduled_start_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "schedule_config": [
          {
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "timezone": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "connected_account_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "whatsapp_template_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "whatsapp_integration_ids": [
          [
            {
              "type": "integer"
            }
          ],
          {
            "type": "null"
          }
        ],
        "ai_followups": [
          [
            {
              "type": "object"
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_id": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "id (required)": {
          "type": "integer"
        },
        "status (required)": {
          "type": "string",
          "enum": [
            "draft",
            "active",
            "paused",
            "paused_limit",
            "paused_by_user",
            "completed",
            "scheduled",
            "initializing",
            "deleted",
            "failed",
            "failed_init"
          ]
        },
        "status_message": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "user_id (required)": {
          "type": "integer"
        },
        "organization_id (required)": {
          "type": "integer"
        },
        "created_at (required)": {
          "type": "string"
        },
        "updated_at": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "subject": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "body": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "followups": [
          {
            "type": "object"
          }
        ],
        "attachments": [
          [
            {
              "filename (required)": {
                "type": "string"
              },
              "content_type": [
                "string",
                "null"
              ],
              "file_size": [
                "integer",
                "null"
              ],
              "id (required)": {
                "type": "integer"
              },
              "created_at (required)": {
                "type": "string"
              },
              "file_url": [
                "string",
                "null"
              ]
            }
          ],
          {
            "type": "null"
          }
        ],
        "brand_name": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
POST/campaigns/{campaign_id}/stopcampaigns:write

Stop campaign

Stop cancels pending work and marks the campaign deleted. Pause preserves it for resume. Start launches a draft or resumes eligible campaigns.

Parameters

[
  {
    "name": "campaign_id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "integer",
      "title": "Campaign Id"
    }
  },
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Required for JSON mutations; use a unique value per action.",
      "title": "Idempotency-Key"
    },
    "description": "Required for JSON mutations; use a unique value per action."
  }
]

Responses

{
  "200": {
    "description": "Successful Response",
    "content": {
      "application/json": {}
    }
  },
  "422": {
    "description": "Validation Error",
    "content": {
      "application/json": {
        "detail": [
          {
            "loc (required)": [
              [
                "string",
                "integer"
              ]
            ],
            "msg (required)": {
              "type": "string"
            },
            "type (required)": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}

Errors, retries and request history

Responses use FastAPI’s detail field. Successful resource responses include X-Request-ID. Read request receipts with GET /requests using audit:read. Receipts expose metadata, never message bodies or provider credentials.

StatusMeaning / action
400Invalid action or missing Idempotency-Key. Correct the request.
401Missing, invalid or revoked key; key owner no longer active.
402Workspace subscription or credit requirement.
403Missing API scope or current owner permission.
404Resource unavailable in this workspace.
409State conflict, reconnect requirement, or reused idempotency key. Inspect the resource.
422Payload validation error; inspect detail for field locations.
429120 authenticated requests per minute per key. Wait for Retry-After.
500 / 502 / 503Service or provider failure. Inspect the operation before attempting another send.

A completed JSON mutation replays its original response with Idempotency-Replayed: true. Keys are unique across your workspace and receipts survive restarts and key rotation. Reusing a key with different content returns 409. If a process stops after provider dispatch, the receipt stays processing or uncertain and repeat dispatch is blocked. Inspect resource status and the provider before taking further action. This protects against duplicate dispatch; providers and background jobs still determine final delivery.

Legacy /platform-api/datasets endpoints remain available. Key creation, rotation and revocation use the signed-in admin session, rather than a public API key. Use the OpenAPI definition to build clients or future MCP tools; OAuth connection, billing and destructive workspace administration stay in the app.