{
  "openapi": "3.1.0",
  "info": {
    "title": "Batler SMS API",
    "version": "1.0.0",
    "description": "REST/JSON API for SMS, OTP, campaigns, contact lists and delivery webhooks. Authenticate with `Authorization: Bearer bm_live_…` (or `bm_test_…`: validated end-to-end, never delivered, never charged). Phones are accepted as 05XXXXXXXX, 5XXXXXXXX, +972… or 972… and always returned in E.164. Errors: `{ \"error\": { \"code\", \"message\", \"details\" } }`. Rate limits per key: 60 requests/min for sending, 600/min for reads (429 with `retry_after`). Breaking changes only in /v2.",
    "contact": {
      "name": "Batler SMS",
      "url": "https://batler.co.il"
    }
  },
  "servers": [
    {
      "url": "https://smsprovider-web.vercel.app/api/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Messages"
    },
    {
      "name": "Campaigns"
    },
    {
      "name": "OTP"
    },
    {
      "name": "Lists"
    },
    {
      "name": "Blacklist"
    },
    {
      "name": "Inbound"
    },
    {
      "name": "Senders"
    },
    {
      "name": "Account"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "Pricing"
    }
  ],
  "paths": {
    "/messages": {
      "post": {
        "operationId": "sendMessage",
        "tags": [
          "Messages"
        ],
        "summary": "Send an SMS",
        "description": "Send the same text to one or up to 1,000 recipients. Credits are reserved immediately (1 segment = 1 credit) and messages are queued. Embedded links (`[link-id]` in the text + `links`) are shortened with click tracking.\n\nRequired scope: `sms:send`.",
        "x-summary-he": "שליחת SMS",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 5,
                        "maxLength": 20
                      },
                      {
                        "minItems": 1,
                        "maxItems": 1000,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 5,
                          "maxLength": 20
                        }
                      }
                    ]
                  },
                  "from": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 20
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1005
                  },
                  "schedule_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "campaign_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "unsubscribe_link": {
                    "type": "boolean"
                  },
                  "unsubscribe_reply": {
                    "type": "boolean"
                  },
                  "links": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_-]{1,32}$"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 2000,
                      "format": "uri"
                    }
                  },
                  "skip_recent_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 14
                  },
                  "allow_international": {
                    "type": "boolean"
                  },
                  "android_hash": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9+/]{11}$"
                  },
                  "ref": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "to",
                  "body"
                ],
                "additionalProperties": false
              },
              "example": {
                "to": [
                  "0501234567"
                ],
                "from": "MyBrand",
                "body": "שלום! ההזמנה שלך יצאה למשלוח: [track]",
                "links": {
                  "track": "https://example.com/orders/123"
                },
                "ref": "order-123"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendResult"
                },
                "example": {
                  "batch_id": "7d1c3c5e-2b1f-4c55-9a51-1f0b8f1b2a10",
                  "accepted": 1,
                  "rejected": [],
                  "credits_reserved": 1,
                  "messages": [
                    {
                      "id": "0e9b2f0a-6c1d-4f43-8c33-6f3b3f0d9a11",
                      "status": "queued",
                      "to": "+972501234567",
                      "segments": 1,
                      "credits": 1,
                      "ref": "order-123",
                      "scheduled_at": null,
                      "created_at": "2026-11-02T18:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "validation_error, idempotency_key_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "sender_not_verified, org_suspended, insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_destination",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "daily_limit_exceeded, rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listMessages",
        "tags": [
          "Messages"
        ],
        "summary": "List messages",
        "description": "Filter by status, date range, campaign or phone. Cursor pagination.\n\nRequired scope: `reports`.",
        "x-summary-he": "רשימת הודעות",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "sent",
                "delivered",
                "failed",
                "expired",
                "cancelled"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 5,
              "maxLength": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagePage"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messages/batch": {
      "post": {
        "operationId": "sendBatch",
        "tags": [
          "Messages"
        ],
        "summary": "Send a batch of different messages",
        "description": "Up to 2,500 different messages in one request (a different text per recipient).\n\nRequired scope: `sms:send`.",
        "x-summary-he": "שליחת הודעות שונות באצווה",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "messages": {
                    "minItems": 1,
                    "maxItems": 2500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "to": {
                          "type": "string",
                          "minLength": 5,
                          "maxLength": 20
                        },
                        "body": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1005
                        },
                        "ref": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        }
                      },
                      "required": [
                        "to",
                        "body"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "from": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 20
                  },
                  "schedule_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "campaign_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "allow_international": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "messages"
                ],
                "additionalProperties": false
              },
              "example": {
                "from": "MyBrand",
                "messages": [
                  {
                    "to": "0501234567",
                    "body": "דנה, התור שלך מחר ב-10:00",
                    "ref": "appt-1"
                  },
                  {
                    "to": "0527654321",
                    "body": "יוסי, התור שלך מחר ב-11:30",
                    "ref": "appt-2"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendResult"
                }
              }
            }
          },
          "400": {
            "description": "validation_error, idempotency_key_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "sender_not_verified, org_suspended, insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_destination",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "daily_limit_exceeded, rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messages/{id}": {
      "get": {
        "operationId": "getMessage",
        "tags": [
          "Messages"
        ],
        "summary": "Get a message",
        "description": "Delivery status, segments, credits, mobile operator and link clicks.\n\nRequired scope: `reports`.",
        "x-summary-he": "סטטוס הודעה",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns": {
      "post": {
        "operationId": "createCampaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Send a campaign to a list",
        "description": "Send to a contact list with dynamic fields `{{df1}}`…`{{df6}}`. Unsubscribed and blacklisted contacts are filtered out automatically.\n\nRequired scope: `sms:send`.",
        "x-summary-he": "קמפיין לרשימת תפוצה",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "list_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "from": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 20
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1005
                  },
                  "schedule_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "unsubscribe": {
                    "default": "none",
                    "type": "string",
                    "enum": [
                      "none",
                      "link",
                      "reply"
                    ]
                  },
                  "skip_recent_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 14
                  },
                  "links": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_-]{1,32}$"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 2000,
                      "format": "uri"
                    }
                  }
                },
                "required": [
                  "list_id",
                  "body"
                ],
                "additionalProperties": false
              },
              "example": {
                "list_id": "5b0d2a8e-1d7c-4a35-9a7e-3c1a3b5e9f00",
                "from": "MyBrand",
                "body": "היי {{df1}}, מבצע סוף עונה: 20% הנחה! [shop]",
                "links": {
                  "shop": "https://example.com/sale"
                },
                "unsubscribe": "link",
                "schedule_at": "2026-11-05T09:00:00+02:00"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendResult"
                }
              }
            }
          },
          "400": {
            "description": "validation_error, idempotency_key_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "sender_not_verified, org_suspended, insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_destination",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "daily_limit_exceeded, rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listCampaigns",
        "tags": [
          "Campaigns"
        ],
        "summary": "List campaigns",
        "description": "All sends and campaigns, newest first.\n\nRequired scope: `reports`.",
        "x-summary-he": "רשימת קמפיינים",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "scheduled",
                "sending",
                "sent",
                "cancelled",
                "failed"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignPage"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}": {
      "get": {
        "operationId": "getCampaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Get a campaign",
        "description": "Sent, delivered, failed and cost.\n\nRequired scope: `reports`.",
        "x-summary-he": "סיכום קמפיין",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/cancel": {
      "post": {
        "operationId": "cancelCampaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Cancel a scheduled campaign",
        "description": "Cancels messages not yet sent and releases their credits.\n\nRequired scope: `sms:send`.",
        "x-summary-he": "ביטול קמפיין מתוזמן",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelResult"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/clicks": {
      "get": {
        "operationId": "campaignClicks",
        "tags": [
          "Campaigns"
        ],
        "summary": "Campaign clicks",
        "description": "Unique and total clicks, CTR, hourly breakdown and clickers (bots and link previews excluded).\n\nRequired scope: `reports`.",
        "x-summary-he": "קליקים בקמפיין",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignClicks"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/otp/send": {
      "post": {
        "operationId": "otpSend",
        "tags": [
          "OTP"
        ],
        "summary": "Send a verification code",
        "description": "Sends a one-time code (4–8 digits, default 6) as a regular SMS from the sender name OTP to an Israeli mobile. The code is generated and checked by us, never stored (only a keyed hash) and never returned to you. Limit: 3 codes per phone per 10 minutes, 10 per hour.\n\nRequired scope: `otp`.",
        "x-summary-he": "שליחת קוד אימות",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 20
                  },
                  "app_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,32}$"
                  },
                  "max_tries": {
                    "type": "integer",
                    "minimum": 3,
                    "maximum": 5
                  },
                  "valid_minutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 15
                  },
                  "code_length": {
                    "type": "integer",
                    "minimum": 4,
                    "maximum": 8
                  },
                  "text": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 300
                  }
                },
                "required": [
                  "to"
                ],
                "additionalProperties": false
              },
              "example": {
                "to": "0501234567",
                "app_id": "login",
                "valid_minutes": 5,
                "text": "קוד הכניסה שלך ל-MyBrand: [code]"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OtpSendResult"
                },
                "example": {
                  "session_id": "c3a1b2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                  "expires_at": "2026-11-02T18:05:00Z"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_destination",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "otp_rate_limited, rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/otp/verify": {
      "post": {
        "operationId": "otpVerify",
        "tags": [
          "OTP"
        ],
        "summary": "Verify a code",
        "description": "Checks the code the user typed. Each call counts as an attempt; after `max_tries` wrong attempts the code is invalidated.\n\nRequired scope: `otp`.",
        "x-summary-he": "אימות קוד",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 20
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^\\d{4,10}$"
                  },
                  "app_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,32}$"
                  }
                },
                "required": [
                  "to",
                  "code"
                ],
                "additionalProperties": false
              },
              "example": {
                "to": "0501234567",
                "code": "482913",
                "app_id": "login"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OtpVerifyResult"
                },
                "example": {
                  "verified": true,
                  "tries_left": 2,
                  "session_id": "c3a1b2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists": {
      "get": {
        "operationId": "listLists",
        "tags": [
          "Lists"
        ],
        "summary": "List contact lists",
        "description": "All contact lists with active subscriber counts.\n\nRequired scope: `lists`.",
        "x-summary-he": "רשימות תפוצה",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactListPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createList",
        "tags": [
          "Lists"
        ],
        "summary": "Create a list",
        "description": "Create a list with up to 10,000 contacts (phone + df1–df6). Invalid numbers are returned in `rejected`.\n\nRequired scope: `lists`.",
        "x-summary-he": "יצירת רשימה",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "contacts": {
                    "default": [],
                    "maxItems": 10000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "minLength": 5,
                          "maxLength": 20
                        },
                        "df1": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df2": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df3": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df4": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df5": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df6": {
                          "type": "string",
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "phone"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              },
              "example": {
                "name": "לקוחות VIP",
                "contacts": [
                  {
                    "phone": "0501234567",
                    "df1": "דנה"
                  },
                  {
                    "phone": "0527654321",
                    "df1": "יוסי"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/{id}": {
      "delete": {
        "operationId": "deleteList",
        "tags": [
          "Lists"
        ],
        "summary": "Delete a list",
        "description": "Deletes the list and its contacts.\n\nRequired scope: `lists`.",
        "x-summary-he": "מחיקת רשימה",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/{id}/contacts": {
      "get": {
        "operationId": "listContacts",
        "tags": [
          "Lists"
        ],
        "summary": "List contacts",
        "description": "Contacts in a list, including unsubscribe time.\n\nRequired scope: `lists`.",
        "x-summary-he": "אנשי קשר ברשימה",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "addContacts",
        "tags": [
          "Lists"
        ],
        "summary": "Add contacts",
        "description": "Add up to 10,000 contacts; duplicates are updated.\n\nRequired scope: `lists`.",
        "x-summary-he": "הוספת אנשי קשר",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contacts": {
                    "minItems": 1,
                    "maxItems": 10000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "minLength": 5,
                          "maxLength": 20
                        },
                        "df1": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df2": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df3": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df4": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df5": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "df6": {
                          "type": "string",
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "phone"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "contacts"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutationResult"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeContacts",
        "tags": [
          "Lists"
        ],
        "summary": "Remove contacts",
        "description": "Remove numbers from the list (JSON body with `phones`).\n\nRequired scope: `lists`.",
        "x-summary-he": "הסרת אנשי קשר",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phones": {
                    "minItems": 1,
                    "maxItems": 10000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 5,
                      "maxLength": 20
                    }
                  }
                },
                "required": [
                  "phones"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutationResult"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/blacklist": {
      "get": {
        "operationId": "listBlacklist",
        "tags": [
          "Blacklist"
        ],
        "summary": "List blacklist",
        "description": "Numbers that will never receive messages from your account, and why.\n\nRequired scope: `lists`.",
        "x-summary-he": "רשימה שחורה",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlacklistPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "addBlacklist",
        "tags": [
          "Blacklist"
        ],
        "summary": "Add to blacklist",
        "description": "Blocks numbers from receiving messages from your account.\n\nRequired scope: `lists`.",
        "x-summary-he": "הוספה לרשימה השחורה",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phones": {
                    "minItems": 1,
                    "maxItems": 10000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 5,
                      "maxLength": 20
                    }
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "required": [
                  "phones"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutationResult"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeBlacklist",
        "tags": [
          "Blacklist"
        ],
        "summary": "Remove from blacklist",
        "description": "Removes numbers from the blacklist. Re-adding someone who opted out requires their renewed consent by law.\n\nRequired scope: `lists`.",
        "x-summary-he": "הסרה מהרשימה השחורה",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phones": {
                    "minItems": 1,
                    "maxItems": 10000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 5,
                      "maxLength": 20
                    }
                  }
                },
                "required": [
                  "phones"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutationResult"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inbound": {
      "get": {
        "operationId": "listInbound",
        "tags": [
          "Inbound"
        ],
        "summary": "List inbound messages",
        "description": "Replies received on your sender numbers.\n\nRequired scope: `reports`.",
        "x-summary-he": "הודעות נכנסות",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboundPage"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/senders": {
      "get": {
        "operationId": "listSenders",
        "tags": [
          "Senders"
        ],
        "summary": "List sender names",
        "description": "Sender names you can send from: shared names (shared: true) and names approved for your account.\n\nRequired scope: `sms:send`.",
        "x-summary-he": "שמות שולח",
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createSender",
        "tags": [
          "Senders"
        ],
        "summary": "Look up a sender name",
        "description": "Returns a sender name available to the account (shared or approved for it). New names are requested in the portal (Sender names → request a new name) with a business certificate and an ID document; answered within one business day. Sending from phone numbers is not available.\n\nRequired scope: `sms:send`.",
        "x-summary-he": "בדיקת שם שולח",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 20
                  },
                  "is_default": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sender"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/balance": {
      "get": {
        "operationId": "getBalance",
        "tags": [
          "Account"
        ],
        "summary": "Get balance",
        "description": "Balance, reserved credits, international balance and expiry.\n\nRequired scope: `reports`.",
        "x-summary-he": "יתרת קרדיטים",
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Balance"
                },
                "example": {
                  "balance_credits": 4820,
                  "reserved_credits": 120,
                  "available_credits": 4700,
                  "intl_balance_credits": 0,
                  "intl_available_credits": 0,
                  "expires_at": "2027-11-02T00:00:00Z"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/usage": {
      "get": {
        "operationId": "getUsage",
        "tags": [
          "Account"
        ],
        "summary": "Get usage",
        "description": "Usage per day or per campaign.\n\nRequired scope: `reports`.",
        "x-summary-he": "שימוש",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "default": "day",
              "type": "string",
              "enum": [
                "day",
                "campaign"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "operationId": "listWebhooks",
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook endpoints",
        "description": "Your endpoints and the events they receive.\n\nRequired scope: `webhooks`.",
        "x-summary-he": "כתובות webhook",
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createWebhook",
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a webhook endpoint",
        "description": "A public HTTPS URL. The `secret` is returned only once — store it to verify signatures.\n\nRequired scope: `webhooks`.",
        "x-summary-he": "הוספת webhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 11,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "message.sent",
                        "message.delivered",
                        "message.failed",
                        "message.expired",
                        "inbound.received",
                        "otp.verified",
                        "otp.failed",
                        "wallet.low_balance",
                        "wallet.credited",
                        "blacklist.added",
                        "link.clicked"
                      ]
                    }
                  }
                },
                "required": [
                  "url",
                  "events"
                ],
                "additionalProperties": false
              },
              "example": {
                "url": "https://example.com/hooks/batler",
                "events": [
                  "message.delivered",
                  "message.failed",
                  "inbound.received"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}": {
      "delete": {
        "operationId": "deleteWebhook",
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a webhook endpoint",
        "description": "Stops delivering events to the URL.\n\nRequired scope: `webhooks`.",
        "x-summary-he": "מחיקת webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}/deliveries": {
      "get": {
        "operationId": "listDeliveries",
        "tags": [
          "Webhooks"
        ],
        "summary": "List deliveries",
        "description": "Delivery attempts, response codes and status.\n\nRequired scope: `webhooks`.",
        "x-summary-he": "לוג משלוחים",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}/deliveries/{delivery_id}/replay": {
      "post": {
        "operationId": "replayDelivery",
        "tags": [
          "Webhooks"
        ],
        "summary": "Replay a delivery",
        "description": "Re-queues an event (same `X-Batler-Event-Id`).\n\nRequired scope: `webhooks`.",
        "x-summary-he": "שליחה חוזרת של אירוע",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/pricing/quote": {
      "get": {
        "operationId": "pricingQuote",
        "tags": [
          "Pricing"
        ],
        "summary": "Price quote by volume",
        "description": "Price before VAT for a credit amount (plus the VAT and the total), the current tier and how many credits to the next tier.\n\nRequired scope: `reports`.",
        "x-summary-he": "הצעת מחיר לפי כמות",
        "parameters": [
          {
            "name": "credits",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed in the window"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left in the window"
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Unix time when the window resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "description": "validation_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "message.sent": {
      "post": {
        "summary": "message.sent event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_message_sent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "message.delivered": {
      "post": {
        "summary": "message.delivered event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_message_delivered"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "message.failed": {
      "post": {
        "summary": "message.failed event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_message_failed"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "message.expired": {
      "post": {
        "summary": "message.expired event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_message_expired"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "inbound.received": {
      "post": {
        "summary": "inbound.received event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_inbound_received"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "otp.verified": {
      "post": {
        "summary": "otp.verified event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_otp_verified"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "otp.failed": {
      "post": {
        "summary": "otp.failed event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_otp_failed"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "wallet.low_balance": {
      "post": {
        "summary": "wallet.low_balance event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_wallet_low_balance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "wallet.credited": {
      "post": {
        "summary": "wallet.credited event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_wallet_credited"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "blacklist.added": {
      "post": {
        "summary": "blacklist.added event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_blacklist_added"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    },
    "link.clicked": {
      "post": {
        "summary": "link.clicked event",
        "description": "Sent as POST JSON to your endpoint. Verify `X-Batler-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>` and reject timestamps older than 5 minutes. Deduplicate by `X-Batler-Event-Id`. Respond 2xx within 10 seconds; otherwise we retry after 1m, 5m, 30m, 2h, 6h and 24h. 10 consecutive failures disable the endpoint.",
        "parameters": [
          {
            "name": "X-Batler-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Batler-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event_link_clicked"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "bm_live_<32 chars> | bm_test_<32 chars>"
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "Unique per logical request (e.g. a UUID). Repeating it within 24h returns the original response without charging again.",
        "schema": {
          "type": "string",
          "maxLength": 200,
          "pattern": "^[A-Za-z0-9_\\-:.]{1,200}$"
        }
      }
    },
    "schemas": {
      "Message": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "sent",
              "delivered",
              "failed",
              "expired",
              "cancelled"
            ]
          },
          "to": {
            "type": "string"
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "segments": {
            "type": "integer"
          },
          "credits": {
            "type": "integer"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "operator": {
            "type": [
              "string",
              "null"
            ]
          },
          "ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "campaign_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduled_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "clicks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "link_id": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "clicked_at": {
                  "type": "string"
                }
              },
              "required": [
                "link_id",
                "url",
                "clicked_at"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "status",
          "to",
          "from",
          "segments",
          "credits",
          "reason",
          "operator",
          "ref",
          "campaign_id",
          "scheduled_at",
          "created_at",
          "sent_at",
          "delivered_at"
        ],
        "additionalProperties": false
      },
      "SendResult": {
        "type": "object",
        "properties": {
          "batch_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "accepted": {
            "type": "integer"
          },
          "rejected": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "to": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "to",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "credits_reserved": {
            "type": "integer"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "sent",
                    "delivered",
                    "failed",
                    "expired",
                    "cancelled"
                  ]
                },
                "to": {
                  "type": "string"
                },
                "from": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "segments": {
                  "type": "integer"
                },
                "credits": {
                  "type": "integer"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "operator": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "campaign_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scheduled_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "sent_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "delivered_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "clicks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "link_id": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      },
                      "clicked_at": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "link_id",
                      "url",
                      "clicked_at"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "status",
                "to",
                "from",
                "segments",
                "credits",
                "reason",
                "operator",
                "ref",
                "campaign_id",
                "scheduled_at",
                "created_at",
                "sent_at",
                "delivered_at"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "batch_id",
          "accepted",
          "rejected",
          "credits_reserved",
          "messages"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "validation_error",
                  "unauthorized",
                  "insufficient_credits",
                  "forbidden",
                  "insufficient_scope",
                  "sender_not_verified",
                  "not_found",
                  "idempotency_conflict",
                  "idempotency_key_required",
                  "invalid_destination",
                  "rate_limited",
                  "otp_rate_limited",
                  "org_suspended",
                  "daily_limit_exceeded",
                  "internal_error",
                  "service_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {}
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Campaign": {
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "total",
          "sent",
          "delivered",
          "failed"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "single",
              "bulk",
              "list",
              "otp",
              "api"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "sending",
              "sent",
              "cancelled",
              "failed"
            ]
          },
          "sender": {
            "type": [
              "string",
              "null"
            ]
          },
          "list_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "scheduled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "total": {
            "type": "integer"
          },
          "sent": {
            "type": "integer"
          },
          "delivered": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "credits_reserved": {
            "type": "integer"
          },
          "credits_committed": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CampaignClicks": {
        "type": "object",
        "properties": {
          "unique_clicks": {
            "type": "integer"
          },
          "total_clicks": {
            "type": "integer"
          },
          "ctr": {
            "type": [
              "number",
              "null"
            ],
            "description": "unique clicks ÷ delivered"
          },
          "by_hour": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "hour": {
                  "type": "string",
                  "format": "date-time"
                },
                "clicks": {
                  "type": "integer"
                }
              }
            }
          },
          "clickers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "phone": {
                  "type": "string"
                },
                "link_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "clicked_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "CancelResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "cancelled",
              "partially_dispatched",
              "already_sent",
              "already_cancelled"
            ]
          },
          "cancelled": {
            "type": "integer"
          }
        }
      },
      "OtpSendResult": {
        "type": "object",
        "required": [
          "session_id",
          "expires_at"
        ],
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OtpVerifyResult": {
        "type": "object",
        "required": [
          "verified",
          "tries_left"
        ],
        "properties": {
          "verified": {
            "type": "boolean"
          },
          "tries_left": {
            "type": "integer"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "ContactList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "description": "active (not unsubscribed) contacts"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Contact": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "description": "E.164"
          },
          "df1": {
            "type": [
              "string",
              "null"
            ]
          },
          "df2": {
            "type": [
              "string",
              "null"
            ]
          },
          "df3": {
            "type": [
              "string",
              "null"
            ]
          },
          "df4": {
            "type": [
              "string",
              "null"
            ]
          },
          "df5": {
            "type": [
              "string",
              "null"
            ]
          },
          "df6": {
            "type": [
              "string",
              "null"
            ]
          },
          "unsubscribed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "MutationResult": {
        "type": "object",
        "properties": {
          "added": {
            "type": "integer"
          },
          "removed": {
            "type": "integer"
          },
          "rejected": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "phone": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "phone",
                "reason"
              ]
            }
          }
        }
      },
      "BlacklistEntry": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "customer",
              "api",
              "unsubscribe",
              "dlr",
              "reply"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Inbound": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string",
            "description": "your sender ID that received the reply"
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "received_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Sender": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "number",
              "alpha"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "rejected"
            ]
          },
          "is_default": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Balance": {
        "type": "object",
        "properties": {
          "balance_credits": {
            "type": "integer"
          },
          "reserved_credits": {
            "type": "integer",
            "description": "held for queued/scheduled messages"
          },
          "available_credits": {
            "type": "integer"
          },
          "intl_balance_credits": {
            "type": "integer"
          },
          "intl_available_credits": {
            "type": "integer"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Usage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "day (YYYY-MM-DD) or campaign id"
                },
                "messages": {
                  "type": "integer"
                },
                "segments": {
                  "type": "integer"
                },
                "credits": {
                  "type": "integer"
                },
                "delivered": {
                  "type": "integer"
                },
                "failed": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "message.sent",
                "message.delivered",
                "message.failed",
                "message.expired",
                "inbound.received",
                "otp.verified",
                "otp.failed",
                "wallet.low_balance",
                "wallet.credited",
                "blacklist.added",
                "link.clicked"
              ]
            }
          },
          "is_active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "secret": {
            "type": "string",
            "description": "Signing secret (whsec_…). Returned ONLY in the create response."
          }
        }
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "event": {
            "type": "string",
            "enum": [
              "message.sent",
              "message.delivered",
              "message.failed",
              "message.expired",
              "inbound.received",
              "otp.verified",
              "otp.failed",
              "wallet.low_balance",
              "wallet.credited",
              "blacklist.added",
              "link.clicked"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "delivered",
              "failed"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "response_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Quote": {
        "type": "object",
        "properties": {
          "credits": {
            "type": "integer"
          },
          "price_ils": {
            "type": "number",
            "description": "price before VAT (ILS)"
          },
          "total_ils": {
            "type": "number",
            "description": "amount charged: price_ils + vat_ils"
          },
          "prices_include_vat": {
            "type": "boolean",
            "description": "always false — list prices are before VAT"
          },
          "price_per_credit": {
            "type": "number"
          },
          "vat_ils": {
            "type": "number",
            "description": "VAT added on top of price_ils"
          },
          "validity_days": {
            "type": "integer"
          },
          "tier": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "min_credits": {
                "type": "integer"
              },
              "max_credits": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "next_tier": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "min_credits": {
                "type": "integer"
              },
              "price_per_credit": {
                "type": "number"
              },
              "credits_needed": {
                "type": "integer"
              }
            }
          }
        }
      },
      "Ok": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "ok"
        ]
      },
      "MessagePage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page"
          }
        }
      },
      "CampaignPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Campaign"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page"
          }
        }
      },
      "ContactListPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactList"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page"
          }
        }
      },
      "ContactPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page"
          }
        }
      },
      "BlacklistPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlacklistEntry"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page"
          }
        }
      },
      "InboundPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Inbound"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page"
          }
        }
      },
      "SenderPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sender"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page"
          }
        }
      },
      "WebhookEndpointPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page"
          }
        }
      },
      "WebhookDeliveryPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page"
          }
        }
      },
      "Event_message_sent": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "message.sent"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "message_id": {
                "type": "string",
                "format": "uuid"
              },
              "to": {
                "type": "string"
              },
              "ref": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "sent",
                  "delivered",
                  "failed",
                  "expired"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Failure reason in our vocabulary: undeliverable, network_failure, expired, kosher_phone, send_window, blocked, invalid_content, no_coverage, rejected, cancelled, temporary_unavailable, internal_error"
              },
              "operator": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "Event_message_delivered": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "message.delivered"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "message_id": {
                "type": "string",
                "format": "uuid"
              },
              "to": {
                "type": "string"
              },
              "ref": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "sent",
                  "delivered",
                  "failed",
                  "expired"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Failure reason in our vocabulary: undeliverable, network_failure, expired, kosher_phone, send_window, blocked, invalid_content, no_coverage, rejected, cancelled, temporary_unavailable, internal_error"
              },
              "operator": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "Event_message_failed": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "message.failed"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "message_id": {
                "type": "string",
                "format": "uuid"
              },
              "to": {
                "type": "string"
              },
              "ref": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "sent",
                  "delivered",
                  "failed",
                  "expired"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Failure reason in our vocabulary: undeliverable, network_failure, expired, kosher_phone, send_window, blocked, invalid_content, no_coverage, rejected, cancelled, temporary_unavailable, internal_error"
              },
              "operator": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "Event_message_expired": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "message.expired"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "message_id": {
                "type": "string",
                "format": "uuid"
              },
              "to": {
                "type": "string"
              },
              "ref": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "sent",
                  "delivered",
                  "failed",
                  "expired"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Failure reason in our vocabulary: undeliverable, network_failure, expired, kosher_phone, send_window, blocked, invalid_content, no_coverage, rejected, cancelled, temporary_unavailable, internal_error"
              },
              "operator": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "Event_inbound_received": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "inbound.received"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "inbound_id": {
                "type": "string",
                "format": "uuid"
              },
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "body": {
                "type": "string"
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "Event_otp_verified": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "otp.verified"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "session_id": {
                "type": "string",
                "format": "uuid"
              },
              "to": {
                "type": "string"
              },
              "app_id": {
                "type": "string"
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "Event_otp_failed": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "otp.failed"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "session_id": {
                "type": "string",
                "format": "uuid"
              },
              "to": {
                "type": "string"
              },
              "app_id": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "Event_wallet_low_balance": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "wallet.low_balance"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "available_credits": {
                "type": "integer"
              },
              "threshold_percent": {
                "type": "integer"
              }
            }
          }
        }
      },
      "Event_wallet_credited": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "wallet.credited"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "order_id": {
                "type": "string",
                "format": "uuid"
              },
              "credits": {
                "type": "integer"
              },
              "amount_ils": {
                "type": "number"
              }
            }
          }
        }
      },
      "Event_blacklist_added": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "blacklist.added"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "phone": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "Event_link_clicked": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "link.clicked"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "properties": {
              "message_id": {
                "type": "string",
                "format": "uuid"
              },
              "link_id": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "clicked_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      }
    }
  },
  "x-error-codes": [
    {
      "code": "validation_error",
      "status": 400
    },
    {
      "code": "unauthorized",
      "status": 401
    },
    {
      "code": "insufficient_credits",
      "status": 402
    },
    {
      "code": "forbidden",
      "status": 403
    },
    {
      "code": "insufficient_scope",
      "status": 403
    },
    {
      "code": "sender_not_verified",
      "status": 403
    },
    {
      "code": "not_found",
      "status": 404
    },
    {
      "code": "idempotency_conflict",
      "status": 409
    },
    {
      "code": "idempotency_key_required",
      "status": 400
    },
    {
      "code": "invalid_destination",
      "status": 422
    },
    {
      "code": "rate_limited",
      "status": 429
    },
    {
      "code": "otp_rate_limited",
      "status": 429
    },
    {
      "code": "org_suspended",
      "status": 403
    },
    {
      "code": "daily_limit_exceeded",
      "status": 429
    },
    {
      "code": "internal_error",
      "status": 500
    },
    {
      "code": "service_unavailable",
      "status": 503
    }
  ]
}