{
  "openapi": "3.0.1",
  "info": {
    "title": "SMSGLobal REST API",
    "description": "The REST API allows programmatic access to SMSGlobal features in MXT. To use the REST API, you will need an MXT account and an API key and secret. You can generate these inside your MXT account. The REST API can be accessed at api.smsglobal.com. Use of SSL is supported and strongly encouraged. The REST API takes full advantage of all HTTP headers. Each part of a request and response is meaningful, including the request method (GET/POST, etc.), the individual headers (Location, Content-Type, Accept, etc.), and the response status code (200, 400, 404, etc.). Use of this API assumes a working knowledge of these HTTP components, and general use of RESTful web APIs.",
    "termsOfService": "https://www.smsglobal.com/terms-and-conditions/",
    "contact": {
      "email": "support@smsglobal.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://api.smsglobal.com"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/v2/auto-topup": {
      "get": {
        "tags": [
          "auto topup"
        ],
        "summary": "Get the auto top-up information associated to the authenticated account.",
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoTopupResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/contact/{id}": {
      "delete": {
        "tags": [
          "contact group"
        ],
        "summary": "Delete a contact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contact identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Returned when successful"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the contact is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "get": {
        "tags": [
          "contact group"
        ],
        "summary": "Get the contact as identified by the given id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contact identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the contact is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "put": {
        "tags": [
          "contact group"
        ],
        "summary": "Update the contact as identified by the given id. You can only update the default fields associated with each contact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contact identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returned when successful"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the contact is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/group": {
      "get": {
        "tags": [
          "contact group"
        ],
        "summary": "Get a list of all contact groups",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset (default 1)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return (default 20)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "post": {
        "tags": [
          "contact group"
        ],
        "summary": "Create a new contact group",
        "requestBody": {
          "description": "Group object that needs to be added",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/group/{groupId}/contact": {
      "post": {
        "tags": [
          "contact group"
        ],
        "summary": "Create a contact",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "Contact object that needs to be added",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/group/{groupId}/contacts": {
      "get": {
        "tags": [
          "contact group"
        ],
        "summary": "Get a list of all contacts in a group",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset (default 1)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return (default 20)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort by field id or msisdn. Prefix with minus (-) for descending order",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when the parameters are wrong"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the group is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/group/{id}": {
      "delete": {
        "tags": [
          "contact group"
        ],
        "summary": "Delete a contact group",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contact group identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Returned when the contact group is deleted successfully"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when group is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "get": {
        "tags": [
          "contact group"
        ],
        "summary": "Get the contact group as identified by the given id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contact group identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the group is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "patch": {
        "tags": [
          "contact group"
        ],
        "summary": "Update fields of a group as identified by the given id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contact group identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "Group object that needs to be updated",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/dedicated-number": {
      "get": {
        "tags": [
          "dedicated number"
        ],
        "summary": "View list of dedicated numbers",
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DedicatedNumbersResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        },
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination Offset (default 1)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return (default 20)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ]
      },
      "post": {
        "tags": [
          "dedicated number"
        ],
        "summary": "Purchase a new virtual dedicated number",
        "description": "Purchase a new virtual dedicated number. Only supported for postpaid accounts; the first available number matching the requested country/type is assigned immediately.",
        "requestBody": {
          "description": "Dedicated number purchase options",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DedicatedNumberPurchaseRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "201": {
            "description": "Returned when the number was purchased successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DedicatedNumber"
                }
              }
            }
          },
          "400": {
            "description": "Returned when the request is invalid, the account is not postpaid, or no matching numbers are available"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          }
        }
      }
    },
    "/v2/opt-outs": {
      "get": {
        "tags": [
          "opt outs"
        ],
        "summary": "View list of opted out numbers",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "query",
            "description": "Filter by phone number",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination Offset (default 1)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return (default 20)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptOutsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "post": {
        "tags": [
          "opt outs"
        ],
        "summary": "Opt out mobile numbers",
        "requestBody": {
          "description": "Optout",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returned when numbers opted-out successfully"
          },
          "400": {
            "description": "Returned when request parameter is invalid"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/opt-outs/validate": {
      "post": {
        "tags": [
          "opt outs"
        ],
        "summary": "Validate mobile numbers for opt out",
        "requestBody": {
          "description": "Group object that needs to be updated",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptOutValidationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returned when validation is performed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptOutValidationsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when request parameter is invalid"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/opt-outs/{number}": {
      "delete": {
        "tags": [
          "opt outs"
        ],
        "summary": "Opt in a mobile number",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "description": "Opt in mobile number (msidn)",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Returned when number opted-in successfully"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when number is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sharedpool": {
      "get": {
        "tags": [
          "sharedpool"
        ],
        "summary": "View list of shared pools",
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedPoolsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sharedpool/{id}": {
      "get": {
        "tags": [
          "sharedpool"
        ],
        "summary": "View details of a shared pool",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Shared pool id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedPoolResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when the sharedpool id is not valid"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when sharedpool does not exist"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sms": {
      "get": {
        "tags": [
          "sms"
        ],
        "summary": "View list of outgoing messages",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset (default 1, maximum offset + limit = 10,000)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return (default 20, maximum 1000)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by message status. Allowed values [delivered, sent, scheduled, noCredits, invalidNumber, undelivered]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date of the date range filter. Date format <Y-m-d H:i:s> in account timezone",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date of the date range filter. Date format <Y-m-d H:i:s> in account timezone",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "destination",
            "in": "query",
            "description": "The number message was sent to",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "source",
            "in": "query",
            "description": "The number message was sent from",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search string in source, destination and message",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsSentsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "post": {
        "tags": [
          "sms"
        ],
        "summary": "Send messages",
        "requestBody": {
          "description": "Message data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsOutsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsOutsResponse"
                }
              }
            }
          },
          "202": {
            "description": "Returned when message(s) saved successfully and added to queue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsOutsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when input validation failed"
          },
          "402": {
            "description": "Returned when account is out of credits"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sms/{id}": {
      "delete": {
        "tags": [
          "sms"
        ],
        "summary": "Delete outgoing message",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Outgoing message id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Returned when message deleted successfully"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when sms outgoing is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "get": {
        "tags": [
          "sms"
        ],
        "summary": "View details of an outgoing message",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Outgoing message id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsOutsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when sms outgoing is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sms-incoming": {
      "get": {
        "tags": [
          "sms incoming"
        ],
        "summary": "View list of incoming messages",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset (default 1, maximum offset + limit = 10,000)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return (default 20, maximum 1000)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date of the date range filter. Date format <Y-m-d H:i:s> in account timezone",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date of the date range filter. Date format <Y-m-d H:i:s> in account timezone",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "destination",
            "in": "query",
            "description": "The shared pool or dedicated number which the sms was sent to",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "description": "The number where the SMS appears to come from",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search string in source, destination and message",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsIncomingsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sms-incoming/{id}": {
      "delete": {
        "tags": [
          "sms incoming"
        ],
        "summary": "Delete incoming message",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Incoming message id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Returned when message deleted successfully"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when sms incoming message is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "get": {
        "tags": [
          "sms incoming"
        ],
        "summary": "View details of a incoming message",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Incoming message id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsIncomingResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when sms incoming message is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/user/billing-details": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Get the authenticated account's billing details",
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingDetailsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "put": {
        "tags": [
          "user"
        ],
        "summary": "Update the authenticated account's billing details",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingDetailsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/user/contact-details": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Get the authenticated account's contact details",
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetailsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "put": {
        "tags": [
          "user"
        ],
        "summary": "Update the authenticated account's contact details",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactDetailsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/user/credit-balance": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "View the account balance",
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditBalanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when the user is Post-Paid user"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        },
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "description": "Sub account email address",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v2/user/low-balance-alerts": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Get the low balance alerts information associated to the authenticated account",
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LowBalanceAlertsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "put": {
        "tags": [
          "user"
        ],
        "summary": "Update the low balance alerts information associated to the authenticated account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LowBalanceAlertsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/user/sub-account": {
      "post": {
        "tags": [
          "user"
        ],
        "summary": "Create sub account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/user/verified-numbers": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Get the authenticated account's verified numbers",
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifiedNumbersResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/voice/call-bridging": {
      "post": {
        "tags": [
          "voice"
        ],
        "summary": "Call bridging",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallBridgingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when input validation failed"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/business-profile": {
      "get": {
        "tags": [
          "business profile"
        ],
        "summary": "View list of business profiles",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return (default 20, maximum 1000)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "registrationType",
            "in": "query",
            "description": "Registration type of the business profile",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrationNumber",
            "in": "query",
            "description": "Registration number of the business profile",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "businessName",
            "in": "query",
            "description": "Business name of the business profile",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessProfilesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when input validation failed"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "post": {
        "tags": [
          "business profile"
        ],
        "summary": "Create a new business profile",
        "requestBody": {
          "description": "Business profile data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BusinessProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when input validation failed"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/business-profile/{id}": {
      "get": {
        "tags": [
          "business profile"
        ],
        "summary": "Get the business profile identified by the given id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The business profile identifier.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessProfileResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the business profile is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "patch": {
        "tags": [
          "business profile"
        ],
        "summary": "Update a business profile",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The business profile identifier.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "Business profile fields to update",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BusinessProfileUpdateRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BusinessProfileUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when input validation failed"
          },
          "403": {
            "description": "Returned when the user is not authorized to update the business profile, or the business profile has already been submitted to ACMA and can no longer be updated"
          },
          "404": {
            "description": "Returned when the business profile is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      },
      "delete": {
        "tags": [
          "business profile"
        ],
        "summary": "Delete a business profile",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The business profile identifier.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Returned when the business profile is deleted successfully"
          },
          "403": {
            "description": "Returned when the user is not authorized to delete the business profile, or it is linked to one or more Sender ID registrations"
          },
          "404": {
            "description": "Returned when the business profile is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sender-id": {
      "get": {
        "tags": [
          "sender id"
        ],
        "summary": "Sender ID list",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset (default 0)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return (default 20, maximum 1000)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "senderId",
            "in": "query",
            "description": "Filter by sender id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "Filter by country",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status: Submitted, Approved or Rejected",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderIdsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when input validation failed"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the contact is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sender-id/{id}": {
      "get": {
        "tags": [
          "sender id"
        ],
        "summary": "Get the Sender Id as identified by the given id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The sender id identifier.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderIdResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the contact is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sender-id/register": {
      "post": {
        "tags": [
          "sender id"
        ],
        "summary": "Register a new Sender Id using business profiles",
        "requestBody": {
          "description": "Sender Id registration data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SenderIdRegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when input validation failed"
          },
          "402": {
            "description": "Returned when account is out of credits"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/invoices": {
      "get": {
        "tags": [
          "invoices"
        ],
        "summary": "Get all the invoices associated to the authenticated account",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination Offset (default 1)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return (default 20, -1 for no limit)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date <Y-m-d H:i:s>",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date <Y-m-d H:i:s>",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicesResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/invoice/{id}": {
      "get": {
        "tags": [
          "invoices"
        ],
        "summary": "Get the id specified invoice associated to the authenticated account",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The invoice identifier.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the invoice is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/sms/scheduled/{id}": {
      "delete": {
        "tags": [
          "sms"
        ],
        "summary": "Delete scheduled message",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Scheduled message ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Returned when message deleted successfully"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when scheduled message is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/user/sub-account/api": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Get sub account api",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "description": "Sub account email address",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubAccountApiKeysResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Returned when the method is not allowed"
          }
        }
      },
      "post": {
        "tags": [
          "user"
        ],
        "summary": "Create api for sub account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubAccountApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Returned when the method is not allowed"
          }
        }
      }
    },
    "/v2/user/sub-account/api/{id}": {
      "delete": {
        "tags": [
          "user"
        ],
        "summary": "Delete sub account api",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The API key identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Returned when message deleted successfully"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when sms outgoing is not found"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/user/verified-number": {
      "post": {
        "tags": [
          "user"
        ],
        "summary": "Register verified numbers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifiedNumberRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/user/verified-number/verify": {
      "post": {
        "tags": [
          "user"
        ],
        "summary": "Verify verified numbers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifiedNumberVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returned when successful"
          },
          "400": {
            "description": "Returned when the request is bad"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/user/verified-numbers/pending": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Get the account's pending verified numbers",
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifiedNumbersResponse"
                }
              }
            }
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/dedicated-number/{number}": {
      "get": {
        "tags": [
          "dedicated number"
        ],
        "summary": "View details of a dedicated number",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "description": "The dedicated number (MSISDN)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returned when successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DedicatedNumber"
                }
              }
            }
          },
          "400": {
            "description": "Returned when the number is not valid"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the dedicated number does not exist"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/v2/dedicated-number/{id}": {
      "delete": {
        "tags": [
          "dedicated number"
        ],
        "summary": "Cancel a dedicated number's auto-renewal",
        "description": "Cancel a dedicated number's auto-renewal. The number is not released immediately - it remains active and owned until the end of the current billing period.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The dedicated number identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Returned when the cancellation was successful"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          },
          "404": {
            "description": "Returned when the dedicated number or its active subscription is not found"
          }
        }
      }
    },
    "/v2/user/sub-account/credit": {
      "post": {
        "tags": [
          "user"
        ],
        "summary": "Transfer credits to a sub-account",
        "description": "Transfer credit balance from the authenticated (prepaid) account to one of its prepaid sub-accounts. Both accounts must share the same currency.",
        "requestBody": {
          "description": "Credit transfer details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditTransferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returned when the credit transfer was successful"
          },
          "400": {
            "description": "Returned when the authenticated account is postpaid, has insufficient balance, the sub-account cannot be found, or the currencies do not match"
          },
          "403": {
            "description": "Returned when the user is not authorized"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CardResponse": {
        "type": "object",
        "properties": {
          "default": {
            "type": "boolean",
            "description": "Whether this credit card is the default card."
          },
          "number": {
            "type": "string",
            "example": "5454-XXXX-XXXX-5454",
            "description": "The credit card's masked number."
          },
          "token": {
            "type": "string",
            "description": "The credit card identifier."
          },
          "type": {
            "type": "string",
            "example": "Visa",
            "description": "The credit card type."
          }
        }
      },
      "AutoTopupResponse": {
        "type": "object",
        "properties": {
          "disabled": {
            "type": "boolean",
            "example": false,
            "description": "Whether auto top-up is disabled for the authenticated user."
          },
          "balanceThreshold": {
            "type": "integer",
            "description": "The auto top-up low balance threshold."
          },
          "balanceAmount": {
            "type": "integer",
            "description": "The auto top-up amount."
          },
          "card": {
            "$ref": "#/components/schemas/CardResponse"
          },
          "periodicFrequency": {
            "type": "integer",
            "description": "The auto top up periodic frequency."
          },
          "periodicStartDate": {
            "type": "string",
            "example": "2019-01-01T00:00:00.000Z",
            "description": "The auto top up start date."
          },
          "periodicEndDate": {
            "type": "string",
            "example": "2019-02-01T00:00:00.000Z",
            "description": "The auto top up end date."
          },
          "periodicAmount": {
            "type": "integer",
            "description": "The periodic top up amount."
          }
        }
      },
      "ContactRequest": {
        "type": "object",
        "properties": {
          "givenName": {
            "type": "string",
            "description": "Contact given name."
          },
          "familyName": {
            "type": "string",
            "description": "Contact surname."
          },
          "displayName": {
            "type": "string",
            "description": "Contact display name."
          },
          "msisdn": {
            "type": "string",
            "description": "Contact mobile number."
          },
          "emailAddress": {
            "type": "string",
            "description": "Contact email address."
          }
        }
      },
      "ContactResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Contact identifier."
          },
          "groupId": {
            "type": "integer",
            "description": "Contact group id."
          },
          "givenName": {
            "type": "string",
            "description": "Contact given name."
          },
          "familyName": {
            "type": "string",
            "description": "Contact surname."
          },
          "displayName": {
            "type": "string",
            "description": "Contact display name."
          },
          "msisdn": {
            "type": "string",
            "description": "Contact mobile number."
          },
          "emailAddress": {
            "type": "string",
            "description": "Contact email address."
          }
        }
      },
      "ContactsResponse": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactResponse"
            }
          }
        }
      },
      "GroupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Group name. Max length of 100 characters."
          },
          "keyword": {
            "type": "string",
            "description": "Email to SMS keyword."
          },
          "isGlobal": {
            "type": "boolean",
            "description": "Is the group globally visible to sub accounts. Defaults to false."
          },
          "defaultOrigin": {
            "type": "string",
            "description": "The default SMS origin for this group. 4-11 characters for alphanumeric or 4-15 * digits for numeric. Pass an empty string \" for shared pool numbers."
          }
        }
      },
      "GroupResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Group identifier."
          },
          "name": {
            "type": "string",
            "description": "Group name. Max length of 100 characters."
          },
          "keyword": {
            "type": "string",
            "description": "Email to SMS keyword."
          },
          "isGlobal": {
            "type": "boolean",
            "description": "Is the group globally visible to sub accounts. Defaults to false."
          },
          "contactCount": {
            "type": "integer",
            "description": "Number of contacts in the group."
          },
          "defaultOrigin": {
            "type": "string",
            "description": "The default SMS origin for this group. 4-11 characters for alphanumeric or 4-15 * digits for numeric. Pass an empty string \" for shared pool numbers."
          }
        }
      },
      "GroupsResponse": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupResponse"
            }
          }
        }
      },
      "DedicatedNumber": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Dedicated number identifier."
          },
          "userId": {
            "type": "integer",
            "description": "User identifier."
          },
          "msisdn": {
            "type": "string",
            "description": "Mobile phone number including country and area codes. 4 to 15 digits; no spaces or other formatting."
          },
          "type": {
            "type": "string",
            "description": "How to handle incoming messages. 0 = Disable this number, 1 = SMPP, 2 = HTTP Callback, 3 = Email, 4 = SMSGlobal website only. All messages still appear on the SMSGlobal website regardless of this setting."
          },
          "emailAddress": {
            "type": "string",
            "description": "Email address to send incoming SMS to."
          },
          "httpCallbackUrl": {
            "type": "string",
            "description": "HTTP callback URL for incoming SMS."
          },
          "isAutoReplyEnabled": {
            "type": "boolean",
            "description": "Whether auto reply messages are enabled."
          },
          "autoReplyMessage": {
            "type": "string",
            "description": "The auto reply message. Maximum of 480 characters."
          },
          "autoReplyOrigin": {
            "type": "string",
            "description": "Where the auto reply should appear to come from. Blank to use the dedicated number itself. 4-15 digits or 3-11 numbers and letters."
          }
        }
      },
      "DedicatedNumbersResponse": {
        "type": "object",
        "properties": {
          "dedicatedNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DedicatedNumber"
            }
          }
        }
      },
      "OptOutResponse": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "number": {
            "type": "string"
          }
        }
      },
      "OptOutsResponse": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "optouts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OptOutResponse"
            }
          }
        }
      },
      "OptOutRequest": {
        "type": "object",
        "properties": {
          "optouts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OptOutValidationRequest": {
        "type": "object",
        "properties": {
          "optouts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OptOutValidationResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "number": {
            "type": "string"
          }
        }
      },
      "OptOutValidationsResponse": {
        "type": "object",
        "properties": {
          "optouts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OptOutValidationResponse"
            }
          }
        }
      },
      "SmsOutRequest": {
        "type": "object",
        "properties": {
          "destination": {
            "type": "string",
            "description": "Destination mobile number. 3-15 digits."
          },
          "destinations": {
            "type": "array",
            "description": "A collection of destination mobile numbers. 3-15 digits.",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "message": {
            "type": "string",
            "description": "The SMS message. If longer than 160 characters (GSM) or 70 characters (Unicode), splits into multiple SMS."
          },
          "origin": {
            "type": "string",
            "description": "Where the SMS appears to come from. 3-11 characters A-Za-z0-9 if alphanumeric; 3-15 digits if numeric (if set, set sharedPool to null)."
          },
          "scheduledDateTime": {
            "type": "string",
            "description": "The datetime the message should be sent in UTC."
          },
          "campaign": {
            "type": "string",
            "description": "The campaign the message is associated with (optional)."
          },
          "sharedPool": {
            "type": "string",
            "description": "The shared pool to use (if set, set origin to null)."
          },
          "notifyUrl": {
            "type": "string",
            "description": "Url to post back the status of message."
          },
          "incomingUrl": {
            "type": "string",
            "description": "Url to post back incoming messages."
          },
          "expiryDateTime": {
            "type": "string",
            "description": "The datetime in UTC at message will expire."
          }
        }
      },
      "SmsOutsRequest": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmsOutRequest"
            }
          }
        }
      },
      "SmsSentResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Message part identifier."
          },
          "outgoing_id": {
            "type": "integer",
            "description": "Outgoing message identifier."
          },
          "origin": {
            "type": "string",
            "description": "Where the SMS appears to come from. 4-11 characters A-Za-z0-9 if alphanumeric; 4-15 digits if numeric (if set, set sharedPool to null)."
          },
          "destination": {
            "type": "string",
            "description": "Destination mobile number. 4-15 digits."
          },
          "message": {
            "type": "string",
            "description": "Outgoing message."
          },
          "status": {
            "type": "string",
            "description": "Message status"
          },
          "dateTime": {
            "type": "string",
            "description": "The date the message was created in UTC."
          }
        }
      },
      "SmsSentsResponse": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmsSentResponse"
            }
          }
        }
      },
      "SmsOutsResponse": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmsSentResponse"
            }
          }
        }
      },
      "CampaignResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Campaign identifier"
          }
        }
      },
      "SmsIncomingResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Incoming message identifier"
          },
          "outgoing_id": {
            "type": "integer",
            "description": "Outgoing message identifier"
          },
          "origin": {
            "type": "string",
            "description": "Where the SMS appears to come from"
          },
          "destination": {
            "type": "string",
            "description": "The shared pool or dedicated number which the sms was sent to"
          },
          "message": {
            "type": "string",
            "description": "The SMS message. If longer than 160 characters (GSM) or 70 characters (Unicode), splits into multiple SMS"
          },
          "isUnicode": {
            "type": "boolean",
            "description": "If incoming message contains Unicode characters"
          },
          "dateTime": {
            "type": "string",
            "description": "The date and time this message was received"
          },
          "campaign": {
            "$ref": "#/components/schemas/CampaignResponse"
          },
          "isMultipart": {
            "type": "boolean",
            "description": "Whether the message exceeded the maximum length and had to be split into multiple parts"
          },
          "partNumber": {
            "type": "integer",
            "description": "If concatenated, the part number this SMS represents; otherwise 1"
          },
          "totalParts": {
            "type": "integer",
            "description": "If concatenated, the total number of parts in this SMS. Ranges from 1-255"
          }
        }
      },
      "SmsIncomingsResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of incoming message objects"
          },
          "offset": {
            "type": "integer",
            "description": "Pagination Offset (default 1)"
          },
          "limit": {
            "type": "integer",
            "description": "Number of incoming message objects to return"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmsIncomingResponse"
            }
          }
        }
      },
      "BillingDetailsRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "The account holder's full name"
          },
          "phone": {
            "type": "string",
            "description": "The account holder's phone number"
          },
          "email": {
            "type": "string",
            "description": "The account holder's email address"
          },
          "address": {
            "type": "string",
            "description": "The account holder's address"
          },
          "city": {
            "type": "string",
            "description": "The account holder's city"
          },
          "state": {
            "type": "string",
            "description": "The account holder's state"
          },
          "postcode": {
            "type": "string",
            "description": "The account holder's postcode"
          },
          "country": {
            "type": "string",
            "description": "The account holder's country"
          }
        }
      },
      "BillingDetailsResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "The account holder's full name"
          },
          "phone": {
            "type": "string",
            "description": "The account holder's phone number"
          },
          "email": {
            "type": "string",
            "description": "The account holder's email address"
          },
          "address": {
            "type": "string",
            "description": "The account holder's address"
          },
          "city": {
            "type": "string",
            "description": "The account holder's city"
          },
          "state": {
            "type": "string",
            "description": "The account holder's state"
          },
          "postcode": {
            "type": "string",
            "description": "The account holder's postcode"
          },
          "country": {
            "type": "string",
            "description": "The account holder's country"
          }
        }
      },
      "ContactDetailsRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "The account holder's full name"
          },
          "phone": {
            "type": "string",
            "description": "The account holder's phone number"
          },
          "email": {
            "type": "string",
            "description": "The account holder's email address"
          },
          "address": {
            "type": "string",
            "description": "The account holder's address"
          },
          "city": {
            "type": "string",
            "description": "The account holder's city"
          },
          "state": {
            "type": "string",
            "description": "The account holder's state"
          },
          "postcode": {
            "type": "string",
            "description": "The account holder's postcode"
          },
          "country": {
            "type": "string",
            "description": "The account holder's country"
          }
        }
      },
      "ContactDetailsResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "The account holder's full name"
          },
          "phone": {
            "type": "string",
            "description": "The account holder's phone number"
          },
          "email": {
            "type": "string",
            "description": "The account holder's email address"
          },
          "address": {
            "type": "string",
            "description": "The account holder's address"
          },
          "city": {
            "type": "string",
            "description": "The account holder's city"
          },
          "state": {
            "type": "string",
            "description": "The account holder's state"
          },
          "postcode": {
            "type": "string",
            "description": "The account holder's postcode"
          },
          "country": {
            "type": "string",
            "description": "The account holder's country"
          }
        }
      },
      "CreditBalanceResponse": {
        "type": "object",
        "properties": {
          "balance": {
            "type": "number",
            "description": "Account Credit Balance (available for Pre-paid customers)"
          },
          "currency": {
            "type": "string",
            "description": "Currency Code"
          }
        }
      },
      "LowBalanceAlertsResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether to send low balance alerts"
          },
          "threshold": {
            "type": "integer",
            "description": "The low balance alerts threshold amount"
          },
          "sendto": {
            "type": "string",
            "description": "The low balance alerts contact delivery destination"
          }
        }
      },
      "LowBalanceAlertsRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether to send low balance alerts"
          },
          "threshold": {
            "type": "integer",
            "description": "The low balance alerts threshold amount"
          },
          "sendto": {
            "type": "string",
            "description": "The low balance alerts contact delivery destination"
          }
        }
      },
      "SubAccountRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The sub account's display name"
          },
          "email": {
            "type": "string",
            "description": "The sub account's email address"
          },
          "password": {
            "type": "string",
            "description": "The sub account's password"
          },
          "mobile": {
            "type": "string",
            "description": "The sub account's mobile number"
          }
        }
      },
      "CallBridgingRequest": {
        "type": "object",
        "properties": {
          "origin": {
            "type": "integer",
            "description": "First destination to call"
          },
          "desination": {
            "type": "integer",
            "description": "Number to bridge the call to"
          },
          "virtualNumber": {
            "type": "integer",
            "description": "Client virtual number to be used as callerid"
          }
        }
      },
      "VerifiedNumbersResponse": {
        "type": "object",
        "properties": {
          "numbers": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "DedicatedNumberResponse": {
        "type": "object",
        "properties": {
          "msisdn": {
            "type": "string",
            "description": "Mobile phone number including country and area codes. 4 to 15 digits; no spaces or other formatting"
          }
        }
      },
      "SharedPoolResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Shared pool identifier"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "numbers": {
            "$ref": "#/components/schemas/DedicatedNumberResponse"
          }
        }
      },
      "SharedPoolsResponse": {
        "type": "object",
        "properties": {
          "SharedPools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SharedPoolResponse"
            }
          }
        }
      },
      "BusinessProfileResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Business profile identifier."
          },
          "registrationType": {
            "type": "string",
            "description": "Registration type of the business (e.g. ABN). Maximum 20 characters."
          },
          "registrationNumber": {
            "type": "string",
            "description": "Business registration number. Maximum 20 characters."
          },
          "businessName": {
            "type": "string",
            "description": "Business name. Maximum 80 characters."
          },
          "companyStreetAddress1": {
            "type": "string",
            "description": "Company street address line 1. Maximum 80 characters."
          },
          "companyStreetAddress2": {
            "type": "string",
            "description": "Company street address line 2. Maximum 80 characters."
          },
          "companyCity": {
            "type": "string",
            "description": "Company city. Maximum 50 characters."
          },
          "companyState": {
            "type": "string",
            "description": "Company state. Maximum 100 characters."
          },
          "companyPostalCode": {
            "type": "string",
            "description": "Company postal code. Maximum 10 characters."
          },
          "companyWebsite": {
            "type": "string",
            "description": "Company website. Maximum 128 characters."
          },
          "companyPhone": {
            "type": "string",
            "description": "Company phone number. Maximum 15 characters."
          },
          "title": {
            "type": "string",
            "description": "Contact title (e.g. Mr, Mrs, Dr). Maximum 25 characters."
          },
          "firstName": {
            "type": "string",
            "description": "Contact first name. Maximum 32 characters."
          },
          "lastName": {
            "type": "string",
            "description": "Contact last name. Maximum 32 characters."
          },
          "email": {
            "type": "string",
            "description": "Contact email address. Maximum 255 characters."
          },
          "phone": {
            "type": "string",
            "description": "Contact phone number. Maximum 15 characters."
          },
          "mobile": {
            "type": "string",
            "description": "Contact mobile number. Maximum 15 characters."
          },
          "global": {
            "type": "boolean",
            "description": "Whether this business profile is shared with other sub-accounts. Defaults to false."
          },
          "createdDate": {
            "type": "string",
            "description": "Created date."
          },
          "updatedDate": {
            "type": "string",
            "description": "Updated date."
          },
          "status": {
            "type": "string",
            "description": "Review status of the business profile. One of Draft, Submitted, Approved, Rejected, Resubmitted."
          },
          "company_country": {
            "type": "string",
            "description": "Company country name."
          }
        }
      },
      "BusinessProfilesResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of business profile objects."
          },
          "offset": {
            "type": "integer",
            "description": "Pagination offset."
          },
          "limit": {
            "type": "integer",
            "description": "Number of business profile objects returned."
          },
          "businessProfiles": {
            "type": "array",
            "description": "A collection of business profile objects.",
            "items": {
              "$ref": "#/components/schemas/BusinessProfileResponse"
            }
          }
        }
      },
      "BusinessProfileRequest": {
        "type": "object",
        "properties": {
          "registrationType": {
            "type": "string",
            "description": "Registration type of the business (e.g. ABN). Required. Maximum 20 characters."
          },
          "registrationNumber": {
            "type": "string",
            "description": "Business registration number. Required. Maximum 20 characters."
          },
          "businessName": {
            "type": "string",
            "description": "Business name. Required. Maximum 80 characters."
          },
          "companyStreetAddress1": {
            "type": "string",
            "description": "Company street address line 1. Required. Maximum 80 characters."
          },
          "companyStreetAddress2": {
            "type": "string",
            "description": "Company street address line 2. Optional. Maximum 80 characters."
          },
          "companyCity": {
            "type": "string",
            "description": "Company city. Required. Maximum 50 characters."
          },
          "companyState": {
            "type": "string",
            "description": "Company state. Required. Maximum 100 characters."
          },
          "companyPostalCode": {
            "type": "string",
            "description": "Company postal code. Required. Maximum 10 characters."
          },
          "companyCountry": {
            "type": "string",
            "description": "Company country. Required. Must match one of the supported country names."
          },
          "companyWebsite": {
            "type": "string",
            "description": "Company website. Required. Maximum 128 characters."
          },
          "companyPhone": {
            "type": "string",
            "description": "Company phone number. Required. Maximum 15 characters."
          },
          "title": {
            "type": "string",
            "description": "Contact title (e.g. Mr, Mrs, Dr). Optional. Maximum 25 characters."
          },
          "firstName": {
            "type": "string",
            "description": "Contact first name. Required. Maximum 32 characters."
          },
          "lastName": {
            "type": "string",
            "description": "Contact last name. Required. Maximum 32 characters."
          },
          "email": {
            "type": "string",
            "description": "Contact email address. Required. Maximum 255 characters."
          },
          "phone": {
            "type": "string",
            "description": "Contact phone number. Required. Maximum 15 characters."
          },
          "mobile": {
            "type": "string",
            "description": "Contact mobile number. Optional. Maximum 15 characters."
          },
          "global": {
            "type": "boolean",
            "description": "Are you sharing this business profile to other sub-accounts? Optional, defaults to false."
          }
        }
      },
      "BusinessProfileUpdateRequest": {
        "type": "object",
        "properties": {
          "registrationType": {
            "type": "string",
            "description": "Registration type of the business (e.g. ABN). Maximum 20 characters."
          },
          "registrationNumber": {
            "type": "string",
            "description": "Business registration number. Maximum 20 characters."
          },
          "businessName": {
            "type": "string",
            "description": "Business name. Maximum 80 characters."
          },
          "companyStreetAddress1": {
            "type": "string",
            "description": "Company street address line 1. Maximum 80 characters."
          },
          "companyStreetAddress2": {
            "type": "string",
            "description": "Company street address line 2. Maximum 80 characters."
          },
          "companyCity": {
            "type": "string",
            "description": "Company city. Maximum 50 characters."
          },
          "companyState": {
            "type": "string",
            "description": "Company state. Maximum 100 characters."
          },
          "companyPostalCode": {
            "type": "string",
            "description": "Company postal code. Maximum 10 characters."
          },
          "companyCountry": {
            "type": "string",
            "description": "Company country. Must match one of the supported country names."
          },
          "companyWebsite": {
            "type": "string",
            "description": "Company website. Maximum 128 characters."
          },
          "companyPhone": {
            "type": "string",
            "description": "Company phone number. Maximum 15 characters."
          },
          "title": {
            "type": "string",
            "description": "Contact title (e.g. Mr, Mrs, Dr). Maximum 25 characters."
          },
          "firstName": {
            "type": "string",
            "description": "Contact first name. Maximum 32 characters."
          },
          "lastName": {
            "type": "string",
            "description": "Contact last name. Maximum 32 characters."
          },
          "email": {
            "type": "string",
            "description": "Contact email address. Maximum 255 characters."
          },
          "phone": {
            "type": "string",
            "description": "Contact phone number. Maximum 15 characters."
          },
          "mobile": {
            "type": "string",
            "description": "Contact mobile number. Maximum 15 characters."
          },
          "global": {
            "type": "boolean",
            "description": "Are you sharing this business profile to other sub-accounts?"
          },
          "verificationPhoto": {
            "type": "string",
            "format": "binary",
            "description": "Image of the user's face, used for facial biometric verification. JPG or PNG. Max 10MB."
          },
          "verificationId": {
            "type": "string",
            "format": "binary",
            "description": "Image of the user's identity document (e.g. passport, national ID card, or driver's licence), used for document verification. JPG, PNG, or PDF. Max 10MB."
          }
        }
      },
      "SenderIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id"
          },
          "senderId": {
            "type": "string",
            "description": "Sender id"
          },
          "createdDate": {
            "type": "string",
            "description": "Created date"
          },
          "updatedDate": {
            "type": "string",
            "description": "Updated date"
          },
          "country": {
            "type": "string",
            "description": "Country"
          },
          "status": {
            "type": "string",
            "description": "Status"
          }
        }
      },
      "SenderIdsResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of sender id objects"
          },
          "offset": {
            "type": "integer",
            "description": "Pagination Offset (default 1)"
          },
          "limit": {
            "type": "integer",
            "description": "Number of sender id objects to return"
          },
          "senderIds": {
            "type": "array",
            "description": "A collection of sender id objects",
            "items": {
              "$ref": "#/components/schemas/SenderIdResponse"
            }
          }
        }
      },
      "SenderIdRegisterRequest": {
        "type": "object",
        "properties": {
          "senderId": {
            "type": "string",
            "description": "Sender Id"
          },
          "country": {
            "type": "string",
            "description": "Country"
          },
          "description": {
            "type": "string",
            "description": "A brief description on how you are going to use this Sender Id"
          },
          "businessProfileId": {
            "type": "integer",
            "description": "Business Profile ID"
          },
          "eaBusinessProfileId": {
            "type": "integer",
            "description": "Entity Associate Business Profile ID (optional)"
          },
          "termsAccepted": {
            "type": "boolean",
            "description": "I have read and accept the SMSGlobal Sender ID Registration Terms & Conditions (https://www.smsglobal.com/terms-and-conditions/)"
          }
        }
      },
      "CardsResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The total number of credit cards associated to the authenticated account."
          },
          "cards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardResponse"
            }
          }
        }
      },
      "CreditCardRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name on the credit card."
          },
          "number": {
            "type": "string",
            "description": "The credit card number, in the format XXXXXXXXXXXXXXXX."
          },
          "expiry": {
            "type": "string",
            "description": "The credit card expiry month/year, in the format MMYY or MM/YY or MM-YY."
          },
          "csv": {
            "type": "integer",
            "description": "The credit card csv/cvn/cvv, in the format XXXX."
          },
          "onFile": {
            "type": "boolean",
            "description": "Whether to store the credit card on file. Default: false."
          }
        }
      },
      "TopUpCardRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "The credit card identifier when using an existing card."
          },
          "name": {
            "type": "string",
            "description": "The name on the credit card."
          },
          "number": {
            "type": "string",
            "description": "The credit card number, in the format XXXXXXXXXXXXXXXX."
          },
          "expiry": {
            "type": "string",
            "description": "The credit card expiry month/year, in the format MMYY or MM/YY or MM-YY."
          },
          "csv": {
            "type": "integer",
            "description": "The credit card csv/cvn/cvv, in the format XXXX."
          },
          "onFile": {
            "type": "boolean",
            "description": "Whether to store the credit card on file. Default: false."
          }
        }
      },
      "TopUpRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "integer",
            "description": "The top up amount."
          },
          "card": {
            "$ref": "#/components/schemas/TopUpCardRequest"
          },
          "contact": {
            "$ref": "#/components/schemas/BillingDetailsRequest"
          }
        }
      },
      "InvoiceItemResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The item identifier."
          },
          "quantity": {
            "type": "integer",
            "description": "The item quantity."
          },
          "productName": {
            "type": "string",
            "description": "The item product name."
          },
          "unitCost": {
            "type": "number",
            "description": "The item unit cost."
          }
        }
      },
      "InvoicePaymentResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The payment identifier."
          },
          "paypalTransactionId": {
            "type": "string",
            "description": "The PayPal transaction id, displayed when applicable."
          },
          "total": {
            "type": "number",
            "description": "The payment total."
          },
          "currencyCode": {
            "type": "string",
            "description": "The payment currency code."
          },
          "status": {
            "type": "string",
            "description": "The payment status text."
          },
          "date": {
            "type": "string",
            "example": "2019-01-01T00:00:00.000Z",
            "description": "The payment date."
          },
          "paymentType": {
            "type": "string",
            "description": "The payment type."
          }
        }
      },
      "InvoiceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The invoice identifier."
          },
          "items": {
            "type": "array",
            "description": "The items that belong to this invoice.",
            "items": {
              "$ref": "#/components/schemas/InvoiceItemResponse"
            }
          },
          "date": {
            "type": "string",
            "example": "2019-01-01T00:00:00.000Z",
            "description": "The invoice date."
          },
          "status": {
            "type": "string",
            "description": "The invoice status."
          },
          "total": {
            "type": "number",
            "description": "The invoice total."
          },
          "currencyCode": {
            "type": "string",
            "description": "The invoice currency code."
          },
          "payments": {
            "type": "array",
            "description": "The payments that belong to this invoice.",
            "items": {
              "$ref": "#/components/schemas/InvoicePaymentResponse"
            }
          }
        }
      },
      "InvoicesResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The total number of invoices associated to the authenticated account."
          },
          "offset": {
            "type": "integer",
            "description": "The pagination Offset (default 1)."
          },
          "limit": {
            "type": "integer",
            "description": "The limit placed upon the total number of invoices returned."
          },
          "invoices": {
            "type": "array",
            "description": "The optionally filtered invoices associated to the authenticated account.",
            "items": {
              "$ref": "#/components/schemas/InvoiceResponse"
            }
          }
        }
      },
      "SubAccountApiRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of your API Key to help identify it easily"
          },
          "email": {
            "type": "string",
            "description": "The sub account's email address"
          }
        }
      },
      "ApiKeyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          },
          "isEnabled": {
            "type": "boolean"
          }
        }
      },
      "SubAccountApiKeysResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The total number of api key associated to the authenticated account"
          },
          "apiKeys": {
            "type": "array",
            "description": "The individual api key associated to the authenticated account",
            "items": {
              "$ref": "#/components/schemas/ApiKeyResponse"
            }
          }
        }
      },
      "VerifiedNumberRequest": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "Number to verify"
          }
        }
      },
      "VerifiedNumberVerifyRequest": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "Number to verify"
          },
          "pin": {
            "type": "integer",
            "description": "PIN"
          }
        }
      },
      "DedicatedNumberPurchaseRequest": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "description": "ISO country code, e.g. AU. Defaults to the account's country."
          },
          "type": {
            "type": "string",
            "description": "Number quality: standard, silver, or gold. Defaults to standard."
          },
          "email": {
            "type": "string",
            "description": "Email address to send incoming SMS to. If provided (and no httpCallbackUrl is given), replies are routed to this address."
          },
          "httpCallbackUrl": {
            "type": "string",
            "description": "HTTP callback URL for incoming SMS. If provided, replies are routed here (takes priority over email)."
          }
        }
      },
      "CreditTransferRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Email address of the sub-account to transfer credits to"
          },
          "credits": {
            "type": "number",
            "description": "Amount of credit to transfer. Minimum 0."
          }
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "api_key",
        "in": "header"
      }
    }
  }
}

