{
  "components": {
    "schemas": {
      "Contact": {
        "properties": {
          "champ_adresse": {
            "nullable": true,
            "type": "string"
          },
          "champ_cp": {
            "nullable": true,
            "type": "string"
          },
          "champ_date": {
            "nullable": true,
            "type": "string"
          },
          "champ_mail": {
            "nullable": true,
            "type": "string"
          },
          "champ_nom": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso1": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso10": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso2": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso3": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso4": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso5": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso6": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso7": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso8": {
            "nullable": true,
            "type": "string"
          },
          "champ_perso9": {
            "nullable": true,
            "type": "string"
          },
          "champ_prenom": {
            "nullable": true,
            "type": "string"
          },
          "champ_ville": {
            "nullable": true,
            "type": "string"
          },
          "contactlist": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactList"
              }
            ],
            "description": "Contact list of the contact. Only in GET /contacts/{id}."
          },
          "country_code": {
            "description": "Country of the number (ISO 3166-1 alpha-2); null if the number is invalid.",
            "example": "FR",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": 6001,
            "type": "integer"
          },
          "rcsCapabilityStatus": {
            "description": "RCS capability of the number: `CAPABILITY_FULL`, `NO_CAPABILITY` or `NO_AGENT` (no RCS agent for its country). null or `LOOKUP_PENDING` until analysed.",
            "example": "CAPABILITY_FULL",
            "nullable": true,
            "type": "string"
          },
          "rcsCapabilityStatusUpdatedAt": {
            "description": "Date of the last change of `rcsCapabilityStatus`; may be null.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "tel": {
            "description": "Phone number, normalized to E.164 when it is valid.",
            "example": "+33639980005",
            "nullable": true,
            "type": "string"
          },
          "tel_valid": {
            "description": "The number is readable and its country known; the line itself is not checked. Contacts with `false` are left out of sends.",
            "example": true,
            "type": "boolean"
          },
          "updatedAt": {
            "description": "Date of the last modification. Only in GET /contacts/{id}.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "tel",
          "country_code",
          "tel_valid",
          "champ_nom",
          "champ_prenom",
          "champ_mail",
          "champ_adresse",
          "champ_cp",
          "champ_ville",
          "champ_date",
          "champ_perso1",
          "champ_perso2",
          "champ_perso3",
          "champ_perso4",
          "champ_perso5",
          "champ_perso6",
          "champ_perso7",
          "champ_perso8",
          "champ_perso9",
          "champ_perso10",
          "rcsCapabilityStatus",
          "rcsCapabilityStatusUpdatedAt"
        ],
        "type": "object"
      },
      "ContactDeleteResult": {
        "properties": {
          "message": {
            "example": "contact removed",
            "type": "string"
          },
          "success": {
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "type": "object"
      },
      "ContactImport": {
        "properties": {
          "contactlist": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactList"
              }
            ],
            "description": "Contact list being imported."
          },
          "duplicates_count": {
            "description": "Number of rows skipped: number already in the list or repeated in the file.",
            "example": 6,
            "type": "integer"
          },
          "error_message": {
            "description": "Diagnostic text in French, not for parsing. Set when the import fails, has rejected rows or imported nothing; null otherwise.",
            "nullable": true,
            "type": "string"
          },
          "failed_rows": {
            "description": "Number of rows not imported: missing or unreadable number.",
            "example": 4,
            "type": "integer"
          },
          "finished_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": 321,
            "type": "integer"
          },
          "imported_rows": {
            "description": "Number of contacts added so far.",
            "example": 990,
            "type": "integer"
          },
          "original_filename": {
            "example": "contacts.csv",
            "nullable": true,
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactImportStatus"
              }
            ],
            "description": "`pending`: not started. `processing`: running. `done`: the whole file was processed (see `failed_rows`, `duplicates_count` and `error_message`). `failed`: interrupted.",
            "example": "processing"
          },
          "total_rows": {
            "description": "Number of rows in the file; null until the file has been read.",
            "example": 1000,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "contactlist",
          "original_filename",
          "total_rows",
          "imported_rows",
          "failed_rows",
          "duplicates_count",
          "status",
          "error_message",
          "started_at",
          "finished_at"
        ],
        "type": "object"
      },
      "ContactImportStart": {
        "properties": {
          "importId": {
            "description": "Identifier of the import (GET /contact-lists/{contactlistId}/imports/{importId}).",
            "example": 321,
            "type": "integer"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactImportStatus"
              }
            ],
            "example": "pending"
          }
        },
        "required": [
          "importId",
          "status"
        ],
        "type": "object"
      },
      "ContactImportStatus": {
        "description": "`pending`: not started. `processing`: running. `done`: the whole file was processed (see `failed_rows`, `duplicates_count` and `error_message`). `failed`: interrupted.",
        "enum": [
          "pending",
          "processing",
          "done",
          "failed"
        ],
        "type": "string"
      },
      "ContactList": {
        "properties": {
          "contacts_count": {
            "description": "Number of contacts.",
            "example": 2,
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "example": 11,
            "type": "integer"
          },
          "name": {
            "example": "Clients fidèles",
            "type": "string"
          },
          "rcsCapabilityDateCheck": {
            "description": "Date of the last RCS analysis; null before.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "rcsCapabilityStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactListRcsCapabilityStatus"
              }
            ],
            "description": "Progress of the RCS analysis of the list. Goes back to `not_checked` when contacts are added.",
            "example": "not_checked"
          },
          "updatedAt": {
            "description": "Date of the last modification. Only in GET /contactlists/{id}.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "contacts_count",
          "rcsCapabilityStatus",
          "rcsCapabilityDateCheck"
        ],
        "type": "object"
      },
      "ContactListDeleteResult": {
        "properties": {
          "message": {
            "example": "contactlist removed",
            "type": "string"
          },
          "success": {
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "type": "object"
      },
      "ContactListRcsCapabilityStatus": {
        "description": "Progress of the RCS analysis of the list. Goes back to `not_checked` when contacts are added.",
        "enum": [
          "not_checked",
          "in_progress",
          "checked"
        ],
        "type": "string"
      },
      "ContactListRequest": {
        "properties": {
          "name": {
            "description": "Name of the list. When the list is created, defaults to `Liste - <date>` if omitted.",
            "example": "Clients fidèles",
            "maxLength": 255,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ContactPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "items",
          "meta"
        ],
        "type": "object"
      },
      "ContactRequest": {
        "properties": {
          "champ_adresse": {
            "example": "1 rue Exemple",
            "type": "string"
          },
          "champ_cp": {
            "example": "75000",
            "type": "string"
          },
          "champ_date": {
            "example": "04/04/1975",
            "type": "string"
          },
          "champ_mail": {
            "example": "claire.martin@example.com",
            "type": "string"
          },
          "champ_nom": {
            "example": "Martin",
            "type": "string"
          },
          "champ_perso1": {
            "example": "perso1",
            "type": "string"
          },
          "champ_perso10": {
            "example": "perso10",
            "type": "string"
          },
          "champ_perso2": {
            "example": "perso2",
            "type": "string"
          },
          "champ_perso3": {
            "example": "perso3",
            "type": "string"
          },
          "champ_perso4": {
            "example": "perso4",
            "type": "string"
          },
          "champ_perso5": {
            "example": "perso5",
            "type": "string"
          },
          "champ_perso6": {
            "example": "perso6",
            "type": "string"
          },
          "champ_perso7": {
            "example": "perso7",
            "type": "string"
          },
          "champ_perso8": {
            "example": "perso8",
            "type": "string"
          },
          "champ_perso9": {
            "example": "perso9",
            "type": "string"
          },
          "champ_prenom": {
            "example": "Claire",
            "type": "string"
          },
          "champ_ville": {
            "example": "Paris",
            "type": "string"
          },
          "tel": {
            "description": "Phone number, French national format (`0612345678`) or international format starting with `+` or `00`; spaces are allowed.",
            "example": "+33639980005",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ContactsCreateResult": {
        "properties": {
          "code": {
            "description": "Present only with a 400 (`success` is false).",
            "enum": [
              "OPERATION_FAILED"
            ],
            "example": "OPERATION_FAILED",
            "type": "string"
          },
          "message": {
            "description": "`contacts added`, or `Import impossible.` with a 400.",
            "example": "contacts added",
            "type": "string"
          },
          "success": {
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "type": "object"
      },
      "CreateContactsRequest": {
        "properties": {
          "contactlist_id": {
            "description": "Identifier of the contact list.",
            "example": 11,
            "type": "integer"
          },
          "contacts": {
            "description": "Contacts to add, 200000 at most. Above that, use POST /contact-lists/{contactlistId}/imports.",
            "items": {
              "$ref": "#/components/schemas/ContactRequest"
            },
            "maxItems": 200000,
            "type": "array"
          }
        },
        "required": [
          "contactlist_id",
          "contacts"
        ],
        "type": "object"
      },
      "CreateStopRequest": {
        "properties": {
          "recipient": {
            "description": "Number to add, in national (`0612345678`) or international E.164 format.",
            "example": "+33639980004",
            "type": "string"
          }
        },
        "required": [
          "recipient"
        ],
        "type": "object"
      },
      "CreateSubAccountRequest": {
        "properties": {
          "credits_mode": {
            "default": "self",
            "description": "Credits mode: `self` (own credits) or `parent` (those of the master account).",
            "enum": [
              "self",
              "parent"
            ],
            "example": "self",
            "type": "string"
          },
          "email": {
            "description": "Email address of the sub-account. Must not be used by another account (otherwise 400).",
            "example": "sous-compte@example.com",
            "type": "string"
          },
          "firstName": {
            "description": "First name. Picked at random if omitted.",
            "example": "Claire",
            "type": "string"
          },
          "lastName": {
            "description": "Last name. Picked at random if omitted.",
            "example": "Martin",
            "type": "string"
          },
          "password": {
            "description": "Password of the sub-account; generated if omitted. 12 to 100 characters, with at least one uppercase letter, one lowercase letter, one digit and one special character, no space. Known compromised passwords are refused.",
            "example": "Exemple-Mdp-2026!",
            "maxLength": 100,
            "minLength": 12,
            "type": "string"
          },
          "phoneNumber": {
            "description": "Phone number, stored as sent, not validated.",
            "example": "+33639980006",
            "type": "string"
          },
          "social_reason": {
            "description": "Company name, free format.",
            "example": "Exemple SAS",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "CreatedSubAccount": {
        "properties": {
          "apikey": {
            "description": "API key of the sub-account, returned only here. If lost, regenerate it from the dashboard of the master account.",
            "example": "EXEMPLE0CLEF0API0FICTIVE0000",
            "type": "string"
          },
          "apikey_created_at": {
            "description": "Date the key was generated; null if unknown.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "appId": {
            "description": "Public identifier of the sub-account, the value of its `X-APP-ID` header.",
            "example": "QmFzZTY0RXhlbXBsZQ",
            "type": "string"
          },
          "credits_mode": {
            "description": "Credits mode: `self` (own credits) or `parent` (those of the master account). `unlimited` cannot be set through the API and behaves like `self`.",
            "enum": [
              "self",
              "parent",
              "unlimited"
            ],
            "example": "self",
            "type": "string"
          },
          "email": {
            "example": "sous-compte@example.com",
            "format": "email",
            "type": "string"
          },
          "first_name": {
            "description": "First name.",
            "example": "Claire",
            "nullable": true,
            "type": "string"
          },
          "has_apikey": {
            "description": "An API key exists for this sub-account.",
            "example": true,
            "type": "boolean"
          },
          "last_name": {
            "description": "Last name.",
            "example": "Martin",
            "nullable": true,
            "type": "string"
          },
          "phone_number": {
            "description": "Phone number, as stored: not validated or reformatted by the API.",
            "example": "+33639980006",
            "nullable": true,
            "type": "string"
          },
          "social_reason": {
            "description": "Company name, free format.",
            "example": "Exemple SAS",
            "nullable": true,
            "type": "string"
          },
          "subaccount_id": {
            "description": "Identifier of the sub-account.",
            "example": 100,
            "type": "integer"
          }
        },
        "required": [
          "subaccount_id",
          "email",
          "social_reason",
          "phone_number",
          "first_name",
          "last_name",
          "credits_mode",
          "appId",
          "has_apikey",
          "apikey_created_at",
          "apikey"
        ],
        "type": "object"
      },
      "Credit": {
        "properties": {
          "credits": {
            "description": "Remaining credits of this message type, rounded to the thousandth. The RCS line is not debited.",
            "example": 100,
            "type": "number"
          },
          "label": {
            "description": "Label of the credit type.",
            "example": "SMS",
            "type": "string"
          },
          "msgType": {
            "description": "Identifier of the message type (1 = SMS, 3 = RCS).",
            "example": 1,
            "type": "integer"
          },
          "price": {
            "description": "Value of the remaining credits in euros excluding tax, rounded to the thousandth.",
            "example": 4.2,
            "type": "number"
          }
        },
        "required": [
          "label",
          "credits",
          "price",
          "msgType"
        ],
        "type": "object"
      },
      "DuplicateExternalIdError": {
        "description": "A send with this `external_id` is already in progress or accepted for the account.",
        "properties": {
          "code": {
            "enum": [
              "DUPLICATE_EXTERNAL_ID"
            ],
            "example": "DUPLICATE_EXTERNAL_ID",
            "type": "string"
          },
          "error": {
            "enum": [
              "External ID already processed"
            ],
            "example": "External ID already processed",
            "type": "string"
          },
          "status": {
            "enum": [
              409
            ],
            "example": 409,
            "type": "integer"
          }
        },
        "required": [
          "status",
          "error",
          "code"
        ],
        "type": "object"
      },
      "DynamicShortUrlOptions": {
        "properties": {
          "mode": {
            "description": "Short link mode. `unique`: one link for all the recipients. `multiple`: one link per message. `dynamic`: one link per message, built from the `url` of each recipient.",
            "enum": [
              "unique",
              "multiple",
              "dynamic"
            ],
            "example": "dynamic",
            "type": "string"
          },
          "url": {
            "description": "URL to shorten, required except in `dynamic` mode (each recipient then gives its own `url`; a recipient without `url` receives no message). A link starting with `http://` or `https://`, or a bare domain (`example.com`), 2083 characters at most; any other scheme is refused (400).",
            "example": "https://example.com/promo",
            "type": "string"
          }
        },
        "required": [
          "mode"
        ],
        "type": "object"
      },
      "HttpError": {
        "description": "Standard error body. `message` is a text, or an array of texts for a validation error (400). `error` is the HTTP label of the status code, absent from some responses.",
        "properties": {
          "code": {
            "description": "Stable error code; see \"Errors\" in the introduction.",
            "example": "INVALID_REQUEST",
            "type": "string"
          },
          "error": {
            "description": "HTTP label of the status code.",
            "example": "Bad Request",
            "type": "string"
          },
          "message": {
            "description": "Description of the error: a text, or an array of texts for a validation error.",
            "example": [
              "recipients must be an array"
            ],
            "oneOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            ]
          },
          "statusCode": {
            "description": "HTTP status code of the response.",
            "example": 400,
            "type": "integer"
          }
        },
        "required": [
          "statusCode",
          "message",
          "code"
        ],
        "type": "object"
      },
      "ImportStopsRequest": {
        "properties": {
          "file": {
            "description": "File in .csv, .xls or .xlsx format; first sheet only, first row = headers. The numbers column has the header `telephone` or a synonym: `téléphone`, `tel`, `phone`, `phonenumber`, `portable`, `port`, `mobile`, `mobilephone`, `cell`, `cellphone` (case and spaces ignored). Rows with a missing or invalid number are skipped.",
            "format": "binary",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "type": "object"
      },
      "InsufficientCreditsError": {
        "description": "Not enough credits (`Not enough credits`) or no valid recipient (`No valid recipient(s)`); nothing is sent or debited. `credits_required` and `credits_remaining` give the credits needed and available, `missing_eur` the amount to top up in euros excluding VAT.",
        "properties": {
          "code": {
            "enum": [
              "INSUFFICIENT_CREDITS",
              "NO_VALID_RECIPIENT"
            ],
            "example": "INSUFFICIENT_CREDITS",
            "type": "string"
          },
          "credits_remaining": {
            "description": "Credits available: the balance the operation is debited from.",
            "example": 1200,
            "type": "number"
          },
          "credits_required": {
            "description": "Credits needed for the operation. For an RCS send: the SMS fallback, plus the RCS messages when they are debited.",
            "example": 1457,
            "type": "number"
          },
          "message": {
            "enum": [
              "Not enough credits",
              "No valid recipient(s)"
            ],
            "example": "Not enough credits",
            "type": "string"
          },
          "missing_eur": {
            "description": "Amount to top up, in euros excluding VAT, for the send to be accepted. Present only for `Not enough credits`, and absent when it cannot be computed.",
            "example": 400,
            "type": "number"
          },
          "statusCode": {
            "enum": [
              403
            ],
            "example": 403,
            "type": "integer"
          }
        },
        "required": [
          "statusCode",
          "message",
          "credits_required",
          "credits_remaining",
          "code"
        ],
        "type": "object"
      },
      "Message": {
        "properties": {
          "basic_count": {
            "description": "RCS recipients billed as Basic. RCS send only.",
            "example": 1,
            "type": "integer"
          },
          "contactlists": {
            "description": "Contact lists targeted by the send; empty for an SMS send. Returned by GET /messages/{id} and PUT /messages/{id}/cancel only.",
            "items": {
              "$ref": "#/components/schemas/ContactList"
            },
            "type": "array"
          },
          "content": {
            "description": "Text of the SMS; for an RCS send, name of its RCS content.",
            "example": "Bonjour, votre commande est prête.",
            "maxLength": 1530,
            "nullable": true,
            "type": "string"
          },
          "credits_rcs": {
            "description": "Number of RCS recipients (1 per recipient), not an amount. Decreases when a recipient falls back to SMS. RCS send only.",
            "example": 1,
            "type": "number"
          },
          "credits_required": {
            "description": "Credits of the send. SMS: the credits debited. RCS: `credits_rcs` plus `credits_sms`.",
            "example": 2,
            "type": "number"
          },
          "credits_sms": {
            "description": "Credits of the SMS fallback, debited from the balance. Increases when an RCS recipient falls back to SMS. RCS send only.",
            "example": 1,
            "type": "number"
          },
          "id": {
            "example": 123456,
            "type": "integer"
          },
          "name": {
            "description": "Name of the send.",
            "example": "Promotion de novembre",
            "nullable": true,
            "type": "string"
          },
          "rcsAgent": {
            "description": "RCS agent of the send; null until one is assigned. Returned by GET /messages/{id} for an RCS send only.",
            "nullable": true,
            "properties": {
              "logoUrl": {
                "example": "https://example.com/logo.png",
                "format": "uri",
                "nullable": true,
                "type": "string"
              },
              "name": {
                "example": "Exemple",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "rcs_config": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsTemplate"
              }
            ],
            "description": "RCS content of the send; null for an SMS. Absent from GET /messages.",
            "nullable": true,
            "type": "object"
          },
          "recipients_count": {
            "description": "Number of recipients.",
            "example": 2,
            "type": "integer"
          },
          "scheduledate": {
            "description": "Date of `scheduletimestamp` in Paris time (`YYYY-MM-DD`).",
            "example": "2026-11-16",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "scheduletime": {
            "description": "Time of `scheduletimestamp` in Paris time (`HH:MM:SS`).",
            "example": "10:10:10",
            "nullable": true,
            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$",
            "type": "string"
          },
          "scheduletimestamp": {
            "description": "Date and time of the send in UTC (ISO 8601): the `scheduleAt` of the request, or the time of the request without `scheduleAt`.",
            "format": "date-time",
            "type": "string"
          },
          "sender": {
            "description": "Sender of the send (for an RCS send, of its SMS fallback); null if none.",
            "example": "EXEMPLE",
            "nullable": true,
            "type": "string"
          },
          "shorturl_mode": {
            "description": "Short link mode; null without a short link.",
            "enum": [
              "unique",
              "multiple",
              "dynamic",
              null
            ],
            "nullable": true,
            "type": "string"
          },
          "shorturl_url": {
            "description": "URL the short link points to; null without a short link.",
            "example": "https://example.com/promo",
            "maxLength": 2083,
            "nullable": true,
            "type": "string"
          },
          "single_count": {
            "description": "RCS recipients billed as Single. RCS send only.",
            "example": 0,
            "type": "integer"
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageState"
              }
            ],
            "description": "State of the send. `scheduled`: waiting for its send time. `sendstarted`: sending. `sendcompleted`: all the messages are dispatched (delivery receipts can still arrive); an RCS send returns to `sendstarted` when an SMS fallback is created. `cancelled`: cancelled. `sendpaused` is not used.",
            "example": "sendcompleted"
          },
          "type": {
            "description": "Channel of the send.",
            "enum": [
              "sms",
              "rcs"
            ],
            "example": "sms",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "scheduletimestamp",
          "scheduledate",
          "scheduletime",
          "content",
          "sender",
          "state",
          "recipients_count",
          "credits_required",
          "shorturl_mode",
          "shorturl_url",
          "type"
        ],
        "type": "object"
      },
      "MessagePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "items",
          "meta"
        ],
        "type": "object"
      },
      "MessageState": {
        "description": "State of the send. `scheduled`: waiting for its send time. `sendstarted`: sending. `sendcompleted`: all the messages are dispatched (delivery receipts can still arrive); an RCS send returns to `sendstarted` when an SMS fallback is created. `cancelled`: cancelled. `sendpaused` is not used.",
        "enum": [
          "scheduled",
          "sendstarted",
          "sendpaused",
          "sendcompleted",
          "cancelled"
        ],
        "type": "string"
      },
      "NotFoundError": {
        "description": "Resource not found, or it belongs to another account (the two cases are not distinguished).",
        "properties": {
          "code": {
            "enum": [
              "NOT_FOUND"
            ],
            "example": "NOT_FOUND",
            "type": "string"
          },
          "message": {
            "$ref": "#/components/schemas/NotFoundErrorDetail"
          }
        },
        "required": [
          "message",
          "code"
        ],
        "type": "object"
      },
      "NotFoundErrorDetail": {
        "properties": {
          "error": {
            "enum": [
              "Not Found"
            ],
            "example": "Not Found",
            "type": "string"
          },
          "statusCode": {
            "enum": [
              404
            ],
            "example": 404,
            "type": "integer"
          }
        },
        "required": [
          "statusCode",
          "error"
        ],
        "type": "object"
      },
      "PaginationMeta": {
        "properties": {
          "currentPage": {
            "description": "Page number (`page`).",
            "example": 1,
            "type": "integer"
          },
          "itemCount": {
            "description": "Number of items on this page.",
            "example": 10,
            "type": "integer"
          },
          "itemsPerPage": {
            "description": "Requested page size (`limit`).",
            "example": 10,
            "type": "integer"
          },
          "totalItems": {
            "description": "Total number of items.",
            "example": 42,
            "type": "integer"
          },
          "totalPages": {
            "description": "Total number of pages.",
            "example": 5,
            "type": "integer"
          }
        },
        "required": [
          "itemCount",
          "totalItems",
          "itemsPerPage",
          "totalPages",
          "currentPage"
        ],
        "type": "object"
      },
      "RcsAgentRoute": {
        "properties": {
          "countryCode": {
            "description": "Country (ISO 3166-1 alpha-2, uppercase).",
            "example": "FR",
            "pattern": "^[A-Z]{2}$",
            "type": "string"
          },
          "rcsAgentId": {
            "description": "Identifier of an RCS agent of the account.",
            "example": 12,
            "type": "integer"
          }
        },
        "required": [
          "countryCode",
          "rcsAgentId"
        ],
        "type": "object"
      },
      "RcsCallChoice": {
        "properties": {
          "phoneNumber": {
            "description": "Number to call (E.164, the `+` is optional), or a variable alone (`#numero#`).",
            "example": "+33639980000",
            "pattern": "^(#[^#\\s]+#|\\+?[1-9]\\d{1,14})$",
            "type": "string"
          },
          "title": {
            "description": "Button label, 25 characters at most, not counting variables (`#prenom#`); once the variables are replaced, a longer label is cut to 24 characters followed by “…”.",
            "maxLength": 255,
            "type": "string"
          },
          "type": {
            "enum": [
              "call"
            ],
            "example": "call",
            "type": "string"
          }
        },
        "required": [
          "title",
          "type",
          "phoneNumber"
        ],
        "type": "object"
      },
      "RcsCard": {
        "properties": {
          "choices": {
            "description": "Buttons of the card.",
            "items": {
              "$ref": "#/components/schemas/RcsChoice"
            },
            "type": "array"
          },
          "description": {
            "example": "Découvrez nos nouveautés.",
            "maxLength": 1530,
            "nullable": true,
            "type": "string"
          },
          "height": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsCardHeight"
              }
            ],
            "description": "Height of the card, always `TALL`.",
            "example": "TALL"
          },
          "id": {
            "example": 41,
            "type": "integer"
          },
          "media_message_url": {
            "description": "Image or video of the card.",
            "example": "https://example.com/image.png",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "position": {
            "description": "Position of the card in the carousel.",
            "example": 0,
            "type": "integer"
          },
          "title": {
            "example": "Nouvelle collection",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "media_message_url",
          "position",
          "height",
          "choices"
        ],
        "type": "object"
      },
      "RcsCardContent": {
        "properties": {
          "choices": {
            "description": "Buttons of the message in display order: suggested replies (`text`) and actions (`url`, `call`, `location`).",
            "example": [
              {
                "postback_data": "rdv_confirm",
                "text": "Oui, je confirme",
                "type": "text"
              },
              {
                "title": "Voir le RDV",
                "type": "url",
                "url": "https://example.com/rdv/123"
              }
            ],
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RcsCallChoice"
                },
                {
                  "$ref": "#/components/schemas/RcsTextChoice"
                },
                {
                  "$ref": "#/components/schemas/RcsUrlChoice"
                },
                {
                  "$ref": "#/components/schemas/RcsLocationChoice"
                }
              ]
            },
            "maxItems": 4,
            "type": "array"
          },
          "description": {
            "maxLength": 1530,
            "type": "string"
          },
          "media_message_url": {
            "description": "URL of the image or video, 255 characters at most. It must end with the file extension (jpeg, jpg, png, gif, mp4, h263, m4v, m4p, mpeg, webm): a query string such as `?v=2` is refused. Variables are replaced.",
            "example": "https://example.com/image.png",
            "maxLength": 255,
            "type": "string"
          },
          "title": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "media_message_url"
        ],
        "type": "object"
      },
      "RcsCardHeight": {
        "description": "Height of the card, always `TALL`.",
        "enum": [
          "SHORT",
          "MEDIUM",
          "TALL",
          "UNSPECIFIED_HEIGHT"
        ],
        "type": "string"
      },
      "RcsCarousel": {
        "properties": {
          "cards": {
            "description": "Cards of the carousel, from 1 to 10.",
            "items": {
              "$ref": "#/components/schemas/RcsCard"
            },
            "type": "array"
          },
          "choices": {
            "description": "Buttons under the carousel.",
            "items": {
              "$ref": "#/components/schemas/RcsChoice"
            },
            "type": "array"
          },
          "id": {
            "example": 51,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "cards",
          "choices"
        ],
        "type": "object"
      },
      "RcsCarouselContent": {
        "properties": {
          "cards": {
            "items": {
              "$ref": "#/components/schemas/RcsCardContent"
            },
            "maxItems": 10,
            "minItems": 1,
            "type": "array"
          },
          "choices": {
            "description": "Buttons of the message in display order: suggested replies (`text`) and actions (`url`, `call`, `location`).",
            "example": [
              {
                "postback_data": "rdv_confirm",
                "text": "Oui, je confirme",
                "type": "text"
              },
              {
                "title": "Voir le RDV",
                "type": "url",
                "url": "https://example.com/rdv/123"
              }
            ],
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RcsCallChoice"
                },
                {
                  "$ref": "#/components/schemas/RcsTextChoice"
                },
                {
                  "$ref": "#/components/schemas/RcsUrlChoice"
                },
                {
                  "$ref": "#/components/schemas/RcsLocationChoice"
                }
              ]
            },
            "maxItems": 3,
            "type": "array"
          }
        },
        "required": [
          "cards"
        ],
        "type": "object"
      },
      "RcsChoice": {
        "properties": {
          "id": {
            "example": 31,
            "type": "integer"
          },
          "label": {
            "description": "Name of the place (`location` type), never shown to the recipient: the label displayed is `title`; null otherwise.",
            "nullable": true,
            "type": "string"
          },
          "latitude": {
            "description": "Latitude (`location` type); null otherwise.",
            "example": "48.8566",
            "nullable": true,
            "type": "string"
          },
          "longitude": {
            "description": "Longitude (`location` type); null otherwise.",
            "example": "2.3522",
            "nullable": true,
            "type": "string"
          },
          "open_mode": {
            "description": "How the link opens (`url` type); null = mode of the message.",
            "enum": [
              "BROWSER",
              "HALF",
              "TALL",
              "FULL",
              null
            ],
            "nullable": true,
            "type": "string"
          },
          "phoneNumber": {
            "description": "Number to call (`call` type); null otherwise.",
            "example": "+33639980000",
            "nullable": true,
            "type": "string"
          },
          "position": {
            "description": "Position of the button.",
            "example": 0,
            "type": "integer"
          },
          "postback_data": {
            "description": "Free value attached to the button (`text` type); null otherwise.",
            "maxLength": 2048,
            "nullable": true,
            "type": "string"
          },
          "text": {
            "description": "Label (`text` type); null otherwise.",
            "example": "Oui",
            "nullable": true,
            "type": "string"
          },
          "title": {
            "description": "Label (`url`, `call` and `location` types); null otherwise.",
            "example": "Voir",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsChoiceType"
              }
            ],
            "example": "text"
          },
          "url": {
            "description": "Link that is opened (`url` type); null otherwise.",
            "example": "https://example.com",
            "maxLength": 2048,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "phoneNumber",
          "text",
          "url",
          "title",
          "label",
          "latitude",
          "longitude",
          "open_mode",
          "postback_data",
          "position"
        ],
        "type": "object"
      },
      "RcsChoiceType": {
        "enum": [
          "call",
          "location",
          "text",
          "url"
        ],
        "type": "string"
      },
      "RcsFallback": {
        "properties": {
          "content": {
            "description": "Text of the SMS, with variables (`#variable#`) and `#URL#` (see `shorturl`). Empty = no fallback. Characters are handled as in the `content` of the SMS sends, in the text and in the values of the variables (names are kept as written); in a template, the text is stored as written.",
            "example": "Hello World",
            "maxLength": 1530,
            "type": "string"
          },
          "sender": {
            "description": "Sender name displayed to the recipient, 11 characters at most. A default sender is used when omitted.",
            "example": "SENDER",
            "maxLength": 11,
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "type": "object"
      },
      "RcsLocationChoice": {
        "properties": {
          "label": {
            "description": "Name of the place, never shown to the recipient: the label displayed is `title`.",
            "maxLength": 255,
            "type": "string"
          },
          "latitude": {
            "description": "Latitude as a number (−90..90), a numeric string (\"48.8566\") or a placeholder (\"#perso1#\").",
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "longitude": {
            "description": "Longitude as a number (−180..180), a numeric string (\"2.3522\") or a placeholder (\"#perso2#\").",
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "title": {
            "description": "Button label, 25 characters at most, not counting variables (`#prenom#`); once the variables are replaced, a longer label is cut to 24 characters followed by “…”.",
            "maxLength": 255,
            "type": "string"
          },
          "type": {
            "enum": [
              "location"
            ],
            "example": "location",
            "type": "string"
          }
        },
        "required": [
          "title",
          "type",
          "latitude",
          "longitude"
        ],
        "type": "object"
      },
      "RcsQuote": {
        "properties": {
          "doublons": {
            "description": "Duplicate recipients removed; with `contactlist`, only the contacts that can receive the RCS message are counted.",
            "example": 0,
            "type": "integer"
          },
          "invalids": {
            "description": "Recipients removed because their number is missing, invalid or has no known country.",
            "example": 0,
            "type": "integer"
          },
          "message": {
            "example": "",
            "type": "string"
          },
          "missing_eur": {
            "description": "Amount to top up, in euros excluding VAT, for the send to be accepted; 0 if the balance is sufficient, absent if it cannot be computed.",
            "example": 0,
            "type": "number"
          },
          "rcs": {
            "$ref": "#/components/schemas/RcsQuoteRcs"
          },
          "recipients_count": {
            "description": "Number of recipients of the send: RCS recipients plus SMS fallback recipients. When 0, the send is refused (403 `No valid recipient(s)`).",
            "example": 13352,
            "type": "integer"
          },
          "sms": {
            "$ref": "#/components/schemas/RcsQuoteSms"
          },
          "stops": {
            "description": "Recipients removed because they are on the STOP list; with `contactlist`, only the contacts that can receive the RCS message are counted.",
            "example": 0,
            "type": "integer"
          },
          "success": {
            "enum": [
              true
            ],
            "example": true,
            "type": "boolean"
          },
          "warnings": {
            "description": "At most one warning, in French: the button labels with a variable, which may be cut once the variables are replaced.",
            "example": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "message",
          "success",
          "sms",
          "rcs",
          "recipients_count",
          "stops",
          "doublons",
          "invalids",
          "warnings"
        ],
        "type": "object"
      },
      "RcsQuoteRcs": {
        "properties": {
          "basic_count": {
            "description": "RCS recipients whose message, once the variables are replaced, is a text of 160 bytes (UTF-8) at most with no button.",
            "example": 12352,
            "type": "integer"
          },
          "by_country": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "RCS recipients by country (ISO 3166-1 alpha-2 code).",
            "example": {
              "DE": 12,
              "FR": 12340
            },
            "type": "object"
          },
          "cost_eur": {
            "description": "Amount debited for the RCS messages, in euros excluding VAT. Absent when the RCS messages are not debited.",
            "example": 1235.2,
            "type": "number"
          },
          "credits_missing": {
            "description": "Credits missing for the whole send (RCS and SMS fallback), 0 if the balance is sufficient.",
            "example": 0,
            "type": "number"
          },
          "credits_remaining": {
            "description": "Credit balance the send is debited from.",
            "example": 20000,
            "type": "number"
          },
          "credits_required": {
            "description": "Credits debited for the RCS messages; 0 when `cost_eur` is absent.",
            "example": 15440,
            "type": "number"
          },
          "rcs_count": {
            "description": "Number of RCS messages (one per recipient).",
            "example": 12352,
            "type": "integer"
          },
          "recipients_count": {
            "description": "Number of RCS recipients.",
            "example": 12352,
            "type": "integer"
          },
          "single_count": {
            "description": "RCS recipients with any other message: a card, a carousel, a text with a button or a longer text.",
            "example": 0,
            "type": "integer"
          },
          "unsold_by_country": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Recipients by country (ISO 3166-1 alpha-2) with an RCS agent but no RCS price: they receive the SMS fallback, if any. Present with `cost_eur`.",
            "example": {
              "BE": 12
            },
            "type": "object"
          }
        },
        "required": [
          "credits_required",
          "credits_remaining",
          "credits_missing",
          "recipients_count",
          "rcs_count",
          "basic_count",
          "single_count",
          "by_country"
        ],
        "type": "object"
      },
      "RcsQuoteSms": {
        "description": "SMS fallback of the quote: the recipients who will receive an SMS instead of the RCS message, that is the recipients of a country with no RCS agent and, with `checkCapability` true, the contacts analyzed as not RCS capable. Zeros without `fallback.content` or such recipient.",
        "properties": {
          "cost_eur": {
            "description": "Amount debited for the SMS fallback, in euros excluding VAT.",
            "example": 96,
            "type": "number"
          },
          "credits_missing": {
            "description": "Credits missing for the SMS fallback alone, 0 if the balance is sufficient. For the whole send, see `rcs.credits_missing`.",
            "example": 0,
            "type": "number"
          },
          "credits_remaining": {
            "description": "Credit balance the send is debited from.",
            "example": 20000,
            "type": "number"
          },
          "credits_required": {
            "description": "Credits debited for the SMS fallback.",
            "example": 1200,
            "type": "number"
          },
          "recipients_count": {
            "example": 1000,
            "type": "integer"
          },
          "sms_count": {
            "example": 1000,
            "type": "integer"
          }
        },
        "required": [
          "credits_required",
          "credits_remaining",
          "credits_missing",
          "recipients_count",
          "sms_count"
        ],
        "type": "object"
      },
      "RcsRecipient": {
        "properties": {
          "country_code": {
            "description": "Country of the number (ISO 3166-1 alpha-2).",
            "example": "FR",
            "nullable": true,
            "type": "string"
          },
          "credits_required": {
            "description": "Count of this RCS recipient (1), not an amount.",
            "example": 1,
            "type": "number"
          },
          "deliver": {
            "description": "Delivery receipt: 1 = delivered, 2 = not delivered; null until a receipt is received.",
            "enum": [
              1,
              2,
              null
            ],
            "example": 1,
            "nullable": true,
            "type": "integer"
          },
          "deliverDate": {
            "description": "Date of the delivery; null before.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "deliverState": {
            "description": "Last RCS delivery status received (for example QUEUED_ON_CHANNEL, DELIVERED, READ, FAILED); null before.",
            "example": "DELIVERED",
            "nullable": true,
            "type": "string"
          },
          "errorcode": {
            "description": "Delivery error code; null if there is no error.",
            "example": "RECIPIENT_NOT_REACHABLE",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": 876543,
            "type": "integer"
          },
          "rcs_classification": {
            "description": "RCS billing category of the recipient; null until it is decided.",
            "enum": [
              "basic",
              "single",
              null
            ],
            "example": "basic",
            "nullable": true,
            "type": "string"
          },
          "readDate": {
            "description": "Date the message was read; null before.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "recipient": {
            "description": "Phone number of the recipient, in international format with a leading `+`.",
            "example": "+33639980002",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "recipient",
          "credits_required",
          "rcs_classification",
          "country_code",
          "deliver",
          "deliverDate",
          "deliverState",
          "readDate",
          "errorcode"
        ],
        "type": "object"
      },
      "RcsRecipientPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RcsRecipient"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "items",
          "meta"
        ],
        "type": "object"
      },
      "RcsSendResult": {
        "properties": {
          "message": {
            "example": "message created",
            "type": "string"
          },
          "message_id": {
            "description": "Identifier of the send (GET /messages/{id}).",
            "example": 123456,
            "type": "integer"
          },
          "rcs": {
            "$ref": "#/components/schemas/RcsSendResultRcs"
          },
          "sms": {
            "$ref": "#/components/schemas/RcsSendResultSms"
          },
          "success": {
            "enum": [
              true
            ],
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message",
          "message_id",
          "sms",
          "rcs"
        ],
        "type": "object"
      },
      "RcsSendResultRcs": {
        "properties": {
          "cost_eur": {
            "description": "Amount debited for the RCS messages, in euros excluding VAT. Absent when the RCS messages are not debited.",
            "example": 1235.2,
            "type": "number"
          },
          "credits_used": {
            "description": "Credits debited for the RCS messages; 0 when `cost_eur` is absent.",
            "example": 15440,
            "type": "number"
          },
          "rcs_count": {
            "description": "Number of RCS messages of the send (one per recipient).",
            "example": 12352,
            "type": "integer"
          }
        },
        "required": [
          "credits_used",
          "rcs_count"
        ],
        "type": "object"
      },
      "RcsSendResultSms": {
        "properties": {
          "cost_eur": {
            "description": "Amount debited for the SMS fallback, in euros excluding VAT.",
            "example": 96,
            "type": "number"
          },
          "credits_used": {
            "description": "Credits debited for the SMS fallback; a fallback decided later is debited when it happens (see `credits_sms` of GET /messages/{id}).",
            "example": 1200,
            "type": "number"
          },
          "sms_count": {
            "description": "Number of SMS of the fallback.",
            "example": 1000,
            "type": "integer"
          }
        },
        "required": [
          "credits_used",
          "sms_count"
        ],
        "type": "object"
      },
      "RcsShortUrl": {
        "properties": {
          "id": {
            "example": 61,
            "type": "integer"
          },
          "shorturl_mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ShortUrlMode"
              }
            ],
            "description": "Mode of the short link. `dynamic` only appears on older sends.",
            "example": "unique"
          },
          "shorturl_url": {
            "description": "URL the short link points to (not the short link itself).",
            "example": "https://example.com/promo",
            "maxLength": 2083,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "shorturl_mode",
          "shorturl_url"
        ],
        "type": "object"
      },
      "RcsTemplate": {
        "properties": {
          "card": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsCard"
              }
            ],
            "description": "Card of a `card` RCS; null otherwise.",
            "nullable": true,
            "type": "object"
          },
          "carousel": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsCarousel"
              }
            ],
            "description": "Carousel of a `carousel` RCS; null otherwise.",
            "nullable": true,
            "type": "object"
          },
          "choices": {
            "description": "Buttons of a `text` RCS; empty for a card or a carousel (their buttons are in `card` and `carousel`). Absent from GET /models/rcs (list), GET /messages/{id}/rcs, PUT /messages/{id}/cancel and the `message` of GET /messages/replies.",
            "items": {
              "$ref": "#/components/schemas/RcsChoice"
            },
            "type": "array"
          },
          "fallback_content": {
            "description": "Text of the SMS fallback; null without a fallback.",
            "maxLength": 1530,
            "nullable": true,
            "type": "string"
          },
          "fallback_sender": {
            "description": "Sender of the SMS fallback; null without a fallback.",
            "example": "EXEMPLE",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": 4321,
            "type": "integer"
          },
          "isModel": {
            "description": "true for an RCS template, false for the content of a send.",
            "example": true,
            "type": "boolean"
          },
          "name": {
            "description": "Name of the RCS template or campaign.",
            "example": "Rendez-vous",
            "nullable": true,
            "type": "string"
          },
          "rcs_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsType"
              }
            ],
            "example": "text"
          },
          "shorturl": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsShortUrl"
              }
            ],
            "description": "Short link of the RCS; null without a short link.",
            "nullable": true,
            "type": "object"
          },
          "text": {
            "description": "Text of a `text` RCS; null otherwise.",
            "example": "Votre rendez-vous est confirmé.",
            "maxLength": 1530,
            "nullable": true,
            "type": "string"
          },
          "webview_mode": {
            "description": "How link buttons open inside the conversation (web view); null = the browser.",
            "enum": [
              "FULL",
              "HALF",
              "TALL",
              null
            ],
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "rcs_type",
          "text",
          "fallback_content",
          "fallback_sender",
          "webview_mode",
          "card",
          "carousel",
          "shorturl",
          "isModel"
        ],
        "type": "object"
      },
      "RcsTemplateDeleteResult": {
        "properties": {
          "success": {
            "enum": [
              true
            ],
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "type": "object"
      },
      "RcsTemplateRequest": {
        "description": "Content of an RCS template. The send options of POST /messages/rcs (`contacts`, `contactlist`, `scheduleAt`, ...) are not part of it.",
        "properties": {
          "checkCapability": {
            "default": false,
            "description": "Used with `contactlist` only (ignored with `contacts` and in templates). If true, the RCS message goes only to the contacts analyzed as RCS capable; the other analyzed contacts get the SMS fallback and the contacts never analyzed get nothing. A list whose analysis is not finished is left out (400 if no list remains): follow it with `rcsCapabilityStatus` of the list. If false, the RCS message goes to all the contacts, and the SMS fallback to those it cannot be delivered to.",
            "example": false,
            "type": "boolean"
          },
          "data": {
            "description": "RCS content for `type`: RcsCardContent (`card`), RcsCarouselContent (`carousel`) or RcsTextContent (`text`). Every `#variable#` (any letter case) is replaced by the property of the same name in the entry of `contacts` (`recipient` included), or by the field of the list contact (`#nom#`, `#prenom#`, `#perso1#`, ...). Replaced in `text`, card `title` and `description`, button labels, links, numbers and coordinates, media URL and `fallback.content`; not in `postback_data` or `name`. A missing value (property absent or null in `contacts`, field with no value in a list contact) leaves the variable in the RCS message, and removes it from `fallback.content` for a list contact; an empty text removes it from both.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RcsCardContent"
              },
              {
                "$ref": "#/components/schemas/RcsCarouselContent"
              },
              {
                "$ref": "#/components/schemas/RcsTextContent"
              }
            ]
          },
          "fallback": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsFallback"
              }
            ],
            "description": "SMS sent instead of the RCS message when the country of the recipient has no RCS agent, when `checkCapability` is true and the contact is not RCS capable, or when the RCS message is not delivered. Without `fallback.content` there is no fallback, and recipients of a country with no RCS agent are left out. It is debited from the SMS balance: at acceptance in the first two cases (a balance that is too low gives a 403); in the third case when the SMS is generated, never refused: if the balance is too low, the SMS is not sent, the RCS message stays undelivered and the webhook event `rcs.fallback_blocked_credits` is sent. In a template, it is only stored."
          },
          "name": {
            "example": "Nom de votre campagne RCS",
            "maxLength": 255,
            "type": "string"
          },
          "shorturl": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ShortUrlOptions"
              }
            ],
            "description": "Short link that replaces the first `#URL#` in the text."
          },
          "type": {
            "description": "Type of RCS message: `text`, `card` or `carousel`.",
            "enum": [
              "card",
              "carousel",
              "text"
            ],
            "example": "card",
            "type": "string"
          },
          "webviewMode": {
            "description": "Opens the link buttons inside the conversation (web view): HALF = half height, TALL = three quarters, FULL = full screen. Omitted = browser of the phone. Default of the buttons without `openMode`; a phone without web view opens the browser.",
            "enum": [
              "FULL",
              "HALF",
              "TALL"
            ],
            "example": "HALF",
            "type": "string"
          }
        },
        "required": [
          "type",
          "data"
        ],
        "type": "object"
      },
      "RcsTextChoice": {
        "properties": {
          "postback_data": {
            "description": "Free value attached to the button, 2048 characters at most, never shown to the recipient. Unique within the message (a duplicate gives a 400); variables are not replaced in it. Returned when the button is tapped, in the `reply.rcs` webhook and in GET /messages/replies.",
            "maxLength": 2048,
            "type": "string"
          },
          "text": {
            "description": "Button label, 25 characters at most, not counting variables (`#prenom#`); once the variables are replaced, a longer label is cut to 24 characters followed by “…”.",
            "maxLength": 255,
            "type": "string"
          },
          "type": {
            "description": "`text`: suggested reply, the recipient sends back the label with one tap.",
            "enum": [
              "text"
            ],
            "example": "text",
            "type": "string"
          }
        },
        "required": [
          "type",
          "text"
        ],
        "type": "object"
      },
      "RcsTextContent": {
        "properties": {
          "choices": {
            "description": "Buttons of the message in display order: suggested replies (`text`) and actions (`url`, `call`, `location`).",
            "example": [
              {
                "postback_data": "rdv_confirm",
                "text": "Oui, je confirme",
                "type": "text"
              },
              {
                "title": "Voir le RDV",
                "type": "url",
                "url": "https://example.com/rdv/123"
              }
            ],
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RcsCallChoice"
                },
                {
                  "$ref": "#/components/schemas/RcsTextChoice"
                },
                {
                  "$ref": "#/components/schemas/RcsUrlChoice"
                },
                {
                  "$ref": "#/components/schemas/RcsLocationChoice"
                }
              ]
            },
            "maxItems": 10,
            "type": "array"
          },
          "text": {
            "example": "Hello World",
            "maxLength": 1530,
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "RcsType": {
        "enum": [
          "card",
          "carousel",
          "text"
        ],
        "type": "string"
      },
      "RcsUrlChoice": {
        "properties": {
          "openMode": {
            "description": "How this link button opens: BROWSER = browser of the phone, HALF = half height, TALL = three quarters, FULL = full screen (web view). Without it, `webviewMode` of the message applies, then the browser; BROWSER overrides `webviewMode`. A phone without web view opens the browser.",
            "enum": [
              "BROWSER",
              "HALF",
              "TALL",
              "FULL"
            ],
            "example": "HALF",
            "type": "string"
          },
          "title": {
            "description": "Button label, 25 characters at most, not counting variables (`#prenom#`); once the variables are replaced, a longer label is cut to 24 characters followed by “…”.",
            "maxLength": 255,
            "type": "string"
          },
          "type": {
            "enum": [
              "url"
            ],
            "example": "url",
            "type": "string"
          },
          "url": {
            "description": "Link opened by the button: starts with `http://` or `https://` and contains a domain extension (such as `.fr`), or a variable alone (`#url#`). Spaces are removed. 2048 characters at most.",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "title",
          "type",
          "url"
        ],
        "type": "object"
      },
      "Reply": {
        "properties": {
          "channel": {
            "description": "Channel of the reply received.",
            "enum": [
              "sms",
              "rcs"
            ],
            "type": "string"
          },
          "choice_label": {
            "description": "Label of the button that was tapped; null for a free text.",
            "nullable": true,
            "type": "string"
          },
          "content": {
            "description": "Text of the reply. A reply containing `stop`, in any case, adds its number to the STOP list (for an RCS button, only the whole word counts).",
            "example": "Oui",
            "type": "string"
          },
          "id": {
            "example": 555,
            "type": "integer"
          },
          "message": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Message"
              }
            ],
            "description": "Send the reply belongs to: for RCS, the send replied to; for SMS, the most recent delivered SMS sent to this number when the reply arrived."
          },
          "postback_data": {
            "description": "Value attached to the button (`postback_data`); null for a free text or an action.",
            "nullable": true,
            "type": "string"
          },
          "receivedAt": {
            "description": "Date of the reply on the channel. RCS replies only: null for an SMS reply.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "recipient": {
            "description": "Phone number of the correspondent, in international format with a leading `+`.",
            "example": "+33639980003",
            "nullable": true,
            "type": "string"
          },
          "reply": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Message"
              }
            ],
            "description": "Automatic reply send; null if none.",
            "nullable": true,
            "type": "object"
          },
          "reply_kind": {
            "description": "`button`: tap on a suggested reply; `action`: tap on an action (link, call, location); `text`: free text.",
            "enum": [
              "button",
              "action",
              "text"
            ],
            "type": "string"
          },
          "timestamp": {
            "description": "Date the reply was recorded.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "timestamp",
          "receivedAt",
          "recipient",
          "content",
          "message",
          "reply",
          "channel",
          "reply_kind",
          "choice_label",
          "postback_data"
        ],
        "type": "object"
      },
      "ReplyExport": {
        "properties": {
          "channel": {
            "enum": [
              "sms",
              "rcs"
            ],
            "type": "string"
          },
          "choice_label": {
            "nullable": true,
            "type": "string"
          },
          "content": {
            "example": "Oui",
            "type": "string"
          },
          "message_id": {
            "example": 123456,
            "type": "integer"
          },
          "postback_data": {
            "description": "Value attached to the button (`postback_data`); null for a free text or an action.",
            "nullable": true,
            "type": "string"
          },
          "recipient": {
            "description": "Phone number of the correspondent, in international format with a leading `+`.",
            "example": "+33639980003",
            "nullable": true,
            "type": "string"
          },
          "reply_kind": {
            "enum": [
              "button",
              "action",
              "text"
            ],
            "type": "string"
          },
          "timestamp": {
            "description": "Date of the reply on the channel if known, otherwise when it was recorded. Format `dd/MM/yyyy HH:mm:ss` (UTC).",
            "example": "03/11/2026 10:00:00",
            "type": "string"
          }
        },
        "required": [
          "timestamp",
          "message_id",
          "recipient",
          "content",
          "channel",
          "reply_kind",
          "choice_label",
          "postback_data"
        ],
        "type": "object"
      },
      "ReplyPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Reply"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "items",
          "meta"
        ],
        "type": "object"
      },
      "SendDynamicSmsRequest": {
        "properties": {
          "content": {
            "description": "Text of the SMS, 1530 characters at most, sent in the SMS alphabet: 160 characters for 1 SMS, 153 per SMS beyond. Accented letters outside the alphabet are replaced by the plain letter; emojis and other characters with no equivalent are removed. The first `#URL#` is replaced by the short link, counted as 13 characters.",
            "example": "Hello World",
            "maxLength": 1530,
            "type": "string"
          },
          "external_id": {
            "description": "Unique identifier of the send for the account, 255 characters at most. A second send with the same identifier is refused (409).",
            "example": "123456789-client",
            "maxLength": 255,
            "type": "string"
          },
          "recipients": {
            "description": "Recipient objects: `recipient` (required) is the phone number, every other property is a `#property#` variable in `content`.",
            "example": [
              {
                "prenom": "Claire",
                "recipient": "+33639980001"
              },
              {
                "prenom": "Paul",
                "recipient": "+33639980002"
              }
            ],
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "properties": {
                "recipient": {
                  "description": "Recipient number, in national (`0612345678`) or international E.164 format.",
                  "example": "+33639980001",
                  "type": "string"
                }
              },
              "required": [
                "recipient"
              ],
              "type": "object"
            },
            "maxItems": 150000,
            "minItems": 1,
            "type": "array"
          },
          "scheduleAt": {
            "description": "Send date in UTC, ISO 8601 format with `Z` (`2025-01-01T10:00:00Z`). Without a date, the send is immediate.",
            "format": "date-time",
            "type": "string"
          },
          "sender": {
            "description": "Sender name, 11 characters at most; defaults to the sender of the account.",
            "example": "SENDER",
            "maxLength": 11,
            "type": "string"
          },
          "shorturl": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DynamicShortUrlOptions"
              }
            ],
            "description": "Short link that replaces the first `#URL#` in the text."
          }
        },
        "required": [
          "content",
          "recipients"
        ],
        "type": "object"
      },
      "SendRcsRequest": {
        "description": "Recipients: exactly one of `contacts` (inline list) and `contactlist` (contact lists); both together give a 400.",
        "properties": {
          "checkCapability": {
            "default": false,
            "description": "Used with `contactlist` only (ignored with `contacts` and in templates). If true, the RCS message goes only to the contacts analyzed as RCS capable; the other analyzed contacts get the SMS fallback and the contacts never analyzed get nothing. A list whose analysis is not finished is left out (400 if no list remains): follow it with `rcsCapabilityStatus` of the list. If false, the RCS message goes to all the contacts, and the SMS fallback to those it cannot be delivered to.",
            "example": false,
            "type": "boolean"
          },
          "contactlist": {
            "description": "Identifiers of the contact lists. Exclusive with `contacts`.",
            "example": [
              1,
              2
            ],
            "items": {
              "type": "integer"
            },
            "minItems": 1,
            "type": "array"
          },
          "contacts": {
            "description": "Recipient objects: `recipient` (required) is the phone number, every other property is a `#property#` variable. Exclusive with `contactlist`. An entry without a valid `recipient` is ignored.",
            "example": [
              {
                "prenom": "Claire",
                "recipient": "+33639980001"
              },
              {
                "prenom": "Paul",
                "recipient": "+33639980002"
              }
            ],
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "properties": {
                "recipient": {
                  "description": "Recipient number, in national (`0612345678`) or international E.164 format.",
                  "example": "+33639980001",
                  "type": "string"
                }
              },
              "required": [
                "recipient"
              ],
              "type": "object"
            },
            "maxItems": 150000,
            "minItems": 1,
            "type": "array"
          },
          "data": {
            "description": "RCS content for `type`: RcsCardContent (`card`), RcsCarouselContent (`carousel`) or RcsTextContent (`text`). Every `#variable#` (any letter case) is replaced by the property of the same name in the entry of `contacts` (`recipient` included), or by the field of the list contact (`#nom#`, `#prenom#`, `#perso1#`, ...). Replaced in `text`, card `title` and `description`, button labels, links, numbers and coordinates, media URL and `fallback.content`; not in `postback_data` or `name`. A missing value (property absent or null in `contacts`, field with no value in a list contact) leaves the variable in the RCS message, and removes it from `fallback.content` for a list contact; an empty text removes it from both.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RcsCardContent"
              },
              {
                "$ref": "#/components/schemas/RcsCarouselContent"
              },
              {
                "$ref": "#/components/schemas/RcsTextContent"
              }
            ]
          },
          "external_id": {
            "description": "Unique identifier of the send for the account, 255 characters at most. A second send with the same identifier is refused (409).",
            "example": "123456789-client",
            "maxLength": 255,
            "type": "string"
          },
          "fallback": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RcsFallback"
              }
            ],
            "description": "SMS sent instead of the RCS message when the country of the recipient has no RCS agent, when `checkCapability` is true and the contact is not RCS capable, or when the RCS message is not delivered. Without `fallback.content` there is no fallback, and recipients of a country with no RCS agent are left out. It is debited from the SMS balance: at acceptance in the first two cases (a balance that is too low gives a 403); in the third case when the SMS is generated, never refused: if the balance is too low, the SMS is not sent, the RCS message stays undelivered and the webhook event `rcs.fallback_blocked_credits` is sent. In a template, it is only stored."
          },
          "name": {
            "example": "Nom de votre campagne RCS",
            "maxLength": 255,
            "type": "string"
          },
          "rcsAgentRoutes": {
            "description": "Agent to use per country (partial). Without it, the agent is chosen from the routes of the account. A country listed twice, or an agent with no route for its country, gives a 400.",
            "items": {
              "$ref": "#/components/schemas/RcsAgentRoute"
            },
            "type": "array"
          },
          "scheduleAt": {
            "description": "Send date in UTC, ISO 8601 format with `Z` (`2025-01-01T10:00:00Z`). Without a date, the send is immediate.",
            "format": "date-time",
            "type": "string"
          },
          "shorturl": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ShortUrlOptions"
              }
            ],
            "description": "Short link that replaces the first `#URL#` in the text."
          },
          "type": {
            "description": "Type of RCS message: `text`, `card` or `carousel`.",
            "enum": [
              "card",
              "carousel",
              "text"
            ],
            "example": "card",
            "type": "string"
          },
          "webviewMode": {
            "description": "Opens the link buttons inside the conversation (web view): HALF = half height, TALL = three quarters, FULL = full screen. Omitted = browser of the phone. Default of the buttons without `openMode`; a phone without web view opens the browser.",
            "enum": [
              "FULL",
              "HALF",
              "TALL"
            ],
            "example": "HALF",
            "type": "string"
          }
        },
        "required": [
          "type",
          "data"
        ],
        "type": "object"
      },
      "SendSmsFromFileRequest": {
        "properties": {
          "content": {
            "description": "Text of the SMS, 1530 characters at most, sent in the SMS alphabet: 160 characters for 1 SMS, 153 per SMS beyond. Accented letters outside the alphabet are replaced by the plain letter; emojis and other characters with no equivalent are removed. The first `#URL#` is replaced by the short link, counted as 13 characters.",
            "example": "Hello World",
            "maxLength": 1530,
            "type": "string"
          },
          "external_id": {
            "description": "Unique identifier of the send for the account, 255 characters at most. A second send with the same identifier is refused (409).",
            "example": "123456789-client",
            "maxLength": 255,
            "type": "string"
          },
          "file": {
            "description": "File in .csv, .xls or .xlsx format; only the first sheet is read. The numbers column has one of these headers: `telephone`, `téléphone`, `tel`, `phone`, `phonenumber`, `portable`, `port`, `mobile`, `mobilephone`, `cell` or `cellphone` (case and spaces ignored).",
            "format": "binary",
            "type": "string"
          },
          "scheduleAt": {
            "description": "Send date in UTC, ISO 8601 format with `Z` (`2025-01-01T10:00:00Z`). Without a date, the send is immediate.",
            "format": "date-time",
            "type": "string"
          },
          "sender": {
            "description": "Sender name, 11 characters at most; defaults to the sender of the account.",
            "example": "SENDER",
            "maxLength": 11,
            "type": "string"
          },
          "shorturl": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ShortUrlOptions"
              }
            ],
            "description": "Short link that replaces the first `#URL#` in the text."
          }
        },
        "required": [
          "content",
          "file"
        ],
        "type": "object"
      },
      "SendSmsRequest": {
        "properties": {
          "content": {
            "description": "Text of the SMS, 1530 characters at most, sent in the SMS alphabet: 160 characters for 1 SMS, 153 per SMS beyond. Accented letters outside the alphabet are replaced by the plain letter; emojis and other characters with no equivalent are removed. The first `#URL#` is replaced by the short link, counted as 13 characters.",
            "example": "Hello World",
            "maxLength": 1530,
            "type": "string"
          },
          "external_id": {
            "description": "Unique identifier of the send for the account, 255 characters at most. A second send with the same identifier is refused (409).",
            "example": "123456789-client",
            "maxLength": 255,
            "type": "string"
          },
          "recipients": {
            "description": "Recipient numbers, in national (`0612345678`) or international E.164 format.",
            "example": [
              "+33639980001",
              "+33639980002"
            ],
            "items": {
              "type": "string"
            },
            "maxItems": 150000,
            "type": "array"
          },
          "scheduleAt": {
            "description": "Send date in UTC, ISO 8601 format with `Z` (`2025-01-01T10:00:00Z`). Without a date, the send is immediate.",
            "format": "date-time",
            "type": "string"
          },
          "sender": {
            "description": "Sender name, 11 characters at most; defaults to the sender of the account.",
            "example": "SENDER",
            "maxLength": 11,
            "type": "string"
          },
          "shorturl": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ShortUrlOptions"
              }
            ],
            "description": "Short link that replaces the first `#URL#` in the text."
          }
        },
        "required": [
          "content",
          "recipients"
        ],
        "type": "object"
      },
      "SendSmsToContactListRequest": {
        "properties": {
          "contactlist": {
            "description": "IDs of the contact lists.",
            "example": [
              1,
              2
            ],
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "content": {
            "description": "Text of the SMS, 1530 characters at most, sent in the SMS alphabet: 160 characters for 1 SMS, 153 per SMS beyond. Accented letters outside the alphabet are replaced by the plain letter; emojis and other characters with no equivalent are removed. The first `#URL#` is replaced by the short link, counted as 13 characters.",
            "example": "Hello World",
            "maxLength": 1530,
            "type": "string"
          },
          "external_id": {
            "description": "Unique identifier of the send for the account, 255 characters at most. A second send with the same identifier is refused (409).",
            "example": "123456789-client",
            "maxLength": 255,
            "type": "string"
          },
          "scheduleAt": {
            "description": "Send date in UTC, ISO 8601 format with `Z` (`2025-01-01T10:00:00Z`). Without a date, the send is immediate.",
            "format": "date-time",
            "type": "string"
          },
          "sender": {
            "description": "Sender name, 11 characters at most; defaults to the sender of the account.",
            "example": "SENDER",
            "maxLength": 11,
            "type": "string"
          },
          "shorturl": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ShortUrlOptions"
              }
            ],
            "description": "Short link that replaces the first `#URL#` in the text."
          }
        },
        "required": [
          "content",
          "contactlist"
        ],
        "type": "object"
      },
      "SendUnavailableError": {
        "description": "Sending is temporarily unavailable: the request was not processed. Send it again after the delay given by `Retry-After`.",
        "properties": {
          "code": {
            "enum": [
              "SEND_UNAVAILABLE"
            ],
            "example": "SEND_UNAVAILABLE",
            "type": "string"
          },
          "message": {
            "example": "envoi indisponible, réessayez",
            "type": "string"
          },
          "success": {
            "enum": [
              false
            ],
            "example": false,
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message",
          "code"
        ],
        "type": "object"
      },
      "ShortUrlMode": {
        "description": "Mode of the short link. `dynamic` only appears on older sends.",
        "enum": [
          "unique",
          "multiple",
          "dynamic"
        ],
        "type": "string"
      },
      "ShortUrlOptions": {
        "properties": {
          "mode": {
            "description": "Short link mode. `unique`: one link for all the recipients. `multiple`: one link per message.",
            "enum": [
              "unique",
              "multiple"
            ],
            "example": "multiple",
            "type": "string"
          },
          "url": {
            "description": "URL to shorten: a link starting with `http://` or `https://`, or a bare domain (`example.com`), 2083 characters at most; any other scheme is refused (400).",
            "example": "https://example.com/promo",
            "type": "string"
          }
        },
        "required": [
          "mode",
          "url"
        ],
        "type": "object"
      },
      "SmsQuote": {
        "properties": {
          "cost_eur": {
            "description": "Amount debited for the send, in euros excluding VAT.",
            "example": 0.14,
            "type": "number"
          },
          "credits_missing": {
            "description": "`credits_required` minus `credits_remaining`, 0 if the balance is sufficient.",
            "example": 0,
            "type": "number"
          },
          "credits_remaining": {
            "description": "Credit balance the send would be debited from.",
            "example": 1200,
            "type": "number"
          },
          "credits_required": {
            "description": "Credits the send costs: for each recipient, the number of SMS multiplied by the credits one SMS costs in the destination country.",
            "example": 2,
            "type": "number"
          },
          "doublons": {
            "description": "Recipients removed because their number appears more than once.",
            "example": 0,
            "type": "integer"
          },
          "invalids": {
            "description": "Recipients removed because their number is missing, invalid or has no known country.",
            "example": 0,
            "type": "integer"
          },
          "message": {
            "example": "",
            "type": "string"
          },
          "missing_eur": {
            "description": "Amount to top up, in euros excluding VAT, for the send to be accepted; 0 if the balance is sufficient, absent if it cannot be computed.",
            "example": 0,
            "type": "number"
          },
          "recipients_count": {
            "description": "Recipients the message would be sent to, after removing duplicates, numbers on the STOP list and recipients that cannot be sent to (unreadable number, country with no price, invalid contact number, dynamic entry without `recipient`). When 0, the send is refused (403 `No valid recipient(s)`).",
            "example": 2,
            "type": "integer"
          },
          "sms_count": {
            "description": "Total number of SMS (segments) for all the recipients.",
            "example": 2,
            "type": "integer"
          },
          "stops": {
            "description": "Recipients removed because their number is on the STOP list.",
            "example": 0,
            "type": "integer"
          },
          "success": {
            "enum": [
              true
            ],
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "message",
          "success",
          "credits_required",
          "credits_remaining",
          "credits_missing",
          "recipients_count",
          "stops",
          "doublons",
          "invalids",
          "sms_count"
        ],
        "type": "object"
      },
      "SmsRecipient": {
        "properties": {
          "content": {
            "description": "Text sent to this recipient.",
            "example": "Bonjour Claire, votre commande est prête.",
            "maxLength": 1530,
            "type": "string"
          },
          "country_code": {
            "description": "Country of the number (ISO 3166-1 alpha-2).",
            "example": "FR",
            "nullable": true,
            "type": "string"
          },
          "credits_required": {
            "description": "Credits of this recipient: the number of SMS multiplied by the credits one SMS costs in the destination country (the unit of the lot of credits bought, not a number of messages).",
            "example": 1,
            "type": "number"
          },
          "deliver": {
            "description": "Delivery receipt: 1 = delivered, 2 = not delivered; null until a receipt is received.",
            "enum": [
              1,
              2,
              null
            ],
            "example": 1,
            "nullable": true,
            "type": "integer"
          },
          "deliverdate": {
            "description": "Date of the last delivery receipt, in Paris time (also set for `SUBMIT_KO`); null before the first one.",
            "example": "2026-11-16",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "delivertime": {
            "description": "Time of the last delivery receipt (`HH:MM:SS`), in Paris time (also set for `SUBMIT_KO`); null before the first one.",
            "example": "10:10:10",
            "nullable": true,
            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$",
            "type": "string"
          },
          "errorcode": {
            "description": "Delivery error code; null if none. `UNDELIV`, `REJECTD`, `EXPIRED`, `DELETED`: failure reported by the operator network; `SUBMIT_KO`: not handed over to the operator.",
            "example": "UNDELIV",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": 987654,
            "type": "integer"
          },
          "recipient": {
            "description": "Phone number of the recipient, in international format with a leading `+`.",
            "example": "+33639980001",
            "nullable": true,
            "type": "string"
          },
          "sms_count": {
            "description": "Number of SMS (segments).",
            "example": 1,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "content",
          "recipient",
          "credits_required",
          "sms_count",
          "country_code",
          "deliver",
          "deliverdate",
          "delivertime",
          "errorcode"
        ],
        "type": "object"
      },
      "SmsRecipientPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SmsRecipient"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "items",
          "meta"
        ],
        "type": "object"
      },
      "SmsSendResult": {
        "properties": {
          "credits_used": {
            "description": "Credits debited for the send.",
            "example": 1,
            "type": "number"
          },
          "message": {
            "example": "message created",
            "type": "string"
          },
          "message_id": {
            "description": "Identifier of the send (GET /messages/{id}).",
            "example": 123456,
            "type": "integer"
          },
          "sms_count": {
            "description": "Number of SMS (segments) of the send.",
            "example": 1,
            "type": "integer"
          },
          "success": {
            "enum": [
              true
            ],
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message",
          "message_id",
          "credits_used",
          "sms_count"
        ],
        "type": "object"
      },
      "Stop": {
        "properties": {
          "id": {
            "example": 777,
            "type": "integer"
          },
          "recipient": {
            "description": "Phone number on the STOP list, in international format with a leading `+`.",
            "example": "+33639980004",
            "nullable": true,
            "type": "string"
          },
          "timestamp": {
            "description": "Date the number was added to the STOP list.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "timestamp",
          "recipient"
        ],
        "type": "object"
      },
      "StopImportResult": {
        "properties": {
          "code": {
            "description": "Present only with a 400 (`success` is false).",
            "enum": [
              "OPERATION_FAILED"
            ],
            "example": "OPERATION_FAILED",
            "type": "string"
          },
          "message": {
            "description": "`stops added`, or `Bad Request` if `success` is false.",
            "example": "stops added",
            "type": "string"
          },
          "stop_added": {
            "description": "Number of STOPs saved.",
            "example": 12,
            "type": "integer"
          },
          "success": {
            "description": "false if a STOP could not be saved.",
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message",
          "stop_added"
        ],
        "type": "object"
      },
      "StopPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Stop"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "items",
          "meta"
        ],
        "type": "object"
      },
      "SubAccount": {
        "properties": {
          "credits_mode": {
            "description": "Credits mode: `self` (own credits) or `parent` (those of the master account). `unlimited` cannot be set through the API and behaves like `self`.",
            "enum": [
              "self",
              "parent",
              "unlimited"
            ],
            "example": "self",
            "type": "string"
          },
          "email": {
            "example": "sous-compte@example.com",
            "format": "email",
            "type": "string"
          },
          "first_name": {
            "description": "First name.",
            "example": "Claire",
            "nullable": true,
            "type": "string"
          },
          "last_name": {
            "description": "Last name.",
            "example": "Martin",
            "nullable": true,
            "type": "string"
          },
          "phone_number": {
            "description": "Phone number, as stored: not validated or reformatted by the API.",
            "example": "+33639980006",
            "nullable": true,
            "type": "string"
          },
          "social_reason": {
            "description": "Company name, free format.",
            "example": "Exemple SAS",
            "nullable": true,
            "type": "string"
          },
          "subaccount_id": {
            "description": "Identifier of the sub-account.",
            "example": 100,
            "type": "integer"
          }
        },
        "required": [
          "subaccount_id",
          "email",
          "social_reason",
          "phone_number",
          "first_name",
          "last_name",
          "credits_mode"
        ],
        "type": "object"
      },
      "SubAccountCreditsModeRequest": {
        "properties": {
          "value": {
            "description": "Target mode: `self` or `parent`.",
            "enum": [
              "self",
              "parent"
            ],
            "example": "self",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "SubAccountCreditsRefusal": {
        "properties": {
          "code": {
            "enum": [
              "SUBACCOUNT_PARENT_MODE"
            ],
            "example": "SUBACCOUNT_PARENT_MODE",
            "type": "string"
          },
          "message": {
            "description": "Reason for the refusal: the sub-account must be in `self` mode.",
            "example": "can't add credits, switch account to credits 'self' mode before...",
            "type": "string"
          },
          "success": {
            "enum": [
              false
            ],
            "example": false,
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message",
          "code"
        ],
        "type": "object"
      },
      "SubAccountCreditsRequest": {
        "properties": {
          "quantity": {
            "description": "Number of credits to transfer.",
            "example": 100,
            "maximum": 10000000,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "quantity"
        ],
        "type": "object"
      },
      "SubAccountDetail": {
        "properties": {
          "apikey_created_at": {
            "description": "Date the key was generated; null if unknown.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "appId": {
            "description": "Public identifier of the sub-account, the value of its `X-APP-ID` header.",
            "example": "QmFzZTY0RXhlbXBsZQ",
            "type": "string"
          },
          "credits_mode": {
            "description": "Credits mode: `self` (own credits) or `parent` (those of the master account). `unlimited` cannot be set through the API and behaves like `self`.",
            "enum": [
              "self",
              "parent",
              "unlimited"
            ],
            "example": "self",
            "type": "string"
          },
          "email": {
            "example": "sous-compte@example.com",
            "format": "email",
            "type": "string"
          },
          "first_name": {
            "description": "First name.",
            "example": "Claire",
            "nullable": true,
            "type": "string"
          },
          "has_apikey": {
            "description": "An API key exists for this sub-account.",
            "example": true,
            "type": "boolean"
          },
          "last_name": {
            "description": "Last name.",
            "example": "Martin",
            "nullable": true,
            "type": "string"
          },
          "phone_number": {
            "description": "Phone number, as stored: not validated or reformatted by the API.",
            "example": "+33639980006",
            "nullable": true,
            "type": "string"
          },
          "social_reason": {
            "description": "Company name, free format.",
            "example": "Exemple SAS",
            "nullable": true,
            "type": "string"
          },
          "subaccount_id": {
            "description": "Identifier of the sub-account.",
            "example": 100,
            "type": "integer"
          }
        },
        "required": [
          "subaccount_id",
          "email",
          "social_reason",
          "phone_number",
          "first_name",
          "last_name",
          "credits_mode",
          "appId",
          "has_apikey",
          "apikey_created_at"
        ],
        "type": "object"
      },
      "SubAccountListItem": {
        "properties": {
          "credits_mode": {
            "description": "Credits mode: `self` (own credits) or `parent` (those of the master account). `unlimited` cannot be set through the API and behaves like `self`.",
            "enum": [
              "self",
              "parent",
              "unlimited"
            ],
            "example": "self",
            "type": "string"
          },
          "email": {
            "example": "sous-compte@example.com",
            "format": "email",
            "type": "string"
          },
          "first_name": {
            "description": "First name.",
            "example": "Claire",
            "nullable": true,
            "type": "string"
          },
          "last_name": {
            "description": "Last name.",
            "example": "Martin",
            "nullable": true,
            "type": "string"
          },
          "phone_number": {
            "description": "Phone number, as stored: not validated or reformatted by the API.",
            "example": "+33639980006",
            "nullable": true,
            "type": "string"
          },
          "social_reason": {
            "description": "Company name, free format.",
            "example": "Exemple SAS",
            "nullable": true,
            "type": "string"
          },
          "subaccount_id": {
            "description": "Identifier of the sub-account.",
            "example": 100,
            "type": "integer"
          },
          "two_factor": {
            "$ref": "#/components/schemas/SubAccountTwoFactor"
          }
        },
        "required": [
          "subaccount_id",
          "email",
          "social_reason",
          "phone_number",
          "first_name",
          "last_name",
          "credits_mode",
          "two_factor"
        ],
        "type": "object"
      },
      "SubAccountPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SubAccountListItem"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "items",
          "meta"
        ],
        "type": "object"
      },
      "SubAccountTwoFactor": {
        "description": "Two-factor authentication state of the sub-account.",
        "properties": {
          "enabled": {
            "description": "Two-factor authentication is enabled.",
            "example": false,
            "type": "boolean"
          },
          "enabled_at": {
            "description": "Activation date, or null.",
            "example": null,
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "method": {
            "description": "Active method, or null.",
            "enum": [
              "totp",
              "email",
              null
            ],
            "example": null,
            "nullable": true,
            "type": "string"
          },
          "required": {
            "description": "Two-factor authentication is required (by the master account or by the sub-account).",
            "example": false,
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "method",
          "enabled_at",
          "required"
        ],
        "type": "object"
      },
      "Template": {
        "properties": {
          "content": {
            "example": "Bonjour, votre panier vous attend.",
            "maxLength": 1530,
            "type": "string"
          },
          "createdAt": {
            "description": "Date of creation.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "example": 98,
            "type": "integer"
          },
          "name": {
            "example": "Relance panier",
            "type": "string"
          },
          "sender": {
            "example": "EXEMPLE",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "content",
          "sender",
          "createdAt"
        ],
        "type": "object"
      },
      "TemplateDeleteResult": {
        "description": "Result of the deletion of an SMS template; only `affected` is meaningful.",
        "properties": {
          "affected": {
            "description": "Number of templates deleted: always 1.",
            "example": 1,
            "type": "integer"
          },
          "generatedMaps": {
            "description": "Not used.",
            "example": [],
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "raw": {
            "additionalProperties": true,
            "description": "Not used.",
            "example": {},
            "type": "object"
          }
        },
        "required": [
          "generatedMaps",
          "raw",
          "affected"
        ],
        "type": "object"
      },
      "TemplateRequest": {
        "properties": {
          "content": {
            "description": "Text of the message, with the same character rules as an SMS.",
            "example": "Ceci est mon premier modèle",
            "maxLength": 1530,
            "type": "string"
          },
          "name": {
            "description": "Name of the template.",
            "example": "Mon Modèle",
            "maxLength": 255,
            "type": "string"
          },
          "sender": {
            "description": "Sender of the template. If omitted on an update, the current value is kept.",
            "example": "EXEMPLE",
            "maxLength": 255,
            "type": "string"
          }
        },
        "required": [
          "name",
          "content"
        ],
        "type": "object"
      },
      "TransferInsufficientCreditsError": {
        "description": "Not enough credits: the balance does not cover `credits_required`. Nothing is transferred.",
        "properties": {
          "code": {
            "enum": [
              "INSUFFICIENT_CREDITS"
            ],
            "example": "INSUFFICIENT_CREDITS",
            "type": "string"
          },
          "credits_remaining": {
            "description": "Available balance of the account that gives the credits.",
            "example": 40,
            "type": "number"
          },
          "credits_required": {
            "description": "Credits to transfer (`quantity`).",
            "example": 100,
            "type": "number"
          },
          "message": {
            "enum": [
              "Not enough credits"
            ],
            "example": "Not enough credits",
            "type": "string"
          },
          "statusCode": {
            "enum": [
              403
            ],
            "example": 403,
            "type": "integer"
          }
        },
        "required": [
          "statusCode",
          "message",
          "credits_required",
          "credits_remaining",
          "code"
        ],
        "type": "object"
      },
      "UpdateWebhooksRequest": {
        "properties": {
          "webhooks": {
            "description": "Full configuration. A type with a URL is created or updated; a type with an empty URL, or missing from the array, is deleted.",
            "items": {
              "$ref": "#/components/schemas/WebhookSetting"
            },
            "type": "array"
          }
        },
        "required": [
          "webhooks"
        ],
        "type": "object"
      },
      "Webhook": {
        "properties": {
          "request_method": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookRequestMethod"
              }
            ],
            "description": "HTTP method used to call the URL. A signed webhook always uses `post`.",
            "example": "post"
          },
          "signed": {
            "description": "Signed webhook (HMAC signature and v2 payload).",
            "example": true,
            "type": "boolean"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookType"
              }
            ],
            "description": "Notification type: `reply` (replies to SMS and RCS), `ack_sms` (SMS submission and delivery reports), `ack_rcs` (RCS statuses and SMS fallbacks; signed only).",
            "example": "ack_sms"
          },
          "webhook": {
            "description": "URL called for each notification of this type.",
            "example": "https://example.com/webhooks/conexteo",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "type",
          "request_method",
          "webhook",
          "signed"
        ],
        "type": "object"
      },
      "WebhookAckRcsNotification": {
        "description": "Signed notification of the `ack_rcs` webhook type; `event` gives its content.",
        "discriminator": {
          "mapping": {
            "rcs.delivered": "#/components/schemas/WebhookRcsDeliveredNotification",
            "rcs.failed": "#/components/schemas/WebhookRcsFailedNotification",
            "rcs.fallback_blocked_credits": "#/components/schemas/WebhookRcsFallbackBlockedCreditsNotification",
            "rcs.fallback_sms": "#/components/schemas/WebhookRcsFallbackSmsNotification",
            "rcs.read": "#/components/schemas/WebhookRcsReadNotification"
          },
          "propertyName": "event"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/WebhookRcsDeliveredNotification"
          },
          {
            "$ref": "#/components/schemas/WebhookRcsReadNotification"
          },
          {
            "$ref": "#/components/schemas/WebhookRcsFailedNotification"
          },
          {
            "$ref": "#/components/schemas/WebhookRcsFallbackSmsNotification"
          },
          {
            "$ref": "#/components/schemas/WebhookRcsFallbackBlockedCreditsNotification"
          }
        ]
      },
      "WebhookAckSmsNotification": {
        "description": "Signed notification of the `ack_sms` webhook type; `event` gives its content.",
        "discriminator": {
          "mapping": {
            "sms.deliver_report": "#/components/schemas/WebhookSmsDeliverReportNotification",
            "sms.submit_ko": "#/components/schemas/WebhookSmsSubmitKoNotification"
          },
          "propertyName": "event"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/WebhookSmsSubmitKoNotification"
          },
          {
            "$ref": "#/components/schemas/WebhookSmsDeliverReportNotification"
          }
        ]
      },
      "WebhookConfig": {
        "properties": {
          "secret": {
            "description": "Signing secret, returned only when generated (first signed webhook). Read it later in the dashboard, or replace it with POST /webhooks/secret. The HMAC key is the whole string, `whsec_` prefix included.",
            "example": "whsec_EXEMPLE_FICTIF",
            "type": "string"
          },
          "webhooks": {
            "items": {
              "$ref": "#/components/schemas/Webhook"
            },
            "type": "array"
          }
        },
        "required": [
          "webhooks"
        ],
        "type": "object"
      },
      "WebhookDelivery": {
        "properties": {
          "attempts": {
            "description": "Number of attempts made.",
            "example": 2,
            "type": "integer"
          },
          "created_at": {
            "description": "Date the notification was created.",
            "format": "date-time",
            "type": "string"
          },
          "delivered_at": {
            "description": "Date of the successful delivery; null until delivered.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "event": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            ],
            "description": "Event of the notification.",
            "example": "sms.deliver_report"
          },
          "http_status": {
            "description": "HTTP status of the last attempt; null if there was no attempt or no response.",
            "example": 200,
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "description": "Delivery identifier, a string of digits. Same value as the `X-Conexteo-Webhook-Id` header and as the `id` of a signed notification, a number there.",
            "example": "12345",
            "pattern": "^\\d+$",
            "type": "string"
          },
          "last_error": {
            "description": "Failure reason of the last attempt; null if none.",
            "example": null,
            "nullable": true,
            "type": "string"
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookDeliveryState"
              }
            ],
            "description": "`pending` and `claimed`: in progress; `delivered`, `failed` and `cancelled`: finished.",
            "example": "delivered"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookType"
              }
            ],
            "description": "Notification type: `reply` (replies to SMS and RCS), `ack_sms` (SMS submission and delivery reports), `ack_rcs` (RCS statuses and SMS fallbacks; signed only)."
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "state",
          "attempts",
          "http_status",
          "last_error",
          "created_at",
          "delivered_at"
        ],
        "type": "object"
      },
      "WebhookDeliveryPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            },
            "type": "array"
          },
          "nextCursor": {
            "description": "Cursor for the next page, null when the page is not full (end of the list). After a full page, the next one can be empty.",
            "example": 12000,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object"
      },
      "WebhookDeliveryState": {
        "description": "`pending` and `claimed`: in progress; `delivered`, `failed` and `cancelled`: finished.",
        "enum": [
          "pending",
          "claimed",
          "delivered",
          "failed",
          "cancelled"
        ],
        "type": "string"
      },
      "WebhookEvent": {
        "description": "Event of the notification.",
        "enum": [
          "sms.submit_ko",
          "sms.deliver_report",
          "reply.sms",
          "reply.rcs",
          "rcs.delivered",
          "rcs.read",
          "rcs.failed",
          "rcs.fallback_sms",
          "rcs.fallback_blocked_credits"
        ],
        "type": "string"
      },
      "WebhookRcsDeliveredNotification": {
        "description": "Signed notification of the `rcs.delivered` event.",
        "properties": {
          "created_at": {
            "description": "Date the event was created, in UTC.",
            "example": "2026-11-20T09:15:30.123Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookRcsStatusData"
              }
            ],
            "description": "Content of the event."
          },
          "event": {
            "description": "Name of the event.",
            "enum": [
              "rcs.delivered"
            ],
            "example": "rcs.delivered",
            "type": "string"
          },
          "id": {
            "description": "Event identifier, same value as the `X-Conexteo-Webhook-Id` header; unchanged on retries.",
            "example": 12345,
            "type": "integer"
          },
          "type": {
            "description": "Type of the webhook that receives the event.",
            "enum": [
              "ack_rcs"
            ],
            "example": "ack_rcs",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "created_at",
          "data"
        ],
        "type": "object"
      },
      "WebhookRcsFailedNotification": {
        "description": "Signed notification of the `rcs.failed` event.",
        "properties": {
          "created_at": {
            "description": "Date the event was created, in UTC.",
            "example": "2026-11-20T09:15:30.123Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookRcsStatusData"
              }
            ],
            "description": "Content of the event."
          },
          "event": {
            "description": "Name of the event.",
            "enum": [
              "rcs.failed"
            ],
            "example": "rcs.failed",
            "type": "string"
          },
          "id": {
            "description": "Event identifier, same value as the `X-Conexteo-Webhook-Id` header; unchanged on retries.",
            "example": 12345,
            "type": "integer"
          },
          "type": {
            "description": "Type of the webhook that receives the event.",
            "enum": [
              "ack_rcs"
            ],
            "example": "ack_rcs",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "created_at",
          "data"
        ],
        "type": "object"
      },
      "WebhookRcsFallbackBlockedCreditsData": {
        "description": "Content of `rcs.fallback_blocked_credits`: SMS fallbacks are blocked for lack of credits. One notification for the send, not one per recipient; it can be received more than once.",
        "properties": {
          "channel": {
            "description": "Channel of the message.",
            "enum": [
              "rcs"
            ],
            "example": "rcs",
            "type": "string"
          },
          "message_id": {
            "description": "Identifier of the message the notification relates to.",
            "example": 1002,
            "type": "integer"
          },
          "reason": {
            "description": "Always `INSUFFICIENT_SMS_CREDITS`: the SMS credits do not cover the fallback.",
            "enum": [
              "INSUFFICIENT_SMS_CREDITS"
            ],
            "example": "INSUFFICIENT_SMS_CREDITS",
            "type": "string"
          },
          "user_id": {
            "description": "Identifier of the account that sent the message.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "channel",
          "user_id",
          "message_id",
          "reason"
        ],
        "type": "object"
      },
      "WebhookRcsFallbackBlockedCreditsNotification": {
        "description": "Signed notification of the `rcs.fallback_blocked_credits` event.",
        "properties": {
          "created_at": {
            "description": "Date the event was created, in UTC.",
            "example": "2026-11-20T09:15:30.123Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookRcsFallbackBlockedCreditsData"
              }
            ],
            "description": "Content of the event."
          },
          "event": {
            "description": "Name of the event.",
            "enum": [
              "rcs.fallback_blocked_credits"
            ],
            "example": "rcs.fallback_blocked_credits",
            "type": "string"
          },
          "id": {
            "description": "Event identifier, same value as the `X-Conexteo-Webhook-Id` header; unchanged on retries.",
            "example": 12345,
            "type": "integer"
          },
          "type": {
            "description": "Type of the webhook that receives the event.",
            "enum": [
              "ack_rcs"
            ],
            "example": "ack_rcs",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "created_at",
          "data"
        ],
        "type": "object"
      },
      "WebhookRcsFallbackSmsData": {
        "description": "Content of `rcs.fallback_sms`: an SMS replaced the RCS message.",
        "properties": {
          "channel": {
            "description": "Channel of the original message.",
            "enum": [
              "rcs"
            ],
            "example": "rcs",
            "type": "string"
          },
          "errorcode": {
            "description": "Always `RECIPIENT_NOT_REACHABLE`: the recipient cannot receive RCS.",
            "enum": [
              "RECIPIENT_NOT_REACHABLE"
            ],
            "example": "RECIPIENT_NOT_REACHABLE",
            "type": "string"
          },
          "message_id": {
            "description": "Identifier of the message the notification relates to.",
            "example": 1002,
            "type": "integer"
          },
          "message_rcs_id": {
            "description": "Identifier of the RCS line replaced by the SMS, the `id` of an `RcsRecipient`.",
            "example": 555003,
            "type": "integer"
          },
          "recipient": {
            "description": "Phone number of the recipient, in international format.",
            "example": "+33600000000",
            "type": "string"
          },
          "user_id": {
            "description": "Identifier of the account that sent the message.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "channel",
          "user_id",
          "message_id",
          "message_rcs_id",
          "recipient",
          "errorcode"
        ],
        "type": "object"
      },
      "WebhookRcsFallbackSmsNotification": {
        "description": "Signed notification of the `rcs.fallback_sms` event.",
        "properties": {
          "created_at": {
            "description": "Date the event was created, in UTC.",
            "example": "2026-11-20T09:15:30.123Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookRcsFallbackSmsData"
              }
            ],
            "description": "Content of the event."
          },
          "event": {
            "description": "Name of the event.",
            "enum": [
              "rcs.fallback_sms"
            ],
            "example": "rcs.fallback_sms",
            "type": "string"
          },
          "id": {
            "description": "Event identifier, same value as the `X-Conexteo-Webhook-Id` header; unchanged on retries.",
            "example": 12345,
            "type": "integer"
          },
          "type": {
            "description": "Type of the webhook that receives the event.",
            "enum": [
              "ack_rcs"
            ],
            "example": "ack_rcs",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "created_at",
          "data"
        ],
        "type": "object"
      },
      "WebhookRcsReadNotification": {
        "description": "Signed notification of the `rcs.read` event.",
        "properties": {
          "created_at": {
            "description": "Date the event was created, in UTC.",
            "example": "2026-11-20T09:15:30.123Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookRcsStatusData"
              }
            ],
            "description": "Content of the event."
          },
          "event": {
            "description": "Name of the event.",
            "enum": [
              "rcs.read"
            ],
            "example": "rcs.read",
            "type": "string"
          },
          "id": {
            "description": "Event identifier, same value as the `X-Conexteo-Webhook-Id` header; unchanged on retries.",
            "example": 12345,
            "type": "integer"
          },
          "type": {
            "description": "Type of the webhook that receives the event.",
            "enum": [
              "ack_rcs"
            ],
            "example": "ack_rcs",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "created_at",
          "data"
        ],
        "type": "object"
      },
      "WebhookRcsStatusData": {
        "description": "Content of `rcs.delivered`, `rcs.read` and `rcs.failed`: status of an RCS message. `rcs.read` can come without `rcs.delivered`, and `rcs.delivered` can follow `rcs.failed`. `RECIPIENT_NOT_REACHABLE` never gives `rcs.failed`: `rcs.fallback_sms` when an SMS replaces the message, otherwise no notification for this recipient.",
        "properties": {
          "channel": {
            "description": "Channel of the message.",
            "enum": [
              "rcs"
            ],
            "example": "rcs",
            "type": "string"
          },
          "errorcode": {
            "description": "Failure code given by the RCS channel; sent only with `failed`, null when the channel gives none.",
            "example": "MESSAGE_EXPIRED",
            "nullable": true,
            "type": "string"
          },
          "message_id": {
            "description": "Identifier of the message the notification relates to.",
            "example": 1002,
            "type": "integer"
          },
          "message_rcs_id": {
            "description": "Identifier of the RCS line, the `id` of an `RcsRecipient`.",
            "example": 555001,
            "type": "integer"
          },
          "recipient": {
            "description": "Phone number of the recipient, in international format.",
            "example": "+33600000000",
            "type": "string"
          },
          "status": {
            "description": "Status reached by the message, the end of the `event` name.",
            "enum": [
              "delivered",
              "read",
              "failed"
            ],
            "example": "delivered",
            "type": "string"
          },
          "user_id": {
            "description": "Identifier of the account that sent the message.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "channel",
          "user_id",
          "message_id",
          "message_rcs_id",
          "recipient",
          "status"
        ],
        "type": "object"
      },
      "WebhookReplyNotification": {
        "description": "Signed notification of the `reply` webhook type; `event` gives its content.",
        "discriminator": {
          "mapping": {
            "reply.rcs": "#/components/schemas/WebhookReplyRcsNotification",
            "reply.sms": "#/components/schemas/WebhookReplySmsNotification"
          },
          "propertyName": "event"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/WebhookReplySmsNotification"
          },
          {
            "$ref": "#/components/schemas/WebhookReplyRcsNotification"
          }
        ]
      },
      "WebhookReplyRcsData": {
        "description": "Content of `reply.rcs`: reply received to an RCS message.",
        "properties": {
          "channel": {
            "description": "Channel of the reply.",
            "enum": [
              "rcs"
            ],
            "example": "rcs",
            "type": "string"
          },
          "choice_label": {
            "description": "Label of the button chosen; null for a free-text reply or an unrecognized button.",
            "example": "Yes, I want it",
            "nullable": true,
            "type": "string"
          },
          "content": {
            "description": "Text of the reply, or the label of the button chosen; empty if there is none.",
            "example": "Yes, I want it",
            "type": "string"
          },
          "message_id": {
            "description": "Identifier of the message the notification relates to.",
            "example": 1002,
            "type": "integer"
          },
          "message_rcs_id": {
            "description": "Identifier of the RCS line, the `id` of an `RcsRecipient`.",
            "example": 555001,
            "type": "integer"
          },
          "postback_data": {
            "description": "`postback_data` of the reply button, as you defined it; null for free text, an action button or an unrecognized button.",
            "example": "yes",
            "nullable": true,
            "type": "string"
          },
          "rcs_choice_id": {
            "description": "Identifier of the button chosen; null for a free-text reply or an unrecognized button.",
            "example": 77,
            "nullable": true,
            "type": "integer"
          },
          "received_at": {
            "description": "Date the reply was received on the channel, in UTC; null if unknown.",
            "example": "2026-11-20T09:24:58.000Z",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "recipient": {
            "description": "Phone number that sent the reply, in international format.",
            "example": "+33600000000",
            "type": "string"
          },
          "reply_kind": {
            "description": "`text`: free text, or a button not recognized; `button`: reply button; `action`: action button.",
            "enum": [
              "text",
              "button",
              "action"
            ],
            "example": "button",
            "type": "string"
          },
          "replydate": {
            "description": "Date the reply was processed, in Paris time.",
            "example": "2026-11-20",
            "format": "date",
            "type": "string"
          },
          "replytime": {
            "description": "Time the reply was processed, in Paris time.",
            "example": "10:25:00",
            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$",
            "type": "string"
          },
          "user_id": {
            "description": "Identifier of the account that sent the message.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "channel",
          "user_id",
          "message_id",
          "message_rcs_id",
          "recipient",
          "content",
          "rcs_choice_id",
          "reply_kind",
          "choice_label",
          "postback_data",
          "received_at",
          "replydate",
          "replytime"
        ],
        "type": "object"
      },
      "WebhookReplyRcsNotification": {
        "description": "Signed notification of the `reply.rcs` event.",
        "properties": {
          "created_at": {
            "description": "Date the event was created, in UTC.",
            "example": "2026-11-20T09:15:30.123Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookReplyRcsData"
              }
            ],
            "description": "Content of the event."
          },
          "event": {
            "description": "Name of the event.",
            "enum": [
              "reply.rcs"
            ],
            "example": "reply.rcs",
            "type": "string"
          },
          "id": {
            "description": "Event identifier, same value as the `X-Conexteo-Webhook-Id` header; unchanged on retries.",
            "example": 12345,
            "type": "integer"
          },
          "type": {
            "description": "Type of the webhook that receives the event.",
            "enum": [
              "reply"
            ],
            "example": "reply",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "created_at",
          "data"
        ],
        "type": "object"
      },
      "WebhookReplySmsData": {
        "description": "Content of `reply.sms`: reply received to an SMS.",
        "properties": {
          "channel": {
            "description": "Channel of the reply.",
            "enum": [
              "sms"
            ],
            "example": "sms",
            "type": "string"
          },
          "content": {
            "description": "Text of the reply.",
            "example": "YES",
            "type": "string"
          },
          "message_id": {
            "description": "Identifier of the message of the last SMS delivered to this number.",
            "example": 1001,
            "type": "integer"
          },
          "message_sms_id": {
            "description": "Identifier of the SMS line of the last SMS delivered to this number.",
            "example": 987654,
            "type": "integer"
          },
          "recipient": {
            "description": "Phone number that sent the reply, in international format.",
            "example": "+33600000000",
            "type": "string"
          },
          "replydate": {
            "description": "Date of the reply, in Paris time.",
            "example": "2026-11-20",
            "format": "date",
            "type": "string"
          },
          "replytime": {
            "description": "Time of the reply, in Paris time.",
            "example": "10:19:59",
            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$",
            "type": "string"
          },
          "user_id": {
            "description": "Identifier of the account that sent the message.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "channel",
          "user_id",
          "message_id",
          "message_sms_id",
          "recipient",
          "replydate",
          "replytime",
          "content"
        ],
        "type": "object"
      },
      "WebhookReplySmsNotification": {
        "description": "Signed notification of the `reply.sms` event.",
        "properties": {
          "created_at": {
            "description": "Date the event was created, in UTC.",
            "example": "2026-11-20T09:15:30.123Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookReplySmsData"
              }
            ],
            "description": "Content of the event."
          },
          "event": {
            "description": "Name of the event.",
            "enum": [
              "reply.sms"
            ],
            "example": "reply.sms",
            "type": "string"
          },
          "id": {
            "description": "Event identifier, same value as the `X-Conexteo-Webhook-Id` header; unchanged on retries.",
            "example": 12345,
            "type": "integer"
          },
          "type": {
            "description": "Type of the webhook that receives the event.",
            "enum": [
              "reply"
            ],
            "example": "reply",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "created_at",
          "data"
        ],
        "type": "object"
      },
      "WebhookRequestMethod": {
        "description": "HTTP method used to call the URL. A signed webhook always uses `post`.",
        "enum": [
          "post",
          "get"
        ],
        "type": "string"
      },
      "WebhookSecret": {
        "properties": {
          "secret": {
            "description": "Signing secret. The HMAC key is the whole string, `whsec_` prefix included.",
            "example": "whsec_EXEMPLE_FICTIF",
            "type": "string"
          }
        },
        "required": [
          "secret"
        ],
        "type": "object"
      },
      "WebhookSetting": {
        "properties": {
          "request_method": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookRequestMethod"
              }
            ],
            "description": "HTTP method used to call the URL. A signed webhook always uses `post`."
          },
          "signed": {
            "description": "Signed webhook (HMAC signature, v2 payload). False on creation; an omitted value keeps the current one. Refused with `request_method=get`; must be `true` for `ack_rcs`.",
            "type": "boolean"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookType"
              }
            ],
            "description": "Notification type: `reply` (replies to SMS and RCS), `ack_sms` (SMS submission and delivery reports), `ack_rcs` (RCS statuses and SMS fallbacks; signed only)."
          },
          "webhook": {
            "description": "Public http or https URL that answers with a 2xx status (redirections are not followed). An empty value deletes the webhook of this type.",
            "example": "https://example.com/webhooks/conexteo",
            "maxLength": 255,
            "type": "string"
          }
        },
        "required": [
          "type",
          "request_method",
          "webhook"
        ],
        "type": "object"
      },
      "WebhookSmsDeliverReportData": {
        "description": "Content of `sms.deliver_report`: delivery report of an SMS. A multipart SMS can give one notification per part, same `message_sms_id`; the last one received is the status kept.",
        "properties": {
          "channel": {
            "description": "Channel of the message.",
            "enum": [
              "sms"
            ],
            "example": "sms",
            "type": "string"
          },
          "deliver": {
            "description": "`1`: delivered; `2`: failed. Absent for any other operator status.",
            "enum": [
              1,
              2
            ],
            "example": 1,
            "type": "integer"
          },
          "deliverdate": {
            "description": "Date of the delivery report, in Paris time.",
            "example": "2026-11-20",
            "format": "date",
            "type": "string"
          },
          "delivertime": {
            "description": "Time of the delivery report, in Paris time.",
            "example": "10:16:01",
            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$",
            "type": "string"
          },
          "errorcode": {
            "description": "Failure reported by the operator network; sent only with `deliver` `2`.",
            "enum": [
              "EXPIRED",
              "DELETED",
              "REJECTD",
              "UNDELIV"
            ],
            "example": "UNDELIV",
            "type": "string"
          },
          "message_id": {
            "description": "Identifier of the message the notification relates to.",
            "example": 1001,
            "type": "integer"
          },
          "message_sms_id": {
            "description": "Identifier of the SMS line, the `id` of an `SmsRecipient`.",
            "example": 987654,
            "type": "integer"
          },
          "user_id": {
            "description": "Identifier of the account that sent the message.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "channel",
          "user_id",
          "message_id",
          "message_sms_id",
          "deliverdate",
          "delivertime"
        ],
        "type": "object"
      },
      "WebhookSmsDeliverReportNotification": {
        "description": "Signed notification of the `sms.deliver_report` event.",
        "properties": {
          "created_at": {
            "description": "Date the event was created, in UTC.",
            "example": "2026-11-20T09:15:30.123Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookSmsDeliverReportData"
              }
            ],
            "description": "Content of the event."
          },
          "event": {
            "description": "Name of the event.",
            "enum": [
              "sms.deliver_report"
            ],
            "example": "sms.deliver_report",
            "type": "string"
          },
          "id": {
            "description": "Event identifier, same value as the `X-Conexteo-Webhook-Id` header; unchanged on retries.",
            "example": 12345,
            "type": "integer"
          },
          "type": {
            "description": "Type of the webhook that receives the event.",
            "enum": [
              "ack_sms"
            ],
            "example": "ack_sms",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "created_at",
          "data"
        ],
        "type": "object"
      },
      "WebhookSmsSubmitKoData": {
        "description": "Content of `sms.submit_ko`. The submission to the operator failed or its outcome is unknown; an `sms.deliver_report` for the same `message_sms_id` can follow and prevails.",
        "properties": {
          "channel": {
            "description": "Channel of the message.",
            "enum": [
              "sms"
            ],
            "example": "sms",
            "type": "string"
          },
          "deliver": {
            "description": "Always `2`: failed.",
            "enum": [
              2
            ],
            "example": 2,
            "type": "integer"
          },
          "deliverdate": {
            "description": "Date of the event, in Paris time.",
            "example": "2026-11-20",
            "format": "date",
            "type": "string"
          },
          "delivertime": {
            "description": "Time of the event, in Paris time.",
            "example": "10:15:29",
            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$",
            "type": "string"
          },
          "errorcode": {
            "description": "Always `SUBMIT_KO`: the submission failed or its outcome is unknown.",
            "enum": [
              "SUBMIT_KO"
            ],
            "example": "SUBMIT_KO",
            "type": "string"
          },
          "message_id": {
            "description": "Identifier of the message the notification relates to.",
            "example": 1001,
            "type": "integer"
          },
          "message_sms_id": {
            "description": "Identifier of the SMS line, the `id` of an `SmsRecipient`.",
            "example": 987654,
            "type": "integer"
          },
          "timestamp_transmitted": {
            "description": "Server time of the attempt, `YYYY-MM-DD HH:mm:ss`, time zone not guaranteed: use `deliverdate` and `delivertime`.",
            "example": "2026-11-20 09:15:29",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "transmitted": {
            "description": "Always `true`.",
            "example": true,
            "type": "boolean"
          },
          "user_id": {
            "description": "Identifier of the account that sent the message.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "channel",
          "user_id",
          "message_id",
          "message_sms_id",
          "transmitted",
          "timestamp_transmitted",
          "deliverdate",
          "delivertime",
          "deliver",
          "errorcode"
        ],
        "type": "object"
      },
      "WebhookSmsSubmitKoNotification": {
        "description": "Signed notification of the `sms.submit_ko` event.",
        "properties": {
          "created_at": {
            "description": "Date the event was created, in UTC.",
            "example": "2026-11-20T09:15:30.123Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookSmsSubmitKoData"
              }
            ],
            "description": "Content of the event."
          },
          "event": {
            "description": "Name of the event.",
            "enum": [
              "sms.submit_ko"
            ],
            "example": "sms.submit_ko",
            "type": "string"
          },
          "id": {
            "description": "Event identifier, same value as the `X-Conexteo-Webhook-Id` header; unchanged on retries.",
            "example": 12345,
            "type": "integer"
          },
          "type": {
            "description": "Type of the webhook that receives the event.",
            "enum": [
              "ack_sms"
            ],
            "example": "ack_sms",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "event",
          "created_at",
          "data"
        ],
        "type": "object"
      },
      "WebhookType": {
        "description": "Notification type: `reply` (replies to SMS and RCS), `ack_sms` (SMS submission and delivery reports), `ack_rcs` (RCS statuses and SMS fallbacks; signed only).",
        "enum": [
          "reply",
          "ack_sms",
          "ack_rcs"
        ],
        "type": "string"
      }
    },
    "securitySchemes": {
      "X-API-KEY": {
        "in": "header",
        "name": "X-API-KEY",
        "type": "apiKey"
      },
      "X-APP-ID": {
        "in": "header",
        "name": "X-APP-ID",
        "type": "apiKey"
      }
    }
  },
  "externalDocs": {
    "description": "Conexteo API documentation",
    "url": "https://developers.conexteo.com"
  },
  "info": {
    "contact": {
      "email": "developers@conexteo.com"
    },
    "description": "Conexteo API: send SMS and RCS messages, and manage contacts, contact lists, templates, STOP lists, sub-accounts and webhooks.\n\n## Authentication\n\nSend the `X-APP-ID` and `X-API-KEY` headers on every request.\n\n## Errors\n\n- 400: invalid request; `message` lists the problems.\n- 401: missing or invalid `X-APP-ID` or `X-API-KEY`.\n- 403: send refused (not enough credits, no valid recipient), or service not enabled on the account.\n- 404: resource not found, or it belongs to another account.\n- 409, 413 and 503: see each operation.\n\nEvery error returned by the API has a JSON body with a `code` at its root. A code never changes; new codes can be added. For a code you do not know, rely on the HTTP status.\n\nMost errors have the body `{ statusCode, message, error, code }`; 404, 409, 503 and \"not enough credits\" have another shape, given by each operation. Error messages are not translated (French or English): rely on `code` and on the HTTP status.\n\n400, 413 and 415 can be returned by any operation that receives a body.\n\nCodes:\n\n- `SUBACCOUNT_PARENT_MODE` (200): Transfer refused: the sub-account is in `parent` mode.\n- `EMAIL_ALREADY_USED` (400): The email of the sub-account is already used.\n- `INVALID_REQUEST` (400): Malformed request or failed validation; `message` lists the problems.\n- `OPERATION_FAILED` (400): The operation could not be completed.\n- `RCS_AGENT_NOT_ASSIGNED` (400): No RCS agent is assigned to the account.\n- `RCS_AGENT_ROUTE_NOT_ACTIVE` (400): The requested RCS agent has no active route for the country.\n- `RCS_CAPABILITY_NOT_ANALYZED` (400): `checkCapability` requested but no contact list has a finished capability analysis.\n- `UNSUPPORTED_FILE_TYPE` (400): File extension not accepted.\n- `MASTER_ACCOUNT_REQUIRED` (401): Operation reserved to the master account.\n- `UNAUTHORIZED` (401): `X-APP-ID` or `X-API-KEY` missing or invalid.\n- `INSUFFICIENT_CREDITS` (403): Not enough credits.\n- `NO_VALID_RECIPIENT` (403): No valid recipient.\n- `SERVICE_NOT_ENABLED` (403): The service is not enabled on the account.\n- `NOT_FOUND` (404): Resource not found, or it belongs to another account.\n- `CREDITS_OPERATION_IN_PROGRESS` (409): Another credits operation is in progress; retry later.\n- `DUPLICATE_EXTERNAL_ID` (409): A send with this `external_id` already exists; do not resend.\n- `PAYLOAD_TOO_LARGE` (413): Body or file too large.\n- `UNSUPPORTED_MEDIA_TYPE` (415): Content type of the body not supported.\n- `INTERNAL_ERROR` (500): Unexpected error on our side.\n- `IMPORT_UNAVAILABLE` (503): Import temporarily unavailable; retry later.\n- `SEND_UNAVAILABLE` (503): Sending temporarily unavailable; retry after `Retry-After`.\n\nUnknown properties are ignored without error: check the spelling of optional fields such as `scheduleAt` (without it, the send is immediate).\n\n## Credits\n\nA credit is the unit of the credit lots you buy, not a number of messages: in France 1 credit pays for 1 SMS, elsewhere an SMS can cost more or fewer credits. Credit amounts can have decimals. A sub-account in `parent` mode uses the balance of its master account.\n\n## SMS text\n\nSMS are sent in the GSM 7-bit alphabet: 160 characters for one SMS, 153 per SMS beyond.\n\n- Accepted as they are: `a-z A-Z 0-9`, space, line feed, `! \" # $ % & ' ( ) * + , - . / : ; < = > ? @ _ ¡ ¿ £ ¤ ¥ §`, `é è ù ì ò à ñ ü ä ö Ä Ö Ñ Ü É Å å Æ æ Ø ø ß`, `Δ Φ Γ Λ Ω Π Ψ Σ Θ Ξ`, and `€ [ ] { } | ~ ^ \\`, which count 2.\n- Converted: other accented Latin letters to the plain letter (`ê` to `e`, `ç` to `c`), `œ` to `oe`, `…` to `...`, typographic quotes and dashes to `'`, `\"` and `-`, tab and no-break space to a space.\n- Removed: invisible characters, emojis and any other character.\n\nThe values of variables follow the same rules. Variable names are converted like the text: write them without accents.\n\n## Dates\n\n`scheduleAt` and `scheduletimestamp` are in UTC (ISO 8601); `scheduledate` and `scheduletime` are in Paris time.",
    "license": {
      "name": "Proprietary",
      "url": "https://conexteo.com/cgv-cgu/"
    },
    "termsOfService": "https://conexteo.com/cgv-cgu/",
    "title": "Conexteo - API",
    "version": "1.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/contact-lists/active-imports": {
      "get": {
        "description": "Covers every contact list of the account; finished imports (`done`, `failed`) are not listed.",
        "operationId": "listActiveContactImports",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ContactImport"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Imports waiting or in progress (20 at most, most recent first)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List active contact imports",
        "tags": [
          "Contact imports"
        ]
      }
    },
    "/contact-lists/{contactlistId}/imports": {
      "post": {
        "description": "Adds the rows of a file to the contact list. Runs in the background: follow it with GET /contact-lists/{contactlistId}/imports/{importId}.",
        "operationId": "importContacts",
        "parameters": [
          {
            "description": "Identifier of the contact list.",
            "in": "path",
            "name": "contactlistId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "description": "File in .csv, .xls or .xlsx format; the first row holds the headers, and only the first sheet is read. Required column: phone number (`telephone`, or a synonym such as `tel`, `phone`, `mobile`; case, spaces, `_`, `-` and `.` are ignored). Optional columns: `nom`, `prenom`, `adresse`, `mail`, `cp`, `ville`, `date`, `perso1` to `perso10`. Other columns, `champ_*` names included, are ignored. A .csv uses `,` or `;` as separator, in UTF-8 or Windows-1252. Rows without a readable number are not imported; numbers already in the list or repeated in the file are skipped. A password-protected .xls or .xlsx cannot be read: the import ends `failed`.",
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactImportStart"
                }
              }
            },
            "description": "Import accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`contactlistId` is not numeric, the file is not .csv, .xls or .xlsx (`UNSUPPORTED_FILE_TYPE`), or the file is missing."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Contact list not found."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "File larger than 500 MB."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Import queue unavailable: retry later (`IMPORT_UNAVAILABLE`)."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Start a contact import",
        "tags": [
          "Contact imports"
        ]
      }
    },
    "/contact-lists/{contactlistId}/imports/{importId}": {
      "get": {
        "description": "Poll until `status` is `done` or `failed`; `imported_rows` shows the progress.",
        "operationId": "getContactImport",
        "parameters": [
          {
            "description": "Identifier of the contact list.",
            "in": "path",
            "name": "contactlistId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Identifier of the import.",
            "in": "path",
            "name": "importId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactImport"
                }
              }
            },
            "description": "Import status."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`contactlistId` or `importId` is not numeric."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Import not found for this contact list."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Get the status of a contact import",
        "tags": [
          "Contact imports"
        ]
      }
    },
    "/contactlists": {
      "get": {
        "description": "Not paginated: returns all the matching lists of the account in one response.",
        "operationId": "listContactLists",
        "parameters": [
          {
            "description": "Only the lists whose name contains this text (case-insensitive).",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "example": "example",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ContactList"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List contact lists",
        "tags": [
          "Contact lists"
        ]
      },
      "post": {
        "description": "Creates an empty list (`contacts_count` 0): add contacts with POST /contacts or POST /contact-lists/{contactlistId}/imports.",
        "operationId": "createContactList",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request, or the contact list could not be saved (`OPERATION_FAILED`)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Create a contact list",
        "tags": [
          "Contact lists"
        ]
      }
    },
    "/contactlists/{id}": {
      "delete": {
        "description": "Deletes the contact list and its contacts.",
        "operationId": "deleteContactList",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactListDeleteResult"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Delete a contact list",
        "tags": [
          "Contact lists"
        ]
      },
      "get": {
        "description": "The contacts are not included: read them with GET /contactlists/{id}/contacts.",
        "operationId": "getContactList",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Get a contact list",
        "tags": [
          "Contact lists"
        ]
      },
      "put": {
        "description": "Only `name` can be changed; the contacts of the list are not affected.",
        "operationId": "updateContactList",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request, or the contact list could not be saved (`OPERATION_FAILED`)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Update a contact list",
        "tags": [
          "Contact lists"
        ]
      }
    },
    "/contactlists/{id}/contacts": {
      "get": {
        "description": "Invalid numbers are included (`tel_valid` false). GET /contactlists/{id}/contacts-extract returns every contact without pagination.",
        "operationId": "listContactListContacts",
        "parameters": [
          {
            "description": "Page number, from 1 to 100000; 1 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 100000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page, from 1 to 10000; 10 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 10000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid `page` or `limit` (integers; `page` from 1 to 100000, `limit` from 1 to 10000)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List the contacts of a contact list (paginated)",
        "tags": [
          "Contact lists"
        ]
      }
    },
    "/contactlists/{id}/contacts-extract": {
      "get": {
        "description": "Without pagination: every contact of the list in one response. For a large list, use GET /contactlists/{id}/contacts.",
        "operationId": "exportContactListContacts",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Contact"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List all the contacts of a contact list",
        "tags": [
          "Contact lists"
        ]
      }
    },
    "/contacts": {
      "post": {
        "description": "Adds contacts to a contact list. A contact with a missing or unreadable number is added with `tel_valid` false. Duplicates are not removed. The response has no contact identifiers: read them with GET /contactlists/{id}/contacts.",
        "operationId": "createContacts",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactsCreateResult"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/HttpError"
                    },
                    {
                      "$ref": "#/components/schemas/ContactsCreateResult"
                    }
                  ]
                }
              }
            },
            "description": "Invalid request, or the import failed (body with `success` false, `OPERATION_FAILED`): contacts of the batches already processed may have been added."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Contact list not found."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 25 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Add contacts",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/contacts/{id}": {
      "delete": {
        "description": "Deletes the contact: it is no longer returned or sent to.",
        "operationId": "deleteContact",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDeleteResult"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Contact not found, or its contact list has been deleted."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Delete a contact",
        "tags": [
          "Contacts"
        ]
      },
      "get": {
        "description": "Includes the contact list of the contact (`contactlist`).",
        "operationId": "getContact",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Contact not found, or its contact list has been deleted."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Get a contact",
        "tags": [
          "Contacts"
        ]
      },
      "put": {
        "description": "Only the properties sent are changed; `null` empties a field. Sending `tel` recomputes `country_code` and `tel_valid`.",
        "operationId": "updateContact",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Contact not found, or its contact list has been deleted."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Update a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/messages": {
      "get": {
        "description": "Sorted by identifier, newest first.",
        "operationId": "listMessages",
        "parameters": [
          {
            "description": "Page number, from 1 to 100000; 1 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 100000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page, from 1 to 10000; 10 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 10000,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagePage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid `page` or `limit` (integers; `page` from 1 to 100000, `limit` from 1 to 10000)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List messages",
        "tags": [
          "Messages"
        ]
      }
    },
    "/messages/rcs": {
      "post": {
        "description": "Sends an RCS message to the contacts of `contactlist` or to the recipients of `contacts` (one of the two). The send is accepted at once and delivered in the background; `message_id` identifies it. With `resumeBefore=true`, returns a quote: nothing is sent or debited, and a balance that is too low is shown in `rcs.credits_missing` instead of a 403. Credits are debited on acceptance: the SMS fallback, and the RCS messages when `rcs.cost_eur` is present; the RCS price is credited back for a message that falls back to SMS. Duplicates and numbers on the STOP list are removed (`doublons`, `stops`).",
        "operationId": "sendRcs",
        "parameters": [
          {
            "description": "If `true`, returns a quote without sending or debiting anything; an insufficient balance is reported in `credits_missing`.",
            "in": "query",
            "name": "resumeBefore",
            "required": false,
            "schema": {
              "default": false,
              "example": true,
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendRcsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RcsSendResult"
                    },
                    {
                      "$ref": "#/components/schemas/RcsQuote"
                    }
                  ]
                }
              }
            },
            "description": "OK: send accepted (`RcsSendResult`), or quote if `resumeBefore=true` (`RcsQuote`)."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid body or parameters (validation), no RCS agent assigned to the account (`RCS_AGENT_NOT_ASSIGNED`), `contacts` and `contactlist` both provided or both missing, the requested agent has no active route for the country (`RCS_AGENT_ROUTE_NOT_ACTIVE`), or `checkCapability` without a finished capability analysis (`RCS_CAPABILITY_NOT_ANALYZED`)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/InsufficientCreditsError"
                    },
                    {
                      "$ref": "#/components/schemas/HttpError"
                    }
                  ]
                }
              }
            },
            "description": "Not enough credits (`Not enough credits`, `INSUFFICIENT_CREDITS`) or no valid recipient (`No valid recipient(s)`, `NO_VALID_RECIPIENT`); nothing is sent or debited. `credits_required` and `credits_remaining` give the credits needed and available, `missing_eur` (only for `Not enough credits`) the amount to top up in euros excluding VAT. A service not enabled on the account (`SERVICE_NOT_ENABLED`) also returns 403 (`HttpError` body, without these fields)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "One of the contact lists of `contactlist` does not exist, or belongs to another account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateExternalIdError"
                }
              }
            },
            "description": "A send with this `external_id` is already in progress or accepted for the account; the request is not processed again, do not resend it (`DUPLICATE_EXTERNAL_ID`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 25 MB."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendUnavailableError"
                }
              }
            },
            "description": "Sending is temporarily unavailable: the request was not processed (`SEND_UNAVAILABLE`). Send it again after the `Retry-After` delay. With an `external_id`, a retry never creates a second send (409 if the first attempt did succeed).",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before sending the request again.",
                "schema": {
                  "example": 30,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Send an RCS message",
        "tags": [
          "Messages/RCS"
        ]
      }
    },
    "/messages/replies": {
      "get": {
        "description": "Sorted by identifier (`id`), ascending.",
        "operationId": "listReplies",
        "parameters": [
          {
            "description": "Page number, from 1 to 100000; 1 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 100000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page, from 1 to 10000; 10 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 10000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Filter on the phone number of the sender of the reply (partial match).",
            "in": "query",
            "name": "recipient_like",
            "required": false,
            "schema": {
              "example": "+33639980003",
              "type": "string"
            }
          },
          {
            "description": "Filter on the identifier of an individual SMS, i.e. the reply of one recipient. SMS replies only. A non-numeric value is ignored.",
            "in": "query",
            "name": "message_sms_id",
            "required": false,
            "schema": {
              "example": 987654,
              "type": "integer"
            }
          },
          {
            "description": "Filter on the identifier of the send. A non-numeric value is ignored.",
            "in": "query",
            "name": "message_id",
            "required": false,
            "schema": {
              "example": 123456,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplyPage"
                }
              }
            },
            "description": "OK",
            "headers": {
              "X-Total-Count": {
                "description": "Total number of replies (`meta.totalItems`).",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid `page` or `limit` (integers; `page` from 1 to 100000, `limit` from 1 to 10000)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `reply` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List replies (paginated)",
        "tags": [
          "Messages/Replies"
        ]
      }
    },
    "/messages/replies/extract": {
      "get": {
        "description": "Without pagination: every reply of the account in one response. For a large volume, use GET /messages/replies.",
        "operationId": "exportReplies",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReplyExport"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `reply` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List all replies",
        "tags": [
          "Messages/Replies"
        ]
      }
    },
    "/messages/sms": {
      "post": {
        "description": "Sends the same text to a list of numbers. Duplicates and numbers on the STOP list are removed (`doublons`, `stops`); invalid numbers and numbers of a country with no price are ignored. Credits are debited on acceptance, even for a scheduled send.",
        "operationId": "sendSms",
        "parameters": [
          {
            "description": "If `true`, returns a quote without sending or debiting anything; an insufficient balance is reported in `credits_missing`.",
            "in": "query",
            "name": "resumeBefore",
            "required": false,
            "schema": {
              "default": false,
              "example": true,
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSmsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SmsSendResult"
                    },
                    {
                      "$ref": "#/components/schemas/SmsQuote"
                    }
                  ]
                }
              }
            },
            "description": "Send accepted, or quote if `resumeBefore=true`."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/InsufficientCreditsError"
                    },
                    {
                      "$ref": "#/components/schemas/HttpError"
                    }
                  ]
                }
              }
            },
            "description": "Not enough credits (`Not enough credits`, `INSUFFICIENT_CREDITS`) or no valid recipient (`No valid recipient(s)`, `NO_VALID_RECIPIENT`); nothing is sent or debited. `credits_required` and `credits_remaining` give the credits needed and available, `missing_eur` (only for `Not enough credits`) the amount to top up in euros excluding VAT. A service not enabled on the account (`SERVICE_NOT_ENABLED`) also returns 403 (`HttpError` body, without these fields)."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateExternalIdError"
                }
              }
            },
            "description": "A send with this `external_id` is already in progress or accepted for the account; the request is not processed again, do not resend it (`DUPLICATE_EXTERNAL_ID`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 25 MB."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendUnavailableError"
                }
              }
            },
            "description": "Sending is temporarily unavailable: the request was not processed (`SEND_UNAVAILABLE`). Send it again after the `Retry-After` delay. With an `external_id`, a retry never creates a second send (409 if the first attempt did succeed).",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before sending the request again.",
                "schema": {
                  "example": 30,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Send an SMS",
        "tags": [
          "Messages/SMS"
        ]
      }
    },
    "/messages/sms/contactlist": {
      "post": {
        "description": "Sends a text with variables to one or more contact lists. The fields of each contact are variables in `content`: `#nom#`, `#prenom#`, `#mail#`, `#adresse#`, `#cp#`, `#ville#`, `#date#`, `#perso1#` to `#perso10#` (case-insensitive); an empty field removes its variable. Duplicates and numbers on the STOP list are removed (`doublons`, `stops`); contacts with an invalid number and numbers of a country with no price are ignored. Credits are debited on acceptance, even for a scheduled send.",
        "operationId": "sendSmsToContactList",
        "parameters": [
          {
            "description": "If `true`, returns a quote without sending or debiting anything; an insufficient balance is reported in `credits_missing`.",
            "in": "query",
            "name": "resumeBefore",
            "required": false,
            "schema": {
              "default": false,
              "example": true,
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSmsToContactListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SmsSendResult"
                    },
                    {
                      "$ref": "#/components/schemas/SmsQuote"
                    }
                  ]
                }
              }
            },
            "description": "Send accepted, or quote if `resumeBefore=true`."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/InsufficientCreditsError"
                    },
                    {
                      "$ref": "#/components/schemas/HttpError"
                    }
                  ]
                }
              }
            },
            "description": "Not enough credits (`Not enough credits`, `INSUFFICIENT_CREDITS`) or no valid recipient (`No valid recipient(s)`, `NO_VALID_RECIPIENT`); nothing is sent or debited. `credits_required` and `credits_remaining` give the credits needed and available, `missing_eur` (only for `Not enough credits`) the amount to top up in euros excluding VAT. A service not enabled on the account (`SERVICE_NOT_ENABLED`) also returns 403 (`HttpError` body, without these fields)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Contact list not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateExternalIdError"
                }
              }
            },
            "description": "A send with this `external_id` is already in progress or accepted for the account; the request is not processed again, do not resend it (`DUPLICATE_EXTERNAL_ID`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendUnavailableError"
                }
              }
            },
            "description": "Sending is temporarily unavailable: the request was not processed (`SEND_UNAVAILABLE`). Send it again after the `Retry-After` delay. With an `external_id`, a retry never creates a second send (409 if the first attempt did succeed).",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before sending the request again.",
                "schema": {
                  "example": 30,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Send an SMS to contact lists",
        "tags": [
          "Messages/SMS"
        ]
      }
    },
    "/messages/sms/dynamic": {
      "post": {
        "description": "Sends a text with variables to a list of recipient objects. Each property of a recipient is a `#property#` variable in `content` (case-insensitive): a missing or `null` property leaves the variable as is, an empty value removes it. With `shorturl`, `#url#` is the short link, not a property. Duplicates and numbers on the STOP list are removed (`doublons`, `stops`); invalid numbers, numbers of a country with no price and entries without `recipient` are ignored. Credits are debited on acceptance, even for a scheduled send.",
        "operationId": "sendDynamicSms",
        "parameters": [
          {
            "description": "If `true`, returns a quote without sending or debiting anything; an insufficient balance is reported in `credits_missing`.",
            "in": "query",
            "name": "resumeBefore",
            "required": false,
            "schema": {
              "default": false,
              "example": true,
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendDynamicSmsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SmsSendResult"
                    },
                    {
                      "$ref": "#/components/schemas/SmsQuote"
                    }
                  ]
                }
              }
            },
            "description": "Send accepted, or quote if `resumeBefore=true`."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/InsufficientCreditsError"
                    },
                    {
                      "$ref": "#/components/schemas/HttpError"
                    }
                  ]
                }
              }
            },
            "description": "Not enough credits (`Not enough credits`, `INSUFFICIENT_CREDITS`) or no valid recipient (`No valid recipient(s)`, `NO_VALID_RECIPIENT`); nothing is sent or debited. `credits_required` and `credits_remaining` give the credits needed and available, `missing_eur` (only for `Not enough credits`) the amount to top up in euros excluding VAT. A service not enabled on the account (`SERVICE_NOT_ENABLED`) also returns 403 (`HttpError` body, without these fields)."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateExternalIdError"
                }
              }
            },
            "description": "A send with this `external_id` is already in progress or accepted for the account; the request is not processed again, do not resend it (`DUPLICATE_EXTERNAL_ID`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 25 MB."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendUnavailableError"
                }
              }
            },
            "description": "Sending is temporarily unavailable: the request was not processed (`SEND_UNAVAILABLE`). Send it again after the `Retry-After` delay. With an `external_id`, a retry never creates a second send (409 if the first attempt did succeed).",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before sending the request again.",
                "schema": {
                  "example": 30,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Send an SMS with per-recipient variables",
        "tags": [
          "Messages/SMS"
        ]
      }
    },
    "/messages/sms/file": {
      "post": {
        "description": "Sends a text with variables to the recipients of a file; the numbers column is found by its header (see `file`). Every other column is a `#header#` variable in `content` (case-insensitive), except `name`, `nom` and `lastname`, which give `#nom#`, `prénom`, which gives `#prenom#`, and `adress` and `adresse`, which give `#adresse#`; an empty cell removes the variable. Duplicates and numbers on the STOP list are removed (`doublons`, `stops`); rows without a valid number and numbers of a country with no price are ignored. Credits are debited on acceptance, even for a scheduled send.",
        "operationId": "sendSmsFromFile",
        "parameters": [
          {
            "description": "If `true`, returns a quote without sending or debiting anything; an insufficient balance is reported in `credits_missing`.",
            "in": "query",
            "name": "resumeBefore",
            "required": false,
            "schema": {
              "default": false,
              "example": true,
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SendSmsFromFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SmsSendResult"
                    },
                    {
                      "$ref": "#/components/schemas/SmsQuote"
                    }
                  ]
                }
              }
            },
            "description": "Send accepted, or quote if `resumeBefore=true`."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request, for example a file that is not a .csv, .xls or .xlsx file (`UNSUPPORTED_FILE_TYPE`), or a missing file (`file is required`)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/InsufficientCreditsError"
                    },
                    {
                      "$ref": "#/components/schemas/HttpError"
                    }
                  ]
                }
              }
            },
            "description": "Not enough credits (`Not enough credits`, `INSUFFICIENT_CREDITS`) or no valid recipient (`No valid recipient(s)`, `NO_VALID_RECIPIENT`); nothing is sent or debited. `credits_required` and `credits_remaining` give the credits needed and available, `missing_eur` (only for `Not enough credits`) the amount to top up in euros excluding VAT. A service not enabled on the account (`SERVICE_NOT_ENABLED`) also returns 403 (`HttpError` body, without these fields)."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateExternalIdError"
                }
              }
            },
            "description": "A send with this `external_id` is already in progress or accepted for the account; the request is not processed again, do not resend it (`DUPLICATE_EXTERNAL_ID`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "File larger than 500 MB."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendUnavailableError"
                }
              }
            },
            "description": "Sending is temporarily unavailable: the request was not processed (`SEND_UNAVAILABLE`). Send it again after the `Retry-After` delay. With an `external_id`, a retry never creates a second send (409 if the first attempt did succeed).",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before sending the request again.",
                "schema": {
                  "example": 30,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Send an SMS from a file",
        "tags": [
          "Messages/SMS"
        ]
      }
    },
    "/messages/{id}": {
      "get": {
        "description": "Returns the send, not its recipients: list them with GET /messages/{id}/sms and GET /messages/{id}/rcs. For an RCS send, includes its RCS content (`rcs_config`, with the buttons of a text RCS) and its agent (`rcsAgent`).",
        "operationId": "getMessage",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Get a message",
        "tags": [
          "Messages"
        ]
      }
    },
    "/messages/{id}/cancel": {
      "put": {
        "description": "Cancels a send that is not yet `sendcompleted` or `cancelled`: its `state` becomes `cancelled`. Any other send is left unchanged, and the response is still 200. The credits of the messages not yet handed over to the operator are credited back; those already handed over, including `SUBMIT_KO`, stay billed.",
        "operationId": "cancelMessage",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Cancel a message",
        "tags": [
          "Messages"
        ]
      }
    },
    "/messages/{id}/rcs": {
      "get": {
        "description": "Sorted by identifier, ascending. Empty for an SMS send. A recipient switched to an SMS fallback moves to GET /messages/{id}/sms.",
        "operationId": "listRcsRecipients",
        "parameters": [
          {
            "description": "Page number, from 1 to 100000; 1 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 100000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page, from 1 to 10000; 10 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 10000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RcsRecipientPage"
                }
              }
            },
            "description": "OK",
            "headers": {
              "X-Total-Count": {
                "description": "Total number of recipients (`meta.totalItems`).",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid `page` or `limit` (integers; `page` from 1 to 100000, `limit` from 1 to 10000)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List the RCS recipients of a message",
        "tags": [
          "Messages"
        ]
      }
    },
    "/messages/{id}/sms": {
      "get": {
        "description": "Sorted by identifier, ascending. The rows are created right after the send is accepted: the list can be incomplete at first, whereas `recipients_count` is final. For an RCS send, only the recipients switched to an SMS fallback are listed.",
        "operationId": "listSmsRecipients",
        "parameters": [
          {
            "description": "Page number, from 1 to 100000; 1 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 100000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page, from 1 to 10000; 10 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 10000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsRecipientPage"
                }
              }
            },
            "description": "OK",
            "headers": {
              "X-Total-Count": {
                "description": "Total number of recipients (`meta.totalItems`).",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid `page` or `limit` (integers; `page` from 1 to 100000, `limit` from 1 to 10000)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List the SMS recipients of a message",
        "tags": [
          "Messages"
        ]
      }
    },
    "/models": {
      "get": {
        "description": "Not paginated: returns every SMS template of the account; RCS templates are listed by GET /models/rcs.",
        "operationId": "listTemplates",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Template"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List SMS templates",
        "tags": [
          "Template"
        ]
      },
      "post": {
        "operationId": "createTemplate",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request. The template could not be saved (`OPERATION_FAILED`)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Create an SMS template",
        "tags": [
          "Template"
        ]
      }
    },
    "/models/rcs": {
      "get": {
        "description": "Returns only the RCS templates (`isModel` true), not the RCS content of a send; SMS templates are listed by GET /models.",
        "operationId": "listRcsTemplates",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RcsTemplate"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK. `choices` is not included: read it with GET /models/rcs/{id}."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `rcs` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List RCS templates",
        "tags": [
          "Template"
        ]
      },
      "post": {
        "operationId": "createRcsTemplate",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RcsTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RcsTemplate"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `rcs` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Create an RCS template",
        "tags": [
          "Template"
        ]
      }
    },
    "/models/rcs/{id}": {
      "delete": {
        "description": "The template is no longer returned by the API.",
        "operationId": "deleteRcsTemplate",
        "parameters": [
          {
            "description": "Identifier of the RCS template.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RcsTemplateDeleteResult"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `rcs` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "RCS template not found (the RCS content of a send is not a template)."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Delete an RCS template",
        "tags": [
          "Template"
        ]
      },
      "get": {
        "description": "Also returns the RCS content of a send (`isModel` false).",
        "operationId": "getRcsTemplate",
        "parameters": [
          {
            "description": "Identifier of the RCS template.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RcsTemplate"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `rcs` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Get an RCS template",
        "tags": [
          "Template"
        ]
      },
      "put": {
        "description": "Replaces the whole template: an omitted property returns to its default value; `fallback` sent without `sender` keeps its current sender.",
        "operationId": "updateRcsTemplate",
        "parameters": [
          {
            "description": "Identifier of the RCS template.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RcsTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RcsTemplate"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `rcs` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "RCS template not found (the RCS content of a send is not a template)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Update an RCS template",
        "tags": [
          "Template"
        ]
      }
    },
    "/models/{id}": {
      "delete": {
        "description": "The template is no longer returned by the API; an RCS template is deleted with DELETE /models/rcs/{id}.",
        "operationId": "deleteTemplate",
        "parameters": [
          {
            "description": "Identifier of the SMS template.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDeleteResult"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Delete an SMS template",
        "tags": [
          "Template"
        ]
      },
      "get": {
        "description": "SMS templates and RCS templates have separate identifiers: read an RCS template with GET /models/rcs/{id}.",
        "operationId": "getTemplate",
        "parameters": [
          {
            "description": "Identifier of the SMS template.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Get an SMS template",
        "tags": [
          "Template"
        ]
      },
      "put": {
        "description": "Updates the template; an omitted `sender` is kept.",
        "operationId": "updateTemplate",
        "parameters": [
          {
            "description": "Identifier of the SMS template.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Update an SMS template",
        "tags": [
          "Template"
        ]
      }
    },
    "/stops": {
      "post": {
        "description": "Adds a number to the STOP list; it is removed from the sends that follow, not from a send already accepted. Adding a number that is already listed creates another entry.",
        "operationId": "createStop",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStopRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stop"
                }
              }
            },
            "description": "STOP saved."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request or invalid number (`recipient must be a valid phone number`), or the STOP could not be saved (`OPERATION_FAILED`)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Add a STOP",
        "tags": [
          "Stops"
        ]
      }
    },
    "/stops/all": {
      "get": {
        "description": "Lists the numbers on the STOP list: the STOPs you added and those saved when a recipient replies STOP. A number added several times appears once per entry.",
        "operationId": "listStops",
        "parameters": [
          {
            "description": "Page number, from 1 to 100000; 1 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 100000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page, from 1 to 10000; 10 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 10000,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StopPage"
                }
              }
            },
            "description": "OK",
            "headers": {
              "X-Total-Count": {
                "description": "Total number of STOPs (`meta.totalItems`).",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid `page` or `limit` (integers; `page` from 1 to 100000, `limit` from 1 to 10000)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List STOPs",
        "tags": [
          "Stops"
        ]
      }
    },
    "/stops/file": {
      "post": {
        "description": "Adds the numbers of a file to the STOP list. Each valid number adds an entry, even if already listed.",
        "operationId": "importStops",
        "parameters": [],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ImportStopsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StopImportResult"
                }
              }
            },
            "description": "Numbers added; `stop_added` is 0 if no phone column is recognized."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/HttpError"
                    },
                    {
                      "additionalProperties": false,
                      "description": "File missing.",
                      "properties": {
                        "code": {
                          "enum": [
                            "INVALID_REQUEST"
                          ],
                          "type": "string"
                        },
                        "message": {
                          "enum": [
                            "file is required"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "code"
                      ],
                      "type": "object"
                    },
                    {
                      "$ref": "#/components/schemas/StopImportResult"
                    }
                  ]
                }
              }
            },
            "description": "File missing (`file is required`), not a .csv, .xls or .xlsx file (`UNSUPPORTED_FILE_TYPE`), or a STOP could not be saved (`success` false, `OPERATION_FAILED`; the STOPs already saved are kept)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "File larger than 50 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Add STOPs from a file",
        "tags": [
          "Stops"
        ]
      }
    },
    "/stops/{id}": {
      "delete": {
        "description": "Deletes one entry. A number leaves the STOP list when all its entries are deleted.",
        "operationId": "deleteStop",
        "parameters": [
          {
            "description": "Identifier of the resource.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "example": [],
                  "items": {},
                  "maxItems": 0,
                  "type": "array"
                }
              }
            },
            "description": "Empty array."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Delete a STOP",
        "tags": [
          "Stops"
        ]
      }
    },
    "/subaccount": {
      "get": {
        "description": "Without pagination; GET /subaccount/list returns the same list, paginated.",
        "operationId": "listSubAccounts",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SubAccountListItem"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "The calling account is a sub-account (`MASTER_ACCOUNT_REQUIRED`)."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `subaccount` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List sub-accounts",
        "tags": [
          "Sub-accounts"
        ]
      },
      "post": {
        "description": "The response contains the API key of the sub-account, returned only once.",
        "operationId": "createSubAccount",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedSubAccount"
                }
              }
            },
            "description": "Sub-account created. Its API key is returned only in this response."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request. Email already used by another account (`EMAIL_ALREADY_USED`)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "The calling account is a sub-account (`MASTER_ACCOUNT_REQUIRED`)."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `subaccount` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Create a sub-account",
        "tags": [
          "Sub-accounts"
        ]
      }
    },
    "/subaccount/list": {
      "get": {
        "description": "Same sub-accounts as GET /subaccount, returned in pages (`items` and `meta`).",
        "operationId": "listSubAccountsPaginated",
        "parameters": [
          {
            "description": "Page number, from 1 to 100000; 1 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 100000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page, from 1 to 10000; 10 by default. Any other value, or a value that is not an integer, gives a 400 error.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 10000,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubAccountPage"
                }
              }
            },
            "description": "OK",
            "headers": {
              "X-Total-Count": {
                "description": "Total number of sub-accounts (`meta.totalItems`).",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid `page` or `limit` (integers; `page` from 1 to 100000, `limit` from 1 to 10000)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "The calling account is a sub-account (`MASTER_ACCOUNT_REQUIRED`)."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `subaccount` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List sub-accounts (paginated)",
        "tags": [
          "Sub-accounts"
        ]
      }
    },
    "/subaccount/{id}": {
      "get": {
        "description": "Adds `appId` and the API key status (`has_apikey`, `apikey_created_at`) to the fields of the list; the key itself is never returned.",
        "operationId": "getSubAccount",
        "parameters": [
          {
            "description": "Identifier of the sub-account (`subaccount_id`).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubAccountDetail"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "The calling account is not a master account (a sub-account, or an account with no sub-account) (`MASTER_ACCOUNT_REQUIRED`)."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `subaccount` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Get a sub-account",
        "tags": [
          "Sub-accounts"
        ]
      }
    },
    "/subaccount/{id}/credits": {
      "get": {
        "description": "A sub-account in `parent` mode has no balance of its own: the balances returned are those of the master account.",
        "operationId": "getSubAccountCredits",
        "parameters": [
          {
            "description": "Identifier of the sub-account (`subaccount_id`).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Credit"
                  },
                  "type": "array"
                }
              }
            },
            "description": "One balance per message type."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "The calling account is not a master account (a sub-account, or an account with no sub-account) (`MASTER_ACCOUNT_REQUIRED`)."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `subaccount` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List the credits of a sub-account",
        "tags": [
          "Sub-accounts"
        ]
      }
    },
    "/subaccount/{id}/credits/add": {
      "put": {
        "description": "Transfers credits from the master account to the sub-account. In `parent` mode nothing is transferred and the response is a refusal. The response has no balance: read it with GET /subaccount/{id}/credits and GET /users/credits.",
        "operationId": "addSubAccountCredits",
        "parameters": [
          {
            "description": "Identifier of the sub-account (`subaccount_id`).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubAccountCreditsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SubAccount"
                    },
                    {
                      "$ref": "#/components/schemas/SubAccountCreditsRefusal"
                    }
                  ]
                }
              }
            },
            "description": "The sub-account (`SubAccount`), or a refusal (`SubAccountCreditsRefusal`, `success` false, `SUBACCOUNT_PARENT_MODE`) if it is in `parent` mode."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request: `quantity` must be an integer from 1 to 10,000,000."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "The calling account is not a master account (a sub-account, or an account with no sub-account) (`MASTER_ACCOUNT_REQUIRED`)."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TransferInsufficientCreditsError"
                    },
                    {
                      "$ref": "#/components/schemas/HttpError"
                    }
                  ]
                }
              }
            },
            "description": "Not enough credits on the master account (`TransferInsufficientCreditsError`, `INSUFFICIENT_CREDITS`), or service “subaccount” not enabled (`HttpError`, `SERVICE_NOT_ENABLED`)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Another credits operation is in progress on this sub-account. Nothing was done: retry later (`CREDITS_OPERATION_IN_PROGRESS`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Add credits to a sub-account",
        "tags": [
          "Sub-accounts"
        ]
      }
    },
    "/subaccount/{id}/credits/mode": {
      "put": {
        "description": "Switches the sub-account between its own credits (`self`) and those of the master account (`parent`). Switching to `parent` transfers its balance back to the master account and turns its online shop off; switching to `self` turns the shop on. The response does not give the transferred amount: read the balances with GET /subaccount/{id}/credits and GET /users/credits.",
        "operationId": "setSubAccountCreditsMode",
        "parameters": [
          {
            "description": "Identifier of the sub-account (`subaccount_id`).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubAccountCreditsModeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubAccount"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request: `value` must be `self` or `parent`."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "The calling account is not a master account (a sub-account, or an account with no sub-account) (`MASTER_ACCOUNT_REQUIRED`)."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Service `subaccount` not enabled on the account (`SERVICE_NOT_ENABLED`)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Another credits operation is in progress on this sub-account. Nothing was done: retry later (`CREDITS_OPERATION_IN_PROGRESS`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Change the credits consumption mode of a sub-account",
        "tags": [
          "Sub-accounts"
        ]
      }
    },
    "/subaccount/{id}/credits/remove": {
      "put": {
        "description": "Transfers credits from the sub-account back to the master account. In `parent` mode nothing is transferred and the response is a refusal. The response has no balance: read it with GET /subaccount/{id}/credits and GET /users/credits.",
        "operationId": "removeSubAccountCredits",
        "parameters": [
          {
            "description": "Identifier of the sub-account (`subaccount_id`).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": 1234,
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubAccountCreditsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SubAccount"
                    },
                    {
                      "$ref": "#/components/schemas/SubAccountCreditsRefusal"
                    }
                  ]
                }
              }
            },
            "description": "The sub-account (`SubAccount`), or a refusal (`SubAccountCreditsRefusal`, `success` false, `SUBACCOUNT_PARENT_MODE`) if it is in `parent` mode."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request: `quantity` must be an integer from 1 to 10,000,000."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "The calling account is not a master account (a sub-account, or an account with no sub-account) (`MASTER_ACCOUNT_REQUIRED`)."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TransferInsufficientCreditsError"
                    },
                    {
                      "$ref": "#/components/schemas/HttpError"
                    }
                  ]
                }
              }
            },
            "description": "Not enough credits on the sub-account (`TransferInsufficientCreditsError`, `INSUFFICIENT_CREDITS`), or service “subaccount” not enabled (`HttpError`, `SERVICE_NOT_ENABLED`)."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Resource not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Another credits operation is in progress on this sub-account. Nothing was done: retry later (`CREDITS_OPERATION_IN_PROGRESS`)."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Remove credits from a sub-account",
        "tags": [
          "Sub-accounts"
        ]
      }
    },
    "/users/credits": {
      "get": {
        "description": "For a sub-account in `parent` mode, the balances are those of the master account.",
        "operationId": "getCredits",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Credit"
                  },
                  "type": "array"
                }
              }
            },
            "description": "One balance per message type."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Get the credit balance",
        "tags": [
          "User"
        ]
      }
    },
    "/webhooks": {
      "get": {
        "description": "Returns one entry per configured notification type (`reply`, `ack_sms`, `ack_rcs`), an empty array if none; the signing secret is not included.",
        "operationId": "listWebhooks",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Webhook"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Get the webhook configuration",
        "tags": [
          "Webhooks"
        ]
      },
      "put": {
        "callbacks": {
          "ack_rcs": {
            "webhooks[type=ack_rcs].webhook": {
              "post": {
                "description": "Sent to the `webhook` of the element of `webhooks` whose `type` is `ack_rcs`, at any position. Events: `rcs.delivered`, `rcs.read`, `rcs.failed`, `rcs.fallback_sms` and `rcs.fallback_blocked_credits`. Conexteo sends neither `X-APP-ID` nor `X-API-KEY` to your URL: authenticate a signed notification by its signature. Signed webhook only: a POST with a JSON body and the three `X-Conexteo-*` headers. `RECIPIENT_NOT_REACHABLE` never gives `rcs.failed`: `rcs.fallback_sms` when an SMS replaces the message, otherwise no notification for this recipient.",
                "operationId": "receiveAckRcsWebhook",
                "parameters": [
                  {
                    "description": "Event identifier, the `id` of the body; unchanged on retries.",
                    "in": "header",
                    "name": "X-Conexteo-Webhook-Id",
                    "required": true,
                    "schema": {
                      "example": "12345",
                      "pattern": "^\\d+$",
                      "type": "string"
                    }
                  },
                  {
                    "description": "Delivery date, epoch in seconds.",
                    "in": "header",
                    "name": "X-Conexteo-Timestamp",
                    "required": true,
                    "schema": {
                      "example": 1795167300,
                      "type": "integer"
                    }
                  },
                  {
                    "description": "Signature of `timestamp.raw body`: `v1=` followed by the HMAC-SHA256 digest in lowercase hexadecimal.",
                    "in": "header",
                    "name": "X-Conexteo-Signature",
                    "required": true,
                    "schema": {
                      "example": "v1=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
                      "pattern": "^v1=[0-9a-f]{64}$",
                      "type": "string"
                    }
                  }
                ],
                "requestBody": {
                  "content": {
                    "application/json": {
                      "examples": {
                        "rcs.delivered": {
                          "value": {
                            "created_at": "2026-11-20T09:30:00.000Z",
                            "data": {
                              "channel": "rcs",
                              "message_id": 1002,
                              "message_rcs_id": 555001,
                              "recipient": "+33600000000",
                              "status": "delivered",
                              "user_id": 42
                            },
                            "event": "rcs.delivered",
                            "id": 12349,
                            "type": "ack_rcs"
                          }
                        },
                        "rcs.failed": {
                          "value": {
                            "created_at": "2026-11-20T09:32:00.000Z",
                            "data": {
                              "channel": "rcs",
                              "errorcode": "MESSAGE_EXPIRED",
                              "message_id": 1002,
                              "message_rcs_id": 555002,
                              "recipient": "+33600000000",
                              "status": "failed",
                              "user_id": 42
                            },
                            "event": "rcs.failed",
                            "id": 12351,
                            "type": "ack_rcs"
                          }
                        },
                        "rcs.fallback_blocked_credits": {
                          "value": {
                            "created_at": "2026-11-20T09:34:00.000Z",
                            "data": {
                              "channel": "rcs",
                              "message_id": 1002,
                              "reason": "INSUFFICIENT_SMS_CREDITS",
                              "user_id": 42
                            },
                            "event": "rcs.fallback_blocked_credits",
                            "id": 12353,
                            "type": "ack_rcs"
                          }
                        },
                        "rcs.fallback_sms": {
                          "value": {
                            "created_at": "2026-11-20T09:33:00.000Z",
                            "data": {
                              "channel": "rcs",
                              "errorcode": "RECIPIENT_NOT_REACHABLE",
                              "message_id": 1002,
                              "message_rcs_id": 555003,
                              "recipient": "+33600000000",
                              "user_id": 42
                            },
                            "event": "rcs.fallback_sms",
                            "id": 12352,
                            "type": "ack_rcs"
                          }
                        },
                        "rcs.read": {
                          "value": {
                            "created_at": "2026-11-20T09:31:00.000Z",
                            "data": {
                              "channel": "rcs",
                              "message_id": 1002,
                              "message_rcs_id": 555001,
                              "recipient": "+33600000000",
                              "status": "read",
                              "user_id": 42
                            },
                            "event": "rcs.read",
                            "id": 12350,
                            "type": "ack_rcs"
                          }
                        }
                      },
                      "schema": {
                        "$ref": "#/components/schemas/WebhookAckRcsNotification"
                      }
                    }
                  },
                  "required": true
                },
                "responses": {
                  "2XX": {
                    "description": "Any 2xx status within 15 seconds, with a response body of 1 MB at most: the notification is received; the body is ignored."
                  },
                  "4XX": {
                    "description": "Any 4xx status is a failure. A timeout (15 seconds), a connection error, a response over 1 MB and a redirection (not followed) are failures too. The notification is then sent again after 30 s, 2 min, 10 min, 30 min, 1 h, 4 h and 12 h, with the same `X-Conexteo-Webhook-Id`: 8 attempts at most."
                  },
                  "5XX": {
                    "description": "Any 5xx status is a failure. A timeout (15 seconds), a connection error, a response over 1 MB and a redirection (not followed) are failures too. The notification is then sent again after 30 s, 2 min, 10 min, 30 min, 1 h, 4 h and 12 h, with the same `X-Conexteo-Webhook-Id`: 8 attempts at most."
                  }
                },
                "security": [],
                "summary": "RCS statuses and SMS fallbacks (`ack_rcs`)"
              }
            }
          },
          "ack_sms": {
            "webhooks[type=ack_sms].webhook": {
              "post": {
                "description": "Sent to the `webhook` of the element of `webhooks` whose `type` is `ack_sms`, at any position. Events: `sms.submit_ko` and `sms.deliver_report`. Conexteo sends neither `X-APP-ID` nor `X-API-KEY` to your URL: authenticate a signed notification by its signature. Signed webhook: a POST with a JSON body and the three `X-Conexteo-*` headers. Unsigned webhook (legacy format): the body is `{ \"type\": \"ack_sms\", \"data\": [ { ... } ] }`, the element of `data` having the fields of `data` below without `channel`; no `X-Conexteo-*` header, no `id` or `event`, a single attempt. With `request_method` `get`, the same object is sent in the query string: `type=<type>&data[]=<JSON of the element>`.",
                "operationId": "receiveAckSmsWebhook",
                "parameters": [
                  {
                    "description": "Event identifier, the `id` of the body; unchanged on retries. Signed webhooks only.",
                    "in": "header",
                    "name": "X-Conexteo-Webhook-Id",
                    "required": true,
                    "schema": {
                      "example": "12345",
                      "pattern": "^\\d+$",
                      "type": "string"
                    }
                  },
                  {
                    "description": "Delivery date, epoch in seconds. Signed webhooks only.",
                    "in": "header",
                    "name": "X-Conexteo-Timestamp",
                    "required": true,
                    "schema": {
                      "example": 1795167300,
                      "type": "integer"
                    }
                  },
                  {
                    "description": "Signature of `timestamp.raw body`: `v1=` followed by the HMAC-SHA256 digest in lowercase hexadecimal. Signed webhooks only.",
                    "in": "header",
                    "name": "X-Conexteo-Signature",
                    "required": true,
                    "schema": {
                      "example": "v1=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
                      "pattern": "^v1=[0-9a-f]{64}$",
                      "type": "string"
                    }
                  }
                ],
                "requestBody": {
                  "content": {
                    "application/json": {
                      "examples": {
                        "sms.deliver_report": {
                          "value": {
                            "created_at": "2026-11-20T09:16:02.411Z",
                            "data": {
                              "channel": "sms",
                              "deliver": 1,
                              "deliverdate": "2026-11-20",
                              "delivertime": "10:16:01",
                              "message_id": 1001,
                              "message_sms_id": 987654,
                              "user_id": 42
                            },
                            "event": "sms.deliver_report",
                            "id": 12346,
                            "type": "ack_sms"
                          }
                        },
                        "sms.submit_ko": {
                          "value": {
                            "created_at": "2026-11-20T09:15:30.123Z",
                            "data": {
                              "channel": "sms",
                              "deliver": 2,
                              "deliverdate": "2026-11-20",
                              "delivertime": "10:15:29",
                              "errorcode": "SUBMIT_KO",
                              "message_id": 1001,
                              "message_sms_id": 987654,
                              "timestamp_transmitted": "2026-11-20 09:15:29",
                              "transmitted": true,
                              "user_id": 42
                            },
                            "event": "sms.submit_ko",
                            "id": 12345,
                            "type": "ack_sms"
                          }
                        }
                      },
                      "schema": {
                        "$ref": "#/components/schemas/WebhookAckSmsNotification"
                      }
                    }
                  },
                  "required": true
                },
                "responses": {
                  "2XX": {
                    "description": "Any 2xx status within 15 seconds, with a response body of 1 MB at most: the notification is received; the body is ignored."
                  },
                  "4XX": {
                    "description": "Any 4xx status is a failure. A timeout (15 seconds), a connection error, a response over 1 MB and a redirection (not followed) are failures too. A signed notification is then sent again after 30 s, 2 min, 10 min, 30 min, 1 h, 4 h and 12 h, with the same `X-Conexteo-Webhook-Id`: 8 attempts at most. An unsigned notification is sent once."
                  },
                  "5XX": {
                    "description": "Any 5xx status is a failure. A timeout (15 seconds), a connection error, a response over 1 MB and a redirection (not followed) are failures too. A signed notification is then sent again after 30 s, 2 min, 10 min, 30 min, 1 h, 4 h and 12 h, with the same `X-Conexteo-Webhook-Id`: 8 attempts at most. An unsigned notification is sent once."
                  }
                },
                "security": [],
                "summary": "SMS submission failures and delivery reports (`ack_sms`)"
              }
            }
          },
          "reply": {
            "webhooks[type=reply].webhook": {
              "post": {
                "description": "Sent to the `webhook` of the element of `webhooks` whose `type` is `reply`, at any position. Events: `reply.sms` and `reply.rcs`. Conexteo sends neither `X-APP-ID` nor `X-API-KEY` to your URL: authenticate a signed notification by its signature. Signed webhook: a POST with a JSON body and the three `X-Conexteo-*` headers. Unsigned webhook (legacy format): the body is `{ \"type\": \"reply\", \"data\": [ { ... } ] }`, the element of `data` having only `user_id`, `message_id`, `message_sms_id`, `recipient`, `replydate`, `replytime` and `content`; for a reply to an RCS message, `message_sms_id` holds the RCS line identifier; no `X-Conexteo-*` header, no `id` or `event`, a single attempt. With `request_method` `get`, the same object is sent in the query string: `type=<type>&data[]=<JSON of the element>`.",
                "operationId": "receiveReplyWebhook",
                "parameters": [
                  {
                    "description": "Event identifier, the `id` of the body; unchanged on retries. Signed webhooks only.",
                    "in": "header",
                    "name": "X-Conexteo-Webhook-Id",
                    "required": true,
                    "schema": {
                      "example": "12345",
                      "pattern": "^\\d+$",
                      "type": "string"
                    }
                  },
                  {
                    "description": "Delivery date, epoch in seconds. Signed webhooks only.",
                    "in": "header",
                    "name": "X-Conexteo-Timestamp",
                    "required": true,
                    "schema": {
                      "example": 1795167300,
                      "type": "integer"
                    }
                  },
                  {
                    "description": "Signature of `timestamp.raw body`: `v1=` followed by the HMAC-SHA256 digest in lowercase hexadecimal. Signed webhooks only.",
                    "in": "header",
                    "name": "X-Conexteo-Signature",
                    "required": true,
                    "schema": {
                      "example": "v1=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
                      "pattern": "^v1=[0-9a-f]{64}$",
                      "type": "string"
                    }
                  }
                ],
                "requestBody": {
                  "content": {
                    "application/json": {
                      "examples": {
                        "reply.rcs": {
                          "value": {
                            "created_at": "2026-11-20T09:25:00.512Z",
                            "data": {
                              "channel": "rcs",
                              "choice_label": "Yes, I want it",
                              "content": "Yes, I want it",
                              "message_id": 1002,
                              "message_rcs_id": 555001,
                              "postback_data": "yes",
                              "rcs_choice_id": 77,
                              "received_at": "2026-11-20T09:24:58.000Z",
                              "recipient": "+33600000000",
                              "reply_kind": "button",
                              "replydate": "2026-11-20",
                              "replytime": "10:25:00",
                              "user_id": 42
                            },
                            "event": "reply.rcs",
                            "id": 12348,
                            "type": "reply"
                          }
                        },
                        "reply.sms": {
                          "value": {
                            "created_at": "2026-11-20T09:20:00.000Z",
                            "data": {
                              "channel": "sms",
                              "content": "YES",
                              "message_id": 1001,
                              "message_sms_id": 987654,
                              "recipient": "+33600000000",
                              "replydate": "2026-11-20",
                              "replytime": "10:19:59",
                              "user_id": 42
                            },
                            "event": "reply.sms",
                            "id": 12347,
                            "type": "reply"
                          }
                        }
                      },
                      "schema": {
                        "$ref": "#/components/schemas/WebhookReplyNotification"
                      }
                    }
                  },
                  "required": true
                },
                "responses": {
                  "2XX": {
                    "description": "Any 2xx status within 15 seconds, with a response body of 1 MB at most: the notification is received; the body is ignored."
                  },
                  "4XX": {
                    "description": "Any 4xx status is a failure. A timeout (15 seconds), a connection error, a response over 1 MB and a redirection (not followed) are failures too. A signed notification is then sent again after 30 s, 2 min, 10 min, 30 min, 1 h, 4 h and 12 h, with the same `X-Conexteo-Webhook-Id`: 8 attempts at most. An unsigned notification is sent once."
                  },
                  "5XX": {
                    "description": "Any 5xx status is a failure. A timeout (15 seconds), a connection error, a response over 1 MB and a redirection (not followed) are failures too. A signed notification is then sent again after 30 s, 2 min, 10 min, 30 min, 1 h, 4 h and 12 h, with the same `X-Conexteo-Webhook-Id`: 8 attempts at most. An unsigned notification is sent once."
                  }
                },
                "security": [],
                "summary": "Replies to SMS and RCS messages (`reply`)"
              }
            }
          }
        },
        "description": "Replaces the whole configuration: a type with a URL is created or updated; a type with an empty URL or missing from the body is deleted. The first signed webhook generates the signing secret, returned once in `secret`.",
        "operationId": "updateWebhooks",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhooksRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookConfig"
                }
              }
            },
            "description": "Configuration updated"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Invalid request, or `signed` with `request_method=get`, or `ack_rcs` without `signed` true."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Body larger than 1 MB."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Replace the webhook configuration",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/deliveries": {
      "get": {
        "description": "Lists the deliveries of your notifications, most recent first. Finished deliveries are kept for 30 days.",
        "operationId": "listWebhookDeliveries",
        "parameters": [
          {
            "description": "`nextCursor` of the previous page; returns the deliveries with a lower id.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Page size, 1 to 100; 20 by default (also for `0` or a non-numeric value). An out-of-range value is brought back to 1 or 100, without error.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryPage"
                }
              }
            },
            "description": "Page of deliveries"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "List webhook deliveries",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/secret": {
      "post": {
        "description": "Generates a new secret and invalidates the previous one at once: signed webhooks fail until you update the secret on your side. Every later delivery, retries included, uses the new secret.",
        "operationId": "rotateWebhookSecret",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecret"
                }
              }
            },
            "description": "New secret"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "`X-APP-ID` or `X-API-KEY` headers missing or invalid."
          }
        },
        "security": [
          {
            "X-API-KEY": [],
            "X-APP-ID": []
          }
        ],
        "summary": "Rotate the signing secret",
        "tags": [
          "Webhooks"
        ]
      }
    }
  },
  "security": [
    {
      "X-API-KEY": [],
      "X-APP-ID": []
    }
  ],
  "servers": [
    {
      "description": "API Server",
      "url": "https://api.conexteo.com"
    }
  ],
  "tags": [
    {
      "description": "APIs to send and manage SMS and RCS messages.",
      "name": "Messages"
    },
    {
      "description": "APIs to create and manage contact lists.",
      "name": "Contact lists"
    },
    {
      "description": "APIs to create and manage the contacts of a contact list.",
      "name": "Contacts"
    },
    {
      "description": "APIs to import contacts from a file into a contact list, and to follow the import.",
      "name": "Contact imports"
    },
    {
      "description": "APIs to create and manage SMS and RCS templates. Sending routes do not take a template identifier.",
      "name": "Template"
    },
    {
      "description": "APIs to create and manage STOPs.",
      "name": "Stops"
    },
    {
      "description": "APIs to read the credit balance of your account.",
      "name": "User"
    },
    {
      "description": "APIs to manage sub-accounts. Reserved to master accounts (401 for a sub-account). An account with no sub-account can only list them (empty result) and create the first one.",
      "name": "Sub-accounts"
    },
    {
      "description": "APIs to configure the webhooks (callbacks) of your account.\n\nA master account does not receive the events of its sub-accounts: each sub-account configures its own webhooks. `user_id` in a notification is the account that sent the message.\n\nThe content of each notification is described by the callbacks of PUT /webhooks: one per type, one schema per event. New fields may be added over time: ignore the fields you do not recognize.\n\n## How to verify a signature\n\nEach signed webhook is a POST with three headers:\n\n| Header | Content |\n|---|---|\n| `X-Conexteo-Webhook-Id` | Event identifier, unchanged on retries: use it to ignore events already processed. |\n| `X-Conexteo-Timestamp` | Delivery date (epoch, in seconds). |\n| `X-Conexteo-Signature` | `v1=` followed by the HMAC-SHA256 digest, in lowercase hexadecimal. |\n\n1. Build the string: the timestamp, a dot, then the raw request body (before any JSON parsing).\n2. Compute its HMAC-SHA256 digest in lowercase hexadecimal, with the whole secret as key (`whsec_` prefix included, not decoded).\n3. Compare it with `X-Conexteo-Signature` after the `v1=` prefix: reject the webhook if it differs.\n\n```\nsignature = \"v1=\" + HMAC_SHA256(secret, timestamp + \".\" + raw body)\n```\n\nAfter POST /webhooks/secret, all later deliveries, retries included, use the new secret.",
      "name": "Webhooks"
    }
  ]
}
