{
  "openapi": "3.1.1",
  "info": {
    "title": "Hyperlocal API",
    "description": "Localized WhatsApp and Facebook campaigns (contacts, templates, broadcasts and their results), and personalised agent videos.",
    "version": "1.0.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "{{API_BASE_URL}}",
      "description": "Your API environment"
    }
  ],
  "tags": [
    {
      "name": "Contacts"
    },
    {
      "name": "Contact groups"
    },
    {
      "name": "Contact localization"
    },
    {
      "name": "Preferences"
    },
    {
      "name": "Products"
    },
    {
      "name": "Product models"
    },
    {
      "name": "Templates"
    },
    {
      "name": "Localizations"
    },
    {
      "name": "Overlays"
    },
    {
      "name": "Uploads"
    },
    {
      "name": "WhatsApp templates"
    },
    {
      "name": "Facebook pages"
    },
    {
      "name": "Facebook templates"
    },
    {
      "name": "Broadcasts"
    },
    {
      "name": "Sending"
    },
    {
      "name": "Test messages"
    },
    {
      "name": "Analytics"
    },
    {
      "name": "Agent videos"
    }
  ],
  "paths": {
    "/v1/galaxy/hyperlocal/agent-video": {
      "get": {
        "operationId": "list-agent-videos",
        "parameters": [
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "processing",
                "completed",
                "failed"
              ]
            }
          },
          {
            "name": "referenceId",
            "required": false,
            "in": "query",
            "description": "Find the video sent with this referenceId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVideoListDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List agent videos",
        "tags": [
          "Agent videos"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.agent_video:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Your agent videos, newest first. Filter by `status`, or by `referenceId` to find the video you sent with that id.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-an-agent-video",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentVideoDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This referenceId was already used: the existing video.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVideoDto"
                }
              }
            }
          },
          "202": {
            "description": "Accepted — rendering has started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVideoDto"
                }
              }
            }
          },
          "400": {
            "description": "A field is missing or invalid, a link is not a public https link, the video cannot be read or is longer than 10 minutes, or the photo / logo is not an image. Nothing is charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits (`InsufficientCredits`, with `required` and `available`). Nothing is created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 402,
                      "message": "Error"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "This `referenceId` was already used for a video with different details. Nothing is created; send a new `referenceId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Video processing is unavailable right now; the credits are refunded. Try again shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 503,
                      "message": "Error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create an agent video",
        "tags": [
          "Agent videos"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.agent_video:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Append a personalised end card to your video: the agent's name, mobile number and email (plus their photo and ARN when sent), with an AI voice-over (\"For investment advice, kindly speak with {name} on mobile number {digits}\"). The card lasts 5 seconds (longer if the voice-over needs it) and matches your video's size. Returns at once with the video's `id` and status `queued`; poll Get an agent video until it is `completed` (its `videoUrl` is the finished MP4) or `failed`. Credits are charged when the video is accepted — a flat 25 credits per video, whatever its length — and refunded if it fails. Send a `referenceId` to make retries safe: the same request with the same `referenceId` returns the existing video (HTTP 200) instead of making a new one; different details under a used `referenceId` are refused (409).",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/agent-video/{id}": {
      "get": {
        "operationId": "get-an-agent-video",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVideoDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No agent video with this id in your organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get an agent video",
        "tags": [
          "Agent videos"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.agent_video:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "The video's status. Poll every 10–15 seconds: `queued` → `processing` → `completed` (`videoUrl` is the finished MP4, a permanent public link) or `failed` (`error` says why; the credits are refunded). Most videos finish within a minute or two.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/asset/from-drive": {
      "post": {
        "description": "Use an image or video that is already in your organization's assets instead of uploading it again. The file is checked against the same rules as an upload of that `kind` (PNG, JPEG, WebP or MP4; images only for a `logo` or `product`; the size limit), then copied on the server into the `hyper-local` folder. The copy is independent: moving or deleting the original later breaks nothing. Returns the copy's `url`.",
        "operationId": "use-a-file-from-your-assets",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportHyperlocalAssetFromDriveDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The file was copied into the `hyper-local` folder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HyperlocalImportedAssetResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A field failed validation, or: the asset is a folder or shortcut (`That is a folder or a shortcut — choose a file.`); its type is not accepted (`Unsupported file type. Use PNG, JPG, WebP or MP4.`); A video was sent for a `logo` or `product`, which must be images (`A logo must be an image.` / `A product must be an image.`). The file is over the limit: 25 MB for an image, 200 MB for a video (`File is too large (max 25 MB).` / `File is too large (max 200 MB).`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`assetId` is not a file in your organization's assets (`That file is no longer in Assets — it may have been moved to the trash.`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Use a file from your assets",
        "tags": [
          "Uploads"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `asset:read` and `asset:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/asset/register": {
      "post": {
        "operationId": "register-an-upload",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterHyperlocalUploadDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The file was added to your assets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HyperlocalRegisteredUploadResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A field failed validation, or `key` is not one Get an upload URL made for your organization and this `kind` (`That upload does not belong to this org.`), or the file is not in storage yet (`That upload was not found in storage — retry the upload.`), or the uploaded bytes are not the image they were sent as (`That file isn't the image its name or type says it is.`, the upload is deleted). A `logo` or `product` is stored re-encoded, without its EXIF data (`Upload a PNG, JPEG or WebP image.` when it can't be read).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Register an upload",
        "tags": [
          "Uploads"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `asset:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Step 2: after the `PUT` succeeds, file the upload in your organization's assets (in the `hyper-local` folder). Returns the file's `url`: store it on the template, contact or product. The size is read from storage.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/asset/upload-url": {
      "post": {
        "description": "Step 1 of uploading an image or video for Hyperlocal: a template creative, a contact logo or a product image. Send the `kind`, file name, content type and, ideally, its size. You get a presigned `uploadUrl`: `PUT` the file bytes to it with exactly the returned `headers` and without your API key, within `expiresIn` seconds (15 minutes). Then call Register an upload with the `key`.",
        "operationId": "get-an-upload-url",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateHyperlocalUploadPresignDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The upload URL, the headers to send with it, and the `key` to register.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HyperlocalUploadUrlResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A field failed validation, or: A video was sent for a `logo` or `product`, which must be images (`A logo must be an image.` / `A product must be an image.`). The file is over the limit: 25 MB for an image, 200 MB for a video (`File is too large (max 25 MB).` / `File is too large (max 200 MB).`). Or the file name is a program or server file, such as `.php` or `.htaccess` (`Files of this type (.php) can't be uploaded.`). Or no upload URL could be made for your organization's storage (`Could not create an upload URL`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get an upload URL",
        "tags": [
          "Uploads"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `asset:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast": {
      "get": {
        "operationId": "list-broadcasts",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, from 1.",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Broadcasts per page, 1 to 100.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 12,
              "type": "number",
              "examples": [
                12
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Only broadcasts whose title contains this text (case-insensitive).",
            "schema": {
              "type": "string",
              "examples": [
                "monsoon"
              ]
            }
          },
          {
            "name": "templateId",
            "required": false,
            "in": "query",
            "description": "Only broadcasts of this creative template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "1f6d2b9a-4c3e-4f8a-b7d1-2e9c5a0f3b64"
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "description": "Field to sort by.",
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "title",
                "createdAt"
              ],
              "examples": [
                "createdAt"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "default": "DESC",
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "examples": [
                "DESC"
              ]
            }
          },
          {
            "name": "scope",
            "required": false,
            "in": "query",
            "description": "`personal`: only broadcasts created by the member who owns the API key. `org` (the default): every broadcast. Always `personal` when that member's role has Personal view turned on.",
            "schema": {
              "type": "string",
              "enum": [
                "personal",
                "org"
              ],
              "examples": [
                "org"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of broadcasts, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BroadcastListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to fetch broadcasts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List broadcasts",
        "tags": [
          "Broadcasts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Broadcasts in your organization, newest first by default. Filter by creative template with `templateId` or by title with `search`; paginated with `page` and `limit`. Each broadcast includes its `status`, progress `counts` and its `schedule`, if any.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-a-broadcast",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBroadcastDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The broadcast was created with `status: generating`, its creatives charged and queued for rendering.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BroadcastResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input / no contacts selected\n\nNothing was created or charged. A field failed validation, or:\n\n- `No contacts selected for the broadcast`: the audience is empty.\n- `WhatsApp template not found` / `Facebook template not found`: `fk_whatsappTemplateId` / `fk_facebookTemplateId` is not one of your templates.\n- `A WhatsApp template is required — no WhatsApp template is mapped for Tamil (64 dealers).` (or Facebook): some contacts' language has no message template; map one or send the broadcast's own.\n- `We couldn't read this creative video's length, so it can't be priced. Re-upload the video and try again.`\n- `Scheduled time is in the past — pick a future date and time.`, or `Unknown timezone \"<timezone>\"`: `schedule` is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for every contact's creative, or your organization owes credits. Nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`fk_templateId` is not a creative template in your organization (`Creative template not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "The broadcast could not be created (`Failed to create broadcast`). Nothing was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a broadcast",
        "tags": [
          "Broadcasts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:create`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when you create the broadcast, all at once: one render per contact, at the rate of that contact's creative (images flat, videos per second of their length). Without enough credits nothing is created. A render that fails on our side is refunded; the charge is kept if you delete the broadcast or remove the contact. Messages are charged separately, when the broadcast is sent.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Creative generation | Rendering a personalized broadcast creative — images are a flat rate, videos are charged per second. | Image: 5 credits per creative; Video (per second): 1 credits per creative |",
            "position": "after-description"
          }
        ],
        "description": "Send a creative template to a set of contacts on WhatsApp, Facebook or both. Pick the audience with `contactIds`, or with `selectAll: true` and a `filter`. Each contact gets the version of the creative in their state's language, personalized with their details; the language is fixed now and stored on their row. Every contact's creative is charged and starts rendering straight away: poll Get a broadcast until `status` is `review`, check the creatives with List broadcast contacts, then call Send a broadcast. Add `schedule` to send it automatically instead. Each language needs a message template on each channel, either mapped on the creative template (Map message templates) or the broadcast's own `fk_whatsappTemplateId` / `fk_facebookTemplateId`. Price it first with Estimate a broadcast.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}": {
      "get": {
        "operationId": "get-a-broadcast",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The broadcast.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BroadcastResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A path ID is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Broadcast not found\n\nNo broadcast with this `id` in your organization, or it was deleted (`Broadcast <id> not found`). A member whose role has Personal view turned on gets 404 for broadcasts someone else created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a broadcast",
        "tags": [
          "Broadcasts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One broadcast. Poll it after Create a broadcast: `status` moves from `generating` to `review` (or `scheduled`) once every contact's creative has settled, and `counts` shows how many rendered or failed. While it sends, `counts.sent` and `counts.failed` grow until `status` is `completed`.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/analytics": {
      "get": {
        "operationId": "get-broadcast-analytics",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The broadcast’s analytics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BroadcastAnalyticsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A path ID is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist, or you cannot see it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get broadcast analytics",
        "tags": [
          "Analytics"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Results of a broadcast: the WhatsApp funnel (sent, delivered, read, failed, pending, with failures grouped by reason), Facebook posts and their summed insights, WhatsApp progress over time, and messages per contact's state. Facebook insights are as last fetched; update them with Refresh Facebook insights. An unknown `id` returns empty results rather than 404.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/analytics/facebook/refresh": {
      "post": {
        "operationId": "refresh-facebook-insights",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Insights refreshed; the broadcast’s analytics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BroadcastAnalyticsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A path ID is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist, or you cannot see it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Refresh Facebook insights",
        "tags": [
          "Analytics"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Fetch the latest impressions, reactions, comments and shares from Facebook for every post of the broadcast, then return its analytics, as Get broadcast analytics does. Insights fetched in the last 30 minutes are reused rather than fetched again. A post whose insights can't be fetched keeps its last values; the others still update.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/contact/{bcId}/regenerate": {
      "post": {
        "operationId": "regenerate-a-creative",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          },
          {
            "name": "bcId",
            "required": true,
            "in": "path",
            "description": "ID of the contact's row in the broadcast (`id` of an item from List broadcast contacts), not the contact's own ID.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "b4d7e1a3-5c2f-4e9b-8a6d-3f1c0e2b9d57"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The render was charged and queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegenerateCreativeResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was charged. A path ID is not a UUID, or:\n\n- `This creative is still rendering — wait for it to finish first`\n- `Render queue is offline — try again soon`\n- `Template has no creative`: the creative template has no creative for this contact's language.\n- `We couldn't read this creative video's length, so it can't be priced. Re-upload the video and try again.`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for the render, or your organization owes credits. Nothing was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Broadcast contact not found\n\n`bcId` is not a contact row in your organization (`Broadcast contact not found`), or the contact itself was deleted (`Contact not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "`This is already being started. Please wait for it to finish.`: the same request is already being charged and started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Regenerate a creative",
        "tags": [
          "Broadcasts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:update`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged each time, before the render is queued, at the rate of the contact's creative. Refunded if the render fails on our side.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Creative generation | Rendering a personalized broadcast creative — images are a flat rate, videos are charged per second. | Image: 5 credits per creative; Video (per second): 1 credits per creative |",
            "position": "after-description"
          }
        ],
        "description": "Render one contact's creative again, for example after it failed or after you fixed the contact's details. It keeps the language chosen at create. The new render is charged before it is queued; poll List broadcast contacts or Get a broadcast for the result. Refused while that creative is still rendering.",
        "x-orbitdocs-order": 6,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/contact/{bcId}/status": {
      "get": {
        "operationId": "get-contact-delivery-status",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          },
          {
            "name": "bcId",
            "required": true,
            "in": "path",
            "description": "ID of the contact's row in the broadcast (`id` of an item from List broadcast contacts), not the contact's own ID.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "b4d7e1a3-5c2f-4e9b-8a6d-3f1c0e2b9d57"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The contact's messages and their attempts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDeliveryStatusResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A path ID is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Broadcast contact not found\n\n`bcId` is not a contact row of this broadcast in your organization (`Broadcast contact not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get contact delivery status",
        "tags": [
          "Analytics"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "How one contact's messages went: one entry per channel with its latest `status`, and every attempt with its timeline (sent, delivered, read, failed or posted) and the provider's message or post ID. Each entry's `id` is the `dispatchId` for Resend a message and Refresh post insights.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/contacts": {
      "get": {
        "operationId": "list-broadcast-contacts",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, from 1.",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Contacts per page, 1 to 100.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 24,
              "type": "number",
              "examples": [
                24
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Only contacts whose person name, firm name or code contains this text (case-insensitive).",
            "schema": {
              "type": "string",
              "examples": [
                "Sri Lakshmi"
              ]
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Only contacts whose creative is in this state.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "generating",
                "generated",
                "failed"
              ],
              "examples": [
                "failed"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the broadcast’s contacts, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BroadcastContactListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A path ID is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Broadcast not found\n\nNo broadcast with this `id` in your organization, or it was deleted (`Broadcast <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List broadcast contacts",
        "tags": [
          "Broadcasts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "The contacts in a broadcast, in the order they were added, each with the language of its creative, its `generationStatus` and the rendered creative's `mediaUrl`. After sending, `dispatches` shows each channel's delivery state. Filter with `status` (for example `failed`, to find creatives to regenerate) and `search`; paginated with `page` and `limit`. Each item's `id` is the `bcId` the per-contact routes take.",
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/dispatch/{dispatchId}/analytics/refresh": {
      "post": {
        "operationId": "refresh-post-insights",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          },
          {
            "name": "dispatchId",
            "required": true,
            "in": "path",
            "description": "ID of one message (a contact on one channel): `id` of an item in `dispatches` from Get contact delivery status.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "d2a8c4e6-1f3b-4a5d-9e7c-8b0f2d4a6c19"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The post's insights.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostInsightsDto"
                }
              }
            }
          },
          "400": {
            "description": "No Facebook post to refresh\n\nA path ID is not a UUID, or:\n\n- `No Facebook post to refresh`: the message has not been posted.\n- `Facebook page token unavailable`: the contact's Facebook page is no longer connected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`dispatchId` is not a Facebook message in your organization (`Facebook dispatch not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Refresh post insights",
        "tags": [
          "Analytics"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Fetch the latest insights of one Facebook post (a Facebook message's `dispatchId` from Get contact delivery status) and return them. Insights fetched in the last 30 minutes are returned without asking Facebook again. When some fields can't be fetched they are 0 and `error` says why.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/dispatch/{dispatchId}/retrigger": {
      "post": {
        "description": "Send one failed message again, as a new, charged attempt. Get the message's `id` from Get contact delivery status. Only a `failed` message can be resent: one that went out would reach the contact twice. Refused while the broadcast is paused or stopped.",
        "operationId": "resend-a-message",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          },
          {
            "name": "dispatchId",
            "required": true,
            "in": "path",
            "description": "ID of one message (a contact on one channel): `id` of an item in `dispatches` from Get contact delivery status.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "d2a8c4e6-1f3b-4a5d-9e7c-8b0f2d4a6c19"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The message was charged and queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResendMessageResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was charged. A path ID is not a UUID, or:\n\n- `This channel is not available for the contact`\n- `Broadcast is \"<status>\" — resume it to resend a message`\n- `Send queue is offline`: retry shortly. Nothing was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for the message, or your organization owes credits. Nothing was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Dispatch not found\n\n`dispatchId` is not a message in your organization (`Dispatch not found`), or its broadcast was deleted (`Broadcast not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The message did not fail\n\nThe message did not fail, so it is not resent: `This message already went out — resending it would reach the dealer twice.`, `This message is already on its way.`, `This channel is not available for the dealer.`, `This message was stopped with the rest of the send.` Or the resend is already under way: `This message is already being resent.`, `This is already being started. Please wait for it to finish.`: the same request is already being charged and started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Resend a message",
        "tags": [
          "Sending"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:update`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged before the message is queued, as a new attempt. Refunded if it fails to send.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Broadcast send | Dispatching one broadcast message — a WhatsApp template message or a Facebook post. | 10 credits |",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 8,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/resume": {
      "post": {
        "description": "Send the messages a paused broadcast is holding. They are queued again from the start, spaced for the WhatsApp rate limit, and are not charged again.",
        "operationId": "resume-a-send",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Sending resumed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumeBroadcastResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Broadcast is not paused\n\nA path ID is not a UUID (`Validation failed (uuid is expected)`). Or:\n\n- `Broadcast is \"<status>\" — only a paused broadcast can be resumed`\n- `This broadcast was paused for more than 30 days — its unsent messages were cancelled and it can no longer be resumed. Send it again as a new broadcast.`: the held messages are cancelled and keep their charge.\n- `This broadcast is already being resumed or was stopped`\n- `Send queue is offline`: retry shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Broadcast not found\n\nNo broadcast with this `id` in your organization, or it was deleted (`Broadcast <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Resume a send",
        "tags": [
          "Sending"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 6,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/retry-failed": {
      "post": {
        "description": "Send every failed message of a broadcast again, as new, charged attempts. Works once the broadcast is `sending` or `completed`; a `completed` one goes back to `sending` until the retries finish. Returns how many messages were queued and what they cost.",
        "operationId": "resend-failed-messages",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The failed messages were charged and queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetryFailedResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Queue offline\n\nA path ID is not a UUID (`Validation failed (uuid is expected)`). Or `Send queue is offline`: retry shortly. Nothing was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for every failed message, or your organization owes credits. Nothing was resent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Broadcast not found\n\nNo broadcast with this `id` in your organization, or it was deleted (`Broadcast <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Paused, stopped or not sent yet; nothing failed; or already retrying\n\nNothing was charged:\n\n- `The send is paused — resume it first.`\n- `This send was stopped, so its failures can’t be retried.`\n- `Nothing has been sent yet, so there is nothing to retry.`\n- `Nothing failed, so there is nothing to retry.`\n- `These failures are already being retried.`, or `This is already being started. Please wait for it to finish.`: the same request is already being charged and started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Resend failed messages",
        "tags": [
          "Sending"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:update`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged before anything is queued, one message per failed message, all at once. Without enough credits nothing is resent. Each message is refunded if it fails again on sending.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Broadcast send | Dispatching one broadcast message — a WhatsApp template message or a Facebook post. | 10 credits |",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 9,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/schedule": {
      "put": {
        "description": "Send a broadcast automatically at a local date and time in a timezone you choose. The time is the earliest it sends: if creatives are still rendering then, it sends as soon as the last one is ready. Calling it again moves the schedule. Works while the broadcast is `generating`, `review` or `scheduled`; one in `review` moves to `scheduled`. To schedule at create, pass `schedule` to Create a broadcast instead. Returns the broadcast with its `schedule`.",
        "operationId": "schedule-a-broadcast",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleBroadcastDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The broadcast, with its schedule attached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BroadcastResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Already sending, time in the past, or unknown timezone\n\nA path ID is not a UUID, a field failed validation (`date must be YYYY-MM-DD`, `time must be HH:mm (24h)`), or:\n\n- `Broadcast is \"<status>\" — only a broadcast that has not started sending can be scheduled`\n- `Scheduled time is in the past — pick a future date and time.`\n- `Unknown timezone \"<timezone>\"`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Broadcast not found\n\nNo broadcast with this `id` in your organization, or it was deleted (`Broadcast <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Schedule a broadcast",
        "tags": [
          "Sending"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:update`. An API key acts with the role of the member who created it.\n\n**Credits:** Nothing is charged when you schedule. The messages are charged at the scheduled time, exactly as Send a broadcast charges them. If your organization doesn't have enough credits then, nothing is sent, the broadcast goes back to `review`, and `statusReason` says why.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Broadcast send | Dispatching one broadcast message — a WhatsApp template message or a Facebook post. | 10 credits |",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/send-preview": {
      "get": {
        "description": "What Send a broadcast would send now, and what it would charge: contacts whose creative is ready, messages per channel (going out, skipped because the contact cannot receive the channel, or blocked because the message template cannot send it), contacts per language, and `credits`, the amount Send a broadcast charges. Nothing is sent or charged.",
        "operationId": "preview-a-send",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What a send would do.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendPreviewResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A path ID is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Broadcast not found\n\nNo broadcast with this `id` in your organization, or it was deleted (`Broadcast <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Preview a send",
        "tags": [
          "Sending"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/{id}/trigger": {
      "post": {
        "operationId": "send-a-broadcast",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Broadcast ID (`id` returned by Create a broadcast).",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The messages were charged and the broadcast is sending.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerBroadcastResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Broadcast not ready to trigger\n\nNothing was sent or charged. A path ID is not a UUID, or:\n\n- `Broadcast is \"<status>\" — only a broadcast in review can be triggered`\n- `No generated creatives to send`\n- `This broadcast is already being sent`\n- `Send queue is offline`: retry shortly. Nothing was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for every message, or your organization owes credits. Nothing was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Broadcast not found\n\nNo broadcast with this `id` in your organization, or it was deleted (`Broadcast <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Send a broadcast",
        "tags": [
          "Sending"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:update`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when you send, all at once: one message for each contact on each channel they can receive, if that language's message template can send it (the `credits` of Preview a send). Without enough credits nothing is sent. A message that fails to send, or that WhatsApp reports as failed, is refunded. Messages not sent because you stop the send, delete the broadcast or never resume a pause keep their charge.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Broadcast send | Dispatching one broadcast message — a WhatsApp template message or a Facebook post. | 10 credits |",
            "position": "after-description"
          }
        ],
        "description": "Start sending a broadcast in `review` (or `scheduled`, to send it now instead of at its time). Every contact whose creative is ready gets a message on each channel they can receive: a WhatsApp template message to their number, a post on their connected Facebook page. All messages are charged first, then the broadcast moves to `sending` and the messages go out in the background, WhatsApp ones spaced to respect its rate limit. Check the count and cost first with Preview a send. Contacts who cannot receive a channel are skipped and not charged.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/estimate": {
      "post": {
        "operationId": "estimate-a-broadcast",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateBroadcastDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The estimate, in credits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BroadcastEstimateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`fk_templateId` is not a creative template in your organization (`Creative template not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Estimate a broadcast",
        "tags": [
          "Broadcasts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.\n\n**Credits:** Free. The estimate uses the rates below, the same ones Create a broadcast and Send a broadcast charge.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Creative generation | Rendering a personalized broadcast creative — images are a flat rate, videos are charged per second. | Image: 5 credits per creative; Video (per second): 1 credits per creative |\n| Broadcast send | Dispatching one broadcast message — a WhatsApp template message or a Facebook post. | 10 credits |",
            "position": "after-description"
          }
        ],
        "description": "Price a broadcast before you create it, with the same audience, template and channels you would send to Create a broadcast. Returns the contacts selected, `generation` (rendering every contact's creative, charged at create), `send` (one message per contact per channel it can receive, charged when sent) and `total`, plus how many contacts get each language version and which message templates are mapped for it. Nothing is created or charged.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/test-send": {
      "post": {
        "operationId": "send-a-test-message",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestSendDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "WhatsApp accepted the test. The credits were charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSendResultResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was sent or charged. A field failed validation, or:\n\n- `phone` is not an international number (`Enter the number in international format, with the country code — e.g. +91 98430 11284.`).\n- The template has no version in `language` (`“<title>” has no <language> version.`).\n- The version cannot be tested, for example `No approved WhatsApp template for <language> — map one on the template page.` or `The <language> version has no creative uploaded.` Preview a test message shows the reason as `problem`.\n- WhatsApp refused the message: the message is WhatsApp's reason, in plain words. The credits are refunded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for one message, or your organization owes credits. Nothing was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No creative template with this `templateId` in your organization (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A test from you is still being sent (`A test is already on its way — wait for it before sending another.`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "You sent 5 tests in the last hour (`You’ve sent 5 tests in the last hour. You can send another in <n> minutes.`). The body also has `limit` and `resetsAt`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "WhatsApp sending is not set up on this server (`WhatsApp isn’t set up on this server, so a test can’t be sent.`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 503,
                      "message": "Error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Send a test message",
        "tags": [
          "Test messages"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:create`. An API key acts with the role of the member who created it.\n\n**Credits:** One broadcast message, charged before the test is sent. Refunded if WhatsApp refuses it.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Broadcast send | Dispatching one broadcast message — a WhatsApp template message or a Facebook post. | 10 credits |",
            "position": "after-description"
          }
        ],
        "description": "Send one WhatsApp message for one language version of a creative template to a number you choose, to check it before a broadcast. It uses the approved WhatsApp template mapped to that language, the creative as uploaded (without contact details drawn on it), and sample values for `{{n}}`. Each member can send 5 tests in a rolling hour, one at a time. Delivery is not tracked.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/broadcast/test-send/preview": {
      "get": {
        "operationId": "preview-a-test-message",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "query",
            "description": "ID of the creative template to test.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "8d4f2a6c-1b3e-4c5d-9a7f-0e2b4c6d8f1a"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One entry per language version, with the cost and allowance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSendPreviewResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No creative template with this `templateId` in your organization (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Preview a test message",
        "tags": [
          "Test messages"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.broadcast:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Before a broadcast, see what a WhatsApp test of each language version of a creative template would send: the mapped WhatsApp template, the message with sample values, and why a version cannot be tested (`problem`). Also returns the cost of one test and how many tests you have left this hour. Sends nothing and charges nothing.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact": {
      "get": {
        "operationId": "list-contacts",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, starting at 1.",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Contacts per page, up to 100.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number",
              "examples": [
                20
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Case-insensitive substring match on personName, firmName or code",
            "schema": {
              "type": "string",
              "examples": [
                "kumar"
              ]
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "description": "Exact (case-insensitive) match on state. Legacy single-state form — prefer `states`; when both are given the values are unioned.",
            "deprecated": true,
            "schema": {
              "type": "string",
              "examples": [
                "Maharashtra"
              ]
            }
          },
          {
            "name": "states",
            "required": false,
            "in": "query",
            "description": "Match any of these states (comma-separated or repeated), case-insensitively.",
            "schema": {
              "type": "string",
              "examples": [
                "Maharashtra,Karnataka"
              ]
            }
          },
          {
            "name": "language",
            "required": false,
            "in": "query",
            "description": "Only contacts with saved localized values in this language (BCP-47 code), that is whose `data.localization.language` equals it.",
            "schema": {
              "type": "string",
              "examples": [
                "mr-IN"
              ]
            }
          },
          {
            "name": "zones",
            "required": false,
            "in": "query",
            "description": "Match any of these sales zones (comma-separated or repeated), case-insensitively.",
            "schema": {
              "type": "string",
              "examples": [
                "North,West"
              ]
            }
          },
          {
            "name": "areas",
            "required": false,
            "in": "query",
            "description": "Filter by one or more areas (comma-separated or repeated).",
            "schema": {
              "type": "string",
              "examples": [
                "Andheri East,Bandra West"
              ]
            }
          },
          {
            "name": "excludeAreas",
            "required": false,
            "in": "query",
            "description": "Exclude one or more areas (comma-separated or repeated). Applied after `areas`.",
            "schema": {
              "type": "string",
              "examples": [
                "Pune Camp"
              ]
            }
          },
          {
            "name": "groupIds",
            "required": false,
            "in": "query",
            "description": "Only contacts in at least one of these contact groups (comma-separated or repeated). ANDed with the other filters, so a group plus a state narrows to that group within that state.",
            "schema": {
              "type": "string",
              "examples": [
                "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "description": "Field to sort by.",
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "personName",
                "firmName",
                "code",
                "createdAt"
              ],
              "examples": [
                "firmName"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "default": "DESC",
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "examples": [
                "ASC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of contacts, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List contacts",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Contacts in your organization, newest first by default, 20 per page (`limit` up to 100). Filter by `search`, `states`, `zones`, `areas`, `excludeAreas` and `groupIds`; the filters combine with AND, and each list matches any of its values. Each contact lists the groups it is in.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-a-contact",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The contact was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A field failed validation, for example `state` is not an Indian state or union territory (`state must be a valid Indian state or union territory`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Another contact in your organization already has this `code` (`A contact with code \"<code>\" already exists in this organization`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a contact",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Add a contact: a dealer, person or firm a broadcast can reach. `code` must be unique in your organization and `state` must be an Indian state or union territory; the state decides which language version of a template the contact gets. To reach them on WhatsApp, set `channelData.whatsapp.number` here or later with Update contact channels.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact-group": {
      "get": {
        "operationId": "list-contact-groups",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, starting at 1.",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Groups per page, up to 200.",
            "schema": {
              "minimum": 1,
              "maximum": 200,
              "default": 50,
              "type": "number",
              "examples": [
                50
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Case-insensitive substring on name.",
            "schema": {
              "type": "string",
              "examples": [
                "premium"
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "description": "Field to sort by.",
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "name",
                "createdAt"
              ],
              "examples": [
                "name"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "default": "DESC",
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "examples": [
                "ASC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of groups, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactGroupListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List contact groups",
        "tags": [
          "Contact groups"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact_group:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Contact groups in your organization, newest first by default, 50 per page (`limit` up to 200), each with its current member count. Filter by name with `search`.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-a-contact-group",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactGroupDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The group was created. `contactCount` is the number of contacts added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactGroupResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "The name is blank (`A group name is required`) or another group in your organization already has it (`A group named “<name>” already exists`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a contact group",
        "tags": [
          "Contact groups"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact_group:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Create a named group of contacts, such as \"Premium Dealers\", to target a broadcast. Names are unique in your organization. Pass `contactIds` to add contacts straight away. A contact can be in any number of groups.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact-group/{id}": {
      "get": {
        "operationId": "get-a-contact-group",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact group ID, as returned by Create a contact group or List contact groups.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The contact group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactGroupResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No contact group with this `id` in your organization, or it was deleted (`Contact group <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a contact group",
        "tags": [
          "Contact groups"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact_group:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One contact group with its member count. To list its contacts, call List contacts with `groupIds`.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "update-a-contact-group",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact group ID, as returned by Create a contact group or List contact groups.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactGroupDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactGroupResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`). Or: The name is blank (`A group name is required`) or another group in your organization already has it (`A group named “<name>” already exists`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No contact group with this `id` in your organization, or it was deleted (`Contact group <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a contact group",
        "tags": [
          "Contact groups"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact_group:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Rename a group or change its description. To change who is in it, use Add contacts to a group and Remove contacts from a group.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact-group/{id}/members": {
      "post": {
        "description": "Add contacts by `contactIds`, or set `selectAll: true` with a `filter` to add every contact matching it (the same filters as List contacts). Contacts already in the group are skipped, so repeating a request is harmless. `changed` says how many were actually added.",
        "operationId": "add-contacts-to-a-group",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact group ID, as returned by Create a contact group or List contact groups.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupMembersDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The group, with its new member count.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupMembersResultDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`). Or neither `contactIds` nor `selectAll` was sent (\"Select some contacts, or set `selectAll` with a filter.\").",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No contact group with this `id` in your organization, or it was deleted (`Contact group <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Add contacts to a group",
        "tags": [
          "Contact groups"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact_group:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/{id}": {
      "get": {
        "operationId": "get-a-contact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact ID, as returned by Create a contact or List contacts.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The contact.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No contact with this `id` in your organization, or it was deleted (`Contact <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a contact",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One contact, with its channels and any saved localized values.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "update-a-contact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact ID, as returned by Create a contact or List contacts.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated contact.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`). Or a field failed validation, for example `state` is not an Indian state or union territory.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No contact with this `id` in your organization, or it was deleted (`Contact <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Another contact in your organization already has this `code` (`A contact with code \"<code>\" already exists in this organization`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a contact",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Change any of the fields you send; the others keep their values. `data` replaces the stored object. `channelData` replaces public channel fields while preserving the managed Facebook connection; Facebook changes must use its connection flow. To change only the WhatsApp number, use Update contact channels.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/{id}/channels": {
      "put": {
        "operationId": "update-contact-channels",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact ID, as returned by Create a contact or List contacts.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactChannelsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The contact, with its updated `channelData`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No contact with this `id` in your organization, or it was deleted (`Contact <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update contact channels",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Set or remove a contact's WhatsApp number. Only the channels you send change; a connected Facebook page is kept. An empty or null `whatsapp.number` removes WhatsApp, so broadcasts no longer send to that contact on WhatsApp.",
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/{id}/facebook/invite": {
      "get": {
        "operationId": "create-a-facebook-connect-link",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact ID, as returned by Create a contact or List contacts.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacebookInviteResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist, or you cannot see it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Facebook is not set up on the server (`Facebook integration is not configured`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a Facebook connect link",
        "tags": [
          "Facebook pages"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.facebook:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Create a link so a contact can connect their Facebook Page. This delegates a connection change and requires Facebook update permission. The contact must belong to your organization. The link works for up to 7 days while its issuer retains access; access is checked again when the link opens and before the connection is saved. Check the result with Get Facebook connection status.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/{id}/facebook/status": {
      "get": {
        "operationId": "get-facebook-connection-status",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact ID, as returned by Create a contact or List contacts.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The connection status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacebookStatusResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No contact with this `id` in your organization, or it was deleted (`Contact not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get Facebook connection status",
        "tags": [
          "Facebook pages"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.facebook:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Whether a contact has a connected Facebook Page that broadcasts can post to, and which Page it is. Access tokens are never returned.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/{id}/localization": {
      "put": {
        "operationId": "save-contact-localization",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact ID, as returned by Create a contact or List contacts.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactLocalizationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The contact, with the values in `data.localization`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`). Or no `language` was sent and the contact's state maps to none (`No target language for this contact's state`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No contact with this `id` in your organization, or it was deleted (`Contact <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Save contact localization",
        "tags": [
          "Contact localization"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Save localized values for one contact. They replace any saved before. Leave out `language` to use the language the contact's state maps to. Broadcasts use these values on creatives in that language.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/{id}/localization/preview": {
      "post": {
        "operationId": "preview-contact-localization",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Contact ID, as returned by Create a contact or List contacts.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The suggested values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactLocalizationPreviewDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No contact with this `id` in your organization, or it was deleted (`Contact <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Preview contact localization",
        "tags": [
          "Contact localization"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Suggested localized values for one contact, in the language its state maps to, using each field's method from Get preferences. Nothing is saved or charged. Edit the values if you need to, then save them with Save contact localization.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/areas": {
      "get": {
        "operationId": "list-contact-areas",
        "parameters": [
          {
            "name": "state",
            "required": false,
            "in": "query",
            "deprecated": true,
            "description": "One state. Deprecated: use `states`.",
            "schema": {
              "type": "string",
              "examples": [
                "Maharashtra"
              ]
            }
          },
          {
            "name": "states",
            "required": false,
            "in": "query",
            "description": "Only areas in these states (comma-separated or repeated), matched case-insensitively. `state` is the older single-value form and is combined with this one.",
            "schema": {
              "type": "string",
              "examples": [
                "Maharashtra,Karnataka"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The areas, sorted A to Z.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Distinct areas of your contacts.",
                  "items": {
                    "type": "string"
                  },
                  "examples": [
                    [
                      "Andheri East",
                      "Koramangala",
                      "Pune Camp"
                    ]
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List contact areas",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "The distinct areas your contacts are in, A to Z, optionally only within some `states`. Use them as `areas` or `excludeAreas` filters.",
        "x-orbitdocs-order": 10,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/channel-reach": {
      "get": {
        "description": "How many of your contacts each channel can reach, using the same rule a broadcast send applies: WhatsApp needs a number in `channelData.whatsapp.number`; Facebook needs a connected page whose status is `active`.",
        "operationId": "get-channel-reach",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The counts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelReachResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get channel reach",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 11,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/import": {
      "post": {
        "description": "Create contacts from a `.csv` or `.xlsx` file (up to 10 MB). Send it as `multipart/form-data` in `file`, or put it in storage first with Get an upload URL for an import and send its `uploadKey` in a JSON body. The first row must use these headers, spelled exactly: `Person Name`, `Firm Name`, `Code`, `Zone`, `State` (required) and `Area`, `Address`, `Contact Number`, `Email`, `Website`, `WhatsApp Number` (optional). Each row is created on its own: a row with a missing value, an unknown state or an existing `Code` is skipped and listed in `skipped`. Pass `groupId` or `groupName` to also put the contacts in a group; then rows whose `Code` already exists are added to the group (`linked`) instead of skipped.",
        "operationId": "import-contacts",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "description": "Send `file` (multipart) or `uploadKey` (JSON).",
                "properties": {
                  "file": {
                    "contentMediaType": "application/octet-stream",
                    "description": "A .csv or .xlsx file, up to 10 MB. Only the first sheet is read. Header row must match exactly: Person Name, Firm Name, Code, Zone, State (required), Area, Address, Contact Number, Email, Website, WhatsApp Number (optional)."
                  },
                  "uploadKey": {
                    "type": "string",
                    "description": "Instead of `file`: the `uploadKey` from Get an upload URL for an import, once the `PUT` has finished."
                  },
                  "groupId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "File the imported contacts into this existing contact group.",
                    "examples": [
                      "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
                    ]
                  },
                  "groupName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "File them into a group with this name, creating it if it does not exist. Ignored when `groupId` is given.",
                    "examples": [
                      "North Zone launch"
                    ]
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Send `file` (multipart) or `uploadKey` (JSON).",
                "properties": {
                  "file": {
                    "contentMediaType": "application/octet-stream",
                    "description": "A .csv or .xlsx file, up to 10 MB. Only the first sheet is read. Header row must match exactly: Person Name, Firm Name, Code, Zone, State (required), Area, Address, Contact Number, Email, Website, WhatsApp Number (optional)."
                  },
                  "uploadKey": {
                    "type": "string",
                    "description": "Instead of `file`: the `uploadKey` from Get an upload URL for an import, once the `PUT` has finished."
                  },
                  "groupId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "File the imported contacts into this existing contact group.",
                    "examples": [
                      "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
                    ]
                  },
                  "groupName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "File them into a group with this name, creating it if it does not exist. Ignored when `groupId` is given.",
                    "examples": [
                      "North Zone launch"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The file was processed. Check `skipped` for rows left out.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportContactsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was imported. No file was sent (`A .csv or .xlsx file is required`); the file cannot be read (`Could not read the uploaded file`, `The uploaded file has no sheets`, `The uploaded file is empty`); the headers are wrong (`Unexpected column(s): …`, `Missing required column(s): …`); or `uploadKey` is not an upload of this step for your organization (`The upload could not be found. Please try uploading the file again.`), was used already (`That upload was already used. Please upload the file again.`), or its `PUT` did not finish (`The upload did not complete. Please try uploading the file again.`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`groupId` is not a contact group in your organization (`Contact group <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "The multipart `file` is larger than 10 MB (`File too large`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 413,
                      "message": "Payload Too Large"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Import contacts",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 7,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/localization/summary": {
      "get": {
        "operationId": "get-the-localization-summary",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The counts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactLocalizationSummaryDto"
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get the localization summary",
        "tags": [
          "Contact localization"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "How many contacts are localized into the language their state maps to (see Get preferences), and how many still need it, in total and per language. Use it before Localize contacts to see what a run will cover.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/localize": {
      "post": {
        "operationId": "localize-contacts",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalizeContactsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The run finished.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalizeContactsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for the run, or your organization owes credits. Nothing was translated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A run with this `requestId` was already started (`This localization was already started. Please wait for it to finish.`). Nothing was charged again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Localize contacts",
        "tags": [
          "Contact localization"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:update`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when the run starts, per target language: four fields for each contact in that language. When a language finishes, the charge is reduced to the fields that actually came back translated (a field left in its original text is not billed). If a language fails, it and every language after it are refunded.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Contact localization | Translating contact fields into the configured languages. Charged per translated field. | 0.1 credits per field |",
            "position": "after-description"
          }
        ],
        "description": "Translate or transliterate `firmName`, `personName`, `area` and `address` of your contacts into the language each contact's state maps to, and save the results on each contact (`data.localization`). Each field uses the method set in Get preferences. `scope: pending` (the default) skips contacts already localized; `scope: all` redoes every contact. The request returns when the run has finished. Send a new `requestId` for each run so a retried request is refused instead of charged twice.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/states": {
      "get": {
        "operationId": "list-contact-states",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The states, sorted A to Z.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Distinct states of your contacts.",
                  "items": {
                    "type": "string"
                  },
                  "examples": [
                    [
                      "Karnataka",
                      "Maharashtra",
                      "Tamil Nadu"
                    ]
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List contact states",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "The distinct states your contacts are in, A to Z. Use them as `states` filters. For every state a contact can have, see Get preferences.",
        "x-orbitdocs-order": 8,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/upload/presign": {
      "post": {
        "operationId": "get-an-upload-url-for-an-import",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStagedUploadDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Where to `PUT` the file, and the key to import it with.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StagedUploadTicketDto"
                }
              }
            }
          },
          "400": {
            "description": "A field failed validation, or the file is empty (`The file is empty.`), larger than 10 MB (`The contacts file is larger than the 10 MB limit.`), not a `.csv` or `.xlsx` (`That isn't a contacts file this step takes (.csv, .xlsx).`), or a program (`Files of this type (.exe) can't be uploaded.`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many uploads: 300 in an hour, or 5 GB waiting to be used, per member (`Too many uploads in the last hour. Please wait and try again.`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get an upload URL for an import",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Step 1 of importing a contacts file without sending it in the request. Send the file name, its type and its exact size in bytes: a `.csv` or `.xlsx` file, up to 10 MB. `PUT` the file to the returned `uploadUrl` with exactly the returned `headers` and without your API key, within `expiresInSeconds`. Then call Import contacts with the `uploadKey` in a JSON body. A key can be used once, and an upload not used within a day is deleted.",
        "x-orbitdocs-order": 6,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/contact/zones": {
      "get": {
        "operationId": "list-contact-zones",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The zones, sorted A to Z.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Distinct zones of your contacts.",
                  "items": {
                    "type": "string"
                  },
                  "examples": [
                    [
                      "East",
                      "North",
                      "South",
                      "West"
                    ]
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List contact zones",
        "tags": [
          "Contacts"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.contact:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "The distinct sales zones your contacts are in, A to Z. Use them as `zones` filters.",
        "x-orbitdocs-order": 9,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/facebook-template": {
      "get": {
        "operationId": "list-facebook-templates",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, starting at 1.",
            "schema": {
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Templates per page, 1 to 100.",
            "schema": {
              "default": 12,
              "type": "number",
              "examples": [
                12
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Only templates whose name contains this text (any case).",
            "schema": {
              "type": "string",
              "examples": [
                "diwali"
              ]
            }
          },
          {
            "name": "language",
            "required": false,
            "in": "query",
            "description": "Only templates in any of these languages (language codes; `none` = no language set) — comma-separated or repeated.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "examples": [
                [
                  "en",
                  "none"
                ]
              ]
            }
          },
          {
            "name": "media",
            "required": false,
            "in": "query",
            "description": "Only templates with any of these media (`none` = no media attached) — comma-separated or repeated.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "image",
                  "video",
                  "none"
                ]
              },
              "examples": [
                [
                  "image"
                ]
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "description": "Field to sort by.",
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "name",
                "createdAt"
              ],
              "examples": [
                "createdAt"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "default": "DESC",
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "examples": [
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of templates, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacebookTemplateListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "The templates could not be read (`Failed to fetch templates`). Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List Facebook templates",
        "tags": [
          "Facebook templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.facebook_template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Your organization's Facebook post templates, newest first by default. Paginated with `page` and `limit`; filter by name with `search`.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-a-facebook-template",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFacebookTemplateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The template was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacebookTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "The template could not be saved (`Failed to create template`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a Facebook template",
        "tags": [
          "Facebook templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.facebook_template:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Save the text of a Facebook post, with `{{1}}`, `{{2}}`… placeholders mapped in order to contact fields in `variables`. A broadcast publishes it on each contact's connected Facebook Page with their creative. Facebook post templates need no review.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/facebook-template/{id}": {
      "get": {
        "operationId": "get-a-facebook-template",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the Facebook post template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6a1d3f8b-2e4c-4b7a-9d0e-8c5f1a2b3e47"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacebookTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No Facebook post template with this `id` in your organization, or it was deleted (`Template <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a Facebook template",
        "tags": [
          "Facebook templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.facebook_template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One Facebook post template.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "update-a-facebook-template",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the Facebook post template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "6a1d3f8b-2e4c-4b7a-9d0e-8c5f1a2b3e47"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFacebookTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacebookTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No Facebook post template with this `id` in your organization, or it was deleted (`Template <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "The template could not be saved (`Failed to update template`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a Facebook template",
        "tags": [
          "Facebook templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.facebook_template:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Change a Facebook post template. Send only the fields to change; `variables` and `media` are replaced as a whole. `language` can be changed but not cleared: `null` is ignored.",
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/facebook-template/meta": {
      "get": {
        "description": "The languages a Facebook post template can be in. They are the WhatsApp template language codes, so each language version of a creative maps to a WhatsApp and a Facebook template the same way.",
        "operationId": "get-facebook-template-options",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The accepted languages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacebookTemplateOptionsResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get Facebook template options",
        "tags": [
          "Facebook templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.facebook_template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/localized-template": {
      "get": {
        "operationId": "list-localizations",
        "parameters": [
          {
            "name": "templateId",
            "required": false,
            "in": "query",
            "description": "Only this template's localizations. Leave it out to list every localization in your organization.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
              ]
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, starting at 1.",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Localizations per page, 1 to 200.",
            "schema": {
              "minimum": 1,
              "maximum": 200,
              "default": 50,
              "type": "number",
              "examples": [
                50
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "description": "Field to sort by.",
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "language",
                "createdAt"
              ],
              "examples": [
                "language"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "default": "DESC",
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "examples": [
                "ASC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of localizations, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlLocalizationListDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found\n\n`templateId` is not a template in your organization (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to fetch localizations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List localizations",
        "tags": [
          "Localizations"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.localized_template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "The language versions of a template (pass `templateId`), or of every template in your organization when you leave it out. Newest first by default; paginated with `page` and `limit` (50 per page by default, at most 200). Each carries `origin`: how its current creative was made.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "description": "Add a language version to a template: its title, caption and, optionally, its own creative (of the template's media type). Without a creative, the version uses the template's base creative. A broadcast sends each contact the version for their state's language. Returns the new localization.",
        "operationId": "create-a-localization",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLocalizedTemplateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The localization was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlLocalizationDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found\n\n`templateId` is not a template in your organization (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Language already localized\n\nThe template already has a version in this language (`Template already has a \"<language>\" localization`). Update that one instead.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to create localization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a localization",
        "tags": [
          "Localizations"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.localized_template:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/localized-template/{id}": {
      "get": {
        "operationId": "get-a-localization",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Localization ID, from List localizations or Create a localization.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "e1c3a5b7-2d4f-4a6c-8e0b-9f7d5c3a1e2b"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The localization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlLocalizationDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Localization not found\n\nNo localization with this `id` in your organization, or it was deleted (`Localization <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a localization",
        "tags": [
          "Localizations"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.localized_template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One language version of a template.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "description": "Change the title, caption, creative, status or `data`; fields you leave out keep their value. The template and language cannot change. A new creative sets `origin` to `upload`; clearing it clears `origin`. Returns the updated localization.",
        "operationId": "update-a-localization",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Localization ID, from List localizations or Create a localization.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "e1c3a5b7-2d4f-4a6c-8e0b-9f7d5c3a1e2b"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLocalizedTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated localization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlLocalizationDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Localization not found\n\nNo localization with this `id` in your organization, or it was deleted (`Localization <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to update localization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a localization",
        "tags": [
          "Localizations"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.localized_template:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/localized-template/preview": {
      "post": {
        "operationId": "preview-a-localization",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewLocalizationDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The source title and the translated caption.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlLocalizationPreviewDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found\n\n`templateId` is not a template in your organization (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Preview a localization",
        "tags": [
          "Localizations"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.localized_template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Start a localization from a template: its caption machine-translated into `language`, and its title as it is (a title is the name you gave the creative, so it is not translated; change it on the version if you want). Nothing is saved. When translation is not set up for your organization, the language is not supported, or translation fails, the original caption comes back unchanged.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/org-preference": {
      "get": {
        "operationId": "get-preferences",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The effective preferences.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgPreferenceResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get preferences",
        "tags": [
          "Preferences"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.org_preference:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Your organization's Hyperlocal settings: the states a contact can have, the language each state's contacts get, and whether each contact field is translated or transliterated. Values you have not overridden show the defaults.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/product": {
      "get": {
        "operationId": "list-products",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, starting at 1.",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Products per page, 1 to 100.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 12,
              "type": "number",
              "examples": [
                12
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Only products whose name or description contains this text (case-insensitive).",
            "schema": {
              "type": "string",
              "examples": [
                "NOVO"
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "description": "Field to sort by.",
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "name",
                "createdAt"
              ],
              "examples": [
                "name"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "default": "DESC",
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "examples": [
                "ASC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of products, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlProductListDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to fetch products",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List products",
        "tags": [
          "Products"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Products in your organization, newest first by default. Paginated with `page` and `limit` (12 per page by default, at most 100); filter with `search` and sort with `sortBy` and `sortOrder`.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-a-product",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The product was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlCreatedProductDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to create product",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a product",
        "tags": [
          "Products"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Add a product to your catalog. A product groups the product models and creative templates you broadcast. Upload its image first and pass the URL in `image`. Returns the stored product, without `creator`.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/product-model": {
      "get": {
        "operationId": "list-product-models",
        "parameters": [
          {
            "name": "productId",
            "required": true,
            "in": "query",
            "description": "The product whose models to list.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
              ]
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, starting at 1.",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Models per page, 1 to 100.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 12,
              "type": "number",
              "examples": [
                12
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Only models whose name or description contains this text (case-insensitive).",
            "schema": {
              "type": "string",
              "examples": [
                "Maxx"
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "description": "Field to sort by.",
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "name",
                "createdAt"
              ],
              "examples": [
                "name"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "default": "DESC",
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "examples": [
                "ASC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of models, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlProductModelListDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Product not found\n\n`productId` is not a product in your organization (`Product <productId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to fetch models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List product models",
        "tags": [
          "Product models"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product_model:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "The models (variants) of one product, newest first by default. Pass the product's ID in `productId`. Paginated with `page` and `limit` (12 per page by default, at most 100).",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-a-product-model",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductModelDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The model was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlProductModelDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Product not found\n\n`productId` is not a product in your organization (`Product <productId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to create model",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a product model",
        "tags": [
          "Product models"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product_model:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Add a model (variant) under a product. A template is made for one product and one of its models. Returns the new model.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/product-model/{id}": {
      "get": {
        "operationId": "get-a-product-model",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Product model ID, from List product models or Create a product model.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "8c4e1b2a-9d3f-4a6e-b7c5-1f2e3d4c5b6a"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The product model.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlProductModelDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Model not found\n\nNo product model with this `id` in your organization, or it was deleted (`Model <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a product model",
        "tags": [
          "Product models"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product_model:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One product model, with who created it.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "update-a-product-model",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Product model ID, from List product models or Create a product model.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "8c4e1b2a-9d3f-4a6e-b7c5-1f2e3d4c5b6a"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductModelDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated product model.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlProductModelDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Model not found\n\nNo product model with this `id` in your organization, or it was deleted (`Model <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to update model",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a product model",
        "tags": [
          "Product models"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product_model:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Change any of `name`, `description`, `image` and `data`; fields you leave out keep their value. A model cannot move to another product. Returns the updated model.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/product-model/{id}/usage": {
      "get": {
        "operationId": "see-what-uses-a-product-model",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Product model ID, from List product models or Create a product model.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "8c4e1b2a-9d3f-4a6e-b7c5-1f2e3d4c5b6a"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What uses it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlCatalogUsageDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Model not found\n\nNo product model with this `id` in your organization, or it was deleted (`Model <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "See what uses a product model",
        "tags": [
          "Product models"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product_model:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Before deleting a product model: how many creative templates use it, with the newest few by title (`modelCount` is always 0). Deleting the model keeps them; they keep working and no longer show the model.",
        "x-orbitdocs-order": 6,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/product/{id}": {
      "get": {
        "operationId": "get-a-product",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Product ID, from List products or Create a product.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlProductDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Product not found\n\nNo product with this `id` in your organization, or it was deleted (`Product <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a product",
        "tags": [
          "Products"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One product, with who created it.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "update-a-product",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Product ID, from List products or Create a product.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlProductDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Product not found\n\nNo product with this `id` in your organization, or it was deleted (`Product <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to update product",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a product",
        "tags": [
          "Products"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Change any of `name`, `description`, `image` and `data`; fields you leave out keep their value. A sent `data` replaces the stored one. Returns the updated product.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/product/{id}/usage": {
      "get": {
        "operationId": "see-what-uses-a-product",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Product ID, from List products or Create a product.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What uses it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlCatalogUsageDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Product not found\n\nNo product with this `id` in your organization, or it was deleted (`Product <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "See what uses a product",
        "tags": [
          "Products"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.product:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Before deleting a product: how many creative templates use it (with the newest few by title) and how many product models it has. Deleting the product keeps them; they keep working and no longer show the product.",
        "x-orbitdocs-order": 6,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/template": {
      "get": {
        "operationId": "list-templates",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, starting at 1.",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Templates per page, 1 to 100.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 12,
              "type": "number",
              "examples": [
                12
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Only templates whose title or caption contains this text (case-insensitive).",
            "schema": {
              "type": "string",
              "examples": [
                "harvest"
              ]
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "description": "Only this product's templates.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
              ]
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Only templates with this status.",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "active"
              ],
              "examples": [
                "active"
              ]
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "Only templates of this media type.",
            "schema": {
              "type": "string",
              "enum": [
                "image",
                "video"
              ],
              "examples": [
                "video"
              ]
            }
          },
          {
            "name": "creatorIds",
            "required": false,
            "in": "query",
            "description": "Only templates created by any of these members: member IDs (`fk_creatorId`), comma-separated or repeated, at most 100.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "examples": [
                [
                  "2b8e4d1a-7c3f-4a9e-8d2b-5f6a7c8d9e0f"
                ]
              ]
            }
          },
          {
            "name": "updatedAtFrom",
            "required": false,
            "in": "query",
            "description": "Only templates last changed at or after this time (ISO 8601).",
            "schema": {
              "type": "string",
              "examples": [
                "2026-09-17T18:30:00.000Z"
              ]
            }
          },
          {
            "name": "updatedAtTo",
            "required": false,
            "in": "query",
            "description": "Only templates last changed at or before this time (ISO 8601).",
            "schema": {
              "type": "string",
              "examples": [
                "2026-09-24T18:29:59.999Z"
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "description": "Field to sort by.",
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "title",
                "createdAt",
                "updatedAt"
              ],
              "examples": [
                "updatedAt"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "default": "DESC",
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "examples": [
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of templates, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlTemplateListDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to fetch templates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List templates",
        "tags": [
          "Templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Creative templates in your organization, newest first by default. Filter by `productId`, `status`, `type`, `creatorIds`, a `search` text or a last-changed window (`updatedAtFrom`, `updatedAtTo`). Paginated with `page` and `limit` (12 per page by default, at most 100). Each row also lists its `localizedLanguages`.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-a-template",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The template was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlTemplateDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input\n\nA field failed validation, or `modelId` is not a model of `productId` (`Selected model does not belong to the selected product`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Product or model not found\n\n`modelId` is not a product model in your organization (`Model <modelId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to create template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a template",
        "tags": [
          "Templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Create a creative template for a product and one of its models: the base creative (an image or a video) with its title and caption in `baseLanguage`. Upload the creative first. For a video, set `data.durationSeconds` to its length: renders are priced by it. Add language versions with Create a localization and draw the dealer details with Save an overlay. Returns the new template.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/template-overlay": {
      "get": {
        "operationId": "list-overlays",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "query",
            "description": "ID of the template whose overlays to list.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The template's overlays, one per language that has one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HlOverlayDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found\n\n`templateId` is not a template in your organization (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List overlays",
        "tags": [
          "Overlays"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template_overlay:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "A template's overlays: at most one per language version. An overlay draws the contact's details (name, phone, logo and so on) over the creative when a broadcast renders it. Languages without an overlay are not listed.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "save-an-overlay",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertTemplateOverlayDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The overlay was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlOverlayDto"
                }
              }
            }
          },
          "400": {
            "description": "Language not available\n\nThe template has no version in this language (`Language \"<language>\" is not available for this template`): use its base language or one of its localizations' languages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found\n\n`templateId` is not a template in your organization (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to save overlay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Save an overlay",
        "tags": [
          "Overlays"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template_overlay:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Create or replace the overlay of one language version of a template: the elements drawn over its creative, each fixed or bound to a contact field. Send the whole element list each time. Check the result with Resolve overlay values or Render an overlay. Returns the saved overlay.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/template-overlay/copy": {
      "post": {
        "operationId": "copy-an-overlay",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyTemplateOverlayDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The overlay was copied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlOverlayDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid languages\n\nThe two languages are the same (`Source and target language must differ`), or one is not a version of the template (`Both languages must be available for this template`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template or source overlay not found\n\n`templateId` is not a template in your organization (`Template <templateId> not found`). Or `fromLanguage` has no overlay (`No overlay for \"<fromLanguage>\" to copy from`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to copy overlay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Copy an overlay",
        "tags": [
          "Overlays"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template_overlay:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Copy one language's overlay over another language of the same template, replacing it. Bound elements are set to the contact's localized values (`mode: transliteration`) when copied into a localization, or to the values as entered (`mode: source`) when copied into the base language. Returns the target language's overlay.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/template-overlay/copy-from-default": {
      "post": {
        "operationId": "copy-the-default-overlay",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyOverlayFromDefaultDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The default overlay was copied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlOverlayDto"
                }
              }
            }
          },
          "400": {
            "description": "Language not available or no default overlay configured\n\nThe template has no version in this language (`Language \"<language>\" is not available for this template`): use its base language or one of its localizations' languages. Or your organization has no default overlay for this media type (`No default <image|video> overlay configured for this organization`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found\n\n`templateId` is not a template in your organization (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to copy overlay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Copy the default overlay",
        "tags": [
          "Overlays"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template_overlay:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Replace a language's overlay with your organization's default overlay for the template's media type (image or video). Bound elements are set to the contact's localized values (`mode: transliteration`) for a localization, or to the values as entered (`mode: source`) for the base language. Returns the saved overlay.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/template-overlay/media-metadata": {
      "get": {
        "operationId": "read-video-metadata",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "query",
            "description": "ID of the template whose overlays to list.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
              ]
            }
          },
          {
            "name": "language",
            "required": true,
            "in": "query",
            "description": "The template language version to inspect.",
            "schema": {
              "maxLength": 35,
              "type": "string",
              "examples": [
                "en-US"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverlayMediaMetadataDto"
                }
              }
            }
          },
          "400": {
            "description": "The language is unavailable or has no video creative.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`templateId` is not a template in your organization (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Video metadata could not be read; retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Read video metadata",
        "tags": [
          "Overlays"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template_overlay:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Read a language version’s source video frame rate, display dimensions and full frame count. Free; uses the same media probe as personalized batch generation.",
        "x-orbitdocs-order": 7,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/template-overlay/render": {
      "post": {
        "operationId": "render-an-overlay",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenderOverlayDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The rendered file (status 201): `image/png` for an image template, `video/mp4` for a video, named `overlay-render.png` or `overlay-render.mp4`.",
            "content": {
              "image/png": {
                "schema": {}
              },
              "video/mp4": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Language not available\n\nThe template has no version in this language (`Language \"<language>\" is not available for this template`): use its base language or one of its localizations' languages. Or the video would be longer than 10 minutes (`A render can be at most 10 minutes long.`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for the render, or your organization owes credits. Nothing was rendered.",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              },
              "video/mp4": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template or contact not found\n\n`contactId` is not a contact in your organization (`Contact <contactId> not found`), or `templateId` is not a template in it (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Render failed\n\nThe render failed (`The render failed. Your credits were refunded — try again in a moment.`). Its credits are refunded; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Rendering is not set up on this server (`Rendering a preview isn’t available right now. …`). Nothing is charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 503,
                      "message": "Error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Render an overlay",
        "tags": [
          "Overlays"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template_overlay:update`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged before the render starts: an image at the flat rate, a video per second of output (the longer of the creative's stored length and `durationInFrames` / `fps`). Refunded in full if the render fails.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Template overlay render | Rendering a personalized creative from a template outside a broadcast — images flat, videos per second. | Image: 5 credits per creative; Video (per second): 1 credits per creative |",
            "position": "after-description"
          }
        ],
        "description": "Render one language version of a template with its overlay, as a broadcast would, and get the file back: a PNG for an image template, an MP4 for a video. Fill the bound elements from a contact (`contactId`) or from your own `resolved` values. Uses the saved overlay unless you send `elements`. Set `width` and `height` to the creative's size; for a video, `durationInFrames` and `fps` set the length. The response is the file itself (`Content-Disposition: attachment`), not JSON. Videos can take minutes.",
        "x-orbitdocs-order": 6,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/template-overlay/resolve": {
      "post": {
        "operationId": "resolve-overlay-values",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveOverlayDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The value of each bound element.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlResolvedOverlayDto"
                }
              }
            }
          },
          "400": {
            "description": "Language not available\n\nThe template has no version in this language (`Language \"<language>\" is not available for this template`): use its base language or one of its localizations' languages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template or contact not found\n\n`contactId` is not a contact in your organization (`Contact <contactId> not found`), or `templateId` is not a template in it (`Template <templateId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Resolve overlay values",
        "tags": [
          "Overlays"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template_overlay:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "See what each bound element of an overlay shows for one contact in one language, without rendering anything. Uses the saved overlay, or the `elements` you send. Free.",
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/template/{id}": {
      "get": {
        "operationId": "get-a-template",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Template ID, from List templates or Create a template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlTemplateDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found\n\nNo template with this `id` in your organization, or it was deleted (`Template <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a template",
        "tags": [
          "Templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One template, with its product, model, creator and message-template mapping.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "update-a-template",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Template ID, from List templates or Create a template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlTemplateDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found\n\nNo template with this `id` in your organization, or it was deleted (`Template <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Failed to update template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a template",
        "tags": [
          "Templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Change the title, caption, creative, status, base language or `data`; fields you leave out keep their value. The product, model, media type and translation memory cannot change. A sent `data` replaces the stored one, but the message-template mapping inside it is kept. Returns the updated template.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/template/{id}/message-templates": {
      "put": {
        "description": "Choose, for each language version of the template (its base language and each localization), the WhatsApp template and Facebook template that send it. A broadcast copies this mapping when it is created and sends each contact with the template mapped for the language of that contact's creative; a language with nothing mapped uses the broadcast's own template. Replaces the whole mapping. Every problem is checked and reported together. Returns the template with its new `messageTemplates`.",
        "operationId": "map-message-templates",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Template ID, from List templates or Create a template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTemplateMessageTemplatesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The template, with the saved `messageTemplates`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HlTemplateDto"
                }
              }
            }
          },
          "400": {
            "description": "A language the template has no version in, a template not in the org, one in another language, or a WhatsApp header that can't carry the creative (every problem is listed)\n\nNothing was saved. `message` lists every problem, for example: `This template has no Telugu (te-IN) version.`, `The Telugu WhatsApp template was not found.`, `“diwali_offer” is a Hindi template; the Telugu creative needs a Telugu one.`, or `“diwali_offer” has no header; the Telugu image creative is sent as an IMAGE header.` More than 100 languages: `A mapping can hold at most 100 languages`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found\n\nNo template with this `id` in your organization, or it was deleted (`Template <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Map message templates",
        "tags": [
          "Templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.template:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/whatsapp-template": {
      "get": {
        "operationId": "list-whatsapp-templates",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number, starting at 1.",
            "schema": {
              "default": 1,
              "type": "number",
              "examples": [
                1
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Templates per page, 1 to 100.",
            "schema": {
              "default": 12,
              "type": "number",
              "examples": [
                12
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Only templates whose name contains this text (any case).",
            "schema": {
              "type": "string",
              "examples": [
                "diwali"
              ]
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Only templates in any of these states — comma-separated or repeated.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "DRAFT",
                  "PENDING",
                  "APPROVED",
                  "REJECTED",
                  "PAUSED",
                  "DISABLED"
                ]
              },
              "examples": [
                [
                  "APPROVED",
                  "PENDING"
                ]
              ]
            }
          },
          {
            "name": "category",
            "required": false,
            "in": "query",
            "description": "Only templates of this category.",
            "schema": {
              "type": "string",
              "enum": [
                "MARKETING",
                "UTILITY",
                "AUTHENTICATION"
              ],
              "examples": [
                "MARKETING"
              ]
            }
          },
          {
            "name": "language",
            "required": false,
            "in": "query",
            "description": "Only templates in any of these languages (Meta language codes) — comma-separated or repeated.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "examples": [
                [
                  "en",
                  "hi"
                ]
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "description": "Field to sort by.",
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "name",
                "createdAt"
              ],
              "examples": [
                "createdAt"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "description": "Sort direction.",
            "schema": {
              "default": "DESC",
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "examples": [
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of templates, with paging details in `pagination`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappTemplateListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "The templates could not be read (`Failed to fetch templates`). Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List WhatsApp templates",
        "tags": [
          "WhatsApp templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.whatsapp_template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Your organization's WhatsApp templates, newest first by default. Paginated with `page` and `limit`; filter by name with `search`. Each template has its review `status`: only `APPROVED` templates can be sent.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-a-whatsapp-template",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWhatsappTemplateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The template was saved as a draft.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Your organization already has a template with this `name` in this `language` (`A template named \"<name>\" already exists for this language`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "The template could not be saved (`Failed to create template`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a WhatsApp template",
        "tags": [
          "WhatsApp templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.whatsapp_template:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Save a WhatsApp message template as a `DRAFT`. Write the body with `{{1}}`, `{{2}}`… placeholders and map each one, in order, to a contact field in `components.body.variables`. Nothing is sent to Meta yet: call Submit a WhatsApp template when it is ready.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/whatsapp-template/{id}": {
      "get": {
        "operationId": "get-a-whatsapp-template",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the WhatsApp template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8a2c1e-7b4d-4e9a-9c2f-5d1e8b7a6c40"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No WhatsApp template with this `id` in your organization, or it was deleted (`Template <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a WhatsApp template",
        "tags": [
          "WhatsApp templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.whatsapp_template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One WhatsApp template with its content, review `status` and, when Meta rejected it, the `rejectionReason`.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "update-a-whatsapp-template",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the WhatsApp template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8a2c1e-7b4d-4e9a-9c2f-5d1e8b7a6c40"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWhatsappTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`). Or the template is in review or approved (`Only draft or rejected templates can be edited`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No WhatsApp template with this `id` in your organization, or it was deleted (`Template <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Your organization already has a template with this `name` in this `language` (`A template named \"<name>\" already exists for this language`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 409,
                      "message": "Conflict",
                      "error": "Conflict"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "The template could not be saved (`Failed to update template`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a WhatsApp template",
        "tags": [
          "WhatsApp templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.whatsapp_template:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Change a template that is `DRAFT` or `REJECTED`. Send only the fields to change; `components` is replaced as a whole. To fix a rejected template, update it and submit it again.",
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/whatsapp-template/{id}/refresh": {
      "post": {
        "operationId": "refresh-whatsapp-template-status",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the WhatsApp template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8a2c1e-7b4d-4e9a-9c2f-5d1e8b7a6c40"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The template with its latest status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`). Or the template was never submitted (`Template has not been submitted yet`), or `WhatsApp Cloud API is not configured`: WhatsApp sending is not set up on this server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No WhatsApp template with this `id` in your organization, or it was deleted (`Template <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Meta could not be reached. Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Refresh WhatsApp template status",
        "tags": [
          "WhatsApp templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.whatsapp_template:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Ask Meta for a submitted template's current review status and store it. Returns the template with the latest `status` and `rejectionReason`.",
        "x-orbitdocs-order": 7,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/whatsapp-template/{id}/submit": {
      "post": {
        "operationId": "submit-a-whatsapp-template",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the WhatsApp template.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f8a2c1e-7b4d-4e9a-9c2f-5d1e8b7a6c40"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Meta accepted the template for review. The template, with its new `status`, `metaName` and `metaTemplateId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was submitted. `id` is not a UUID (`Validation failed (uuid is expected)`). Or:\n\n- `Template is already PENDING` / `Template is already APPROVED`.\n- `The message has <n> {{n}} placeholder(s) but <m> variable(s) mapped — they must match. …`\n- `A sample media file is required to submit a media-header template`.\n- The sample file could not be used: `The sample media link must be a public https:// address.`, `The sample media file is larger than 100 MB.` or `Could not download the sample media file.`\n- `WhatsApp Cloud API is not configured`: WhatsApp sending is not set up on this server.\n- Meta refused the template: the message is Meta's reason, in plain words.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No WhatsApp template with this `id` in your organization, or it was deleted (`Template <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Submit a WhatsApp template",
        "tags": [
          "WhatsApp templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.whatsapp_template:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Send a `DRAFT` or `REJECTED` template to Meta for review. Meta reviews it with each variable's `sample` and, for a media header, the `sampleMediaUrl` file. The template comes back with `status` `PENDING` (or Meta's decision, if it was immediate). Meta's decision arrives on its own; to check sooner, call Refresh WhatsApp template status.",
        "x-orbitdocs-order": 6,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/hyperlocal/whatsapp-template/meta": {
      "get": {
        "operationId": "get-whatsapp-template-options",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The accepted values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappTemplateOptionsResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get WhatsApp template options",
        "tags": [
          "WhatsApp templates"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `hyperlocal.whatsapp_template:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "The values a WhatsApp template accepts: categories, language codes, header formats, and the contact fields a `{{n}}` variable can be filled from. Use it to build a template before Create a WhatsApp template.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your organization API key (starts with `uvk_`). Create one in the Universe app under Settings → API keys."
      }
    },
    "schemas": {
      "AgentVideoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The video id — poll `GET …/agent-video/{id}`."
          },
          "referenceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "completed",
              "failed"
            ],
            "description": "`queued` → `processing` → `completed` (videoUrl is set) or `failed` (error is set; the credits are refunded)."
          },
          "videoUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "The finished video (MP4) — a permanent public link. Set once `completed`."
          },
          "durationSeconds": {
            "type": [
              "number",
              "null"
            ],
            "description": "Length of the finished video in seconds."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed. Set once `failed`."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null once the agent details were removed (30 days after the video finished; see `personalDataClearedAt`)."
          },
          "arn": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null when the video was made without an ARN."
          },
          "mobile": {
            "type": [
              "string",
              "null"
            ],
            "description": "Digits only, as shown on the card. Null once removed."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null once removed."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "personalDataClearedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the agent details (name, mobile, email, ARN, photo) were removed — 30 days after the video finished. The video stays available."
          }
        },
        "required": [
          "id",
          "status",
          "createdAt"
        ]
      },
      "AgentVideoListDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentVideoDto"
            }
          },
          "total": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "limit"
        ]
      },
      "AnalyticsFailureReasonDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Error message of the failed WhatsApp messages.",
            "examples": [
              "Message undeliverable"
            ]
          },
          "count": {
            "type": "number",
            "description": "Messages that failed with it.",
            "examples": [
              3
            ]
          }
        },
        "required": [
          "reason",
          "count"
        ]
      },
      "AnalyticsStateCountDto": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "description": "Contact's Indian state (`Unknown` when the contact or its state is gone).",
            "examples": [
              "Tamil Nadu"
            ]
          },
          "count": {
            "type": "number",
            "description": "Messages that went out to contacts in this state.",
            "examples": [
              64
            ]
          }
        },
        "required": [
          "state",
          "count"
        ]
      },
      "AnalyticsTimeseriesPointDto": {
        "type": "object",
        "properties": {
          "t": {
            "type": "string",
            "format": "date-time",
            "description": "End of this time bucket.",
            "examples": [
              "2026-10-04T11:30:00.000Z"
            ]
          },
          "sent": {
            "type": "number",
            "description": "WhatsApp messages sent by this time (cumulative).",
            "examples": [
              96
            ]
          },
          "delivered": {
            "type": "number",
            "description": "WhatsApp messages delivered by this time (cumulative).",
            "examples": [
              88
            ]
          },
          "read": {
            "type": "number",
            "description": "WhatsApp messages read by this time (cumulative).",
            "examples": [
              51
            ]
          }
        },
        "required": [
          "t",
          "sent",
          "delivered",
          "read"
        ]
      },
      "BroadcastAnalyticsResponseDto": {
        "type": "object",
        "properties": {
          "broadcastId": {
            "type": "string",
            "format": "uuid",
            "description": "Broadcast ID.",
            "examples": [
              "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
            ]
          },
          "timeseries": {
            "description": "WhatsApp sent / delivered / read over time, in up to 24 buckets between the first and the last status update. Empty before any update.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsTimeseriesPointDto"
            }
          },
          "states": {
            "description": "Messages that went out (sent, delivered, read or posted) per contact's state, most first. Empty until something has been sent.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsStateCountDto"
            }
          },
          "whatsapp": {
            "description": "WhatsApp delivery funnel. Null when no WhatsApp message exists.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappAnalyticsDto"
              }
            ]
          },
          "facebook": {
            "description": "Facebook posts and insights. Null when no post exists.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacebookAnalyticsDto"
              }
            ]
          }
        },
        "required": [
          "broadcastId",
          "timeseries",
          "states",
          "whatsapp",
          "facebook"
        ]
      },
      "BroadcastAudienceDto": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "deprecated": true,
            "description": "Legacy single-state filter. Prefer `states`; both are combined. Matched without regard to case.",
            "examples": [
              "Tamil Nadu"
            ]
          },
          "states": {
            "description": "Contacts in any of these Indian states (`state` on the contact). Matched without regard to case.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Tamil Nadu",
                "Maharashtra"
              ]
            ]
          },
          "zones": {
            "description": "Contacts in any of these sales zones (`zone` on the contact). Matched without regard to case.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "South"
              ]
            ]
          },
          "areas": {
            "description": "Contacts in any of these areas (`area` on the contact). Matched exactly, including case.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Anna Nagar",
                "T. Nagar"
              ]
            ]
          },
          "groupIds": {
            "description": "Only contacts in at least one of these contact groups. ANDed with the other filters, so a group plus a state targets that group within that state.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "5b0c3f2e-8d14-4a7b-9e21-6f3a2c1d0e94"
              ]
            ]
          },
          "excludeAreas": {
            "description": "Areas to leave out of the audience (applied after `areas`). Matched exactly, including case.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Tambaram"
              ]
            ]
          },
          "search": {
            "type": "string",
            "description": "Contacts whose person name, firm name or code contains this text (case-insensitive).",
            "examples": [
              "Sri Lakshmi"
            ]
          },
          "selectAll": {
            "type": "boolean",
            "description": "Whether the audience was every contact matching the filter (`true`) or a list of `contactIds` (`false`).",
            "examples": [
              true
            ]
          }
        },
        "required": [
          "selectAll"
        ]
      },
      "BroadcastAudienceFilterDto": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "deprecated": true,
            "description": "Legacy single-state filter. Prefer `states`; both are combined. Matched without regard to case.",
            "examples": [
              "Tamil Nadu"
            ]
          },
          "states": {
            "description": "Contacts in any of these Indian states (`state` on the contact). Matched without regard to case.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Tamil Nadu",
                "Maharashtra"
              ]
            ]
          },
          "zones": {
            "description": "Contacts in any of these sales zones (`zone` on the contact). Matched without regard to case.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "South"
              ]
            ]
          },
          "areas": {
            "description": "Contacts in any of these areas (`area` on the contact). Matched exactly, including case.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Anna Nagar",
                "T. Nagar"
              ]
            ]
          },
          "groupIds": {
            "description": "Only contacts in at least one of these contact groups. ANDed with the other filters, so a group plus a state targets that group within that state.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "5b0c3f2e-8d14-4a7b-9e21-6f3a2c1d0e94"
              ]
            ]
          },
          "excludeAreas": {
            "description": "Areas to leave out of the audience (applied after `areas`). Matched exactly, including case.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Tambaram"
              ]
            ]
          },
          "search": {
            "type": "string",
            "description": "Contacts whose person name, firm name or code contains this text (case-insensitive).",
            "examples": [
              "Sri Lakshmi"
            ]
          }
        }
      },
      "BroadcastContactListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "One page of contacts, in the order they were added.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BroadcastContactRowDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastPaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "BroadcastContactRowDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the contact's row in the broadcast. Use it as `bcId`.",
            "examples": [
              "b4d7e1a3-5c2f-4e9b-8a6d-3f1c0e2b9d57"
            ]
          },
          "fk_contactId": {
            "type": "string",
            "format": "uuid",
            "description": "Contact ID.",
            "examples": [
              "0c4f8e2a-6b1d-4a9e-8f3c-7d2b5e1a9c60"
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ],
            "description": "Language code of the creative version this contact gets, fixed when the broadcast was created.",
            "examples": [
              "ta-IN"
            ]
          },
          "generationStatus": {
            "type": "string",
            "enum": [
              "pending",
              "generating",
              "generated",
              "failed"
            ],
            "description": "State of this contact's creative.",
            "examples": [
              "generated"
            ]
          },
          "generationError": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the render failed. Null otherwise.",
            "examples": [
              null
            ]
          },
          "mediaUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the rendered creative. Null until it is generated.",
            "examples": [
              "{{CDN_BASE_URL}}/hyper-local/broadcasts/6e2f9a14/b4d7e1a3.png"
            ]
          },
          "mediaType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "image",
              "video"
            ],
            "description": "Kind of creative. Null until it is generated.",
            "examples": [
              "image"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the row last changed.",
            "examples": [
              "2026-10-04T10:14:55.000Z"
            ]
          },
          "dispatches": {
            "description": "One entry per channel, WhatsApp first. Empty until the broadcast is sent.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BroadcastRowDispatchDto"
            }
          },
          "contact": {
            "description": "The contact. Null if it was deleted.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastContactSummaryDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "fk_contactId",
          "language",
          "generationStatus",
          "generationError",
          "mediaUrl",
          "mediaType",
          "updatedAt",
          "dispatches",
          "contact"
        ]
      },
      "BroadcastContactSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact ID.",
            "examples": [
              "0c4f8e2a-6b1d-4a9e-8f3c-7d2b5e1a9c60"
            ]
          },
          "personName": {
            "type": "string",
            "description": "Contact person's name.",
            "examples": [
              "R. Kumar"
            ]
          },
          "firmName": {
            "type": "string",
            "description": "Firm (dealer) name.",
            "examples": [
              "Sri Lakshmi Motors"
            ]
          },
          "code": {
            "type": "string",
            "description": "Your code for the contact.",
            "examples": [
              "TN-0142"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone number.",
            "examples": [
              "+919843011284"
            ]
          },
          "area": {
            "type": "string",
            "description": "Area.",
            "examples": [
              "Anna Nagar"
            ]
          },
          "state": {
            "type": "string",
            "description": "Indian state.",
            "examples": [
              "Tamil Nadu"
            ]
          }
        },
        "required": [
          "id",
          "personName",
          "firmName",
          "code",
          "phone",
          "area",
          "state"
        ]
      },
      "BroadcastCountsDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Contacts in the broadcast when it was created.",
            "examples": [
              120
            ]
          },
          "generated": {
            "type": "number",
            "description": "Creatives rendered so far.",
            "examples": [
              118
            ]
          },
          "generationFailed": {
            "type": "number",
            "description": "Creatives that failed to render.",
            "examples": [
              2
            ]
          },
          "sent": {
            "type": "number",
            "description": "Messages sent so far (once sending has started).",
            "examples": [
              96
            ]
          },
          "failed": {
            "type": "number",
            "description": "Messages that failed to send (once sending has started).",
            "examples": [
              3
            ]
          }
        }
      },
      "BroadcastCreatorDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "User ID of the member who created the broadcast.",
            "examples": [
              "a91c3e5f-7b2d-4f6a-8e0c-2d4b6f8a1c35"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member's name.",
            "examples": [
              "Priya Raman"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the member's profile picture.",
            "examples": [
              "{{CDN_BASE_URL}}/avatars/priya-raman.png"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "image"
        ]
      },
      "BroadcastEstimateLanguageDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "description": "Language code of the creative version these contacts get.",
            "examples": [
              "ta-IN"
            ]
          },
          "contacts": {
            "type": "number",
            "description": "Contacts who get this version.",
            "examples": [
              64
            ]
          },
          "whatsappTemplateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "WhatsApp template mapped to this language on the creative template. Null when none is: the broadcast then needs its own `fk_whatsappTemplateId`.",
            "examples": [
              "8a3e1c7b-2f4d-4b6a-9c0e-5d7f1a2b3c48"
            ]
          },
          "facebookTemplateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Facebook template mapped to this language. Null when none is: the broadcast then needs its own `fk_facebookTemplateId`.",
            "examples": [
              null
            ]
          }
        },
        "required": [
          "language",
          "contacts",
          "whatsappTemplateId",
          "facebookTemplateId"
        ]
      },
      "BroadcastEstimateResponseDto": {
        "type": "object",
        "properties": {
          "contacts": {
            "type": "number",
            "description": "Contacts the audience selects.",
            "examples": [
              120
            ]
          },
          "generation": {
            "type": "number",
            "description": "Credits to render every contact's creative, charged when you create the broadcast.",
            "examples": [
              600
            ]
          },
          "send": {
            "type": "number",
            "description": "Credits to send every message (each contact on each channel it can receive), charged when the broadcast is sent.",
            "examples": [
              1180
            ]
          },
          "total": {
            "type": "number",
            "description": "`generation` plus `send`.",
            "examples": [
              1780
            ]
          },
          "unknownLength": {
            "type": "number",
            "description": "Contacts whose video creative has no known length, so they are not in `generation`. Creating the broadcast is refused until the video can be measured.",
            "examples": [
              0
            ]
          },
          "languages": {
            "description": "Contacts per creative language, most first, with the message templates mapped for each.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BroadcastEstimateLanguageDto"
            }
          },
          "unreachable": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "description": "Per chosen channel, how many of the contacts it cannot reach — no WhatsApp number, or no connected Facebook Page. Their messages would be skipped (and are not in `send`). Empty when there is no audience.",
            "examples": [
              {
                "whatsapp": 0,
                "facebook": 3
              }
            ]
          }
        },
        "required": [
          "contacts",
          "generation",
          "send",
          "total",
          "unknownLength",
          "languages",
          "unreachable"
        ]
      },
      "BroadcastListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "One page of broadcasts.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BroadcastResponseDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastPaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "BroadcastPaginationDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Items that match, on all pages.",
            "examples": [
              37
            ]
          },
          "page": {
            "type": "number",
            "description": "This page number.",
            "examples": [
              1
            ]
          },
          "limit": {
            "type": "number",
            "description": "Items per page.",
            "examples": [
              12
            ]
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether there is another page after this one.",
            "examples": [
              true
            ]
          }
        },
        "required": [
          "total",
          "page",
          "limit",
          "hasMore"
        ]
      },
      "BroadcastResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Broadcast ID.",
            "examples": [
              "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
            ]
          },
          "title": {
            "type": "string",
            "description": "Name of the broadcast.",
            "examples": [
              "Q3 monsoon push"
            ]
          },
          "fk_templateId": {
            "type": "string",
            "format": "uuid",
            "description": "The creative template it sends.",
            "examples": [
              "1f6d2b9a-4c3e-4f8a-b7d1-2e9c5a0f3b64"
            ]
          },
          "templateName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The creative template's title. Null if the template was deleted.",
            "examples": [
              "Monsoon offer — scooter"
            ]
          },
          "channels": {
            "type": "array",
            "description": "Channels it sends on.",
            "items": {
              "type": "string",
              "enum": [
                "whatsapp",
                "facebook"
              ]
            },
            "examples": [
              [
                "whatsapp",
                "facebook"
              ]
            ]
          },
          "fk_whatsappTemplateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The broadcast's own WhatsApp template, used for languages with no mapped one.",
            "examples": [
              "8a3e1c7b-2f4d-4b6a-9c0e-5d7f1a2b3c48"
            ]
          },
          "fk_facebookTemplateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The broadcast's own Facebook template, used for languages with no mapped one.",
            "examples": [
              null
            ]
          },
          "options": {
            "type": "object",
            "additionalProperties": true,
            "description": "The `options` you sent, plus `messageTemplates`: a copy of the creative template's message-template mapping taken at create (language code → `whatsappTemplateId` / `facebookTemplateId`). Later changes to the mapping do not change this broadcast.",
            "examples": [
              {
                "messageTemplates": {
                  "ta-IN": {
                    "whatsappTemplateId": "8a3e1c7b-2f4d-4b6a-9c0e-5d7f1a2b3c48"
                  }
                }
              }
            ]
          },
          "audience": {
            "description": "The audience filter it was created with.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastAudienceDto"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "generating",
              "review",
              "scheduled",
              "sending",
              "paused",
              "completed",
              "cancelled"
            ],
            "description": "`generating`: creatives are rendering. `review`: every creative has settled and it waits for Send a broadcast. `scheduled`: settled, and a schedule will send it. `sending`, `paused`, then `completed`. `cancelled`: the send was stopped.",
            "examples": [
              "review"
            ]
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the broadcast is in its `status`, when that needs saying: for example a scheduled send that could not go out because your organization was short of credits. Null otherwise.",
            "examples": [
              null
            ]
          },
          "counts": {
            "description": "Progress counters.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastCountsDto"
              }
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "2b5d8f1a-4c7e-4a9b-b3d6-9e1f4a7c2d58"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the member who created the broadcast.",
            "examples": [
              "f3a6c9e2-1b4d-4e7a-9c2f-5b8e1d4a7c06"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the broadcast was created.",
            "examples": [
              "2026-10-04T10:12:41.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the broadcast last changed.",
            "examples": [
              "2026-10-04T10:18:03.000Z"
            ]
          },
          "creator": {
            "description": "Who created it. Null if the member no longer exists.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastCreatorDto"
              }
            ]
          },
          "schedule": {
            "description": "The schedule that will send it. Null when it waits for Send a broadcast.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastScheduleDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "title",
          "fk_templateId",
          "templateName",
          "channels",
          "fk_whatsappTemplateId",
          "fk_facebookTemplateId",
          "options",
          "audience",
          "status",
          "statusReason",
          "counts",
          "fk_orgId",
          "fk_creatorId",
          "createdAt",
          "updatedAt",
          "creator",
          "schedule"
        ]
      },
      "BroadcastRowDispatchDto": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "enum": [
              "whatsapp",
              "facebook"
            ],
            "description": "Channel.",
            "examples": [
              "whatsapp"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "sent",
              "delivered",
              "read",
              "failed",
              "posted",
              "skipped",
              "cancelled"
            ],
            "description": "Latest state of the message. `skipped`: the contact cannot receive this channel. `cancelled`: the send was stopped before it went out. `posted` is for Facebook.",
            "examples": [
              "delivered"
            ]
          },
          "eligible": {
            "type": "boolean",
            "description": "Whether the contact can receive this channel.",
            "examples": [
              true
            ]
          },
          "skipReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "no_whatsapp_number",
              "no_fb_page"
            ],
            "description": "Why the message was skipped. Null when it was not.",
            "examples": [
              null
            ]
          },
          "statusAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When `status` last changed. Null while pending.",
            "examples": [
              "2026-10-04T11:02:17.000Z"
            ]
          }
        },
        "required": [
          "connector",
          "status",
          "eligible",
          "skipReason",
          "statusAt"
        ]
      },
      "BroadcastScheduleDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the schedule.",
            "examples": [
              "7c1e3a5b-9d2f-4b6e-8a0c-4e6f8a2b1d93"
            ]
          },
          "handlerKey": {
            "type": "string",
            "description": "What the schedule runs. Always `hyperlocal.broadcast.dispatch`.",
            "examples": [
              "hyperlocal.broadcast.dispatch"
            ]
          },
          "resourceType": {
            "type": "string",
            "description": "Always `hl_broadcast`.",
            "examples": [
              "hl_broadcast"
            ]
          },
          "resourceId": {
            "type": "string",
            "format": "uuid",
            "description": "The broadcast this schedule sends.",
            "examples": [
              "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
            ]
          },
          "runAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the broadcast sends, as a UTC instant.",
            "examples": [
              "2026-10-12T03:30:00.000Z"
            ]
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone the schedule was set in.",
            "examples": [
              "Asia/Kolkata"
            ]
          },
          "localDate": {
            "type": "string",
            "description": "The date you set, `YYYY-MM-DD`, in `timezone`.",
            "examples": [
              "2026-10-12"
            ]
          },
          "localTime": {
            "type": "string",
            "description": "The time you set, `HH:mm`, in `timezone`.",
            "examples": [
              "09:00"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "waiting_readiness",
              "firing",
              "fired",
              "expired",
              "failed",
              "cancelled"
            ],
            "description": "`pending` until `runAt`; `waiting_readiness` when `runAt` has passed but creatives are still rendering (it sends as soon as they are ready); then `firing` and `fired`. `expired`, `failed` and `cancelled` mean it did not send.",
            "examples": [
              "pending"
            ]
          },
          "readinessDeadlineAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "How long the schedule waits for the creatives after `runAt` before it expires. Null when it is not waiting.",
            "examples": [
              null
            ]
          },
          "notReadyReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the schedule is still waiting, in plain words.",
            "examples": [
              null
            ]
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last attempt to send failed.",
            "examples": [
              null
            ]
          },
          "firedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the schedule sent the broadcast.",
            "examples": [
              null
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the schedule was set.",
            "examples": [
              "2026-10-04T10:15:00.000Z"
            ]
          }
        },
        "required": [
          "id",
          "handlerKey",
          "resourceType",
          "resourceId",
          "runAt",
          "timezone",
          "localDate",
          "localTime",
          "status",
          "readinessDeadlineAt",
          "notReadyReason",
          "lastError",
          "firedAt",
          "createdAt"
        ]
      },
      "ChannelReachResponseDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Contacts in your organization.",
            "examples": [
              1240
            ]
          },
          "whatsapp": {
            "type": "number",
            "description": "Contacts with a WhatsApp number.",
            "examples": [
              1102
            ]
          },
          "facebook": {
            "type": "number",
            "description": "Contacts with a connected Facebook page that is active.",
            "examples": [
              318
            ]
          }
        },
        "required": [
          "total",
          "whatsapp",
          "facebook"
        ]
      },
      "ContactChannelDataDto": {
        "type": "object",
        "properties": {
          "whatsapp": {
            "description": "The WhatsApp channel. Missing when the contact has no WhatsApp number.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactWhatsappDto"
              }
            ]
          },
          "facebook": {
            "type": "object",
            "additionalProperties": true,
            "description": "The connected Facebook page (`page.id`, `page.name`, `status`, `connectedAt`), present once the contact has connected a page through Create a Facebook connect link. Check it with Get Facebook connection status.",
            "examples": [
              {
                "status": "active",
                "page": {
                  "id": "104582377712345",
                  "name": "Kumar Traders Andheri"
                },
                "connectedAt": "2026-09-14T10:22:31.000Z"
              }
            ]
          }
        }
      },
      "ContactDataDto": {
        "type": "object",
        "properties": {
          "localization": {
            "description": "Saved localized values, written by Localize contacts or Save contact localization. Any other keys are the free-form `data` you sent.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactLocalizationDto"
              }
            ]
          }
        }
      },
      "ContactDeliveryStatusResponseDto": {
        "type": "object",
        "properties": {
          "broadcastId": {
            "type": "string",
            "format": "uuid",
            "description": "Broadcast ID.",
            "examples": [
              "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
            ]
          },
          "broadcastContactId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the contact's row in the broadcast.",
            "examples": [
              "b4d7e1a3-5c2f-4e9b-8a6d-3f1c0e2b9d57"
            ]
          },
          "contact": {
            "description": "The contact. Null if it was deleted.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastContactSummaryDto"
              }
            ]
          },
          "dispatches": {
            "description": "One message per channel, by channel name. Empty until the broadcast is sent.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactDispatchStatusDto"
            }
          }
        },
        "required": [
          "broadcastId",
          "broadcastContactId",
          "contact",
          "dispatches"
        ]
      },
      "ContactDispatchStatusDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Message (dispatch) ID. Use it as `dispatchId` to resend the message or refresh its insights.",
            "examples": [
              "d2a8c4e6-1f3b-4a5d-9e7c-8b0f2d4a6c19"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "whatsapp",
              "facebook"
            ],
            "description": "Channel.",
            "examples": [
              "whatsapp"
            ]
          },
          "eligible": {
            "type": "boolean",
            "description": "Whether the contact can receive this channel.",
            "examples": [
              true
            ]
          },
          "skipReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "no_whatsapp_number",
              "no_fb_page"
            ],
            "description": "Why the message was skipped. Null when it was not.",
            "examples": [
              null
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "sent",
              "delivered",
              "read",
              "failed",
              "posted",
              "skipped",
              "cancelled"
            ],
            "description": "Latest state of the message.",
            "examples": [
              "delivered"
            ]
          },
          "statusAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When `status` last changed.",
            "examples": [
              "2026-10-04T11:02:17.000Z"
            ]
          },
          "attemptCount": {
            "type": "number",
            "description": "How many times it has been tried.",
            "examples": [
              1
            ]
          },
          "attempts": {
            "description": "Every attempt, oldest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DispatchAttemptDto"
            }
          }
        },
        "required": [
          "id",
          "connector",
          "eligible",
          "skipReason",
          "status",
          "statusAt",
          "attemptCount",
          "attempts"
        ]
      },
      "ContactGroupListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "One page of contact groups.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactGroupResponseDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/HyperlocalPaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "ContactGroupRefDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact group ID.",
            "examples": [
              "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
            ]
          },
          "name": {
            "type": "string",
            "description": "Group name.",
            "examples": [
              "Premium Dealers"
            ]
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ContactGroupResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact group ID.",
            "examples": [
              "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
            ]
          },
          "name": {
            "type": "string",
            "description": "Group name, unique in your organization.",
            "examples": [
              "Premium Dealers"
            ]
          },
          "description": {
            "type": "string",
            "description": "Description. Empty string when not set.",
            "examples": [
              "Dealers with annual sales above ₹1 crore."
            ]
          },
          "contactCount": {
            "type": "number",
            "description": "Contacts in the group.",
            "examples": [
              148
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "0b7e4d2a-9c1f-4e8b-a6d3-5f2c1e9b7a40"
            ]
          },
          "fk_creatorId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Member ID of whoever created the group.",
            "examples": [
              "5a9d3c7e-1f2b-4e6a-8c0d-9b4e7f2a1c58"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the group was created.",
            "examples": [
              "2026-09-12T06:30:00.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the group was last changed.",
            "examples": [
              "2026-09-20T08:15:00.000Z"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "contactCount",
          "fk_orgId",
          "fk_creatorId",
          "createdAt",
          "updatedAt"
        ]
      },
      "ContactListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact ID.",
            "examples": [
              "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
            ]
          },
          "personName": {
            "type": "string",
            "description": "Name of the person.",
            "examples": [
              "Ravi Kumar"
            ]
          },
          "firmName": {
            "type": "string",
            "description": "Name of the firm.",
            "examples": [
              "Kumar Traders"
            ]
          },
          "code": {
            "type": "string",
            "description": "Your code for the contact, unique in your organization.",
            "examples": [
              "KT-001"
            ]
          },
          "zone": {
            "type": "string",
            "description": "Sales zone.",
            "examples": [
              "West"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "Andhra Pradesh",
              "Arunachal Pradesh",
              "Assam",
              "Bihar",
              "Chhattisgarh",
              "Goa",
              "Gujarat",
              "Haryana",
              "Himachal Pradesh",
              "Jharkhand",
              "Karnataka",
              "Kerala",
              "Madhya Pradesh",
              "Maharashtra",
              "Manipur",
              "Meghalaya",
              "Mizoram",
              "Nagaland",
              "Odisha",
              "Punjab",
              "Rajasthan",
              "Sikkim",
              "Tamil Nadu",
              "Telangana",
              "Tripura",
              "Uttar Pradesh",
              "Uttarakhand",
              "West Bengal",
              "Andaman and Nicobar Islands",
              "Chandigarh",
              "Dadra and Nagar Haveli and Daman and Diu",
              "Delhi",
              "Jammu and Kashmir",
              "Ladakh",
              "Lakshadweep",
              "Puducherry"
            ],
            "description": "Indian state or union territory. It decides which language version of a template the contact gets.",
            "examples": [
              "Maharashtra"
            ]
          },
          "area": {
            "type": "string",
            "description": "Area or locality. Empty string when not set.",
            "examples": [
              "Andheri East"
            ]
          },
          "address": {
            "type": "string",
            "description": "Street address. Empty string when not set.",
            "examples": [
              "123 MG Road"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Contact phone number.",
            "examples": [
              "+919876543210"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email address.",
            "examples": [
              "ravi@kumartraders.in"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "description": "The dealer's own website, as entered (with or without `https://`).",
            "examples": [
              "kumartraders.in"
            ]
          },
          "logo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public URL of the contact’s logo, used on creatives that show it.",
            "examples": [
              "{{CDN_BASE_URL}}/0b7e4d2a/hyper-local/uploads/logo/5d1c/kumar-traders.png"
            ]
          },
          "data": {
            "description": "Free-form data you stored, plus `localization` once saved.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactDataDto"
              }
            ]
          },
          "channelData": {
            "description": "The channels the contact can be reached on. Empty object when none.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactChannelDataDto"
              }
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "0b7e4d2a-9c1f-4e8b-a6d3-5f2c1e9b7a40"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the contact was created.",
            "examples": [
              "2026-09-12T06:30:00.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the contact was last changed.",
            "examples": [
              "2026-09-20T08:15:00.000Z"
            ]
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the contact was deleted. Always null for live contacts.",
            "examples": [
              null
            ]
          },
          "groups": {
            "description": "The contact groups the contact is in. Empty when none.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactGroupRefDto"
            }
          }
        },
        "required": [
          "id",
          "personName",
          "firmName",
          "code",
          "zone",
          "state",
          "area",
          "address",
          "phone",
          "email",
          "website",
          "logo",
          "data",
          "channelData",
          "fk_orgId",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "groups"
        ]
      },
      "ContactListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "One page of contacts.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactListItemDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/HyperlocalPaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "ContactLocalizationDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "description": "BCP-47 code of the language these values are in. The contact counts as localized only while this equals the language its state maps to.",
            "examples": [
              "mr-IN"
            ]
          },
          "fields": {
            "description": "The localized values, by field.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactLocalizedFieldsDto"
              }
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "When the values were last saved (ISO 8601).",
            "examples": [
              "2026-09-20T08:15:00.000Z"
            ]
          }
        },
        "required": [
          "language",
          "fields",
          "updatedAt"
        ]
      },
      "ContactLocalizationPreviewDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": [
              "string",
              "null"
            ],
            "description": "BCP-47 code of the language the contact’s state maps to. Null when it maps to none (then `fields` is empty).",
            "examples": [
              "mr-IN"
            ]
          },
          "fields": {
            "description": "Suggested values for the non-empty fields. Nothing is saved: send them, edited or not, to Save contact localization.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactLocalizedFieldsDto"
              }
            ]
          }
        },
        "required": [
          "language",
          "fields"
        ]
      },
      "ContactLocalizationSummaryDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Contacts in your organization.",
            "examples": [
              1240
            ]
          },
          "localized": {
            "type": "number",
            "description": "Contacts localized into the language their current state maps to.",
            "examples": [
              980
            ]
          },
          "notLocalized": {
            "type": "number",
            "description": "Contacts whose state maps to a language but are not yet localized into it.",
            "examples": [
              260
            ]
          },
          "byLanguage": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/LanguageLocalizationCountsDto"
            },
            "description": "The same counts per target language (BCP-47 code). Localize contacts charges each language separately, so use these to estimate a run.",
            "examples": [
              {
                "mr-IN": {
                  "localized": 410,
                  "notLocalized": 35
                },
                "ta-IN": {
                  "localized": 220,
                  "notLocalized": 180
                }
              }
            ]
          }
        },
        "required": [
          "total",
          "localized",
          "notLocalized",
          "byLanguage"
        ]
      },
      "ContactLocalizedFieldsDto": {
        "type": "object",
        "properties": {
          "firmName": {
            "type": "string",
            "description": "Firm name in the target language or script.",
            "examples": [
              "कुमार ट्रेडर्स"
            ]
          },
          "personName": {
            "type": "string",
            "description": "Person name in the target language or script.",
            "examples": [
              "रवि कुमार"
            ]
          },
          "area": {
            "type": "string",
            "description": "Area in the target language.",
            "examples": [
              "अंधेरी पूर्व"
            ]
          },
          "address": {
            "type": "string",
            "description": "Address in the target language.",
            "examples": [
              "123 एमजी रोड"
            ]
          }
        }
      },
      "ContactResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact ID.",
            "examples": [
              "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
            ]
          },
          "personName": {
            "type": "string",
            "description": "Name of the person.",
            "examples": [
              "Ravi Kumar"
            ]
          },
          "firmName": {
            "type": "string",
            "description": "Name of the firm.",
            "examples": [
              "Kumar Traders"
            ]
          },
          "code": {
            "type": "string",
            "description": "Your code for the contact, unique in your organization.",
            "examples": [
              "KT-001"
            ]
          },
          "zone": {
            "type": "string",
            "description": "Sales zone.",
            "examples": [
              "West"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "Andhra Pradesh",
              "Arunachal Pradesh",
              "Assam",
              "Bihar",
              "Chhattisgarh",
              "Goa",
              "Gujarat",
              "Haryana",
              "Himachal Pradesh",
              "Jharkhand",
              "Karnataka",
              "Kerala",
              "Madhya Pradesh",
              "Maharashtra",
              "Manipur",
              "Meghalaya",
              "Mizoram",
              "Nagaland",
              "Odisha",
              "Punjab",
              "Rajasthan",
              "Sikkim",
              "Tamil Nadu",
              "Telangana",
              "Tripura",
              "Uttar Pradesh",
              "Uttarakhand",
              "West Bengal",
              "Andaman and Nicobar Islands",
              "Chandigarh",
              "Dadra and Nagar Haveli and Daman and Diu",
              "Delhi",
              "Jammu and Kashmir",
              "Ladakh",
              "Lakshadweep",
              "Puducherry"
            ],
            "description": "Indian state or union territory. It decides which language version of a template the contact gets.",
            "examples": [
              "Maharashtra"
            ]
          },
          "area": {
            "type": "string",
            "description": "Area or locality. Empty string when not set.",
            "examples": [
              "Andheri East"
            ]
          },
          "address": {
            "type": "string",
            "description": "Street address. Empty string when not set.",
            "examples": [
              "123 MG Road"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Contact phone number.",
            "examples": [
              "+919876543210"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email address.",
            "examples": [
              "ravi@kumartraders.in"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "description": "The dealer's own website, as entered (with or without `https://`).",
            "examples": [
              "kumartraders.in"
            ]
          },
          "logo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public URL of the contact’s logo, used on creatives that show it.",
            "examples": [
              "{{CDN_BASE_URL}}/0b7e4d2a/hyper-local/uploads/logo/5d1c/kumar-traders.png"
            ]
          },
          "data": {
            "description": "Free-form data you stored, plus `localization` once saved.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactDataDto"
              }
            ]
          },
          "channelData": {
            "description": "The channels the contact can be reached on. Empty object when none.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactChannelDataDto"
              }
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "0b7e4d2a-9c1f-4e8b-a6d3-5f2c1e9b7a40"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the contact was created.",
            "examples": [
              "2026-09-12T06:30:00.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the contact was last changed.",
            "examples": [
              "2026-09-20T08:15:00.000Z"
            ]
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the contact was deleted. Always null for live contacts.",
            "examples": [
              null
            ]
          }
        },
        "required": [
          "id",
          "personName",
          "firmName",
          "code",
          "zone",
          "state",
          "area",
          "address",
          "phone",
          "email",
          "website",
          "logo",
          "data",
          "channelData",
          "fk_orgId",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ]
      },
      "ContactWhatsappDto": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "WhatsApp number the contact receives broadcasts on, as you saved it.",
            "examples": [
              "+919876543210"
            ]
          }
        },
        "required": [
          "number"
        ]
      },
      "CopyOverlayFromDefaultDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "description": "ID of the template.",
            "format": "uuid",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "toLanguage": {
            "type": "string",
            "description": "Language whose overlay to replace with the default: the template's base language or one of its localizations' languages (BCP-47).",
            "maxLength": 35,
            "examples": [
              "hi-IN"
            ]
          }
        },
        "required": [
          "templateId",
          "toLanguage"
        ]
      },
      "CopyTemplateOverlayDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "description": "ID of the template.",
            "format": "uuid",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "fromLanguage": {
            "type": "string",
            "description": "Language whose overlay to copy (BCP-47). It must already have an overlay.",
            "maxLength": 35,
            "examples": [
              "en-IN"
            ]
          },
          "toLanguage": {
            "type": "string",
            "description": "Language to copy it into (BCP-47): the template's base language or one of its localizations' languages, different from `fromLanguage`. Its overlay is replaced.",
            "maxLength": 35,
            "examples": [
              "hi-IN"
            ]
          }
        },
        "required": [
          "templateId",
          "fromLanguage",
          "toLanguage"
        ]
      },
      "CreateAgentVideoDto": {
        "type": "object",
        "properties": {
          "videoUrl": {
            "type": "string",
            "description": "Public https link to the source video (MP4, MOV, WebM, MKV and other common formats; up to 10 minutes and 500 MB).",
            "examples": [
              "https://cdn.example.com/campaigns/sip-launch.mp4"
            ]
          },
          "photoUrl": {
            "type": "string",
            "description": "Public https link to the agent's photo (JPEG, PNG or WebP, up to 10 MB, at least 400 px on its shorter side). Optional: without it the card shows the details centred, with no photo.",
            "examples": [
              "https://cdn.example.com/agents/rohan.jpg"
            ]
          },
          "logoUrl": {
            "type": "string",
            "description": "Public https link to a logo shown top-right on the end card: JPEG, PNG or WebP (PNG with a transparent background works best), at least 200 px on its shorter side, at most 2000 px on its longer side, and no wider or taller than 4:1. Empty borders are trimmed automatically.",
            "examples": [
              "https://cdn.example.com/brand/logo.png"
            ]
          },
          "name": {
            "type": "string",
            "description": "The agent's name: letters, spaces and . ' - (at most 50 characters).",
            "maxLength": 50,
            "examples": [
              "Rohan Sharma"
            ]
          },
          "arn": {
            "type": "string",
            "description": "The agent's ARN, shown as sent: letters, digits and / . _ - with no spaces (at most 30 characters). Optional: without it the card leaves the ARN line out.",
            "maxLength": 30,
            "examples": [
              "781673/OCT/ABC"
            ]
          },
          "mobile": {
            "type": "string",
            "description": "Mobile number. Digits, with optional +, spaces or dashes; a leading +91 is dropped. Spoken digit by digit in the voice-over.",
            "examples": [
              "8090134650"
            ]
          },
          "email": {
            "type": "string",
            "description": "The agent's email (at most 100 characters).",
            "maxLength": 100,
            "examples": [
              "rohan@gmail.com"
            ]
          },
          "referenceId": {
            "type": "string",
            "description": "Your own id for this video (letters, digits, `-`, `_`, `.`, `:`). Sending the same request with the same referenceId returns the existing video instead of making (and charging for) a new one — safe to retry. Different details under a used referenceId are refused (409).",
            "examples": [
              "agent-rohan-sip-oct"
            ]
          }
        },
        "required": [
          "videoUrl",
          "name",
          "mobile",
          "email"
        ]
      },
      "CreateBroadcastDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Name of the broadcast, up to 255 characters.",
            "maxLength": 255,
            "examples": [
              "Q3 monsoon push"
            ]
          },
          "fk_templateId": {
            "type": "string",
            "format": "uuid",
            "description": "The creative template to send (`id` from Create a template). Each contact gets a creative rendered from the version of it in their language.",
            "examples": [
              "1f6d2b9a-4c3e-4f8a-b7d1-2e9c5a0f3b64"
            ]
          },
          "channels": {
            "type": "array",
            "description": "Where to send: `whatsapp` (a WhatsApp template message to each contact's number), `facebook` (a post on each contact's connected Facebook page), or both.",
            "items": {
              "type": "string",
              "enum": [
                "whatsapp",
                "facebook"
              ]
            },
            "examples": [
              [
                "whatsapp"
              ]
            ]
          },
          "fk_whatsappTemplateId": {
            "type": "string",
            "format": "uuid",
            "description": "WhatsApp template used for every language the creative template has no WhatsApp template mapped for (see Map message templates). Required with `whatsapp` when some contact's language is not mapped. Must be one of your organization's WhatsApp templates.",
            "examples": [
              "8a3e1c7b-2f4d-4b6a-9c0e-5d7f1a2b3c48"
            ]
          },
          "fk_facebookTemplateId": {
            "type": "string",
            "format": "uuid",
            "description": "Facebook template used for every language the creative template has no Facebook template mapped for. Required with `facebook` when some contact's language is not mapped. Must be one of your organization's Facebook templates.",
            "examples": [
              "3d9b6e2a-7c1f-4e8d-a5b0-9f2c4e6a1d73"
            ]
          },
          "options": {
            "type": "object",
            "additionalProperties": true,
            "description": "Per-channel options, stored with the broadcast. No option currently changes how a broadcast sends. A `messageTemplates` key you send is dropped: the server fills it.",
            "examples": [
              {
                "whatsapp": {
                  "imageOnly": true
                }
              }
            ]
          },
          "filter": {
            "description": "Which contacts to send to when `selectAll` is true. The filters are combined (AND). Stored on the broadcast as `audience`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastAudienceFilterDto"
              }
            ]
          },
          "contactIds": {
            "description": "The contacts to send to (`id` from List contacts). Used when `selectAll` is not true; ids not in your organization are ignored.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "0c4f8e2a-6b1d-4a9e-8f3c-7d2b5e1a9c60",
                "e7a1b3c5-9d2f-4e6a-b8c0-1f3d5a7b9e24"
              ]
            ]
          },
          "selectAll": {
            "type": "boolean",
            "description": "Send to every contact that matches `filter` (or every contact, without one) instead of `contactIds`.",
            "default": false,
            "examples": [
              false
            ]
          },
          "schedule": {
            "description": "Send this automatically at a chosen time instead of waiting for a manual dispatch. The time is the EARLIEST send time — if the personalized creatives are still generating when it arrives, the broadcast sends as soon as the last one is ready.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ScheduleBroadcastDto"
              }
            ]
          }
        },
        "required": [
          "title",
          "fk_templateId",
          "channels"
        ]
      },
      "CreateContactDto": {
        "type": "object",
        "properties": {
          "personName": {
            "type": "string",
            "description": "Name of the person.",
            "examples": [
              "Ravi Kumar"
            ]
          },
          "firmName": {
            "type": "string",
            "description": "Name of the firm.",
            "examples": [
              "Kumar Traders"
            ]
          },
          "code": {
            "type": "string",
            "description": "Unique code within the organization.",
            "examples": [
              "KT-001"
            ]
          },
          "zone": {
            "type": "string",
            "description": "Sales zone.",
            "examples": [
              "North"
            ]
          },
          "state": {
            "type": "string",
            "description": "One of the canonical Indian states / union territories, spelled exactly as listed. It decides which language version of a template the contact gets.",
            "enum": [
              "Andhra Pradesh",
              "Arunachal Pradesh",
              "Assam",
              "Bihar",
              "Chhattisgarh",
              "Goa",
              "Gujarat",
              "Haryana",
              "Himachal Pradesh",
              "Jharkhand",
              "Karnataka",
              "Kerala",
              "Madhya Pradesh",
              "Maharashtra",
              "Manipur",
              "Meghalaya",
              "Mizoram",
              "Nagaland",
              "Odisha",
              "Punjab",
              "Rajasthan",
              "Sikkim",
              "Tamil Nadu",
              "Telangana",
              "Tripura",
              "Uttar Pradesh",
              "Uttarakhand",
              "West Bengal",
              "Andaman and Nicobar Islands",
              "Chandigarh",
              "Dadra and Nagar Haveli and Daman and Diu",
              "Delhi",
              "Jammu and Kashmir",
              "Ladakh",
              "Lakshadweep",
              "Puducherry"
            ],
            "examples": [
              "Maharashtra"
            ]
          },
          "area": {
            "type": "string",
            "default": "",
            "description": "Area or locality.",
            "examples": [
              "Andheri East"
            ]
          },
          "address": {
            "type": "string",
            "default": "",
            "description": "Street address.",
            "examples": [
              "123 MG Road"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Contact phone number. WhatsApp messages are not sent to it: they go to `channelData.whatsapp.number`.",
            "examples": [
              "+919876543210"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email address.",
            "examples": [
              "ravi@kumartraders.in"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "description": "The dealer's own website — filled into an overlay's Website element and a QR code set to Dealer website. With or without `https://`.",
            "examples": [
              "kumartraders.in"
            ]
          },
          "logo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public URL of the contact’s logo, for creatives that show it. Upload the image first with Get an upload URL and Register an upload.",
            "examples": [
              "{{CDN_BASE_URL}}/0b7e4d2a/hyper-local/uploads/logo/5d1c/kumar-traders.png"
            ]
          },
          "data": {
            "type": "object",
            "description": "Any JSON object you want to keep with the contact. The `localization` key is written by Localize contacts and Save contact localization.",
            "default": {},
            "examples": [
              {
                "region": "Mumbai Metro",
                "tier": "gold"
              }
            ]
          },
          "channelData": {
            "type": "object",
            "description": "Channel handles. Set `whatsapp.number` to reach the contact on WhatsApp. A Facebook page is added by the contact through Create a Facebook connect link, not here.",
            "default": {},
            "examples": [
              {
                "whatsapp": {
                  "number": "+919876543210"
                }
              }
            ]
          }
        },
        "required": [
          "personName",
          "firmName",
          "code",
          "zone",
          "state"
        ]
      },
      "CreateContactGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Group name. Must be unique in your organization.",
            "maxLength": 120,
            "examples": [
              "Premium Dealers"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "What the group is for.",
            "examples": [
              "Dealers with annual sales above ₹1 crore."
            ]
          },
          "contactIds": {
            "description": "Contact IDs to put in the group straight away. IDs that are not contacts in your organization are ignored.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f"
              ]
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "CreateFacebookTemplateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Template name, up to 255 characters.",
            "examples": [
              "Diwali offer post"
            ]
          },
          "message": {
            "type": "string",
            "description": "The post text, with `{{1}}`, `{{2}}`… where contact details go.",
            "examples": [
              "Namaste {{1}}! Visit {{2}} this Diwali for the best deals."
            ]
          },
          "variables": {
            "description": "One entry per placeholder, in order: the first fills `{{1}}`. Send an empty array when the text has no placeholders.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FacebookTemplateVariableDto"
            }
          },
          "media": {
            "description": "The media the post carries. `null` or left out: text only.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacebookMediaDto"
              }
            ]
          },
          "language": {
            "type": "string",
            "description": "The language of the post, as a WhatsApp (Meta) language code from Get Facebook template options. A template without a language is never mapped to a creative's language version. Once set, it can be changed but not cleared.",
            "enum": [
              "en",
              "en-US",
              "en-GB",
              "hi",
              "bn",
              "gu",
              "kn",
              "ml",
              "mr",
              "pa",
              "ta",
              "te",
              "ur"
            ],
            "examples": [
              "hi"
            ]
          }
        },
        "required": [
          "name",
          "message",
          "variables"
        ]
      },
      "CreateHyperlocalUploadPresignDto": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "creative",
              "logo",
              "product"
            ],
            "description": "What the file is for: `creative` (a template creative, image or video), `logo` (a contact logo, image only) or `product` (a product or model image, image only).",
            "examples": [
              "product"
            ]
          },
          "fileName": {
            "type": "string",
            "description": "File name, with its extension. It names the file in your assets and ends its storage key; characters other than letters, digits, `_`, `.` and `-` become `_`.",
            "examples": [
              "scooter.png"
            ]
          },
          "contentType": {
            "type": "string",
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp",
              "video/mp4"
            ],
            "description": "MIME type of the file. `video/mp4` is accepted only for a `creative`.",
            "examples": [
              "image/png"
            ]
          },
          "size": {
            "type": "number",
            "description": "Size of the file in bytes. When you send it, a file over the limit (25 MB for an image, 200 MB for a video) is refused before a URL is made.",
            "examples": [
              482133
            ]
          }
        },
        "required": [
          "kind",
          "fileName",
          "contentType"
        ]
      },
      "CreateLocalizedTemplateDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the template this is a version of.",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "language": {
            "type": "string",
            "description": "Language of this version, as a BCP-47 code (up to 35 characters). One localization per language per template.",
            "maxLength": 35,
            "examples": [
              "hi-IN"
            ]
          },
          "title": {
            "type": "string",
            "description": "Title in this language, up to 255 characters. Preview a localization suggests one.",
            "maxLength": 255,
            "examples": [
              "फसल सीज़न लॉन्च"
            ]
          },
          "caption": {
            "type": "string",
            "description": "Caption in this language. Preview a localization suggests one.",
            "examples": [
              "कॉम्पैक्ट ऑर्चर्ड ट्रैक्टर"
            ]
          },
          "creative": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of this version's own creative, up to 2048 characters, of the template's media type. Leave it out (or null) to use the template's base creative.",
            "maxLength": 2048,
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest-hi.png"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active"
            ],
            "default": "draft",
            "description": "`draft` or `active`.",
            "examples": [
              "active"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON data for this version, e.g. `durationSeconds` for its own video creative (it prices renders). On update a sent object replaces the stored one; leave it out to keep it. `origin` is set by the server and ignored if sent.",
            "default": {},
            "examples": [
              {
                "durationSeconds": 24
              }
            ]
          }
        },
        "required": [
          "templateId",
          "language",
          "title",
          "caption"
        ]
      },
      "CreateProductDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Product name, up to 255 characters.",
            "maxLength": 255,
            "examples": [
              "Mahindra NOVO"
            ]
          },
          "description": {
            "type": "string",
            "description": "Product description.",
            "examples": [
              "Introducing the all-new Mahindra NOVO, built for heavy haulage."
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the product image, up to 2048 characters. Upload it first with Get an upload URL and Register an upload (`kind: product`).",
            "maxLength": 2048,
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/product/novo.png"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own JSON data for the product. Stored as sent; on update a sent object replaces the stored one.",
            "default": {},
            "examples": [
              {
                "sku": "NOVO-605"
              }
            ]
          }
        },
        "required": [
          "name",
          "description"
        ]
      },
      "CreateProductModelDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the product the model belongs to. It cannot be changed later.",
            "examples": [
              "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
            ]
          },
          "name": {
            "type": "string",
            "description": "Model name, up to 255 characters.",
            "maxLength": 255,
            "examples": [
              "NOVO Maxx"
            ]
          },
          "description": {
            "type": "string",
            "description": "Model description.",
            "examples": [
              "High-capacity variant with extended payload."
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the model image, up to 2048 characters. Upload it first with Get an upload URL and Register an upload (`kind: product`).",
            "maxLength": 2048,
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/product/novo-maxx.png"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own JSON data for the model. Stored as sent; on update a sent object replaces the stored one.",
            "default": {},
            "examples": [
              {
                "payloadKg": 1500
              }
            ]
          }
        },
        "required": [
          "productId",
          "name",
          "description"
        ]
      },
      "CreateStagedUploadDto": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "Name of the file you will upload. Its extension must be one this step takes.",
            "examples": [
              "catalogue.csv"
            ]
          },
          "contentType": {
            "type": "string",
            "description": "The file's type, sent again as the `Content-Type` of the `PUT` (the URL is signed over it). `application/octet-stream` is accepted when the type is unknown.",
            "examples": [
              "text/csv"
            ]
          },
          "size": {
            "type": "number",
            "description": "Exact size of the file in bytes. It is part of the signed URL: storage refuses a `PUT` of any other length.",
            "examples": [
              524288
            ]
          }
        },
        "required": [
          "fileName",
          "contentType",
          "size"
        ]
      },
      "CreateTemplateDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the product the template is for. It cannot be changed later.",
            "examples": [
              "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
            ]
          },
          "modelId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of a model of that product. It cannot be changed later.",
            "examples": [
              "8c4e1b2a-9d3f-4a6e-b7c5-1f2e3d4c5b6a"
            ]
          },
          "tmId": {
            "type": "string",
            "format": "uuid",
            "description": "Translation memory used to translate this template. Set once at creation; it cannot be changed afterwards.",
            "examples": [
              "f4b6d8a0-1c3e-4f5a-8b7d-6e9c0a2b4d6f"
            ]
          },
          "title": {
            "type": "string",
            "description": "Title in the base language, up to 255 characters.",
            "maxLength": 255,
            "examples": [
              "Harvest season launch"
            ]
          },
          "caption": {
            "type": "string",
            "description": "Caption in the base language.",
            "examples": [
              "Compact orchard tractor for vineyards and inter-row spraying."
            ]
          },
          "creative": {
            "type": "string",
            "description": "URL of the base creative, up to 2048 characters: an image (PNG, JPG) or, with `type: video`, an MP4. Upload it first with Get an upload URL and Register an upload (`kind: creative`).",
            "maxLength": 2048,
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.png"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ],
            "default": "image",
            "description": "Media type of the creative. Fixed once the template exists; its localizations must match it.",
            "examples": [
              "image"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active"
            ],
            "default": "draft",
            "description": "`draft` or `active`.",
            "examples": [
              "active"
            ]
          },
          "baseLanguage": {
            "type": "string",
            "description": "Language of the base creative, as a BCP-47 code. Defaults to `en-US`.",
            "default": "en-US",
            "examples": [
              "en-IN"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON data for the template. Set `durationSeconds` to a video creative’s length in seconds (it prices renders), and optionally `stateLanguageMap` (state name → language version) to override your preferences for this template. On update a sent object replaces the stored one; `messageTemplates` is ignored here (use Map message templates).",
            "default": {},
            "examples": [
              {
                "durationSeconds": 24,
                "stateLanguageMap": {
                  "Telangana": "te-IN"
                }
              }
            ]
          }
        },
        "required": [
          "productId",
          "modelId",
          "title",
          "caption",
          "creative"
        ]
      },
      "CreateWhatsappTemplateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Template name: lowercase letters, numbers and underscores, up to 120 characters. Unique in your organization for each language.",
            "examples": [
              "diwali_offer"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "MARKETING",
              "UTILITY",
              "AUTHENTICATION"
            ],
            "description": "The WhatsApp category Meta reviews the template under. Broadcast offers are `MARKETING`.",
            "examples": [
              "MARKETING"
            ]
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "en-US",
              "en-GB",
              "hi",
              "bn",
              "gu",
              "kn",
              "ml",
              "mr",
              "pa",
              "ta",
              "te",
              "ur"
            ],
            "description": "The BCP-47 code of the message language, such as `hi` or `en-US` (the older `en_US` form is still accepted). Get the list from Get WhatsApp template options.",
            "examples": [
              "hi"
            ]
          },
          "components": {
            "description": "The header, body, footer and buttons of the message.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappComponentsDto"
              }
            ]
          }
        },
        "required": [
          "name",
          "category",
          "language",
          "components"
        ]
      },
      "DispatchAttemptDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Attempt ID.",
            "examples": [
              "9e1b3d5f-7a2c-4e6b-8d0f-2a4c6e8b1d37"
            ]
          },
          "attemptNo": {
            "type": "number",
            "description": "Attempt number, from 1. A resend is a new attempt.",
            "examples": [
              1
            ]
          },
          "providerRef": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider's ID for this message: the WhatsApp message ID (`wamid`) or the Facebook post ID.",
            "examples": [
              "wamid.HBgMOTE5ODQzMDExMjg0FQIAERgSNkQ3RTA5QjA4QzE2RDY0RkEA"
            ]
          },
          "currentStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "Latest status of this attempt.",
            "examples": [
              "delivered"
            ]
          },
          "statusTimeline": {
            "description": "Every status update for this attempt, oldest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusEventDto"
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the attempt failed. Null otherwise.",
            "examples": [
              null
            ]
          },
          "connectorData": {
            "type": "object",
            "additionalProperties": true,
            "description": "Channel-specific details: for a Facebook post, its `analytics` (the same shape as Refresh post insights returns) and `analyticsAt`; `creditKey` names the credit charge the attempt is paid by.",
            "examples": [
              {
                "creditKey": "bc-send:d2a8c4e6-1f3b-4a5d-9e7c-8b0f2d4a6c19:a1"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt was made.",
            "examples": [
              "2026-10-04T11:01:52.000Z"
            ]
          }
        },
        "required": [
          "id",
          "attemptNo",
          "providerRef",
          "currentStatus",
          "statusTimeline",
          "error",
          "connectorData",
          "createdAt"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Error body returned for every 4xx and 5xx response.",
        "required": [
          "statusCode",
          "message"
        ],
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "HTTP status code, repeated in the body.",
            "examples": [
              404
            ]
          },
          "message": {
            "description": "What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ],
            "examples": [
              "Booking not found"
            ]
          },
          "error": {
            "type": "string",
            "description": "Short name of the status.",
            "examples": [
              "Not Found"
            ]
          }
        }
      },
      "EstimateBroadcastDto": {
        "type": "object",
        "properties": {
          "fk_templateId": {
            "type": "string",
            "format": "uuid",
            "description": "The creative template to send (`id` from Create a template). Each contact gets a creative rendered from the version of it in their language.",
            "examples": [
              "1f6d2b9a-4c3e-4f8a-b7d1-2e9c5a0f3b64"
            ]
          },
          "channels": {
            "type": "array",
            "description": "Where to send: `whatsapp` (a WhatsApp template message to each contact's number), `facebook` (a post on each contact's connected Facebook page), or both.",
            "items": {
              "type": "string",
              "enum": [
                "whatsapp",
                "facebook"
              ]
            },
            "examples": [
              [
                "whatsapp"
              ]
            ]
          },
          "filter": {
            "description": "Which contacts to send to when `selectAll` is true. The filters are combined (AND). Stored on the broadcast as `audience`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BroadcastAudienceFilterDto"
              }
            ]
          },
          "contactIds": {
            "description": "The contacts to send to (`id` from List contacts). Used when `selectAll` is not true; ids not in your organization are ignored.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "0c4f8e2a-6b1d-4a9e-8f3c-7d2b5e1a9c60",
                "e7a1b3c5-9d2f-4e6a-b8c0-1f3d5a7b9e24"
              ]
            ]
          },
          "selectAll": {
            "type": "boolean",
            "description": "Send to every contact that matches `filter` (or every contact, without one) instead of `contactIds`.",
            "default": false,
            "examples": [
              false
            ]
          }
        },
        "required": [
          "fk_templateId",
          "channels"
        ]
      },
      "FacebookAnalyticsDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Facebook posts (contacts with an active connected Facebook page).",
            "examples": [
              40
            ]
          },
          "posted": {
            "type": "number",
            "description": "Posted.",
            "examples": [
              38
            ]
          },
          "failed": {
            "type": "number",
            "description": "Failed.",
            "examples": [
              1
            ]
          },
          "pending": {
            "type": "number",
            "description": "Not posted or failed yet.",
            "examples": [
              1
            ]
          },
          "insightPosts": {
            "type": "number",
            "description": "Posts whose insights have been fetched and are summed in `insights`.",
            "examples": [
              36
            ]
          },
          "insights": {
            "description": "Insights summed over `insightPosts`, as last fetched. Refresh them with Refresh Facebook insights.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FacebookInsightsTotalsDto"
              }
            ]
          }
        },
        "required": [
          "total",
          "posted",
          "failed",
          "pending",
          "insightPosts",
          "insights"
        ]
      },
      "FacebookInsightsTotalsDto": {
        "type": "object",
        "properties": {
          "impressions": {
            "type": "number",
            "description": "Times the posts were shown.",
            "examples": [
              5320
            ]
          },
          "reactions": {
            "type": "number",
            "description": "Reactions on the posts.",
            "examples": [
              214
            ]
          },
          "comments": {
            "type": "number",
            "description": "Comments on the posts.",
            "examples": [
              37
            ]
          },
          "shares": {
            "type": "number",
            "description": "Shares of the posts.",
            "examples": [
              12
            ]
          }
        },
        "required": [
          "impressions",
          "reactions",
          "comments",
          "shares"
        ]
      },
      "FacebookInviteResponseDto": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Link to send to the contact. Opening it takes them to Facebook to choose the Page to connect. It works for 7 days.",
            "examples": [
              "{{API_BASE_URL}}/v1/galaxy/hyperlocal/facebook/invite/M2Y4YzJiMWUtN2E0ZC00YzllLWI1ZjItMWQ2ZThhMGM0YjdmLjE3NjAxMjM0NTY3ODkuYjRkOWUyZjE"
            ]
          }
        },
        "required": [
          "url"
        ]
      },
      "FacebookMediaDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ],
            "description": "Whether the post carries an image or a video. The file posted for each contact is their own creative.",
            "examples": [
              "image"
            ]
          },
          "url": {
            "type": "string",
            "description": "A sample or source media link, for example the creative of a template.",
            "examples": [
              "https://cdn.example.com/hyper-local/uploads/creative/diwali-sample.png"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "FacebookPageStatusDto": {
        "type": "object",
        "properties": {
          "pageId": {
            "type": "string",
            "description": "Facebook Page ID.",
            "examples": [
              "104582377712345"
            ]
          },
          "pageName": {
            "type": "string",
            "description": "Facebook Page name.",
            "examples": [
              "Kumar Traders Andheri"
            ]
          },
          "connectedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the page was connected.",
            "examples": [
              "2026-09-14T10:22:31.000Z"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "expired"
            ],
            "description": "State of the connection. Broadcasts post only to `active` pages.",
            "examples": [
              "active"
            ]
          }
        },
        "required": [
          "pageId",
          "pageName",
          "connectedAt",
          "status"
        ]
      },
      "FacebookStatusResponseDto": {
        "type": "object",
        "properties": {
          "connected": {
            "type": "boolean",
            "description": "True when a page is connected and its status is `active`, so broadcasts can post to it.",
            "examples": [
              true
            ]
          },
          "needsReconnect": {
            "type": "boolean",
            "description": "True when the contact’s Facebook login has expired. Posting still works, but send a new connect link so a later disconnect can also remove access on Facebook.",
            "examples": [
              false
            ]
          },
          "facebook": {
            "description": "The connected page. Null when none is connected.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacebookPageStatusDto"
              }
            ]
          }
        },
        "required": [
          "connected",
          "needsReconnect",
          "facebook"
        ]
      },
      "FacebookTemplateListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "One page of templates.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FacebookTemplateResponseDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageTemplatePaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "FacebookTemplateOptionsResponseDto": {
        "type": "object",
        "properties": {
          "languages": {
            "description": "Languages `language` accepts: the same codes as WhatsApp templates, so a language version of a creative maps to both channels the same way.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageTemplateLanguageDto"
            },
            "examples": [
              [
                {
                  "code": "en",
                  "label": "English"
                },
                {
                  "code": "en-US",
                  "label": "English (US)"
                },
                {
                  "code": "en-GB",
                  "label": "English (UK)"
                },
                {
                  "code": "hi",
                  "label": "Hindi"
                }
              ]
            ]
          }
        },
        "required": [
          "languages"
        ]
      },
      "FacebookTemplateResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the template.",
            "examples": [
              "6a1d3f8b-2e4c-4b7a-9d0e-8c5f1a2b3e47"
            ]
          },
          "name": {
            "type": "string",
            "description": "Template name.",
            "examples": [
              "Diwali offer post"
            ]
          },
          "message": {
            "type": "string",
            "description": "The post text, with `{{n}}` placeholders.",
            "examples": [
              "Namaste {{1}}! Visit {{2}} this Diwali for the best deals."
            ]
          },
          "variables": {
            "description": "The contact field behind each placeholder, in order.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FacebookTemplateVariableDto"
            }
          },
          "media": {
            "description": "The media the post carries; `null` for text only.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacebookMediaDto"
              }
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ],
            "description": "WhatsApp (Meta) language code of the post. `null` for a template saved without one.",
            "examples": [
              "hi"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Extra stored details. Usually empty.",
            "examples": [
              {}
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of your organization.",
            "examples": [
              "9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the creator.",
            "examples": [
              "2c4e6a80-9b1d-4f3e-8a5c-7d9e1f2a3b4c"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the template was created.",
            "examples": [
              "2026-10-01T09:30:00.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the template was last changed.",
            "examples": [
              "2026-10-02T11:05:00.000Z"
            ]
          },
          "creator": {
            "description": "Who created the template.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageTemplateCreatorDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "message",
          "variables",
          "media",
          "language",
          "data",
          "fk_orgId",
          "fk_creatorId",
          "createdAt",
          "updatedAt",
          "creator"
        ]
      },
      "FacebookTemplateVariableDto": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "enum": [
              "personName",
              "firmName",
              "area",
              "address",
              "state",
              "zone",
              "phone",
              "email",
              "website",
              "code"
            ],
            "description": "The contact field that fills this placeholder when the post is published. The first variable fills `{{1}}`, the second `{{2}}`, and so on.",
            "examples": [
              "firmName"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "source",
              "localized"
            ],
            "description": "`source` uses the field as stored on the contact. `localized` uses the contact's saved localized value when it is in the post's language, and falls back to the stored value otherwise.",
            "examples": [
              "localized"
            ]
          },
          "sample": {
            "type": "string",
            "description": "Sample value to preview the post with. Up to 255 characters.",
            "examples": [
              "Kumar Traders"
            ]
          }
        },
        "required": [
          "field",
          "mode"
        ]
      },
      "GroupAudienceFilterDto": {
        "type": "object",
        "properties": {
          "states": {
            "description": "Match contacts in any of these states.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Maharashtra",
                "Karnataka"
              ]
            ]
          },
          "zones": {
            "description": "Match contacts in any of these sales zones.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "West"
              ]
            ]
          },
          "areas": {
            "description": "Match contacts in any of these areas.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Andheri East",
                "Bandra West"
              ]
            ]
          },
          "excludeAreas": {
            "description": "Areas to exclude, applied after `areas`.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Pune Camp"
              ]
            ]
          },
          "groupIds": {
            "description": "Only contacts already in at least one of these groups.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "1e6b4d8a-2c9f-4a37-b5e0-8d3f6c1a9b24"
              ]
            ]
          },
          "search": {
            "type": "string",
            "description": "Substring match on person name, firm name or code.",
            "examples": [
              "traders"
            ]
          }
        }
      },
      "GroupMembersDto": {
        "type": "object",
        "properties": {
          "contactIds": {
            "description": "Contact IDs. Ignored when `selectAll` is true. IDs that are not contacts in your organization are ignored.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "3f8c2b1e-7a4d-4c9e-b5f2-1d6e8a0c4b7f",
                "9d2a6e4c-8b1f-4d73-a0c5-6e3b9f1d2a87"
              ]
            ]
          },
          "selectAll": {
            "type": "boolean",
            "description": "Act on every contact matching `filter` instead of `contactIds`. With no `filter`, that is every contact in your organization.",
            "examples": [
              false
            ]
          },
          "filter": {
            "description": "Which contacts `selectAll` acts on: the same filters as List contacts, combined with AND.",
            "allOf": [
              {
                "$ref": "#/components/schemas/GroupAudienceFilterDto"
              }
            ]
          }
        }
      },
      "GroupMembersResultDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact group ID.",
            "examples": [
              "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
            ]
          },
          "name": {
            "type": "string",
            "description": "Group name.",
            "examples": [
              "Premium Dealers"
            ]
          },
          "contactCount": {
            "type": "number",
            "description": "Member count after the change.",
            "examples": [
              150
            ]
          },
          "matched": {
            "type": "number",
            "description": "How many contacts the request resolved to.",
            "examples": [
              3
            ]
          },
          "changed": {
            "type": "number",
            "description": "How many memberships actually changed. Lower than `matched` when some were already in the group (add) or already absent (remove).",
            "examples": [
              2
            ]
          }
        },
        "required": [
          "id",
          "name",
          "contactCount",
          "matched",
          "changed"
        ]
      },
      "HlCatalogCreatorDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The creator's user ID (not their member ID: `fk_creatorId` holds that).",
            "examples": [
              "9d0e1f2a-3b4c-4d5e-8f6a-7b8c9d0e1f2a"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The creator's name, or null when it is not set.",
            "examples": [
              "Priya Sharma"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the creator's avatar, or null when there is none.",
            "examples": [
              "{{CDN_BASE_URL}}/avatars/priya-sharma.png"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "image"
        ]
      },
      "HlCatalogPaginationDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Items that match the filters, across all pages.",
            "examples": [
              27
            ]
          },
          "page": {
            "type": "number",
            "description": "This page number, starting at 1.",
            "examples": [
              1
            ]
          },
          "limit": {
            "type": "number",
            "description": "Items per page.",
            "examples": [
              12
            ]
          },
          "hasMore": {
            "type": "boolean",
            "description": "True when there are more pages after this one.",
            "examples": [
              true
            ]
          }
        },
        "required": [
          "total",
          "page",
          "limit",
          "hasMore"
        ]
      },
      "HlCatalogUsageDto": {
        "type": "object",
        "properties": {
          "templateCount": {
            "type": "number",
            "description": "Creative templates that use it.",
            "examples": [
              3
            ]
          },
          "templates": {
            "description": "The first few of those templates, newest first (up to 5).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HlCatalogUsageTemplateDto"
            }
          },
          "modelCount": {
            "type": "number",
            "description": "Product models under it. Always 0 for a product model itself.",
            "examples": [
              2
            ]
          }
        },
        "required": [
          "templateCount",
          "templates",
          "modelCount"
        ]
      },
      "HlCatalogUsageTemplateDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the creative template.",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "title": {
            "type": "string",
            "description": "Its title.",
            "examples": [
              "Nova X1 Launch Poster"
            ]
          }
        },
        "required": [
          "id",
          "title"
        ]
      },
      "HlCreatedProductDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Product ID.",
            "examples": [
              "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
            ]
          },
          "name": {
            "type": "string",
            "description": "Product name.",
            "examples": [
              "Mahindra NOVO"
            ]
          },
          "description": {
            "type": "string",
            "description": "Product description.",
            "examples": [
              "Introducing the all-new Mahindra NOVO, built for heavy haulage."
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the product image (from Get an upload URL and Register an upload), or null.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/product/novo.png"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own JSON data for the product, as you saved it.",
            "examples": [
              {
                "sku": "NOVO-605"
              }
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "6a1f3c2e-8b4d-4e7a-9c1f-2d3e4f5a6b7c"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the person (or API key owner) who created it.",
            "examples": [
              "2b8e4d1a-7c3f-4a9e-8d2b-5f6a7c8d9e0f"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created.",
            "examples": [
              "2026-09-28T09:12:44.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last changed.",
            "examples": [
              "2026-09-30T14:03:10.000Z"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "image",
          "data",
          "fk_orgId",
          "fk_creatorId",
          "createdAt",
          "updatedAt"
        ]
      },
      "HlLocalizationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Localization ID.",
            "examples": [
              "e1c3a5b7-2d4f-4a6c-8e0b-9f7d5c3a1e2b"
            ]
          },
          "fk_templateId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the template this is a version of.",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "language": {
            "type": "string",
            "description": "Language of this version, as a BCP-47 code. One localization per language per template.",
            "examples": [
              "hi-IN"
            ]
          },
          "title": {
            "type": "string",
            "description": "Title in this language.",
            "examples": [
              "फसल सीज़न लॉन्च"
            ]
          },
          "caption": {
            "type": "string",
            "description": "Caption in this language.",
            "examples": [
              "बगीचों और अंतर-पंक्ति छिड़काव के लिए कॉम्पैक्ट ट्रैक्टर।"
            ]
          },
          "creative": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of this version's own creative, or null to use the template's base creative.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest-hi.png"
            ]
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to a still of the video creative, for a card. `null` for an image creative, or while the video has no thumbnail; show the video itself then.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.thumb.webp"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ],
            "description": "Media type, always the template's.",
            "examples": [
              "image"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active"
            ],
            "description": "`draft` or `active`. Broadcasts send drafts too: the status does not decide which version a contact gets.",
            "examples": [
              "draft"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON data for this version, such as `durationSeconds` for its own video creative. `origin` in it is set by the server.",
            "examples": [
              {
                "durationSeconds": 24,
                "origin": "upload"
              }
            ]
          },
          "origin": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "image_translation",
              "upload"
            ],
            "description": "How the current creative was made: `upload`, `image_translation` (saved from the image translator), or null when not recorded (no creative, or made before this was tracked).",
            "examples": [
              "upload"
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "6a1f3c2e-8b4d-4e7a-9c1f-2d3e4f5a6b7c"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the person (or API key owner) who created it.",
            "examples": [
              "2b8e4d1a-7c3f-4a9e-8d2b-5f6a7c8d9e0f"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created.",
            "examples": [
              "2026-09-28T09:12:44.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last changed.",
            "examples": [
              "2026-09-30T14:03:10.000Z"
            ]
          },
          "creator": {
            "description": "Who created it, or null when that user no longer exists.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/HlCatalogCreatorDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "fk_templateId",
          "language",
          "title",
          "caption",
          "creative",
          "thumbnailUrl",
          "type",
          "status",
          "data",
          "origin",
          "fk_orgId",
          "fk_creatorId",
          "createdAt",
          "updatedAt",
          "creator"
        ]
      },
      "HlLocalizationListDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "This page of localizations.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HlLocalizationDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/HlCatalogPaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "HlLocalizationPreviewDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "The template's title, unchanged — titles are not translated.",
            "examples": [
              "फसल सीज़न लॉन्च"
            ]
          },
          "caption": {
            "type": "string",
            "description": "The template's caption translated into `language`, or the original caption when it could not be translated.",
            "examples": [
              "बगीचों और अंतर-पंक्ति छिड़काव के लिए कॉम्पैक्ट ट्रैक्टर।"
            ]
          }
        },
        "required": [
          "title",
          "caption"
        ]
      },
      "HlMessageTemplateEntryDto": {
        "type": "object",
        "properties": {
          "whatsappTemplateId": {
            "type": "string",
            "format": "uuid",
            "description": "WhatsApp template that sends this language version. Absent when none is mapped.",
            "examples": [
              "5f0c2a4e-6b8d-4f1a-9c3e-7d5b9a1c3e5f"
            ]
          },
          "facebookTemplateId": {
            "type": "string",
            "format": "uuid",
            "description": "Facebook template that posts this language version. Absent when none is mapped.",
            "examples": [
              "0b7e9d1f-3a5c-4e7b-8d9f-1a3c5e7b9d1f"
            ]
          }
        }
      },
      "HlOverlayDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Overlay ID.",
            "examples": [
              "c5a7e9b1-3d5f-4b7a-9c1e-4f6a8b0c2d3e"
            ]
          },
          "fk_templateId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the template.",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "language": {
            "type": "string",
            "description": "Language this overlay is for: the template's base language or one of its localizations' languages (BCP-47).",
            "examples": [
              "hi-IN"
            ]
          },
          "elements": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Positioned elements drawn over the creative, stored as you send them. Each element has an `id`, a `kind` (`text`, `image`, `qr`, `shape` or `icon`), a `name`, its box as percentages of the canvas (`x`, `y`, `w`, `h`, 0 to 100), `rotation` in degrees, `opacity` (0 to 1), `zIndex`, `locked`, `visible`, and either a fixed `value` (text, image URL or QR URL) or a `binding` to a contact field: `{ field, mode }`, where `field` is `personName`, `firmName`, `phone`, `email`, `address`, `zone`, `state`, `area`, `code` or `logo`, and `mode` is `source` (the field as entered) or `localized` (the contact’s saved localized value for the language, falling back to the source; `translation` and `transliteration` work the same way). Styling goes in the object named after its `kind` (`text`, `image`, `qr`, `shape`, `icon`); pixel sizes are at the creative’s own resolution.",
            "examples": [
              [
                {
                  "id": "dealer-name",
                  "kind": "text",
                  "name": "Dealer name",
                  "x": 6,
                  "y": 82,
                  "w": 60,
                  "h": 8,
                  "rotation": 0,
                  "opacity": 1,
                  "zIndex": 2,
                  "locked": false,
                  "visible": true,
                  "binding": {
                    "field": "firmName",
                    "mode": "localized"
                  },
                  "value": null,
                  "text": {
                    "fontFamily": "Noto Sans",
                    "fontWeight": 700,
                    "fontSize": 48,
                    "color": "#FFFFFF",
                    "align": "left",
                    "lineHeight": 1.2,
                    "letterSpacing": 0,
                    "padding": 8,
                    "borderRadius": 4,
                    "background": {
                      "color": "#000000",
                      "opacity": 0.4
                    },
                    "border": null,
                    "maxLines": 1
                  }
                }
              ]
            ]
          },
          "canvas": {
            "type": "object",
            "additionalProperties": true,
            "description": "Canvas settings: `opacity` (0 to 1) for the whole overlay and `showSafeZone` (whether the safe-zone guide is drawn).",
            "examples": [
              {
                "opacity": 1,
                "showSafeZone": false
              }
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "6a1f3c2e-8b4d-4e7a-9c1f-2d3e4f5a6b7c"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the person (or API key owner) who first saved this overlay.",
            "examples": [
              "2b8e4d1a-7c3f-4a9e-8d2b-5f6a7c8d9e0f"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was first saved.",
            "examples": [
              "2026-09-28T09:12:44.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last saved.",
            "examples": [
              "2026-09-30T14:03:10.000Z"
            ]
          }
        },
        "required": [
          "id",
          "fk_templateId",
          "language",
          "elements",
          "canvas",
          "fk_orgId",
          "fk_creatorId",
          "createdAt",
          "updatedAt"
        ]
      },
      "HlProductDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Product ID.",
            "examples": [
              "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
            ]
          },
          "name": {
            "type": "string",
            "description": "Product name.",
            "examples": [
              "Mahindra NOVO"
            ]
          },
          "description": {
            "type": "string",
            "description": "Product description.",
            "examples": [
              "Introducing the all-new Mahindra NOVO, built for heavy haulage."
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the product image (from Get an upload URL and Register an upload), or null.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/product/novo.png"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own JSON data for the product, as you saved it.",
            "examples": [
              {
                "sku": "NOVO-605"
              }
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "6a1f3c2e-8b4d-4e7a-9c1f-2d3e4f5a6b7c"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the person (or API key owner) who created it.",
            "examples": [
              "2b8e4d1a-7c3f-4a9e-8d2b-5f6a7c8d9e0f"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created.",
            "examples": [
              "2026-09-28T09:12:44.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last changed.",
            "examples": [
              "2026-09-30T14:03:10.000Z"
            ]
          },
          "creator": {
            "description": "Who created it, or null when that user no longer exists.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/HlCatalogCreatorDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "image",
          "data",
          "fk_orgId",
          "fk_creatorId",
          "createdAt",
          "updatedAt",
          "creator"
        ]
      },
      "HlProductListDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "This page of products.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HlProductDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/HlCatalogPaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "HlProductModelDto": {
        "type": "object",
        "properties": {
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the product image (from Get an upload URL and Register an upload), or null.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/product/novo.png"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own JSON data for the product, as you saved it.",
            "examples": [
              {
                "sku": "NOVO-605"
              }
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "6a1f3c2e-8b4d-4e7a-9c1f-2d3e4f5a6b7c"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the person (or API key owner) who created it.",
            "examples": [
              "2b8e4d1a-7c3f-4a9e-8d2b-5f6a7c8d9e0f"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created.",
            "examples": [
              "2026-09-28T09:12:44.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last changed.",
            "examples": [
              "2026-09-30T14:03:10.000Z"
            ]
          },
          "creator": {
            "description": "Who created it, or null when that user no longer exists.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/HlCatalogCreatorDto"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Product model ID.",
            "examples": [
              "8c4e1b2a-9d3f-4a6e-b7c5-1f2e3d4c5b6a"
            ]
          },
          "name": {
            "type": "string",
            "description": "Model name.",
            "examples": [
              "NOVO Maxx"
            ]
          },
          "description": {
            "type": "string",
            "description": "Model description.",
            "examples": [
              "High-capacity variant with extended payload."
            ]
          },
          "fk_productId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the product this model belongs to.",
            "examples": [
              "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
            ]
          }
        },
        "required": [
          "image",
          "data",
          "fk_orgId",
          "fk_creatorId",
          "createdAt",
          "updatedAt",
          "creator",
          "id",
          "name",
          "description",
          "fk_productId"
        ]
      },
      "HlProductModelListDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "This page of the product's models.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HlProductModelDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/HlCatalogPaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "HlResolvedOverlayDto": {
        "type": "object",
        "properties": {
          "resolved": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Element `id` → the value it shows for this contact, for every element with a `binding`. A text field gives the contact's localized value when the binding's `mode` is `localized` and the contact is localized into this language, otherwise the field as entered; `logo` gives its URL. An empty field gives `\"\"`.",
            "examples": [
              {
                "dealer-name": "श्री गणेश ट्रैक्टर्स",
                "dealer-phone": "+919843011284",
                "dealer-logo": "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/logo/ganesh.png"
              }
            ]
          }
        },
        "required": [
          "resolved"
        ]
      },
      "HlTemplateDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Template ID.",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "title": {
            "type": "string",
            "description": "Title, in the base language.",
            "examples": [
              "Harvest season launch"
            ]
          },
          "caption": {
            "type": "string",
            "description": "Caption, in the base language.",
            "examples": [
              "Compact orchard tractor for vineyards and inter-row spraying."
            ]
          },
          "creative": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the base creative: an image (PNG, JPG) or a video (MP4), per `type`.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.png"
            ]
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to a still of the video creative, for a card. `null` for an image creative, or while the video has no thumbnail; show the video itself then.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.thumb.webp"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ],
            "description": "Media type of the creative, fixed when the template is created. Every localization has the same type.",
            "examples": [
              "image"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active"
            ],
            "description": "`draft` or `active`.",
            "examples": [
              "active"
            ]
          },
          "baseLanguage": {
            "type": "string",
            "description": "Language of the base creative, as a BCP-47 code.",
            "examples": [
              "en-IN"
            ]
          },
          "fk_productId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the product.",
            "examples": [
              "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
            ]
          },
          "fk_modelId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the product model.",
            "examples": [
              "8c4e1b2a-9d3f-4a6e-b7c5-1f2e3d4c5b6a"
            ]
          },
          "fk_tmId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Translation memory used to translate this template, or null. Set when the template is created.",
            "examples": [
              "f4b6d8a0-1c3e-4f5a-8b7d-6e9c0a2b4d6f"
            ]
          },
          "imageTranslationJobId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Image-translation job behind localizations made in the image translator, or null until one is made.",
            "examples": [
              null
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "6a1f3c2e-8b4d-4e7a-9c1f-2d3e4f5a6b7c"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the person (or API key owner) who created it.",
            "examples": [
              "2b8e4d1a-7c3f-4a9e-8d2b-5f6a7c8d9e0f"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON data for the template. Holds your own keys and some the platform reads: `durationSeconds` (a video creative’s length, which prices its renders), `stateLanguageMap` (state name → language version, overriding your preferences for this template) and `messageTemplates` (also returned on its own below).",
            "examples": [
              {
                "durationSeconds": 24,
                "stateLanguageMap": {
                  "Telangana": "te-IN"
                }
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created.",
            "examples": [
              "2026-09-28T09:12:44.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last changed.",
            "examples": [
              "2026-09-30T14:03:10.000Z"
            ]
          },
          "product": {
            "description": "The product, or null when it was deleted.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/HlTemplateProductRefDto"
              }
            ]
          },
          "model": {
            "description": "The product model, or null when it was deleted.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/HlTemplateModelRefDto"
              }
            ]
          },
          "creator": {
            "description": "Who created it, or null when that user no longer exists.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/HlCatalogCreatorDto"
              }
            ]
          },
          "messageTemplates": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/HlMessageTemplateEntryDto"
            },
            "description": "Per language version (BCP-47 code), the WhatsApp and Facebook templates that send it, as saved with Map message templates. `{}` when nothing is mapped.",
            "examples": [
              {
                "en-IN": {
                  "whatsappTemplateId": "5f0c2a4e-6b8d-4f1a-9c3e-7d5b9a1c3e5f"
                },
                "te-IN": {
                  "whatsappTemplateId": "9a41c3e5-7b9d-4f1a-8c3e-5d7f9b1d3f5a",
                  "facebookTemplateId": "0b7e9d1f-3a5c-4e7b-8d9f-1a3c5e7b9d1f"
                }
              }
            ]
          }
        },
        "required": [
          "id",
          "title",
          "caption",
          "creative",
          "thumbnailUrl",
          "type",
          "status",
          "baseLanguage",
          "fk_productId",
          "fk_modelId",
          "fk_tmId",
          "imageTranslationJobId",
          "fk_orgId",
          "fk_creatorId",
          "data",
          "createdAt",
          "updatedAt",
          "product",
          "model",
          "creator",
          "messageTemplates"
        ]
      },
      "HlTemplateListDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "This page of templates.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HlTemplateListItemDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/HlCatalogPaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "HlTemplateListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Template ID.",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "title": {
            "type": "string",
            "description": "Title, in the base language.",
            "examples": [
              "Harvest season launch"
            ]
          },
          "caption": {
            "type": "string",
            "description": "Caption, in the base language.",
            "examples": [
              "Compact orchard tractor for vineyards and inter-row spraying."
            ]
          },
          "creative": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the base creative: an image (PNG, JPG) or a video (MP4), per `type`.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.png"
            ]
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to a still of the video creative, for a card. `null` for an image creative, or while the video has no thumbnail; show the video itself then.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.thumb.webp"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ],
            "description": "Media type of the creative, fixed when the template is created. Every localization has the same type.",
            "examples": [
              "image"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active"
            ],
            "description": "`draft` or `active`.",
            "examples": [
              "active"
            ]
          },
          "baseLanguage": {
            "type": "string",
            "description": "Language of the base creative, as a BCP-47 code.",
            "examples": [
              "en-IN"
            ]
          },
          "fk_productId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the product.",
            "examples": [
              "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
            ]
          },
          "fk_modelId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the product model.",
            "examples": [
              "8c4e1b2a-9d3f-4a6e-b7c5-1f2e3d4c5b6a"
            ]
          },
          "fk_tmId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Translation memory used to translate this template, or null. Set when the template is created.",
            "examples": [
              "f4b6d8a0-1c3e-4f5a-8b7d-6e9c0a2b4d6f"
            ]
          },
          "imageTranslationJobId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Image-translation job behind localizations made in the image translator, or null until one is made.",
            "examples": [
              null
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "Your organization ID.",
            "examples": [
              "6a1f3c2e-8b4d-4e7a-9c1f-2d3e4f5a6b7c"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the person (or API key owner) who created it.",
            "examples": [
              "2b8e4d1a-7c3f-4a9e-8d2b-5f6a7c8d9e0f"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON data for the template. Holds your own keys and some the platform reads: `durationSeconds` (a video creative’s length, which prices its renders), `stateLanguageMap` (state name → language version, overriding your preferences for this template) and `messageTemplates` (also returned on its own below).",
            "examples": [
              {
                "durationSeconds": 24,
                "stateLanguageMap": {
                  "Telangana": "te-IN"
                }
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created.",
            "examples": [
              "2026-09-28T09:12:44.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last changed.",
            "examples": [
              "2026-09-30T14:03:10.000Z"
            ]
          },
          "product": {
            "description": "The product, or null when it was deleted.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/HlTemplateProductRefDto"
              }
            ]
          },
          "model": {
            "description": "The product model, or null when it was deleted.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/HlTemplateModelRefDto"
              }
            ]
          },
          "creator": {
            "description": "Who created it, or null when that user no longer exists.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/HlCatalogCreatorDto"
              }
            ]
          },
          "messageTemplates": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/HlMessageTemplateEntryDto"
            },
            "description": "Per language version (BCP-47 code), the WhatsApp and Facebook templates that send it, as saved with Map message templates. `{}` when nothing is mapped.",
            "examples": [
              {
                "en-IN": {
                  "whatsappTemplateId": "5f0c2a4e-6b8d-4f1a-9c3e-7d5b9a1c3e5f"
                },
                "te-IN": {
                  "whatsappTemplateId": "9a41c3e5-7b9d-4f1a-8c3e-5d7f9b1d3f5a",
                  "facebookTemplateId": "0b7e9d1f-3a5c-4e7b-8d9f-1a3c5e7b9d1f"
                }
              }
            ]
          },
          "localizedLanguages": {
            "description": "Languages the template has a localization in (drafts included), without the base language, sorted. Left out if they could not be read.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "hi-IN",
                "ta-IN",
                "te-IN"
              ]
            ]
          }
        },
        "required": [
          "id",
          "title",
          "caption",
          "creative",
          "thumbnailUrl",
          "type",
          "status",
          "baseLanguage",
          "fk_productId",
          "fk_modelId",
          "fk_tmId",
          "imageTranslationJobId",
          "fk_orgId",
          "fk_creatorId",
          "data",
          "createdAt",
          "updatedAt",
          "product",
          "model",
          "creator",
          "messageTemplates"
        ]
      },
      "HlTemplateModelRefDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Product model ID.",
            "examples": [
              "8c4e1b2a-9d3f-4a6e-b7c5-1f2e3d4c5b6a"
            ]
          },
          "name": {
            "type": "string",
            "description": "Model name.",
            "examples": [
              "NOVO Maxx"
            ]
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "HlTemplateProductRefDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Product ID.",
            "examples": [
              "3f9a2c71-5e4b-4d8a-b1c6-7e2f9a0b3c4d"
            ]
          },
          "name": {
            "type": "string",
            "description": "Product name.",
            "examples": [
              "Mahindra NOVO"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the product image, or null.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/product/novo.png"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "image"
        ]
      },
      "HyperlocalImportedAssetResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the file in your organization's assets.",
            "examples": [
              "0b9f6f7e-3c2a-4b8e-9d1f-2a6c1e5b7d90"
            ]
          },
          "key": {
            "type": "string",
            "description": "Storage key of the file. Register keeps the file at a key of its own, so this is not the `key` you sent.",
            "examples": [
              "9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b/hyper-local/uploads/product/c47d2a10-8e5b-4f3a-9c6d-7b1e2f3a4d5c/scooter.png"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public link to the file. Use it as a template's `creative`, a contact's logo or a product image.",
            "examples": [
              "https://cdn.example.com/9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b/hyper-local/uploads/product/c47d2a10-8e5b-4f3a-9c6d-7b1e2f3a4d5c/scooter.png"
            ]
          },
          "name": {
            "type": "string",
            "description": "File name of the copy.",
            "examples": [
              "scooter.png"
            ]
          },
          "contentType": {
            "type": "string",
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp",
              "video/mp4"
            ],
            "description": "Content type of the file.",
            "examples": [
              "image/png"
            ]
          }
        },
        "required": [
          "id",
          "key",
          "url",
          "name",
          "contentType"
        ]
      },
      "HyperlocalPaginationDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Total number of matching items.",
            "examples": [
              248
            ]
          },
          "page": {
            "type": "number",
            "description": "The page returned (1-based).",
            "examples": [
              1
            ]
          },
          "limit": {
            "type": "number",
            "description": "Items per page.",
            "examples": [
              20
            ]
          },
          "hasMore": {
            "type": "boolean",
            "description": "True when there are more pages after this one.",
            "examples": [
              true
            ]
          }
        },
        "required": [
          "total",
          "page",
          "limit",
          "hasMore"
        ]
      },
      "HyperlocalRegisteredUploadResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the file in your organization's assets.",
            "examples": [
              "0b9f6f7e-3c2a-4b8e-9d1f-2a6c1e5b7d90"
            ]
          },
          "key": {
            "type": "string",
            "description": "Storage key of the file. Register keeps the file at a key of its own, so this is not the `key` you sent.",
            "examples": [
              "9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b/hyper-local/uploads/product/c47d2a10-8e5b-4f3a-9c6d-7b1e2f3a4d5c/scooter.png"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public link to the file. Use it as a template's `creative`, a contact's logo or a product image.",
            "examples": [
              "https://cdn.example.com/9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b/hyper-local/uploads/product/c47d2a10-8e5b-4f3a-9c6d-7b1e2f3a4d5c/scooter.png"
            ]
          }
        },
        "required": [
          "id",
          "key",
          "url"
        ]
      },
      "HyperlocalUploadUrlResponseDto": {
        "type": "object",
        "properties": {
          "uploadId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of this upload. It is also part of `key`.",
            "examples": [
              "5e2b7c91-4d3a-4f6e-8b1c-0a9d2e3f4b5c"
            ]
          },
          "key": {
            "type": "string",
            "description": "Where the `PUT` writes the file. Send it to Register an upload.",
            "examples": [
              "9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b/hyper-local/incoming/product/5e2b7c91-4d3a-4f6e-8b1c-0a9d2e3f4b5c/scooter.png"
            ]
          },
          "uploadUrl": {
            "type": "string",
            "description": "Presigned URL. `PUT` the file bytes to it, without your API key, before it expires.",
            "examples": [
              "https://storage.example.com/9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b/hyper-local/incoming/product/5e2b7c91-4d3a-4f6e-8b1c-0a9d2e3f4b5c/scooter.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=900&X-Amz-Signature=…"
            ]
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Headers to send with the `PUT`, exactly as given and no others: the signature covers them.",
            "examples": [
              {
                "Content-Type": "image/png"
              }
            ]
          },
          "expiresIn": {
            "type": "number",
            "description": "Seconds until `uploadUrl` expires.",
            "examples": [
              900
            ]
          }
        },
        "required": [
          "uploadId",
          "key",
          "uploadUrl",
          "headers",
          "expiresIn"
        ]
      },
      "ImportContactsResponseDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Data rows in the file (not counting the header).",
            "examples": [
              320
            ]
          },
          "created": {
            "type": "number",
            "description": "Contacts created.",
            "examples": [
              300
            ]
          },
          "linked": {
            "type": "number",
            "description": "Rows whose `Code` already existed and were added to the group instead. Always 0 without a group.",
            "examples": [
              12
            ]
          },
          "skipped": {
            "description": "Rows that were not imported, with the reason.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportSkipDto"
            }
          },
          "group": {
            "description": "The group, when you sent `groupId` or `groupName`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ImportGroupDto"
              }
            ]
          }
        },
        "required": [
          "total",
          "created",
          "linked",
          "skipped"
        ]
      },
      "ImportGroupDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact group ID.",
            "examples": [
              "7c2e9a14-3b6d-4f80-9e1a-2d5b8c4f6a03"
            ]
          },
          "name": {
            "type": "string",
            "description": "Group name.",
            "examples": [
              "North Zone launch"
            ]
          },
          "contactCount": {
            "type": "number",
            "description": "Contacts in the group after the import.",
            "examples": [
              312
            ]
          }
        },
        "required": [
          "id",
          "name",
          "contactCount"
        ]
      },
      "ImportHyperlocalAssetFromDriveDto": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of a file in your organization's assets (not a folder or shortcut).",
            "examples": [
              "0b9f6f7e-3c2a-4b8e-9d1f-2a6c1e5b7d90"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "creative",
              "logo",
              "product"
            ],
            "description": "What the file is for: `creative` (a template creative, image or video), `logo` (a contact logo, image only) or `product` (a product or model image, image only).",
            "examples": [
              "product"
            ]
          }
        },
        "required": [
          "assetId",
          "kind"
        ]
      },
      "ImportSkipDto": {
        "type": "object",
        "properties": {
          "row": {
            "type": "number",
            "description": "Row number in the file (the header is row 1).",
            "examples": [
              14
            ]
          },
          "code": {
            "type": "string",
            "description": "The row’s `Code`, when it had one.",
            "examples": [
              "KT-014"
            ]
          },
          "reason": {
            "type": "string",
            "description": "Why it was skipped: `missing required field(s): …`, `invalid state: \"…\"`, `duplicate code` or `failed to create`.",
            "examples": [
              "duplicate code"
            ]
          }
        },
        "required": [
          "row",
          "reason"
        ]
      },
      "InsufficientCreditsErrorDto": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "HTTP status code.",
            "examples": [
              402
            ]
          },
          "error": {
            "type": "string",
            "description": "Always `InsufficientCredits`.",
            "examples": [
              "InsufficientCredits"
            ]
          },
          "message": {
            "type": "string",
            "description": "What happened, in plain words.",
            "examples": [
              "You don't have enough credits to start this. It needs 120; you have 45."
            ]
          },
          "required": {
            "type": "number",
            "description": "Credits this request needs.",
            "examples": [
              120
            ]
          },
          "available": {
            "type": "number",
            "description": "Credits your organization can spend now.",
            "examples": [
              45
            ]
          },
          "owed": {
            "type": "number",
            "description": "Credits your organization owes from earlier jobs (0 when nothing is owed). While anything is owed, every paid request is refused until it is repaid.",
            "examples": [
              0
            ]
          }
        },
        "required": [
          "statusCode",
          "error",
          "message",
          "required",
          "available",
          "owed"
        ]
      },
      "LanguageLocalizationCountsDto": {
        "type": "object",
        "properties": {
          "localized": {
            "type": "number",
            "description": "Contacts already localized into this language.",
            "examples": [
              410
            ]
          },
          "notLocalized": {
            "type": "number",
            "description": "Contacts that still need localizing into this language.",
            "examples": [
              35
            ]
          }
        },
        "required": [
          "localized",
          "notLocalized"
        ]
      },
      "LocalizationMethodsDto": {
        "type": "object",
        "properties": {
          "firmName": {
            "type": "string",
            "enum": [
              "translate",
              "transliterate"
            ],
            "description": "Method for `firmName`. Default `transliterate`.",
            "examples": [
              "transliterate"
            ]
          },
          "personName": {
            "type": "string",
            "enum": [
              "translate",
              "transliterate"
            ],
            "description": "Method for `personName`. Default `transliterate`.",
            "examples": [
              "transliterate"
            ]
          },
          "area": {
            "type": "string",
            "enum": [
              "translate",
              "transliterate"
            ],
            "description": "Method for `area`. Default `translate`.",
            "examples": [
              "translate"
            ]
          },
          "address": {
            "type": "string",
            "enum": [
              "translate",
              "transliterate"
            ],
            "description": "Method for `address`. Default `translate`.",
            "examples": [
              "translate"
            ]
          }
        },
        "required": [
          "firmName",
          "personName",
          "area",
          "address"
        ]
      },
      "LocalizeContactsDto": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "description": "'pending' localizes only contacts not yet localized for their current state language; 'all' re-localizes every contact.",
            "enum": [
              "all",
              "pending"
            ],
            "default": "pending",
            "examples": [
              "pending"
            ]
          },
          "requestId": {
            "type": "string",
            "description": "Client-minted id for this click (UUID). A network retry that re-sends the same id is refused (409) instead of being charged a second time; mint a new one per click.",
            "format": "uuid",
            "examples": [
              "b4d9e2f1-6a3c-4e8b-9d7f-2c1a5e8b3f60"
            ]
          }
        }
      },
      "LocalizeContactsResponseDto": {
        "type": "object",
        "properties": {
          "processed": {
            "type": "number",
            "description": "Contacts sent for localization in this run.",
            "examples": [
              260
            ]
          },
          "updated": {
            "type": "number",
            "description": "Contacts whose localized values were saved.",
            "examples": [
              260
            ]
          },
          "alreadyLocalized": {
            "type": "number",
            "description": "Contacts left alone because they were already localized (`scope: pending` only).",
            "examples": [
              980
            ]
          },
          "skipped": {
            "type": "number",
            "description": "Contacts whose state maps to no language.",
            "examples": [
              0
            ]
          }
        },
        "required": [
          "processed",
          "updated",
          "alreadyLocalized",
          "skipped"
        ]
      },
      "MessageTemplateCreatorDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "User ID of the member who created the template.",
            "examples": [
              "7d2e9f40-1a3b-4c5d-8e6f-9a0b1c2d3e4f"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member's name.",
            "examples": [
              "Priya Sharma"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to the member's profile picture.",
            "examples": [
              "https://cdn.example.com/avatars/priya.png"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "image"
        ]
      },
      "MessageTemplateLanguageDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "WhatsApp (Meta) language code. Send it as `language`.",
            "examples": [
              "hi"
            ]
          },
          "label": {
            "type": "string",
            "description": "Language name.",
            "examples": [
              "Hindi"
            ]
          }
        },
        "required": [
          "code",
          "label"
        ]
      },
      "MessageTemplatePaginationDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Templates that match, across all pages.",
            "examples": [
              27
            ]
          },
          "page": {
            "type": "number",
            "description": "This page number.",
            "examples": [
              1
            ]
          },
          "limit": {
            "type": "number",
            "description": "Templates per page.",
            "examples": [
              12
            ]
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether there are more pages after this one.",
            "examples": [
              true
            ]
          }
        },
        "required": [
          "total",
          "page",
          "limit",
          "hasMore"
        ]
      },
      "OrgPreferenceResponseDto": {
        "type": "object",
        "properties": {
          "states": {
            "type": "array",
            "description": "Every state and union territory a contact can have (28 states, then 8 union territories).",
            "items": {
              "type": "string",
              "enum": [
                "Andhra Pradesh",
                "Arunachal Pradesh",
                "Assam",
                "Bihar",
                "Chhattisgarh",
                "Goa",
                "Gujarat",
                "Haryana",
                "Himachal Pradesh",
                "Jharkhand",
                "Karnataka",
                "Kerala",
                "Madhya Pradesh",
                "Maharashtra",
                "Manipur",
                "Meghalaya",
                "Mizoram",
                "Nagaland",
                "Odisha",
                "Punjab",
                "Rajasthan",
                "Sikkim",
                "Tamil Nadu",
                "Telangana",
                "Tripura",
                "Uttar Pradesh",
                "Uttarakhand",
                "West Bengal",
                "Andaman and Nicobar Islands",
                "Chandigarh",
                "Dadra and Nagar Haveli and Daman and Diu",
                "Delhi",
                "Jammu and Kashmir",
                "Ladakh",
                "Lakshadweep",
                "Puducherry"
              ]
            },
            "examples": [
              [
                "Andhra Pradesh",
                "Arunachal Pradesh",
                "Assam"
              ]
            ]
          },
          "stateLanguageMap": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The language (BCP-47 code) contacts in each state get: the default map with your overrides applied.",
            "examples": [
              {
                "Maharashtra": "mr-IN",
                "Tamil Nadu": "ta-IN",
                "West Bengal": "bn-IN",
                "Bihar": "hi-IN"
              }
            ]
          },
          "localizationFields": {
            "description": "Whether each contact field is translated (meaning) or transliterated (same sound, target script): the defaults with your overrides applied.",
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizationMethodsDto"
              }
            ]
          },
          "hasDefaultImageOverlay": {
            "type": "boolean",
            "description": "True when your organization has a default overlay for image templates, so Copy the default overlay works for them.",
            "examples": [
              true
            ]
          },
          "hasDefaultVideoOverlay": {
            "type": "boolean",
            "description": "True when your organization has a default overlay for video templates.",
            "examples": [
              false
            ]
          }
        },
        "required": [
          "states",
          "stateLanguageMap",
          "localizationFields",
          "hasDefaultImageOverlay",
          "hasDefaultVideoOverlay"
        ]
      },
      "OverlayMediaMetadataDto": {
        "type": "object",
        "properties": {
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          },
          "fps": {
            "type": "number",
            "description": "Source video frames per second, retaining fractional rates."
          },
          "durationInFrames": {
            "type": "number",
            "description": "Full creative length rounded up to the next complete frame."
          }
        },
        "required": [
          "width",
          "height",
          "fps",
          "durationInFrames"
        ]
      },
      "PostInsightsDto": {
        "type": "object",
        "properties": {
          "impressions": {
            "type": "number",
            "description": "Times the post was shown.",
            "examples": [
              148
            ]
          },
          "reactions": {
            "type": "number",
            "description": "Reactions on the post.",
            "examples": [
              6
            ]
          },
          "comments": {
            "type": "number",
            "description": "Comments on the post.",
            "examples": [
              1
            ]
          },
          "shares": {
            "type": "number",
            "description": "Shares of the post.",
            "examples": [
              0
            ]
          },
          "fetchedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the insights were fetched from Facebook.",
            "examples": [
              "2026-10-04T12:05:00.000Z"
            ]
          },
          "error": {
            "type": "string",
            "description": "Set when some fields could not be fetched (they are 0), for example because the page token lacks a permission and the page must be connected again. Absent when everything was fetched.",
            "examples": [
              "#200 Missing Permissions"
            ]
          }
        },
        "required": [
          "impressions",
          "reactions",
          "comments",
          "shares",
          "fetchedAt"
        ]
      },
      "PreviewLocalizationDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the template whose title and caption to translate.",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "language": {
            "type": "string",
            "description": "Language to translate into, as a BCP-47 code.",
            "maxLength": 35,
            "examples": [
              "hi-IN"
            ]
          }
        },
        "required": [
          "templateId",
          "language"
        ]
      },
      "RegenerateCreativeResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the contact's row in the broadcast.",
            "examples": [
              "b4d7e1a3-5c2f-4e9b-8a6d-3f1c0e2b9d57"
            ]
          },
          "generationStatus": {
            "type": "string",
            "enum": [
              "generating"
            ],
            "description": "Always `generating`: the new render is queued.",
            "examples": [
              "generating"
            ]
          }
        },
        "required": [
          "id",
          "generationStatus"
        ]
      },
      "RegisterHyperlocalUploadDto": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "creative",
              "logo",
              "product"
            ],
            "description": "The same `kind` you sent to Get an upload URL.",
            "examples": [
              "product"
            ]
          },
          "key": {
            "type": "string",
            "description": "The `key` returned by Get an upload URL.",
            "examples": [
              "9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b/hyper-local/incoming/product/5e2b7c91-4d3a-4f6e-8b1c-0a9d2e3f4b5c/scooter.png"
            ]
          },
          "fileName": {
            "type": "string",
            "description": "File name to show in your assets.",
            "examples": [
              "scooter.png"
            ]
          },
          "contentType": {
            "type": "string",
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp",
              "video/mp4"
            ],
            "description": "MIME type of the file. `video/mp4` is accepted only for a `creative`.",
            "examples": [
              "image/png"
            ]
          }
        },
        "required": [
          "kind",
          "key",
          "fileName",
          "contentType"
        ]
      },
      "RenderOverlayDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "description": "ID of the template.",
            "format": "uuid",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "language": {
            "type": "string",
            "description": "Language version to render: the template's base language or one of its localizations' languages (BCP-47). Its creative is the background.",
            "maxLength": 35,
            "examples": [
              "hi-IN"
            ]
          },
          "contactId": {
            "type": "string",
            "format": "uuid",
            "description": "Contact whose details fill the bound elements. Left out: the values in `resolved` are used.",
            "examples": [
              "a2c4e6f8-0b1d-4e3f-9a5c-7d8e9f0a1b2c"
            ]
          },
          "elements": {
            "type": "array",
            "description": "Elements to draw instead of the saved overlay. Same shape as in Save an overlay. Left out: the saved overlay of `language` (and its canvas, unless you send `canvas`).",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "examples": [
              [
                {
                  "id": "dealer-name",
                  "kind": "text",
                  "name": "Dealer name",
                  "x": 6,
                  "y": 82,
                  "w": 60,
                  "h": 8,
                  "rotation": 0,
                  "opacity": 1,
                  "zIndex": 2,
                  "locked": false,
                  "visible": true,
                  "binding": {
                    "field": "firmName",
                    "mode": "localized"
                  },
                  "value": null,
                  "text": {
                    "fontFamily": "Noto Sans",
                    "fontWeight": 700,
                    "fontSize": 48,
                    "color": "#FFFFFF",
                    "align": "left",
                    "lineHeight": 1.2,
                    "letterSpacing": 0,
                    "padding": 8,
                    "borderRadius": 4,
                    "background": {
                      "color": "#000000",
                      "opacity": 0.4
                    },
                    "border": null,
                    "maxLines": 1
                  }
                }
              ]
            ]
          },
          "canvas": {
            "type": "object",
            "additionalProperties": true,
            "description": "Canvas settings (`opacity`, `showSafeZone`). Left out: the saved canvas when `elements` is also left out, otherwise `{ opacity: 1, showSafeZone: false }`.",
            "examples": [
              {
                "opacity": 1,
                "showSafeZone": false
              }
            ]
          },
          "resolved": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Element `id` → the value to show, used as sent when there is no `contactId` (for example, sample values).",
            "examples": [
              {
                "dealer-name": "Shree Ganesh Tractors"
              }
            ]
          },
          "width": {
            "type": "number",
            "description": "Output width in pixels, 16 to 8192. Use the creative's own width.",
            "minimum": 16,
            "maximum": 8192,
            "examples": [
              1080
            ]
          },
          "height": {
            "type": "number",
            "description": "Output height in pixels, 16 to 8192. Use the creative's own height.",
            "minimum": 16,
            "maximum": 8192,
            "examples": [
              1080
            ]
          },
          "durationInFrames": {
            "type": "number",
            "description": "Video length in frames (videos only), 1 to 72000. Omitted: the complete source duration at the requested or source FPS, including audio tails. A render longer than 10 minutes is refused.",
            "minimum": 1,
            "maximum": 72000,
            "examples": [
              720
            ]
          },
          "fps": {
            "type": "number",
            "description": "Video frames per second (videos only), 1 to 120. Omitted: the source video frame rate.",
            "minimum": 1,
            "maximum": 120,
            "examples": [
              30
            ]
          }
        },
        "required": [
          "templateId",
          "language",
          "width",
          "height"
        ]
      },
      "ResendMessageResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the message (dispatch).",
            "examples": [
              "d2a8c4e6-1f3b-4a5d-9e7c-8b0f2d4a6c19"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending"
            ],
            "description": "Always `pending`: the message is queued to send again.",
            "examples": [
              "pending"
            ]
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "ResolveOverlayDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "description": "ID of the template.",
            "format": "uuid",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "language": {
            "type": "string",
            "description": "Language to resolve in: the template's base language or one of its localizations' languages (BCP-47).",
            "maxLength": 35,
            "examples": [
              "hi-IN"
            ]
          },
          "contactId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the contact whose details fill the bound elements.",
            "examples": [
              "a2c4e6f8-0b1d-4e3f-9a5c-7d8e9f0a1b2c"
            ]
          },
          "elements": {
            "type": "array",
            "description": "Elements to resolve instead of the saved overlay, for example unsaved changes. Same shape as in Save an overlay. Left out: the saved overlay of `language`.",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "examples": [
              [
                {
                  "id": "dealer-name",
                  "kind": "text",
                  "name": "Dealer name",
                  "x": 6,
                  "y": 82,
                  "w": 60,
                  "h": 8,
                  "rotation": 0,
                  "opacity": 1,
                  "zIndex": 2,
                  "locked": false,
                  "visible": true,
                  "binding": {
                    "field": "firmName",
                    "mode": "localized"
                  },
                  "value": null,
                  "text": {
                    "fontFamily": "Noto Sans",
                    "fontWeight": 700,
                    "fontSize": 48,
                    "color": "#FFFFFF",
                    "align": "left",
                    "lineHeight": 1.2,
                    "letterSpacing": 0,
                    "padding": 8,
                    "borderRadius": 4,
                    "background": {
                      "color": "#000000",
                      "opacity": 0.4
                    },
                    "border": null,
                    "maxLines": 1
                  }
                }
              ]
            ]
          }
        },
        "required": [
          "templateId",
          "language",
          "contactId"
        ]
      },
      "ResumeBroadcastResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Broadcast ID.",
            "examples": [
              "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "sending"
            ],
            "description": "Always `sending`. If nothing was left to send, the broadcast completes straight away; Get a broadcast shows it.",
            "examples": [
              "sending"
            ]
          },
          "requeued": {
            "type": "number",
            "description": "Messages queued to send again.",
            "examples": [
              42
            ]
          }
        },
        "required": [
          "id",
          "status",
          "requeued"
        ]
      },
      "RetryFailedResponseDto": {
        "type": "object",
        "properties": {
          "retried": {
            "type": "number",
            "description": "Failed messages queued to send again.",
            "examples": [
              3
            ]
          },
          "credits": {
            "type": "number",
            "description": "Credits charged for them.",
            "examples": [
              30
            ]
          }
        },
        "required": [
          "retried",
          "credits"
        ]
      },
      "ScheduleBroadcastDto": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Date to send on, `YYYY-MM-DD`, in `timezone`.",
            "examples": [
              "2026-10-12"
            ]
          },
          "time": {
            "type": "string",
            "description": "Time to send at, 24-hour `HH:mm`, in `timezone`.",
            "examples": [
              "09:00"
            ]
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone name that `date` and `time` are in, such as `Asia/Kolkata`.",
            "examples": [
              "Asia/Kolkata"
            ]
          }
        },
        "required": [
          "date",
          "time",
          "timezone"
        ]
      },
      "SendPreviewBlockedDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "description": "Language code of the creative version.",
            "examples": [
              "mr-IN"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "no_template",
              "not_approved",
              "header_mismatch"
            ],
            "description": "`no_template`: no message template for this language on this channel. `not_approved`: the WhatsApp template is not approved by Meta yet. `header_mismatch`: the WhatsApp template's header does not fit the creative (an image header with a video creative, for example).",
            "examples": [
              "not_approved"
            ]
          },
          "dealers": {
            "type": "number",
            "description": "Contacts affected.",
            "examples": [
              8
            ]
          }
        },
        "required": [
          "language",
          "reason",
          "dealers"
        ]
      },
      "SendPreviewChannelDto": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "whatsapp",
              "facebook"
            ],
            "description": "Channel.",
            "examples": [
              "whatsapp"
            ]
          },
          "eligible": {
            "type": "number",
            "description": "Messages that will go out on this channel.",
            "examples": [
              104
            ]
          },
          "skipped": {
            "type": "number",
            "description": "Contacts skipped because they cannot receive this channel (no WhatsApp number, or no active connected Facebook page).",
            "examples": [
              6
            ]
          },
          "blocked": {
            "type": "number",
            "description": "Contacts who can receive this channel but whose message template cannot send it. They are not counted or charged; they fail when sent, and can be resent once the template is fixed.",
            "examples": [
              8
            ]
          },
          "blockedBy": {
            "description": "Why messages are blocked, per creative language, most first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SendPreviewBlockedDto"
            }
          }
        },
        "required": [
          "channel",
          "eligible",
          "skipped",
          "blocked",
          "blockedBy"
        ]
      },
      "SendPreviewLanguageDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "description": "Language code of the creative version (`unknown` when the row has none).",
            "examples": [
              "ta-IN"
            ]
          },
          "dealers": {
            "type": "number",
            "description": "Contacts who get at least one message in this language.",
            "examples": [
              64
            ]
          }
        },
        "required": [
          "language",
          "dealers"
        ]
      },
      "SendPreviewResponseDto": {
        "type": "object",
        "properties": {
          "generated": {
            "type": "number",
            "description": "Contacts whose creative is ready.",
            "examples": [
              118
            ]
          },
          "reachableDealers": {
            "type": "number",
            "description": "Contacts who will get at least one message.",
            "examples": [
              104
            ]
          },
          "messages": {
            "type": "number",
            "description": "Messages that will go out: each reachable contact on each channel.",
            "examples": [
              104
            ]
          },
          "channels": {
            "description": "Per channel: who gets it, who is skipped, who is blocked.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SendPreviewChannelDto"
            }
          },
          "languages": {
            "description": "Reachable contacts per creative language, most first. They add up to `reachableDealers`.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SendPreviewLanguageDto"
            }
          },
          "unitCredits": {
            "type": "number",
            "description": "Credits per message, rounded up the way each charge is. 0 when sending is free.",
            "examples": [
              10
            ]
          },
          "credits": {
            "type": "number",
            "description": "What Send a broadcast will charge: `messages` × `unitCredits`.",
            "examples": [
              1040
            ]
          }
        },
        "required": [
          "generated",
          "reachableDealers",
          "messages",
          "channels",
          "languages",
          "unitCredits",
          "credits"
        ]
      },
      "StagedUploadTicketDto": {
        "type": "object",
        "properties": {
          "uploadUrl": {
            "type": "string",
            "description": "Presigned URL. `PUT` the file bytes to it within `expiresInSeconds`, with exactly the headers in `headers`, without your API key."
          },
          "uploadKey": {
            "type": "string",
            "description": "The upload key. Send it as `uploadKey` to the step the file is for once the `PUT` has finished. It can be used once, and an upload not used within a day is deleted.",
            "examples": [
              "1f0c…/staged-uploads/7b9e….csv"
            ]
          },
          "headers": {
            "type": "object",
            "description": "Headers the `PUT` must send exactly (the URL is signed over them).",
            "examples": [
              {
                "Content-Type": "text/csv",
                "Content-Disposition": "attachment"
              }
            ]
          },
          "expiresInSeconds": {
            "type": "number",
            "description": "Seconds the URL stays valid for starting the `PUT`.",
            "examples": [
              600
            ]
          },
          "maxBytes": {
            "type": "number",
            "description": "The largest file this step takes, in bytes.",
            "examples": [
              26214400
            ]
          }
        },
        "required": [
          "uploadUrl",
          "uploadKey",
          "headers",
          "expiresInSeconds",
          "maxBytes"
        ]
      },
      "StatusEventDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "initiated",
              "sent",
              "delivered",
              "read",
              "failed",
              "posted"
            ],
            "description": "What happened.",
            "examples": [
              "delivered"
            ]
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "When it happened.",
            "examples": [
              "2026-10-04T11:02:17.000Z"
            ]
          },
          "reason": {
            "type": "string",
            "description": "Why, for a failure.",
            "examples": [
              "Message undeliverable"
            ]
          }
        },
        "required": [
          "status",
          "at"
        ]
      },
      "TestSendAllowanceDto": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number",
            "description": "Tests one member can send in a rolling hour.",
            "examples": [
              5
            ]
          },
          "used": {
            "type": "number",
            "description": "Tests this member sent in the last hour.",
            "examples": [
              2
            ]
          },
          "resetsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the next test can be sent, once the limit is reached. `null` while tests are left.",
            "examples": [
              null
            ]
          }
        },
        "required": [
          "limit",
          "used",
          "resetsAt"
        ]
      },
      "TestSendDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the creative template to test.",
            "examples": [
              "8d4f2a6c-1b3e-4c5d-9a7f-0e2b4c6d8f1a"
            ]
          },
          "language": {
            "type": "string",
            "description": "Which language version to send: the template's base language or the language of one of its localizations, as a BCP-47 code. Preview a test message lists them.",
            "examples": [
              "ta-IN"
            ]
          },
          "phone": {
            "type": "string",
            "description": "The WhatsApp number to send the test to, in international format with a leading `+` and the country code. Spaces, dots, dashes and brackets are ignored.",
            "examples": [
              "+919843011284"
            ]
          }
        },
        "required": [
          "templateId",
          "language",
          "phone"
        ]
      },
      "TestSendMessageDto": {
        "type": "object",
        "properties": {
          "header": {
            "type": "string",
            "enum": [
              "IMAGE",
              "VIDEO"
            ],
            "description": "The header the creative is sent in.",
            "examples": [
              "IMAGE"
            ]
          },
          "body": {
            "type": "string",
            "description": "The body text, with sample values in place of `{{n}}`.",
            "examples": [
              "Namaste Ravi Kumar! Visit Kumar Traders this Diwali."
            ]
          },
          "footer": {
            "type": [
              "string",
              "null"
            ],
            "description": "The footer text, or `null` for none.",
            "examples": [
              "Reply STOP to unsubscribe"
            ]
          },
          "buttons": {
            "description": "Button labels.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "View offers"
              ]
            ]
          },
          "samples": {
            "description": "The sample values, in placeholder order: each variable's `sample`, or a built-in one. A test never uses a contact's details.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "Ravi Kumar",
                "Kumar Traders"
              ]
            ]
          }
        },
        "required": [
          "header",
          "body",
          "footer",
          "buttons",
          "samples"
        ]
      },
      "TestSendPreviewResponseDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the creative template.",
            "examples": [
              "8d4f2a6c-1b3e-4c5d-9a7f-0e2b4c6d8f1a"
            ]
          },
          "credits": {
            "type": "number",
            "description": "Credits one test costs: one broadcast message at your organization's rate.",
            "examples": [
              10
            ]
          },
          "allowance": {
            "description": "How many tests are left this hour.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TestSendAllowanceDto"
              }
            ]
          },
          "versions": {
            "description": "Each language version: the base language first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TestSendPreviewVersionDto"
            }
          }
        },
        "required": [
          "templateId",
          "credits",
          "allowance",
          "versions"
        ]
      },
      "TestSendPreviewVersionDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "description": "BCP-47 language code of the version. Send it as `language`.",
            "examples": [
              "ta-IN"
            ]
          },
          "isSource": {
            "type": "boolean",
            "description": "Whether this is the template's base language.",
            "examples": [
              false
            ]
          },
          "title": {
            "type": "string",
            "description": "Title of this version.",
            "examples": [
              "Diwali scooter offer"
            ]
          },
          "creative": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to the creative a test sends, as uploaded. `null` when the version has none.",
            "examples": [
              "https://cdn.example.com/hyper-local/uploads/creative/diwali-ta.png"
            ]
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to a still of the video creative, for a card. `null` for an image creative, or while the video has no thumbnail; show the video itself then.",
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.thumb.webp"
            ]
          },
          "creativeType": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ],
            "description": "Whether the creative is an image or a video.",
            "examples": [
              "image"
            ]
          },
          "whatsappTemplate": {
            "description": "The WhatsApp template mapped to this language with Map message templates, or `null` when none is mapped.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/TestSendWhatsappTemplateDto"
              }
            ]
          },
          "message": {
            "description": "What a test sends, or `null` when this version cannot be tested.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/TestSendMessageDto"
              }
            ]
          },
          "hasOverlay": {
            "type": "boolean",
            "description": "Whether a broadcast draws contact details on this creative. A test sends the creative without them.",
            "examples": [
              true
            ]
          },
          "problem": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why this version cannot be tested, for example no approved WhatsApp template is mapped. `null` when it can.",
            "examples": [
              null
            ]
          }
        },
        "required": [
          "language",
          "isSource",
          "title",
          "creative",
          "thumbnailUrl",
          "creativeType",
          "whatsappTemplate",
          "message",
          "hasOverlay",
          "problem"
        ]
      },
      "TestSendResultResponseDto": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "description": "WhatsApp's ID for the message.",
            "examples": [
              "wamid.HBgMOTE5ODQzMDExMjg0FQIAERgSQjVBRTlBMDM5RkQ2NkI4NjZBAA=="
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted"
            ],
            "description": "Always `accepted`: WhatsApp took the message. Delivery is not tracked for a test.",
            "examples": [
              "accepted"
            ]
          },
          "to": {
            "type": "string",
            "description": "The number it was sent to, in E.164 format.",
            "examples": [
              "+919843011284"
            ]
          },
          "language": {
            "type": "string",
            "description": "The language version that was sent.",
            "examples": [
              "ta-IN"
            ]
          },
          "whatsappTemplateName": {
            "type": "string",
            "description": "Name of the WhatsApp template used.",
            "examples": [
              "diwali_offer_ta"
            ]
          },
          "credits": {
            "type": "number",
            "description": "Credits charged for the test.",
            "examples": [
              10
            ]
          }
        },
        "required": [
          "messageId",
          "status",
          "to",
          "language",
          "whatsappTemplateName",
          "credits"
        ]
      },
      "TestSendWhatsappTemplateDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the WhatsApp template.",
            "examples": [
              "3f8a2c1e-7b4d-4e9a-9c2f-5d1e8b7a6c40"
            ]
          },
          "name": {
            "type": "string",
            "description": "Template name.",
            "examples": [
              "diwali_offer_ta"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "PENDING",
              "APPROVED",
              "REJECTED",
              "PAUSED",
              "DISABLED"
            ],
            "description": "Review status. Only `APPROVED` templates can be tested.",
            "examples": [
              "APPROVED"
            ]
          },
          "language": {
            "type": "string",
            "description": "WhatsApp (Meta) language code of the template.",
            "examples": [
              "ta"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "language"
        ]
      },
      "TriggerBroadcastResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Broadcast ID.",
            "examples": [
              "6e2f9a14-3b7c-4d8e-a1f5-0c9b2d4e7a36"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "sending"
            ],
            "description": "Always `sending`.",
            "examples": [
              "sending"
            ]
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "UpdateContactChannelsDto": {
        "type": "object",
        "properties": {
          "whatsapp": {
            "description": "The WhatsApp channel. Leave it out to keep the current WhatsApp number.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsAppChannelDto"
              }
            ]
          }
        }
      },
      "UpdateContactDto": {
        "type": "object",
        "properties": {
          "personName": {
            "type": "string",
            "description": "Name of the person.",
            "examples": [
              "Ravi Kumar"
            ]
          },
          "firmName": {
            "type": "string",
            "description": "Name of the firm.",
            "examples": [
              "Kumar Traders"
            ]
          },
          "code": {
            "type": "string",
            "description": "Unique code within the organization.",
            "examples": [
              "KT-001"
            ]
          },
          "zone": {
            "type": "string",
            "description": "Sales zone.",
            "examples": [
              "North"
            ]
          },
          "state": {
            "type": "string",
            "description": "One of the canonical Indian states / union territories, spelled exactly as listed. It decides which language version of a template the contact gets.",
            "enum": [
              "Andhra Pradesh",
              "Arunachal Pradesh",
              "Assam",
              "Bihar",
              "Chhattisgarh",
              "Goa",
              "Gujarat",
              "Haryana",
              "Himachal Pradesh",
              "Jharkhand",
              "Karnataka",
              "Kerala",
              "Madhya Pradesh",
              "Maharashtra",
              "Manipur",
              "Meghalaya",
              "Mizoram",
              "Nagaland",
              "Odisha",
              "Punjab",
              "Rajasthan",
              "Sikkim",
              "Tamil Nadu",
              "Telangana",
              "Tripura",
              "Uttar Pradesh",
              "Uttarakhand",
              "West Bengal",
              "Andaman and Nicobar Islands",
              "Chandigarh",
              "Dadra and Nagar Haveli and Daman and Diu",
              "Delhi",
              "Jammu and Kashmir",
              "Ladakh",
              "Lakshadweep",
              "Puducherry"
            ],
            "examples": [
              "Maharashtra"
            ]
          },
          "area": {
            "type": "string",
            "default": "",
            "description": "Area or locality.",
            "examples": [
              "Andheri East"
            ]
          },
          "address": {
            "type": "string",
            "default": "",
            "description": "Street address.",
            "examples": [
              "123 MG Road"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Contact phone number. WhatsApp messages are not sent to it: they go to `channelData.whatsapp.number`.",
            "examples": [
              "+919876543210"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email address.",
            "examples": [
              "ravi@kumartraders.in"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "description": "The dealer's own website — filled into an overlay's Website element and a QR code set to Dealer website. With or without `https://`.",
            "examples": [
              "kumartraders.in"
            ]
          },
          "logo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public URL of the contact’s logo, for creatives that show it. Upload the image first with Get an upload URL and Register an upload.",
            "examples": [
              "{{CDN_BASE_URL}}/0b7e4d2a/hyper-local/uploads/logo/5d1c/kumar-traders.png"
            ]
          },
          "data": {
            "type": "object",
            "description": "Any JSON object you want to keep with the contact. The `localization` key is written by Localize contacts and Save contact localization.",
            "default": {},
            "examples": [
              {
                "region": "Mumbai Metro",
                "tier": "gold"
              }
            ]
          },
          "channelData": {
            "type": "object",
            "description": "Channel handles. Set `whatsapp.number` to reach the contact on WhatsApp. A Facebook page is added by the contact through Create a Facebook connect link, not here.",
            "default": {},
            "examples": [
              {
                "whatsapp": {
                  "number": "+919876543210"
                }
              }
            ]
          }
        }
      },
      "UpdateContactGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120,
            "description": "New name. Must be unique in your organization.",
            "examples": [
              "Premium Dealers West"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "New description. Send an empty string to clear it.",
            "examples": [
              "Premium dealers in the West zone."
            ]
          }
        }
      },
      "UpdateContactLocalizationDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "description": "Target BCP-47 language. Defaults to the language the contact’s state maps to.",
            "examples": [
              "bn-IN"
            ]
          },
          "fields": {
            "type": "object",
            "description": "Localized values keyed by field: `firmName`, `personName`, `area` and `address`. Other keys are ignored. The saved values are replaced whole, so a field you leave out is cleared.",
            "properties": {
              "firmName": {
                "type": "string",
                "description": "Localized firm name.",
                "examples": [
                  "কুমার ট্রেডার্স"
                ]
              },
              "personName": {
                "type": "string",
                "description": "Localized person name.",
                "examples": [
                  "রবি কুমার"
                ]
              },
              "area": {
                "type": "string",
                "description": "Localized area.",
                "examples": [
                  "সল্টলেক"
                ]
              },
              "address": {
                "type": "string",
                "description": "Localized address.",
                "examples": [
                  "১২৩ এমজি রোড"
                ]
              }
            },
            "examples": [
              {
                "firmName": "কুমার ট্রেডার্স",
                "address": "১২৩ এমজি রোড"
              }
            ]
          }
        },
        "required": [
          "fields"
        ]
      },
      "UpdateFacebookTemplateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Template name, up to 255 characters.",
            "examples": [
              "Diwali offer post"
            ]
          },
          "message": {
            "type": "string",
            "description": "The post text, with `{{1}}`, `{{2}}`… where contact details go.",
            "examples": [
              "Namaste {{1}}! Visit {{2}} this Diwali for the best deals."
            ]
          },
          "variables": {
            "description": "One entry per placeholder, in order: the first fills `{{1}}`. Send an empty array when the text has no placeholders.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FacebookTemplateVariableDto"
            }
          },
          "media": {
            "description": "The media the post carries. `null` or left out: text only.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacebookMediaDto"
              }
            ]
          },
          "language": {
            "type": "string",
            "description": "The language of the post, as a WhatsApp (Meta) language code from Get Facebook template options. A template without a language is never mapped to a creative's language version. Once set, it can be changed but not cleared.",
            "enum": [
              "en",
              "en-US",
              "en-GB",
              "hi",
              "bn",
              "gu",
              "kn",
              "ml",
              "mr",
              "pa",
              "ta",
              "te",
              "ur"
            ],
            "examples": [
              "hi"
            ]
          }
        }
      },
      "UpdateLocalizedTemplateDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title in this language, up to 255 characters. Preview a localization suggests one.",
            "maxLength": 255,
            "examples": [
              "फसल सीज़न लॉन्च"
            ]
          },
          "caption": {
            "type": "string",
            "description": "Caption in this language. Preview a localization suggests one.",
            "examples": [
              "कॉम्पैक्ट ऑर्चर्ड ट्रैक्टर"
            ]
          },
          "creative": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of this version's own creative, up to 2048 characters, of the template's media type. Leave it out (or null) to use the template's base creative.",
            "maxLength": 2048,
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest-hi.png"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active"
            ],
            "default": "draft",
            "description": "`draft` or `active`.",
            "examples": [
              "active"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON data for this version, e.g. `durationSeconds` for its own video creative (it prices renders). On update a sent object replaces the stored one; leave it out to keep it. `origin` is set by the server and ignored if sent.",
            "default": {},
            "examples": [
              {
                "durationSeconds": 24
              }
            ]
          }
        }
      },
      "UpdateProductDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Product name, up to 255 characters.",
            "maxLength": 255,
            "examples": [
              "Mahindra NOVO"
            ]
          },
          "description": {
            "type": "string",
            "description": "Product description.",
            "examples": [
              "Introducing the all-new Mahindra NOVO, built for heavy haulage."
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the product image, up to 2048 characters. Upload it first with Get an upload URL and Register an upload (`kind: product`).",
            "maxLength": 2048,
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/product/novo.png"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own JSON data for the product. Stored as sent; on update a sent object replaces the stored one.",
            "default": {},
            "examples": [
              {
                "sku": "NOVO-605"
              }
            ]
          }
        }
      },
      "UpdateProductModelDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Model name, up to 255 characters.",
            "maxLength": 255,
            "examples": [
              "NOVO Maxx"
            ]
          },
          "description": {
            "type": "string",
            "description": "Model description.",
            "examples": [
              "High-capacity variant with extended payload."
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the model image, up to 2048 characters. Upload it first with Get an upload URL and Register an upload (`kind: product`).",
            "maxLength": 2048,
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/product/novo-maxx.png"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own JSON data for the model. Stored as sent; on update a sent object replaces the stored one.",
            "default": {},
            "examples": [
              {
                "payloadKg": 1500
              }
            ]
          }
        }
      },
      "UpdateTemplateDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title in the base language, up to 255 characters.",
            "maxLength": 255,
            "examples": [
              "Harvest season launch"
            ]
          },
          "caption": {
            "type": "string",
            "description": "Caption in the base language.",
            "examples": [
              "Compact orchard tractor for vineyards and inter-row spraying."
            ]
          },
          "creative": {
            "type": "string",
            "description": "URL of the base creative, up to 2048 characters: an image (PNG, JPG) or, with `type: video`, an MP4. Upload it first with Get an upload URL and Register an upload (`kind: creative`).",
            "maxLength": 2048,
            "examples": [
              "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.png"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active"
            ],
            "default": "draft",
            "description": "`draft` or `active`.",
            "examples": [
              "active"
            ]
          },
          "baseLanguage": {
            "type": "string",
            "description": "Language of the base creative, as a BCP-47 code. Defaults to `en-US`.",
            "default": "en-US",
            "examples": [
              "en-IN"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON data for the template. Set `durationSeconds` to a video creative’s length in seconds (it prices renders), and optionally `stateLanguageMap` (state name → language version) to override your preferences for this template. On update a sent object replaces the stored one; `messageTemplates` is ignored here (use Map message templates).",
            "default": {},
            "examples": [
              {
                "durationSeconds": 24,
                "stateLanguageMap": {
                  "Telangana": "te-IN"
                }
              }
            ]
          }
        }
      },
      "UpdateTemplateMessageTemplatesDto": {
        "type": "object",
        "properties": {
          "mappings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/HlMessageTemplateEntryDto"
            },
            "description": "Keyed by language version: the template's base language or a localization's language, exactly as stored (BCP-47, at most 100). Each value names a `whatsappTemplateId` and/or a `facebookTemplateId` (null or left out = none). Each template must be in your organization and in that language (`en` and `en_US` match `en-IN`); a WhatsApp template also needs the header the creative is sent in (`IMAGE` for an image, `VIDEO` for a video). A WhatsApp template still in review may be mapped; it sends once Meta approves it. Replaces the whole mapping: a language you leave out is unmapped.",
            "examples": [
              {
                "en-IN": {
                  "whatsappTemplateId": "5f0c2a4e-6b8d-4f1a-9c3e-7d5b9a1c3e5f",
                  "facebookTemplateId": null
                },
                "te-IN": {
                  "whatsappTemplateId": "9a41c3e5-7b9d-4f1a-8c3e-5d7f9b1d3f5a",
                  "facebookTemplateId": "0b7e9d1f-3a5c-4e7b-8d9f-1a3c5e7b9d1f"
                }
              }
            ]
          }
        },
        "required": [
          "mappings"
        ]
      },
      "UpdateWhatsappTemplateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Template name: lowercase letters, numbers and underscores, up to 120 characters. Unique in your organization for each language.",
            "examples": [
              "diwali_offer"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "MARKETING",
              "UTILITY",
              "AUTHENTICATION"
            ],
            "description": "The WhatsApp category Meta reviews the template under. Broadcast offers are `MARKETING`.",
            "examples": [
              "MARKETING"
            ]
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "en-US",
              "en-GB",
              "hi",
              "bn",
              "gu",
              "kn",
              "ml",
              "mr",
              "pa",
              "ta",
              "te",
              "ur"
            ],
            "description": "The BCP-47 code of the message language, such as `hi` or `en-US` (the older `en_US` form is still accepted). Get the list from Get WhatsApp template options.",
            "examples": [
              "hi"
            ]
          },
          "components": {
            "description": "The header, body, footer and buttons of the message.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappComponentsDto"
              }
            ]
          }
        }
      },
      "UpsertTemplateOverlayDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "description": "ID of the template.",
            "format": "uuid",
            "examples": [
              "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f"
            ]
          },
          "language": {
            "type": "string",
            "description": "Language the overlay is for: the template's base language or one of its localizations' languages (BCP-47).",
            "maxLength": 35,
            "examples": [
              "hi-IN"
            ]
          },
          "elements": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Positioned elements drawn over the creative, stored as you send them. Each element has an `id`, a `kind` (`text`, `image`, `qr`, `shape` or `icon`), a `name`, its box as percentages of the canvas (`x`, `y`, `w`, `h`, 0 to 100), `rotation` in degrees, `opacity` (0 to 1), `zIndex`, `locked`, `visible`, and either a fixed `value` (text, image URL or QR URL) or a `binding` to a contact field: `{ field, mode }`, where `field` is `personName`, `firmName`, `phone`, `email`, `address`, `zone`, `state`, `area`, `code` or `logo`, and `mode` is `source` (the field as entered) or `localized` (the contact’s saved localized value for the language, falling back to the source; `translation` and `transliteration` work the same way). Styling goes in the object named after its `kind` (`text`, `image`, `qr`, `shape`, `icon`); pixel sizes are at the creative’s own resolution. Replaces the stored elements.",
            "examples": [
              [
                {
                  "id": "dealer-name",
                  "kind": "text",
                  "name": "Dealer name",
                  "x": 6,
                  "y": 82,
                  "w": 60,
                  "h": 8,
                  "rotation": 0,
                  "opacity": 1,
                  "zIndex": 2,
                  "locked": false,
                  "visible": true,
                  "binding": {
                    "field": "firmName",
                    "mode": "localized"
                  },
                  "value": null,
                  "text": {
                    "fontFamily": "Noto Sans",
                    "fontWeight": 700,
                    "fontSize": 48,
                    "color": "#FFFFFF",
                    "align": "left",
                    "lineHeight": 1.2,
                    "letterSpacing": 0,
                    "padding": 8,
                    "borderRadius": 4,
                    "background": {
                      "color": "#000000",
                      "opacity": 0.4
                    },
                    "border": null,
                    "maxLines": 1
                  }
                }
              ]
            ]
          },
          "canvas": {
            "type": "object",
            "additionalProperties": true,
            "description": "Canvas settings: `opacity` (0 to 1) for the whole overlay and `showSafeZone` (whether the safe-zone guide is drawn). Left out: `{}`.",
            "examples": [
              {
                "opacity": 1,
                "showSafeZone": false
              }
            ]
          }
        },
        "required": [
          "templateId",
          "language",
          "elements"
        ]
      },
      "WhatsappAnalyticsDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "WhatsApp messages (contacts who could receive WhatsApp).",
            "examples": [
              104
            ]
          },
          "sent": {
            "type": "number",
            "description": "Sent, including delivered and read.",
            "examples": [
              96
            ]
          },
          "delivered": {
            "type": "number",
            "description": "Delivered, including read.",
            "examples": [
              88
            ]
          },
          "read": {
            "type": "number",
            "description": "Read.",
            "examples": [
              51
            ]
          },
          "failed": {
            "type": "number",
            "description": "Failed.",
            "examples": [
              3
            ]
          },
          "pending": {
            "type": "number",
            "description": "Not sent or failed yet: `total` − `sent` − `failed`.",
            "examples": [
              5
            ]
          },
          "failureReasons": {
            "description": "Failed messages grouped by error, most first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsFailureReasonDto"
            }
          }
        },
        "required": [
          "total",
          "sent",
          "delivered",
          "read",
          "failed",
          "pending",
          "failureReasons"
        ]
      },
      "WhatsappBodyDto": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The message text, with `{{1}}`, `{{2}}`… where contact details go. The number of placeholders must equal the number of `variables` to submit the template.",
            "examples": [
              "Namaste {{1}}! Visit {{2}} this Diwali for festive offers on every model."
            ]
          },
          "variables": {
            "description": "One entry per placeholder, in order: the first fills `{{1}}`. Send an empty array when the text has no placeholders.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatsappTemplateVariableDto"
            }
          }
        },
        "required": [
          "text",
          "variables"
        ]
      },
      "WhatsappButtonDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "QUICK_REPLY",
              "URL",
              "PHONE_NUMBER"
            ],
            "description": "`QUICK_REPLY` sends the button text back as a reply; `URL` opens `url`; `PHONE_NUMBER` calls `phoneNumber`.",
            "examples": [
              "URL"
            ]
          },
          "text": {
            "type": "string",
            "description": "Button label, up to 25 characters.",
            "examples": [
              "View offers"
            ]
          },
          "url": {
            "type": "string",
            "description": "The link a `URL` button opens.",
            "examples": [
              "https://www.example.com/diwali"
            ]
          },
          "phoneNumber": {
            "type": "string",
            "description": "The number a `PHONE_NUMBER` button calls, with the country code. Up to 20 characters.",
            "examples": [
              "+919876543210"
            ]
          }
        },
        "required": [
          "type",
          "text"
        ]
      },
      "WhatsAppChannelDto": {
        "type": "object",
        "properties": {
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "WhatsApp number with its country code (digits, optional leading +). Empty or null removes WhatsApp from the contact.",
            "examples": [
              "918327423344"
            ]
          }
        }
      },
      "WhatsappComponentsDto": {
        "type": "object",
        "properties": {
          "header": {
            "description": "The header. Leave it out for no header.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappHeaderDto"
              }
            ]
          },
          "body": {
            "description": "The message body.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappBodyDto"
              }
            ]
          },
          "footer": {
            "description": "The footer. Leave it out for no footer.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappFooterDto"
              }
            ]
          },
          "buttons": {
            "description": "Buttons under the message.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatsappButtonDto"
            }
          }
        },
        "required": [
          "body"
        ]
      },
      "WhatsappFooterDto": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Footer text, up to 60 characters.",
            "examples": [
              "Reply STOP to unsubscribe"
            ]
          }
        },
        "required": [
          "text"
        ]
      },
      "WhatsappHeaderDto": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "TEXT",
              "IMAGE",
              "VIDEO",
              "DOCUMENT"
            ],
            "description": "`TEXT` for a text header, or `IMAGE`, `VIDEO` or `DOCUMENT` for a media header. A broadcast sends each contact's creative in a media header, so use the creative's type (`IMAGE` or `VIDEO`).",
            "examples": [
              "IMAGE"
            ]
          },
          "text": {
            "type": "string",
            "description": "The header text, for `format: TEXT`. Up to 60 characters.",
            "examples": [
              "Diwali offers are here"
            ]
          },
          "sampleMediaUrl": {
            "type": "string",
            "description": "A public `https://` link to a sample file, for a media header. Required to submit a media-header template: Meta reviews the template with it. The file sent to each contact is their own creative. Up to 100 MB.",
            "examples": [
              "https://cdn.example.com/hyper-local/uploads/creative/diwali-sample.png"
            ]
          },
          "sampleMimeType": {
            "type": "string",
            "description": "MIME type of the sample file. Leave it out to use the type the file's server reports.",
            "examples": [
              "image/png"
            ]
          }
        },
        "required": [
          "format"
        ]
      },
      "WhatsappTemplateListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "One page of templates.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatsappTemplateResponseDto"
            }
          },
          "pagination": {
            "description": "Paging details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageTemplatePaginationDto"
              }
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "WhatsappTemplateOptionsResponseDto": {
        "type": "object",
        "properties": {
          "categories": {
            "type": "array",
            "description": "Values `category` accepts.",
            "items": {
              "type": "string",
              "enum": [
                "MARKETING",
                "UTILITY",
                "AUTHENTICATION"
              ]
            },
            "examples": [
              [
                "MARKETING",
                "UTILITY",
                "AUTHENTICATION"
              ]
            ]
          },
          "languages": {
            "description": "Languages `language` accepts.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageTemplateLanguageDto"
            },
            "examples": [
              [
                {
                  "code": "en",
                  "label": "English"
                },
                {
                  "code": "en-US",
                  "label": "English (US)"
                },
                {
                  "code": "en-GB",
                  "label": "English (UK)"
                },
                {
                  "code": "hi",
                  "label": "Hindi"
                }
              ]
            ]
          },
          "headerFormats": {
            "type": "array",
            "description": "Header formats. `NONE` means no header: leave `components.header` out.",
            "items": {
              "type": "string",
              "enum": [
                "NONE",
                "TEXT",
                "IMAGE",
                "VIDEO",
                "DOCUMENT"
              ]
            },
            "examples": [
              [
                "NONE",
                "TEXT",
                "IMAGE",
                "VIDEO",
                "DOCUMENT"
              ]
            ]
          },
          "contactFields": {
            "type": "array",
            "description": "Contact fields a variable can be filled from.",
            "items": {
              "type": "string",
              "enum": [
                "personName",
                "firmName",
                "area",
                "address",
                "state",
                "zone",
                "phone",
                "email",
                "website",
                "code"
              ]
            },
            "examples": [
              [
                "personName",
                "firmName",
                "area",
                "address",
                "state",
                "zone",
                "phone",
                "email",
                "website",
                "code"
              ]
            ]
          }
        },
        "required": [
          "categories",
          "languages",
          "headerFormats",
          "contactFields"
        ]
      },
      "WhatsappTemplateResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the template.",
            "examples": [
              "3f8a2c1e-7b4d-4e9a-9c2f-5d1e8b7a6c40"
            ]
          },
          "name": {
            "type": "string",
            "description": "Template name, as you set it.",
            "examples": [
              "diwali_offer"
            ]
          },
          "metaName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name the template is registered under with Meta: your name with an organization prefix. `null` until it is submitted.",
            "examples": [
              "hl_9b1f6c2e_diwali_offer"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "MARKETING",
              "UTILITY",
              "AUTHENTICATION"
            ],
            "description": "The WhatsApp category.",
            "examples": [
              "MARKETING"
            ]
          },
          "language": {
            "type": "string",
            "description": "WhatsApp (Meta) language code of the message.",
            "examples": [
              "hi"
            ]
          },
          "components": {
            "description": "Header, body, footer and buttons.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappComponentsDto"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "PENDING",
              "APPROVED",
              "REJECTED",
              "PAUSED",
              "DISABLED"
            ],
            "description": "`DRAFT` until submitted; then `PENDING` while Meta reviews it, and `APPROVED` or `REJECTED`. Meta can later set `PAUSED` or `DISABLED`. Only `APPROVED` templates send.",
            "examples": [
              "APPROVED"
            ]
          },
          "metaTemplateId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Meta's ID for the template. `null` until it is submitted.",
            "examples": [
              "1234567890123456"
            ]
          },
          "rejectionReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why Meta rejected the template, when it did.",
            "examples": [
              null
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Extra stored details. Usually empty.",
            "examples": [
              {}
            ]
          },
          "fk_orgId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of your organization.",
            "examples": [
              "9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b"
            ]
          },
          "fk_creatorId": {
            "type": "string",
            "format": "uuid",
            "description": "Member ID of the creator.",
            "examples": [
              "2c4e6a80-9b1d-4f3e-8a5c-7d9e1f2a3b4c"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the template was created.",
            "examples": [
              "2026-10-01T09:30:00.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the template was last changed.",
            "examples": [
              "2026-10-02T11:05:00.000Z"
            ]
          },
          "creator": {
            "description": "Who created the template.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageTemplateCreatorDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "metaName",
          "category",
          "language",
          "components",
          "status",
          "metaTemplateId",
          "rejectionReason",
          "data",
          "fk_orgId",
          "fk_creatorId",
          "createdAt",
          "updatedAt",
          "creator"
        ]
      },
      "WhatsappTemplateVariableDto": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "enum": [
              "personName",
              "firmName",
              "area",
              "address",
              "state",
              "zone",
              "phone",
              "email",
              "website",
              "code"
            ],
            "description": "The contact field that fills this placeholder when the message is sent. The first variable fills `{{1}}`, the second `{{2}}`, and so on.",
            "examples": [
              "personName"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "source",
              "localized"
            ],
            "description": "`source` sends the field as stored on the contact. `localized` sends the contact's saved localized value when it is in the message's language, and falls back to the stored value otherwise.",
            "examples": [
              "localized"
            ]
          },
          "sample": {
            "type": "string",
            "description": "Sample value sent to Meta with the template for review, and used in test messages. Leave it out to use a built-in sample for the field (for example `Ravi Kumar` for `personName`). Up to 255 characters.",
            "examples": [
              "Ravi Kumar"
            ]
          }
        },
        "required": [
          "field",
          "mode"
        ]
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}
