{
  "openapi": "3.1.0",
  "info": {
    "title": "SlickText API (New Platform)",
    "version": "2026-04-29",
    "summary": "Initial machine-readable spec for the published new-platform SlickText docs.",
    "description": "This OpenAPI document captures the public v2 documentation currently published in this repository.\nIt covers the documented REST endpoints under `https://dev.slicktext.com/v1` and the documented webhook\nevent payloads exposed by SlickText.\n\nThe spec is intentionally conservative where the prose docs do not fully enumerate every field. Those\nrequest and response objects allow additional properties so the document is immediately useful for structured\nretrieval, client generation, validation, and AI-assisted answers without over-claiming undocumented shapes.\n"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "servers": [
    {
      "url": "https://dev.slicktext.com/v1",
      "description": "Production API base URL"
    }
  ],
  "security": [
    {
      "bearerAuth": [

      ]
    }
  ],
  "tags": [
    {
      "name": "Brands"
    },
    {
      "name": "Contacts"
    },
    {
      "name": "Messages"
    },
    {
      "name": "Keywords"
    },
    {
      "name": "Campaigns"
    },
    {
      "name": "Lists"
    },
    {
      "name": "Segments"
    },
    {
      "name": "Links"
    },
    {
      "name": "Custom Fields"
    },
    {
      "name": "Workflows"
    },
    {
      "name": "Website Popups"
    },
    {
      "name": "Inbox"
    },
    {
      "name": "Analytics"
    },
    {
      "name": "Webhooks"
    }
  ],
  "paths": {
    "/brands": {
      "get": {
        "tags": [
          "Brands"
        ],
        "operationId": "getBrand",
        "summary": "Retrieve brand information",
        "description": "Returns information about the authenticated brand context.",
        "responses": {
          "200": {
            "description": "Brand information retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Brand"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/usage": {
      "get": {
        "tags": [
          "Brands"
        ],
        "operationId": "getBrandUsage",
        "summary": "Retrieve credit usage for a brand",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          }
        ],
        "responses": {
          "200": {
            "description": "Brand usage retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandUsage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/contacts": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "operationId": "listContacts",
        "summary": "Retrieve all contacts",
        "description": "Supports pagination and exact-match filtering on fields present in the resource.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Contacts retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "operationId": "createContact",
        "summary": "Create a contact",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ContactUpsert"
        },
        "responses": {
          "200": {
            "description": "Contact created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/contacts/{id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "operationId": "getContact",
        "summary": "Retrieve a specific contact",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Contacts"
        ],
        "operationId": "updateContact",
        "summary": "Update a specific contact",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ContactUpsert"
        },
        "responses": {
          "200": {
            "description": "Contact updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "operationId": "deleteContact",
        "summary": "Delete a specific contact",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/messages": {
      "get": {
        "tags": [
          "Messages"
        ],
        "operationId": "listMessages",
        "summary": "Retrieve all messages",
        "description": "Supports pagination and exact-match filtering on message fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Messages retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/keywords": {
      "get": {
        "tags": [
          "Keywords"
        ],
        "operationId": "listKeywords",
        "summary": "Retrieve all keywords",
        "description": "Supports pagination and exact-match filtering on keyword fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Keywords retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeywordCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/keywords/{id}": {
      "get": {
        "tags": [
          "Keywords"
        ],
        "operationId": "getKeyword",
        "summary": "Retrieve a specific keyword",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Keyword retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Keyword"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Keywords"
        ],
        "operationId": "deleteKeyword",
        "summary": "Delete a specific keyword",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Keyword deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/campaigns": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "operationId": "listCampaigns",
        "summary": "Retrieve all campaigns",
        "description": "Supports pagination and exact-match filtering on campaign fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Campaigns retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Campaigns"
        ],
        "operationId": "createCampaign",
        "summary": "Create a campaign",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CampaignUpsert"
        },
        "responses": {
          "200": {
            "description": "Campaign created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/campaigns/{id}": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "operationId": "getCampaign",
        "summary": "Retrieve a specific campaign",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Campaign retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Campaigns"
        ],
        "operationId": "updateCampaign",
        "summary": "Update a specific campaign",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CampaignUpsert"
        },
        "responses": {
          "200": {
            "description": "Campaign updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Campaigns"
        ],
        "operationId": "deleteCampaign",
        "summary": "Delete a specific campaign",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Campaign deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/lists": {
      "get": {
        "tags": [
          "Lists"
        ],
        "operationId": "listLists",
        "summary": "Retrieve all contact lists",
        "description": "Supports pagination and exact-match filtering on list fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact lists retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Lists"
        ],
        "operationId": "createList",
        "summary": "Create a contact list",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ListUpsert"
        },
        "responses": {
          "200": {
            "description": "Contact list created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/lists/{id}": {
      "get": {
        "tags": [
          "Lists"
        ],
        "operationId": "getList",
        "summary": "Retrieve a specific contact list",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact list retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Lists"
        ],
        "operationId": "updateList",
        "summary": "Update a specific contact list",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ListUpsert"
        },
        "responses": {
          "200": {
            "description": "Contact list updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Lists"
        ],
        "operationId": "deleteList",
        "summary": "Delete a specific contact list",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact list deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/lists/{id}/contacts/count": {
      "get": {
        "tags": [
          "Lists"
        ],
        "operationId": "getListContactCount",
        "summary": "Retrieve a contact count for a list",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact count retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/lists/{id}/contacts": {
      "get": {
        "tags": [
          "Lists"
        ],
        "operationId": "listListContacts",
        "summary": "Retrieve contacts in a list",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "List contacts retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/lists/contacts": {
      "post": {
        "tags": [
          "Lists"
        ],
        "operationId": "addContactsToLists",
        "summary": "Add contacts to one or more lists",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ListContactsMutation"
        },
        "responses": {
          "200": {
            "description": "Contacts added to lists successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericSuccessObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Lists"
        ],
        "operationId": "removeContactsFromLists",
        "summary": "Remove contacts from one or more lists",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ListContactsMutation"
        },
        "responses": {
          "200": {
            "description": "Contacts removed from lists successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericSuccessObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/segments": {
      "get": {
        "tags": [
          "Segments"
        ],
        "operationId": "listSegments",
        "summary": "Retrieve all segments",
        "description": "Supports pagination and exact-match filtering on segment fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Segments retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/segments/{id}": {
      "get": {
        "tags": [
          "Segments"
        ],
        "operationId": "getSegment",
        "summary": "Retrieve a specific segment",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Segment retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Segment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Segments"
        ],
        "operationId": "updateSegment",
        "summary": "Update a specific segment",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/SegmentUpsert"
        },
        "responses": {
          "200": {
            "description": "Segment updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Segment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Segments"
        ],
        "operationId": "deleteSegment",
        "summary": "Delete a specific segment",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Segment deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/segments/{id}/contacts/count": {
      "get": {
        "tags": [
          "Segments"
        ],
        "operationId": "getSegmentContactCount",
        "summary": "Retrieve a contact count for a segment",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact count retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/segments/{id}/contacts": {
      "get": {
        "tags": [
          "Segments"
        ],
        "operationId": "listSegmentContacts",
        "summary": "Retrieve contacts in a segment",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Segment contacts retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/links": {
      "get": {
        "tags": [
          "Links"
        ],
        "operationId": "listLinks",
        "summary": "Retrieve all links",
        "description": "Supports pagination and exact-match filtering on link fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Links retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Links"
        ],
        "operationId": "createLink",
        "summary": "Create a link",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LinkUpsert"
        },
        "responses": {
          "200": {
            "description": "Link created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Link"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/links/{id}": {
      "get": {
        "tags": [
          "Links"
        ],
        "operationId": "getLink",
        "summary": "Retrieve a specific link",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Link retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Link"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Links"
        ],
        "operationId": "updateLink",
        "summary": "Update a specific link",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LinkUpsert"
        },
        "responses": {
          "200": {
            "description": "Link updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Link"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Links"
        ],
        "operationId": "deleteLink",
        "summary": "Delete a specific link",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Link deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/custom-fields": {
      "get": {
        "tags": [
          "Custom Fields"
        ],
        "operationId": "listCustomFields",
        "summary": "Retrieve all custom fields",
        "description": "Supports pagination and exact-match filtering on custom field fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Custom fields retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomFieldCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Custom Fields"
        ],
        "operationId": "createCustomField",
        "summary": "Create a custom field",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CustomFieldUpsert"
        },
        "responses": {
          "200": {
            "description": "Custom field created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomField"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/custom-fields/{id}": {
      "get": {
        "tags": [
          "Custom Fields"
        ],
        "operationId": "getCustomField",
        "summary": "Retrieve a specific custom field",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Custom field retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomField"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Custom Fields"
        ],
        "operationId": "updateCustomField",
        "summary": "Update a specific custom field",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CustomFieldUpsert"
        },
        "responses": {
          "200": {
            "description": "Custom field updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomField"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Custom Fields"
        ],
        "operationId": "deleteCustomField",
        "summary": "Delete a specific custom field",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Custom field deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/workflows": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "operationId": "listWorkflows",
        "summary": "Retrieve all workflows",
        "description": "Supports pagination and exact-match filtering on workflow fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflows retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/workflows/{id}": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "operationId": "getWorkflow",
        "summary": "Retrieve a specific workflow",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Workflows"
        ],
        "operationId": "updateWorkflow",
        "summary": "Update a specific workflow",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowUpsert"
        },
        "responses": {
          "200": {
            "description": "Workflow updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Workflows"
        ],
        "operationId": "deleteWorkflow",
        "summary": "Delete a specific workflow",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/website-popups": {
      "get": {
        "tags": [
          "Website Popups"
        ],
        "operationId": "listWebsitePopups",
        "summary": "Retrieve all website popups",
        "description": "Supports pagination and exact-match filtering on website popup fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Website popups retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsitePopupCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/website-popups/{id}": {
      "get": {
        "tags": [
          "Website Popups"
        ],
        "operationId": "getWebsitePopup",
        "summary": "Retrieve a specific website popup",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Website popup retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsitePopup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Website Popups"
        ],
        "operationId": "updateWebsitePopup",
        "summary": "Update a specific website popup",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/WebsitePopupUpsert"
        },
        "responses": {
          "200": {
            "description": "Website popup updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsitePopup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Website Popups"
        ],
        "operationId": "deleteWebsitePopup",
        "summary": "Delete a specific website popup",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Website popup deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/inbox-threads": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "operationId": "listInboxThreads",
        "summary": "Retrieve inbox threads",
        "description": "Supports pagination and exact-match filtering on inbox thread fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Inbox threads retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxThreadCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/inbox-threads/{id}/content": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "operationId": "getInboxThreadContent",
        "summary": "Retrieve content for a specific inbox thread",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Inbox thread content retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxThreadContent"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/inbox-threads/{id}": {
      "put": {
        "tags": [
          "Inbox"
        ],
        "operationId": "updateInboxThread",
        "summary": "Update a specific inbox thread",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/InboxThreadUpsert"
        },
        "responses": {
          "200": {
            "description": "Inbox thread updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxThread"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/inbox-tags": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "operationId": "listInboxTags",
        "summary": "Retrieve inbox tags",
        "description": "Supports exact-match filtering on inbox tag fields.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Offset"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Inbox tags retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxTagCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/inbox-tags/{id}": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "operationId": "getInboxTag",
        "summary": "Retrieve a specific inbox tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Inbox tag retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxTag"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Inbox"
        ],
        "operationId": "updateInboxTag",
        "summary": "Update a specific inbox tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/InboxTagUpsert"
        },
        "responses": {
          "200": {
            "description": "Inbox tag updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxTag"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Inbox"
        ],
        "operationId": "deleteInboxTag",
        "summary": "Delete a specific inbox tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Inbox tag deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyArrayResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/contacts": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getContactAnalytics",
        "summary": "Retrieve contact analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Group"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/contacts/growth": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getContactGrowthAnalytics",
        "summary": "Retrieve contact growth analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Group"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact growth analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/contacts/create-delete-events": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getContactCreateDeleteAnalytics",
        "summary": "Retrieve contact create/delete event analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Group"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact create/delete analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/contacts/opt-in-status-events": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getContactOptInStatusAnalytics",
        "summary": "Retrieve contact opt-in status analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Group"
          }
        ],
        "responses": {
          "200": {
            "description": "Contact opt-in status analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/campaigns": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getCampaignAnalytics",
        "summary": "Retrieve campaign analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Group"
          }
        ],
        "responses": {
          "200": {
            "description": "Campaign analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/campaigns/{campaign_id}": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getCampaignDetailAnalytics",
        "summary": "Retrieve analytics for a specific campaign",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/CampaignId"
          },
          {
            "$ref": "#/components/parameters/Group"
          }
        ],
        "responses": {
          "200": {
            "description": "Campaign detail analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/messages": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getMessageAnalytics",
        "summary": "Retrieve message analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Group"
          }
        ],
        "responses": {
          "200": {
            "description": "Message analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/message/credits": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getMessageCreditAnalytics",
        "summary": "Retrieve message credit analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Group"
          }
        ],
        "responses": {
          "200": {
            "description": "Message credit analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/inbox/users": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getInboxUserAnalytics",
        "summary": "Retrieve inbox user analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Compare"
          }
        ],
        "responses": {
          "200": {
            "description": "Inbox user analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/inbox/tags": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getInboxTagAnalytics",
        "summary": "Retrieve inbox tag analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/Compare"
          }
        ],
        "responses": {
          "200": {
            "description": "Inbox tag analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/brands/{brand_id}/analytics/workflows/{id}": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "operationId": "getWorkflowAnalytics",
        "summary": "Retrieve workflow analytics",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow analytics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "webhooks": {
    "contactCreated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Contact created event",
        "description": "Fired when a new contact is created for a brand.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SlickTextSignature"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactCreatedWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 2xx response within 5 seconds to acknowledge receipt."
          }
        }
      }
    },
    "contactUpdated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Contact updated event",
        "parameters": [
          {
            "$ref": "#/components/parameters/SlickTextSignature"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdatedWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 2xx response within 5 seconds to acknowledge receipt."
          }
        }
      }
    },
    "contactDeleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Contact deleted event",
        "parameters": [
          {
            "$ref": "#/components/parameters/SlickTextSignature"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactDeletedWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 2xx response within 5 seconds to acknowledge receipt."
          }
        }
      }
    },
    "campaignSent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Campaign sent event",
        "parameters": [
          {
            "$ref": "#/components/parameters/SlickTextSignature"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignSentWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 2xx response within 5 seconds to acknowledge receipt."
          }
        }
      }
    },
    "campaignFailed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Campaign failed event",
        "parameters": [
          {
            "$ref": "#/components/parameters/SlickTextSignature"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignFailedWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 2xx response within 5 seconds to acknowledge receipt."
          }
        }
      }
    },
    "inboxMessageReceived": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Inbox message received event",
        "parameters": [
          {
            "$ref": "#/components/parameters/SlickTextSignature"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboxMessageReceivedWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 2xx response within 5 seconds to acknowledge receipt."
          }
        }
      }
    },
    "inboxThreadStatusChanged": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Inbox conversation status changed event",
        "parameters": [
          {
            "$ref": "#/components/parameters/SlickTextSignature"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboxThreadStatusChangedWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 2xx response within 5 seconds to acknowledge receipt."
          }
        }
      }
    },
    "inboxThreadAssigneeChanged": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Inbox conversation assignee changed event",
        "parameters": [
          {
            "$ref": "#/components/parameters/SlickTextSignature"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboxThreadAssigneeChangedWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 2xx response within 5 seconds to acknowledge receipt."
          }
        }
      }
    },
    "inboxThreadTagsChanged": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Inbox conversation tags changed event",
        "parameters": [
          {
            "$ref": "#/components/parameters/SlickTextSignature"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboxThreadTagsChangedWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 2xx response within 5 seconds to acknowledge receipt."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "Supply the SlickText API key in the Authorization header as a bearer token."
      }
    },
    "parameters": {
      "BrandId": {
        "name": "brand_id",
        "in": "path",
        "required": true,
        "description": "The numeric brand identifier.",
        "schema": {
          "type": "integer"
        }
      },
      "ResourceId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The resource identifier.",
        "schema": {
          "type": "integer"
        }
      },
      "CampaignId": {
        "name": "campaign_id",
        "in": "path",
        "required": true,
        "description": "The campaign identifier.",
        "schema": {
          "type": "integer"
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum number of items to return. Default is 50. Maximum is 250.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 250
        }
      },
      "Offset": {
        "name": "offset",
        "in": "query",
        "description": "Number of items to skip before returning results.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "Page": {
        "name": "page",
        "in": "query",
        "description": "Zero-based page number.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "PageSize": {
        "name": "pageSize",
        "in": "query",
        "description": "Number of items to return per page.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 250
        }
      },
      "Group": {
        "name": "group",
        "in": "query",
        "description": "Grouping dimension supported by the target analytics endpoint.",
        "schema": {
          "type": "string"
        }
      },
      "Compare": {
        "name": "compare",
        "in": "query",
        "description": "Comparison mode supported by the target analytics endpoint.",
        "schema": {
          "type": "string"
        }
      },
      "SlickTextSignature": {
        "name": "x-slicktext-signature",
        "in": "header",
        "required": true,
        "description": "HMAC SHA-256 signature of the raw request payload using the webhook secret.",
        "schema": {
          "type": "string"
        }
      }
    },
    "requestBodies": {
      "ContactUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ContactUpsertRequest"
            }
          }
        }
      },
      "CampaignUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CampaignUpsertRequest"
            }
          }
        }
      },
      "ListUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListUpsertRequest"
            }
          }
        }
      },
      "ListContactsMutation": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListContactsMutationRequest"
            }
          }
        }
      },
      "SegmentUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SegmentUpsertRequest"
            }
          }
        }
      },
      "LinkUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LinkUpsertRequest"
            }
          }
        }
      },
      "CustomFieldUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CustomFieldUpsertRequest"
            }
          }
        }
      },
      "WorkflowUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowUpsertRequest"
            }
          }
        }
      },
      "WebsitePopupUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WebsitePopupUpsertRequest"
            }
          }
        }
      },
      "InboxThreadUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InboxThreadUpsertRequest"
            }
          }
        }
      },
      "InboxTagUpsert": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InboxTagUpsertRequest"
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "PagingData": {
        "type": "object",
        "properties": {
          "prevPage": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currentPage": {
            "type": [
              "integer",
              "null"
            ]
          },
          "nextPage": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currentPageString": {
            "type": [
              "string",
              "null"
            ]
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "CountResponse": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          }
        },
        "additionalProperties": true
      },
      "EmptyArrayResponse": {
        "type": "array",
        "maxItems": 0,
        "items": {
        }
      },
      "GenericSuccessObject": {
        "type": "object",
        "description": "Generic success payload used where the prose docs do not define a stricter response body.",
        "additionalProperties": true
      },
      "Brand": {
        "type": "object",
        "properties": {
          "brand_id": {
            "type": "integer"
          },
          "_account_id": {
            "type": [
              "integer",
              "string"
            ]
          },
          "name": {
            "type": "string"
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "industry": {
            "type": [
              "string",
              "null"
            ]
          },
          "use_case": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "contact_phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_updated": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "BrandUsage": {
        "type": "object",
        "properties": {
          "brand_id": {
            "type": "integer"
          },
          "brand_name": {
            "type": "string"
          },
          "total_credits": {
            "type": "integer"
          },
          "credits_used": {
            "type": "integer"
          },
          "credits_available": {
            "type": "integer"
          },
          "message_credit_limit": {
            "type": [
              "integer",
              "null"
            ]
          },
          "message_credit_limit_percentage": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "Contact": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "integer"
          },
          "_brand_id": {
            "type": "integer"
          },
          "mobile_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "opt_in_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_updated": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "ContactCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "ContactUpsertRequest": {
        "type": "object",
        "description": "Request body for creating or updating contacts. Exact supported fields are documented per endpoint.",
        "properties": {
          "mobile_number": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "custom_fields": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "Message": {
        "type": "object",
        "properties": {
          "_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "direction": {
            "type": [
              "string",
              "null"
            ]
          },
          "channel": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "_source_id": {
            "type": [
              "integer",
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "MessageCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "Keyword": {
        "type": "object",
        "properties": {
          "keyword_id": {
            "type": "integer"
          },
          "_brand_id": {
            "type": "integer"
          },
          "word": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": [
              "integer",
              "boolean",
              "null"
            ]
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_updated": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "KeywordCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Keyword"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "Campaign": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "integer"
          },
          "_brand_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "media_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "scheduled": {
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_updated": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "CampaignCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Campaign"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "CampaignUpsertRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "media_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "status": {
            "type": "string"
          },
          "scheduled": {
            "type": [
              "string",
              "null"
            ]
          },
          "audience": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "ContactList": {
        "type": "object",
        "properties": {
          "contact_list_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_brand_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": [
              "integer",
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "ListCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactList"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "ListUpsertRequest": {
        "type": "object",
        "description": "Request body for creating or updating a list.",
        "additionalProperties": true
      },
      "ListContactsMutationRequest": {
        "type": "object",
        "properties": {
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "list_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "additionalProperties": true
      },
      "Segment": {
        "type": "object",
        "properties": {
          "segment_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_brand_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": [
              "integer",
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "SegmentCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Segment"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "SegmentUpsertRequest": {
        "type": "object",
        "description": "Request body for creating or updating a segment.",
        "additionalProperties": true
      },
      "Link": {
        "type": "object",
        "properties": {
          "link_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_brand_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "active": {
            "type": [
              "integer",
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "LinkCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Link"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "LinkUpsertRequest": {
        "type": "object",
        "description": "Request body for creating or updating a link.",
        "additionalProperties": true
      },
      "CustomField": {
        "type": "object",
        "properties": {
          "custom_field_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_brand_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "data_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": [
              "integer",
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "CustomFieldCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomField"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "CustomFieldUpsertRequest": {
        "type": "object",
        "description": "Request body for creating or updating a custom field.",
        "additionalProperties": true
      },
      "Workflow": {
        "type": "object",
        "properties": {
          "workflow_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_brand_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "entry_rule": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": [
              "integer",
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "WorkflowCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workflow"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "WorkflowUpsertRequest": {
        "type": "object",
        "description": "Request body for creating or updating a workflow.",
        "additionalProperties": true
      },
      "WebsitePopup": {
        "type": "object",
        "properties": {
          "website_popup_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_brand_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": [
              "integer",
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "WebsitePopupCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebsitePopup"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "WebsitePopupUpsertRequest": {
        "type": "object",
        "description": "Request body for creating or updating a website popup.",
        "additionalProperties": true
      },
      "InboxThread": {
        "type": "object",
        "properties": {
          "_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_brand_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "unread": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_assigned_to_user_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "InboxThreadCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboxThread"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "InboxThreadContent": {
        "type": "object",
        "description": "Content payload for a single inbox thread.",
        "additionalProperties": true
      },
      "InboxThreadUpsertRequest": {
        "type": "object",
        "description": "Request body for updating an inbox thread.",
        "additionalProperties": true
      },
      "InboxTag": {
        "type": "object",
        "properties": {
          "inbox_tag_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_brand_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": [
              "integer",
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "InboxTagCollectionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboxTag"
            }
          },
          "pagingData": {
            "$ref": "#/components/schemas/PagingData"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "InboxTagUpsertRequest": {
        "type": "object",
        "description": "Request body for updating an inbox tag.",
        "additionalProperties": true
      },
      "AnalyticsResponse": {
        "type": "object",
        "description": "Analytics payload. Individual analytics endpoints expose different result shapes.",
        "additionalProperties": true
      },
      "WebhookEnvelope": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "attempts": {
            "type": "integer"
          },
          "date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "attempts",
          "date",
          "data"
        ],
        "additionalProperties": true
      },
      "ContactWebhookData": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "integer"
          },
          "_brand_id": {
            "type": "integer"
          },
          "mobile_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "opt_in_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_updated": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "CampaignWebhookData": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "integer"
          },
          "_brand_id": {
            "type": "integer"
          },
          "_created_by_user_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "media_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "status_detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_updated": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "InboxThreadWebhookData": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "contact_id": {
            "type": "integer"
          },
          "_brand_id": {
            "type": "integer"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "unread": {
            "type": [
              "integer",
              "null"
            ]
          },
          "_last_message_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_message_direction": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_message_sent": {
            "type": [
              "string",
              "null"
            ]
          },
          "_assigned_to_user_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "ContactCreatedWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ContactWebhookData"
              }
            }
          }
        ]
      },
      "ContactUpdatedWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ContactWebhookData"
              }
            }
          }
        ]
      },
      "ContactDeletedWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ContactWebhookData"
              }
            }
          }
        ]
      },
      "CampaignSentWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/CampaignWebhookData"
              }
            }
          }
        ]
      },
      "CampaignFailedWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/CampaignWebhookData"
              }
            }
          }
        ]
      },
      "InboxMessageReceivedWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/InboxThreadWebhookData"
              }
            }
          }
        ]
      },
      "InboxThreadStatusChangedWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/InboxThreadWebhookData"
              }
            }
          }
        ]
      },
      "InboxThreadAssigneeChangedWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/InboxThreadWebhookData"
              }
            }
          }
        ]
      },
      "InboxThreadTagsChangedWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/InboxThreadWebhookData"
              }
            }
          }
        ]
      }
    }
  }
}
