openapi: 3.0.0
info:
  title: Messaging Gateway SzybkiSMS.pl (former GSMService.pl)
  description: "\r\n# Introduction\r\n\r\nThis document was created to explain the process of integration any application or system with the **SzybkiSMS.pl** SMS Gateway via the *REST API*. Currently, there are several ways to send messages with the SzybkiSMS.pl platform:\r\n\r\n* Directly from the [https://szybkisms.pl](https://szybkisms.pl) platform [User Panel](https://panel.szybkisms.pl)\r\n* Via this *REST API* and provided *SDKs*\r\n* Via the legacy (deprecated) versions API: *Webservices (SOAP)* and *HTTP* \r\n* Via the *MAIL2SMS* service\r\n\r\nThis document describes the possibilities offered by **REST API**.\r\n\r\n> **We kindly ask you to read this documentation carefully before starting the integration. This will make the whole process easier and will help you avoid many problems.**\r\n\r\n## Documentation and Try Outs\r\n\r\nThis documentation is available in two formats: [**REDOC**](https://api.szybkisms.pl/rest/) and [**SWAGGER**](https://api.szybkisms.pl/rest/swagger). You can test any endpoint directly from documentation using **Try Out** feature of Swagger. Also you can [download a **YAML** file](https://api.szybkisms.pl/rest/swagger/messaging.yaml) with this specification in OpenApi 3.0 format.\r\n\r\n## Account signup and setup\r\n\r\nFirstly, it is necessary to create your personal account at the SzybkiSMS.pl SMS Gateway platform if you haven't one and activate access to the API. To register a new account please [signup the form](https://panel.szybkisms.pl/rejestracja). After signing up and fully activation of an account you have to activate an API ID.\r\n\r\nTo do it please use [this site](https://panel.szybkisms.pl/api) - fill the *New API ID* form with your preferred API ID, select which API standard you want to activate for this account (select **REST API** there). Optionally you can add IP adresses (or IP pool with CIDR notation) from which access to your account via API will be possible. You can also set a callback address there to collect any messages status updates automatically. When a status of a message changes, the callback address will be called with passing parameters with new message status.\r\n\r\nAfter setup an API access you will get an unique **API Access Token** - please write it down as there won't be possible to display it again (you will have the possibility to regenerate it only). This token will be required to authenticate all the requests made with API on your account.\r\n\r\n## Authentication of API requests\r\n\r\nAll the endpoints of this REST API have to be authenticated using your API Access Token with one exception: */rest/ping* endpoint which doesn't need an authentication. \r\n\r\nTo make an authenticated request you should add to all requests an ***Authorization* header** which you have generated in previous step:\r\n\r\n```html\r\nAuthorization: Bearer <YOUR_API_ACCESS_TOKEN>;\r\n```\r\n\r\n## URLs to connect to API\r\n\r\nPlease use this SSL secured adresses to connect to REST API:\r\n\r\n* ```https://api.szybkisms.pl/rest``` - for production system\r\n\r\n* ```https://api.szybkisms.pl/rest-sandbox``` - for test system (Sandbox)\r\n\r\n> [!NOTE]\r\n> **When calling our API, make sure you are using TLS version 1.2 or higher. Older versions are no longer supported.**\r\n\r\n# SDK Client Libraries\r\n\r\nFor developers integrating SMS functionality into their app, we provide a convenient SDK Libraries.\r\n\r\nOur SDKs allow you to quickly start interacting with the Gateway using your favorite programming language. Currently we support the following languages:\r\n\r\n## PHP ≥ 8.2\r\n\r\nTo install PHP SDK issue the following command:\r\n\r\n```shell\r\ncomposer require gsmservice-pl/messaging-sdk-php\r\n```\r\nMore information and documentation you can find at our [GitHub](https://github.com/gsmservice-pl/messaging-sdk-php) \r\n\r\n## Typescript\r\n\r\nTo install Typescript SDK issue the following command:\r\n\r\n```shell\r\nnpm add @gsmservice-pl/messaging-sdk-typescript\r\n```\r\n\r\nMore information and documentation you can find at our [GitHub](https://github.com/gsmservice-pl/messaging-sdk-typescript) \r\n\r\n## Python ≥ 3.8\r\n\r\nTo install Python SDK issue the following command:\r\n\r\n```shell\r\npip install gsmservice-gateway\r\n```\r\n\r\nMore information and documentation you can find at our [GitHub](https://github.com/gsmservice-pl/messaging-sdk-python) \r\n\r\n## C# (.Net  ≥ 8.0)\r\n\r\nTo install C# SDK issue the following command:\r\n\r\n```shell\r\ndotnet add package Gsmservice.Gateway\r\n```\r\n\r\nMore information and documentation you can find at our [GitHub](https://github.com/gsmservice-pl/messaging-sdk-csharp)\r\n\r\n## Java ≥ 11\r\n\r\nTo install Java SDK with Gradle issue the following command:\r\n\r\n```shell\r\nimplementation 'pl.gsmservice:gateway:1.0.1'\r\n```\r\n\r\nMore information and documentation you can find at our [GitHub](https://github.com/gsmservice-pl/messaging-sdk-java)\r\n\r\n## Go ≥ 1.14\r\n\r\nTo install C# SDK issue the following command:\r\n\r\n```shell\r\ngo get github.com/gsmservice-pl/messaging-sdk-go\r\n```\r\n\r\nMore information and documentation you can find at our [GitHub](https://github.com/gsmservice-pl/messaging-sdk-go)\r\n"
  contact:
    name: Bramka SMS SzybkiSMS.pl
    url: https://szybkisms.pl
    email: kontakt@szybkisms.pl
  license:
    name: MIT
    url: https://opensource.org/license/mit
  version: 1.2.1
  x-logo:
    url: https://panel.szybkisms.pl/assets/media/logos/szybki_sms_logo.svg
    href: https://szybkisms.pl
servers:
  - url: https://api.szybkisms.pl/rest
    description: Production system
    x-speakeasy-server-id: prod
  - url: https://api.szybkisms.pl/rest-sandbox
    description: Test system (SANDBOX)
    x-speakeasy-server-id: sandbox
paths:
  /account:
    get:
      tags:
        - Accounts
      summary: Get account details
      description: "Get current account balance and other details of your account. You can check also account limit and if account is main one. Main accounts have unlimited privileges and using [User Panel](https://panel.szybkisms.pl) you can create as many subaccounts as you need.\r\n \r\nThe request doesn't contain a body or any parameters. As a successful result an `AccountResponse` object will be returned with properties describing details of current account you are logged in to using API Access Token. This request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: getAccountDetails
      responses:
        '200':
          description: The request was processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: accounts
      x-speakeasy-name-override: get
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->accounts->get(

            );

            if ($response->accountResponse !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.accounts.get();

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.accounts.get()

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            var res = await sdk.Accounts.GetAsync();

            // handle response
        - lang: java
          label: Java SDK
          source: >-
            package hello.world;


            import java.lang.Exception;

            import pl.gsmservice.gateway.Client;

            import pl.gsmservice.gateway.models.errors.ErrorResponse;

            import
            pl.gsmservice.gateway.models.operations.GetAccountDetailsResponse;


            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    GetAccountDetailsResponse res = sdk.accounts().get()
                            .call();

                    if (res.accountResponse().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Accounts.Get(ctx)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.AccountResponse != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/account",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/account",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.szybkisms.pl")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/rest/account", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/account\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/account");

            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.szybkisms.pl/rest/account")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/account")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /account/{user_login}:
    get:
      tags:
        - Accounts
      summary: Get subaccount details
      description: "Check account balance and other details such subcredit balance of a subaccount. Subaccounts are additional users who can access your account services and the details. You can restrict access level and setup privileges to subaccounts using [user panel](https://panel.szybkisms.pl).\r\n    \r\nThis endpoint accepts a path `user_login` parameter with empty request body. You should pass the full subaccount login to access its data. \r\n\r\nAs a successful result an `AccountResponse` object will be returned with properties describing details of subaccount with provided login. This request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: getSubaccountDetails
      parameters:
        - name: user_login
          in: path
          description: Login of the subaccount (user) to get the data for
          required: true
          style: simple
          explode: true
          schema:
            type: string
          example: some-login
      responses:
        '200':
          description: The request was processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: accounts
      x-speakeasy-name-override: getSubaccount
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->accounts->getSubaccount(
                userLogin: 'some-login'
            );

            if ($response->accountResponse !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.accounts.getSubaccount({
                userLogin: "some-login",
              });

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.accounts.get_subaccount(user_login="some-login")

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: >-
            using Gsmservice.Gateway;

            using Gsmservice.Gateway.Models.Components;


            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");


            var res = await sdk.Accounts.GetSubaccountAsync(userLogin:
            "some-login");


            // handle response
        - lang: java
          label: Java SDK
          source: >-
            package hello.world;


            import java.lang.Exception;

            import pl.gsmservice.gateway.Client;

            import pl.gsmservice.gateway.models.errors.ErrorResponse;

            import
            pl.gsmservice.gateway.models.operations.GetSubaccountDetailsResponse;


            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    GetSubaccountDetailsResponse res = sdk.accounts().getSubaccount()
                            .userLogin("some-login")
                            .call();

                    if (res.accountResponse().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Accounts.GetSubaccount(ctx, \"some-login\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.AccountResponse != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/account/some-login",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/account/some-login",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.szybkisms.pl")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/rest/account/some-login", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/account/some-login\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/account/some-login");

            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.szybkisms.pl/rest/account/some-login")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/account/some-login")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /messages/{ids}:
    get:
      tags:
        - Outgoing messages
      summary: Get the messages details and status by IDs
      description: "Check the current status and details of one or more messages using their `ids`. You have to pass the unique message *IDs* as path parameter, which were returned after sending a message. If you want to get the details of multiple messages at once, please separate their IDs with a comma. The system will accept maximum 50 identifiers in one call. If you need to get details of larger volume of messages, please split it to several separate requests.\r\n    \r\nAs a successful result an array with `Message` objects will be returned, each object per single found message. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were found and returned correctly) and `X-Error-Count` (count of messages which were not found).\r\n\r\nIf you pass duplicated IDs, API will return data of this message only once. This request have to be authenticated using **API Access Token**. \r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: getMessages
      parameters:
        - $ref: '#/components/parameters/ids'
      responses:
        '200':
          description: >-
            The request was processed successfully. Please check messages
            details in response body.
          headers:
            X-Success-Count:
              description: Count of messages processed correctly
              schema:
                type: integer
                example: '1'
            X-Error-Count:
              description: Count of messages processed with errors
              schema:
                type: integer
                example: '0'
          content:
            application/json:
              schema:
                description: Array of sent messages
                type: array
                items:
                  $ref: '#/components/schemas/Message'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: outgoing
      x-speakeasy-name-override: getByIds
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->outgoing->getByIds(
                ids: [
                    43456,
                ]
            );

            if ($response->messages !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.outgoing.getByIds({
                ids: [
                  43456,
                ],
              });

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.outgoing.get_by_ids(ids=[
                    43456,
                ])

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;
            using System.Collections.Generic;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            var res = await sdk.Outgoing.GetByIdsAsync(ids: new List<long>() {
                43456,
            });

            // handle response
        - lang: java
          label: Java SDK
          source: |-
            package hello.world;

            import java.lang.Exception;
            import java.util.List;
            import pl.gsmservice.gateway.Client;
            import pl.gsmservice.gateway.models.errors.ErrorResponse;
            import pl.gsmservice.gateway.models.operations.GetMessagesResponse;

            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    GetMessagesResponse res = sdk.outgoing().getByIds()
                            .ids(List.of(
                                43456L))
                            .call();

                    if (res.messages().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Outgoing.GetByIds(ctx, []int64{\n        43456,\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Messages != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/messages/{ids}",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/messages/{ids}",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.szybkisms.pl")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/rest/messages/{ids}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/messages/{ids}\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/messages/{ids}");

            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.szybkisms.pl/rest/messages/{ids}")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/messages/{ids}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    delete:
      tags:
        - Outgoing messages
      summary: Cancel a scheduled messages
      description: "Cancel messages using their `ids` which were scheduled to be sent at a specific time. You have to pass the unique message IDs as path parameter, which were returned after sending a message. If you want to cancel multiple messages at once, please separate their IDs with a comma. The system will accept maximum 50 identifiers in one call. If you need to cancel larger volume of messages, please split it to several separate requests. You can cancel only messages with *SCHEDULED* status.\r\n \r\nAs a successful result an array with `CancelledMessage` objects will be returned, each object per single message id. The `status` property will contain a status code of operation - `204` if message was cancelled successfully and other code if an error occured with cancelling a given message. In case of an error, an `error` property will contain `ErrorResponse` object with the details of an error.\r\n \r\nResponse will also include meta-data headers: `X-Success-Count` (a count of messages which were cancelled successfully), `X-Error-Count` (count of messages which were not cancelled) and `X-Sandbox` (if a request was made in Sandbox or Production system).\r\n \r\nIf you pass duplicated message IDs in one call, API will process them only once. This request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: cancelMessages
      parameters:
        - $ref: '#/components/parameters/ids'
      responses:
        '200':
          description: >-
            The request was processed successfully. Please check the status of
            messages cancellation in response body.
          headers:
            X-Success-Count:
              description: Count of messages processed correctly
              schema:
                type: integer
                example: 1
            X-Error-Count:
              description: Count of messages processed with errors
              schema:
                type: integer
                example: 0
            X-Sandbox:
              description: >-
                Determines whether the request was processed in the SANDBOX test
                system
              schema:
                type: boolean
                example: false
          content:
            application/json:
              schema:
                description: Array of cancelled messages
                type: array
                items:
                  $ref: '#/components/schemas/CancelledMessage'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: outgoing
      x-speakeasy-name-override: cancelScheduled
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->outgoing->cancelScheduled(
                ids: [
                    43456,
                ]
            );

            if ($response->cancelledMessages !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.outgoing.cancelScheduled({
                ids: [
                  43456,
                ],
              });

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.outgoing.cancel_scheduled(ids=[
                    43456,
                ])

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: >-
            using Gsmservice.Gateway;

            using Gsmservice.Gateway.Models.Components;

            using System.Collections.Generic;


            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");


            var res = await sdk.Outgoing.CancelScheduledAsync(ids: new
            List<long>() {
                43456,
            });


            // handle response
        - lang: java
          label: Java SDK
          source: >-
            package hello.world;


            import java.lang.Exception;

            import java.util.List;

            import pl.gsmservice.gateway.Client;

            import pl.gsmservice.gateway.models.errors.ErrorResponse;

            import
            pl.gsmservice.gateway.models.operations.CancelMessagesResponse;


            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    CancelMessagesResponse res = sdk.outgoing().cancelScheduled()
                            .ids(List.of(
                                43456L))
                            .call();

                    if (res.cancelledMessages().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Outgoing.CancelScheduled(ctx, []int64{\n        43456,\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.CancelledMessages != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/messages/{ids}",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "DELETE",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/messages/{ids}",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.szybkisms.pl")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/rest/messages/{ids}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/messages/{ids}\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/messages/{ids}");

            var request = new RestRequest(Method.DELETE);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.delete("https://api.szybkisms.pl/rest/messages/{ids}")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/messages/{ids}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /incoming:
    get:
      tags:
        - Incoming messages
      summary: List the received SMS messages
      description: "Get the details of all of received messages from your account incoming messages box. This endpoint supports pagination so you have to pass as query parameters a `page` value (number of page with received messages which you want to access) and a `limit` value (max of received messages per page). Messages are fetched from the latest one. The system will accept maximum **50** as `limit` parameter value. If you need to get details of larger volume of messages, please access them with next pages.\r\n    \r\nAs a successful result an array with `IncomingMessage` objects will be returned, each object per single received message. Response will also include meta-data headers: `X-Total-Results` (a total count of all received messages which are available in incoming box on your account), `X-Total-Pages` (a total number of all pages with results), `X-Current-Page` (A current page number) and `X-Limit` (messages count per single page). This request have to be authenticated using **API Access Token**. \r\n\r\nA response contains also a special `Link` header which includes *URIs* to access next, previous, first and last page with received messages (which complies with [RFC 5988](https://www.rfc-editor.org/rfc/rfc5988)).\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: listIncomingMessages
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: >-
            The request was processed successfully. Please check received
            messages details in response body.
          headers:
            X-Total-Results:
              description: Total Results
              schema:
                type: integer
                example: 1
            X-Total-Pages:
              description: Total number of results pages
              schema:
                type: integer
                example: 1
            X-Current-Page:
              description: Current results page number
              schema:
                type: integer
                example: 1
            X-Limit:
              description: Message limit per results page
              schema:
                type: integer
                example: 10
          content:
            application/json:
              schema:
                description: Array of received messages
                type: array
                items:
                  $ref: '#/components/schemas/IncomingMessage'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: incoming
      x-speakeasy-name-override: list
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->incoming->list(
                page: 1,
                limit: 10

            );

            if ($response->incomingMessages !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.incoming.list({});

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.incoming.list()

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            var res = await sdk.Incoming.ListAsync(
                page: 1,
                limit: 10
            );

            // handle response
        - lang: java
          label: Java SDK
          source: >-
            package hello.world;


            import java.lang.Exception;

            import pl.gsmservice.gateway.Client;

            import pl.gsmservice.gateway.models.errors.ErrorResponse;

            import
            pl.gsmservice.gateway.models.operations.ListIncomingMessagesResponse;


            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    ListIncomingMessagesResponse res = sdk.incoming().list()
                            .page(1L)
                            .limit(10L)
                            .call();

                    if (res.incomingMessages().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Incoming.List(ctx, nil, nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.IncomingMessages != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/incoming?page=1&limit=10",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/incoming?page=1&limit=10",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.szybkisms.pl")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET", "/rest/incoming?page=1&limit=10",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/incoming?page=1&limit=10\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/incoming?page=1&limit=10");

            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.szybkisms.pl/rest/incoming?page=1&limit=10")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/incoming?page=1&limit=10")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /incoming/{ids}:
    get:
      tags:
        - Incoming messages
      summary: Get the incoming messages by IDs
      description: "Get the details of one or more received messages using their `ids`. You have to pass the unique incoming message *IDs* as path parameter, which were given while receiving a messages. If you want to get the details of multiple messages at once, please separate their IDs with a comma. The system will accept maximum 50 identifiers in one call. If you need to get details of larger volume of incoming messages, please split it to several separate requests.\r\n    \r\nAs a successful result an array with `IncomingMessage` objects will be returned, each object per single found message. Response will also include meta-data headers: `X-Success-Count` (a count of incoming messages which were found and returned correctly) and `X-Error-Count` (count of incoming messages which were not found).\r\n\r\nIf you pass duplicated IDs, API will return data of this message only once. This request have to be authenticated using **API Access Token**. \r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: getIncomingMessages
      parameters:
        - $ref: '#/components/parameters/ids'
      responses:
        '200':
          description: >-
            The request was processed successfully. Please check received
            messages details in response body.
          headers:
            X-Success-Count:
              description: Count of incoming messages processed correctly
              schema:
                type: integer
                example: '1'
            X-Error-Count:
              description: Count of incoming messages processed with errors
              schema:
                type: integer
                example: '0'
          content:
            application/json:
              schema:
                description: Array of received messages
                type: array
                items:
                  $ref: '#/components/schemas/IncomingMessage'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: incoming
      x-speakeasy-name-override: getByIds
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->incoming->getByIds(
                ids: [
                    43456,
                ]
            );

            if ($response->incomingMessages !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.incoming.getByIds({
                ids: [
                  43456,
                ],
              });

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.incoming.get_by_ids(ids=[
                    43456,
                ])

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;
            using System.Collections.Generic;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            var res = await sdk.Incoming.GetByIdsAsync(ids: new List<long>() {
                43456,
            });

            // handle response
        - lang: java
          label: Java SDK
          source: >-
            package hello.world;


            import java.lang.Exception;

            import java.util.List;

            import pl.gsmservice.gateway.Client;

            import pl.gsmservice.gateway.models.errors.ErrorResponse;

            import
            pl.gsmservice.gateway.models.operations.GetIncomingMessagesResponse;


            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    GetIncomingMessagesResponse res = sdk.incoming().getByIds()
                            .ids(List.of(
                                43456L))
                            .call();

                    if (res.incomingMessages().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Incoming.GetByIds(ctx, []int64{\n        43456,\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.IncomingMessages != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/incoming/{ids}",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/incoming/{ids}",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.szybkisms.pl")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/rest/incoming/{ids}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/incoming/{ids}\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/incoming/{ids}");

            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.szybkisms.pl/rest/incoming/{ids}")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/incoming/{ids}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /ping:
    get:
      tags:
        - Common
      summary: Checks API availability and version
      description: "Check the API connection and the current API availability status. Also you will get the current API version number. The request doesn't contain a body or any parameters.\r\n\r\nAs a successful result a `PingResponse` object will be returned. This request doesn't need to be authenticated.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: ping
      responses:
        '200':
          description: API service is available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PingResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '503':
          description: API service is unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      security: []
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()->build();



            $response = $sdk->common->ping(

            );

            if ($response->pingResponse !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client();

            async function run() {
              const result = await client.common.ping();

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client() as client:

                res = client.common.ping()

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;

            var sdk = new Client();

            var res = await sdk.Common.PingAsync();

            // handle response
        - lang: java
          label: Java SDK
          source: |-
            package hello.world;

            import java.lang.Exception;
            import pl.gsmservice.gateway.Client;
            import pl.gsmservice.gateway.models.errors.ErrorResponse;
            import pl.gsmservice.gateway.models.operations.PingResponse;

            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                        .build();

                    PingResponse res = sdk.common().ping()
                            .call();

                    if (res.pingResponse().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New()\n\n    res, err := s.Common.Ping(ctx)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.PingResponse != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/ping",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/ping",
              "headers": {}
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.szybkisms.pl")

            conn.request("GET", "/rest/ping")

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/ping\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: |-
            var client = new RestClient("https://api.szybkisms.pl/rest/ping");
            var request = new RestRequest(Method.GET);
            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.szybkisms.pl/rest/ping")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/ping")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)

            response = http.request(request)
            puts response.read_body
  /messages/mms/price:
    post:
      tags:
        - Outgoing messages
      summary: Check the price of MMS Messages
      description: "Check the price of single or multiple MMS messages at the same time before sending them. You have to pass as request body the `MmsMessage` object (for single message) or `array` of `MmsMessage` objects (for multiple messages). Each object has several properties, describing message parameters such recipient phone number, content of the message, attachments, etc. Please mind that some of them are required.\r\nThe system will accept maximum **50** messages in one call. If you need to check the price of larger volume of messages, please split it to several separate requests.\r\n\r\nAs a successful result an `array` of `Price` objects will be returned, one object per each single message. You should check the `error` property of each message in a response body to make sure which were priced successfully and which finished with an error. Successfully priced messages will have `null` value of `error` property. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were processed successfully) and `X-Error-Count` (count of messages which were rejected).\r\n\r\nIf you check duplicated messages in one call, API will process such message only once. This request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).\r\n"
      operationId: getMmsPrice
      requestBody:
        description: >-
          To check the price of a single MMS or messages with the same content
          to multiple recipients, pass in the Request Body a single `MmsMessage`
          object with the properties of this message. To check the price of
          multiple messages with different content at the same time, pass in the
          Request Body an `array` of `MmsMessage` objects with the properties of
          each message.
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/MmsMessage'
                - title: Array of MmsMessage
                  type: array
                  items:
                    $ref: '#/components/schemas/MmsMessage'
                  maxItems: 50
                  minItems: 1
            examples:
              single:
                summary: MMS to single recipient
                description: >-
                  Example of checking the price of a single message to one
                  recipient.
                value:
                  recipients: '+48999999999'
                  message: This is MMS message content.
                  subject: This is a subject of the message
                  attachments: <file body in base64 format>
              bulk:
                summary: MMS with different content to multiple recipients
                description: >-
                  Example of checking the price of multiple messages with
                  different content to multiple recipients. Maximum number of
                  messages in one request: 50. Please split larger volumes into
                  separate calls.
                value:
                  - recipients: '+48999999999'
                    message: This is first MMS message content
                    subject: This is a subject of the first message
                    attachments: <file 1 body in base64 format>
                  - recipients: '+48999888777'
                    message: This is second MMS message content
                    subject: This is a subject of the second message
                    attachments: <file 2 body in base64 format>
              multi:
                summary: MMS with the same content to multiple recipients
                description: >-
                  Example of checking the price of multiple messages with the
                  same content to multiple recipients. Maximum number of
                  messages in one request: 50. Please split larger volumes into
                  separate calls.
                value:
                  recipients:
                    - '+48999999999'
                    - '+48999888777'
                  message: This is MMS message content.
                  subject: This is a subject of the message
                  attachments: <file body in base64 format>
              single_cid:
                summary: MMS to single recipient with custom message ID (cid)
                description: >-
                  Example of checking the price of a single message to one
                  recipient. Contains the "cid" property, which specifies the
                  user-defined identifier for the message.
                value:
                  recipients:
                    nr: '+48999999999'
                    cid: custom-id-A44445T
                  message: This is MMS message content
                  subject: This is a subject of the message
                  attachments: <file body in base64 format>
              bulk_cid:
                summary: >-
                  MMS with different content to multiple recipients with custom
                  message IDs (cid)
                description: >-
                  Example of checking the price of multiple messages with
                  different content to multiple recipients. Maximum number of
                  messages in one request: 50. Please split larger volumes into
                  separate calls. Contains the "cid" properties, which specifies
                  the user-defined identifier for messages.
                value:
                  - recipients:
                      nr: '+48999999999'
                      cid: custom-id-A44445T
                    message: This is first MMS message content
                    subject: This is a subject of the first message
                    attachments: <file 1 body in base64 format>
                  - recipients:
                      nr: '+48999888777'
                      cid: custom-id-F44445R
                    message: This is second MMS message content
                    subject: This is a subject of the second message
                    attachments: <file 2 body in base64 format>
              multi_cid:
                summary: >-
                  MMS with the same content to multiple recipients with custom
                  message IDs (cid)
                description: >-
                  Example of checking the price of multiple messages with the
                  same content to multiple recipients. Maximum number of
                  messages in one request: 50. Please split larger volumes into
                  separate calls. Contains the "cid" properties, which specifies
                  the user-defined identifier for messages.
                value:
                  recipients:
                    - nr: '+48999999999'
                      cid: custom-id-A44445T
                    - nr: '+48999888777'
                      cid: custom-id-F44445R
                  message: This is MMS message content
                  subject: This is a subject of the message
                  attachments: <file body in base64 format>
      responses:
        '200':
          description: >-
            The request was processed successfully. Please check the price and
            the details of particular messages in response body
          headers:
            X-Success-Count:
              description: Count of messages processed correctly
              schema:
                type: integer
                example: 1
            X-Error-Count:
              description: Count of messages processed with errors
              schema:
                type: integer
                example: 0
          content:
            application/json:
              schema:
                description: Array of checked messages
                type: array
                items:
                  $ref: '#/components/schemas/Price'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: outgoing.mms
      x-speakeasy-name-override: getPrice
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;
            use Gsmservice\Gateway\Models\Components;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();

            $request = [
                new Components\MmsMessage(
                    recipients: new Components\PhoneNumberWithCid(
                        nr: '+48999999999',
                        cid: 'my-id-1113',
                    ),
                    subject: 'To jest temat wiadomości',
                    message: 'To jest treść wiadomości',
                    attachments: [
                        '<file_body in base64 format>',
                    ],
                ),
            ];

            $response = $sdk->outgoing->mms->getPrice(
                request: $request
            );

            if ($response->prices !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.outgoing.mms.getPrice([
                {
                  recipients: {
                    nr: "+48999999999",
                    cid: "my-id-1113",
                  },
                  subject: "To jest temat wiadomości",
                  message: "To jest treść wiadomości",
                  attachments: [
                    "<file_body in base64 format>",
                  ],
                  date: null,
                },
              ]);

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.outgoing.mms.get_price(request=[
                    {
                        "recipients": {
                            "nr": "+48999999999",
                            "cid": "my-id-1113",
                        },
                        "subject": "To jest temat wiadomości",
                        "message": "To jest treść wiadomości",
                        "attachments": [
                            "<file_body in base64 format>",
                        ],
                        "date_": None,
                    },
                ])

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: >-
            using Gsmservice.Gateway;

            using Gsmservice.Gateway.Models.Components;

            using Gsmservice.Gateway.Models.Requests;

            using System.Collections.Generic;


            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");


            GetMmsPriceRequestBody req =
            GetMmsPriceRequestBody.CreateArrayOfMmsMessage(
                new List<MmsMessage>() {
                    new MmsMessage() {
                        Recipients = Recipients.CreatePhoneNumberWithCid(
                            new PhoneNumberWithCid() {
                                Nr = "+48999999999",
                                Cid = "my-id-1113",
                            }
                        ),
                        Subject = "To jest temat wiadomości",
                        Message = "To jest treść wiadomości",
                        Attachments = Attachments.CreateArrayOfStr(
                            new List<string>() {
                                "<file_body in base64 format>",
                            }
                        ),
                    },
                }
            );


            var res = await sdk.Outgoing.Mms.GetPriceAsync(req);


            // handle response
        - lang: java
          label: Java SDK
          source: >-
            package hello.world;


            import java.lang.Exception;

            import java.util.List;

            import pl.gsmservice.gateway.Client;

            import pl.gsmservice.gateway.models.components.Attachments;

            import pl.gsmservice.gateway.models.components.MmsMessage;

            import pl.gsmservice.gateway.models.components.PhoneNumberWithCid;

            import pl.gsmservice.gateway.models.components.Recipients;

            import pl.gsmservice.gateway.models.errors.ErrorResponse;

            import
            pl.gsmservice.gateway.models.operations.GetMmsPriceRequestBody;

            import pl.gsmservice.gateway.models.operations.GetMmsPriceResponse;


            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    GetMmsPriceRequestBody req = GetMmsPriceRequestBody.of(List.of(
                            MmsMessage.builder()
                                .recipients(Recipients.of(PhoneNumberWithCid.builder()
                                    .nr("+48999999999")
                                    .cid("my-id-1113")
                                    .build()))
                                .subject("To jest temat wiadomości")
                                .message("To jest treść wiadomości")
                                .attachments(Attachments.of(List.of(
                                    "<file_body in base64 format>")))
                                .build()));

                    GetMmsPriceResponse res = sdk.outgoing().mms().getPrice()
                            .request(req)
                            .call();

                    if (res.prices().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"github.com/gsmservice-pl/messaging-sdk-go/v3/models/components\"\n\t\"github.com/gsmservice-pl/messaging-sdk-go/v3/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Outgoing.Mms.GetPrice(ctx, operations.CreateGetMmsPriceRequestBodyArrayOfMmsMessage(\n        []components.MmsMessage{\n            components.MmsMessage{\n                Recipients: components.CreateRecipientsArrayOfStr(\n                    []string{\n                        \"+48999999999\",\n                    },\n                ),\n                Subject: messagingsdkgo.String(\"To jest temat wiadomości\"),\n                Message: messagingsdkgo.String(\"To jest treść wiadomości\"),\n                Attachments: messagingsdkgo.Pointer(components.CreateAttachmentsStr(\n                    \"<file_body in base64 format>\",\n                )),\n            },\n        },\n    ))\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Prices != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/messages/mms/price",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"recipients\":\"+48999999999\",\"subject\":\"To jest temat wiadomości\",\"message\":\"To jest treść wiadomości\",\"attachments\":\"<file_body in base64 format>\",\"date\":null}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/messages/mms/price",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              recipients: '+48999999999',
              subject: 'To jest temat wiadomości',
              message: 'To jest treść wiadomości',
              attachments: '<file_body in base64 format>',
              date: null
            }));
            req.end();
        - lang: Python 3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.szybkisms.pl")


            payload = "{\"recipients\":\"+48999999999\",\"subject\":\"To jest
            temat wiadomości\",\"message\":\"To jest treść
            wiadomości\",\"attachments\":\"<file_body in base64
            format>\",\"date\":null}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/rest/messages/mms/price", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/messages/mms/price\"\n\n\tpayload := strings.NewReader(\"{\\\"recipients\\\":\\\"+48999999999\\\",\\\"subject\\\":\\\"To jest temat wiadomości\\\",\\\"message\\\":\\\"To jest treść wiadomości\\\",\\\"attachments\\\":\\\"<file_body in base64 format>\\\",\\\"date\\\":null}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/messages/mms/price");

            var request = new RestRequest(Method.POST);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            request.AddHeader("content-type", "application/json");

            request.AddParameter("application/json",
            "{\"recipients\":\"+48999999999\",\"subject\":\"To jest temat
            wiadomości\",\"message\":\"To jest treść
            wiadomości\",\"attachments\":\"<file_body in base64
            format>\",\"date\":null}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://api.szybkisms.pl/rest/messages/mms/price")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"recipients\":\"+48999999999\",\"subject\":\"To jest temat wiadomości\",\"message\":\"To jest treść wiadomości\",\"attachments\":\"<file_body in base64 format>\",\"date\":null}")
              .asString();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url = URI("https://api.szybkisms.pl/rest/messages/mms/price")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"recipients\":\"+48999999999\",\"subject\":\"To
            jest temat wiadomości\",\"message\":\"To jest treść
            wiadomości\",\"attachments\":\"<file_body in base64
            format>\",\"date\":null}"


            response = http.request(request)

            puts response.read_body
  /messages/sms/price:
    post:
      tags:
        - Outgoing messages
      summary: Check the price of SMS Messages
      description: "Check the price of single or multiple SMS messages at the same time before sending them. You have to pass as request body the `SmsMessage` object (for single message) or `array` of `SmsMessage` objects (for multiple messages). Each object has several properties, describing message parameters such recipient phone number, content of the message, type, etc. Please mind that some of them are required.\r\nThe system will accept maximum **100** messages in one call. If you need to check the price of larger volume of messages, please split it to several separate requests.\r\n\r\nAs a successful result an `array` of `Price` objects will be returned, one object per each single message. You should check the `error` property of each message in a response body to make sure which were priced successfully and which finished with an error. Successfully priced messages will have `null` value of `error` property. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were processed successfully) and `X-Error-Count` (count of messages which were rejected).\r\n\r\nIf you check duplicated messages in one call, API will process such message only once. This request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).\r\n"
      operationId: getSmsPrice
      requestBody:
        description: >-
          To check the price of a single SMS or messages with the same content
          to multiple recipients, pass in the Request Body a single `SmsMessage`
          object with the properties of this message. To check the price of
          multiple messages with different content at the same time, pass in the
          Request Body an `array` of `SmsMessage` objects with the properties of
          each message.
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/SmsMessage'
                - title: Array of SmsMessage
                  type: array
                  items:
                    $ref: '#/components/schemas/SmsMessage'
                  maxItems: 100
                  minItems: 1
            examples:
              single:
                summary: SMS to single recipient
                description: >-
                  Example of checking the price of a single message to one
                  recipient.
                value:
                  recipients: '+48999999999'
                  message: This is SMS message content.
                  sender: Bramka SMS
                  type: 1
                  unicode: true
                  flash: false
              bulk:
                summary: SMS with different content to multiple recipients
                description: >-
                  Example of checking the price of multiple messages with
                  different content to multiple recipients. Maximum number of
                  messages in one request: 100. Please split larger volumes into
                  separate calls.
                value:
                  - recipients: '+48999999999'
                    message: This is first SMS message content
                    sender: Bramka SMS
                    type: 1
                    unicode: true
                    flash: false
                  - recipients: '+48999888777'
                    message: This is second SMS message content
                    sender: Bramka SMS
                    type: 1
                    unicode: true
              multi:
                summary: SMS with the same content to multiple recipients
                description: >-
                  Example of checking the price of multiple messages with the
                  same content to multiple recipients. Maximum number of
                  messages in one request: 100. Please split larger volumes into
                  separate calls.
                value:
                  recipients:
                    - '+48999999999'
                    - '+48999888777'
                  message: This is SMS message content.
                  sender: Bramka SMS
                  type: 1
                  unicode: true
                  flash: false
              single_cid:
                summary: SMS to single recipient with custom message ID (cid)
                description: >-
                  Example of checking the price of a single message to one
                  recipient. Contains the "cid" property, which specifies the
                  user-defined identifier for the message.
                value:
                  recipients:
                    nr: '+48999999999'
                    cid: custom-id-A44445T
                  message: This is SMS message content
                  sender: Bramka SMS
                  type: 1
                  unicode: true
                  flash: false
              bulk_cid:
                summary: >-
                  SMS with different content to multiple recipients with custom
                  message IDs (cid)
                description: >-
                  Example of checking the price of multiple messages with
                  different content to multiple recipients. Maximum number of
                  messages in one request: 100. Please split larger volumes into
                  separate calls. Contains the "cid" properties, which specifies
                  the user-defined identifier for messages.
                value:
                  - recipients:
                      nr: '+48999999999'
                      cid: custom-id-A44445T
                    message: This is first SMS message content
                    sender: Bramka SMS
                    type: 1
                    unicode: true
                    flash: false
                  - recipients:
                      nr: '+48999888777'
                      cid: custom-id-F44445R
                    message: This is second SMS message content
                    sender: Bramka SMS
                    type: 1
                    unicode: true
              multi_cid:
                summary: >-
                  SMS with the same content to multiple recipients with custom
                  message IDs (cid)
                description: >-
                  Example of checking the price of multiple messages with the
                  same content to multiple recipients. Maximum number of
                  messages in one request: 100. Please split larger volumes into
                  separate calls. Contains the "cid" properties, which specifies
                  the user-defined identifier for messages.
                value:
                  recipients:
                    - nr: '+48999999999'
                      cid: custom-id-A44445T
                    - nr: '+48999888777'
                      cid: custom-id-F44445R
                  message: This is SMS message content
                  sender: Bramka SMS
                  type: 1
                  unicode: true
                  flash: false
      responses:
        '200':
          description: >-
            The request was processed successfully. Please check the price and
            the details of particular messages in response body
          headers:
            X-Success-Count:
              description: Count of messages processed correctly
              schema:
                type: integer
                example: 1
            X-Error-Count:
              description: Count of messages processed with errors
              schema:
                type: integer
                example: 0
          content:
            application/json:
              schema:
                description: Array of checked messages
                type: array
                items:
                  $ref: '#/components/schemas/Price'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: outgoing.sms
      x-speakeasy-name-override: getPrice
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;
            use Gsmservice\Gateway\Models\Components;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();

            $request = [
                new Components\SmsMessage(
                    recipients: new Components\PhoneNumberWithCid(
                        nr: '+48999999999',
                        cid: 'my-id-1113',
                    ),
                    message: 'To jest treść wiadomości',
                ),
            ];

            $response = $sdk->outgoing->sms->getPrice(
                request: $request
            );

            if ($response->prices !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.outgoing.sms.getPrice([
                {
                  recipients: {
                    nr: "+48999999999",
                    cid: "my-id-1113",
                  },
                  message: "To jest treść wiadomości",
                  sender: "Bramka SMS",
                  type: 1,
                  unicode: false,
                  flash: false,
                  date: null,
                },
              ]);

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.outgoing.sms.get_price(request=[
                    {
                        "recipients": {
                            "nr": "+48999999999",
                            "cid": "my-id-1113",
                        },
                        "message": "To jest treść wiadomości",
                        "sender": "Bramka SMS",
                        "type": 1,
                        "unicode": False,
                        "flash": False,
                        "date_": None,
                    },
                ])

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: >-
            using Gsmservice.Gateway;

            using Gsmservice.Gateway.Models.Components;

            using Gsmservice.Gateway.Models.Requests;

            using System.Collections.Generic;


            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");


            GetSmsPriceRequestBody req =
            GetSmsPriceRequestBody.CreateArrayOfSmsMessage(
                new List<SmsMessage>() {
                    new SmsMessage() {
                        Recipients = SmsMessageRecipients.CreatePhoneNumberWithCid(
                            new PhoneNumberWithCid() {
                                Nr = "+48999999999",
                                Cid = "my-id-1113",
                            }
                        ),
                        Message = "To jest treść wiadomości",
                    },
                }
            );


            var res = await sdk.Outgoing.Sms.GetPriceAsync(req);


            // handle response
        - lang: java
          label: Java SDK
          source: >-
            package hello.world;


            import java.lang.Exception;

            import java.util.List;

            import pl.gsmservice.gateway.Client;

            import pl.gsmservice.gateway.models.components.PhoneNumberWithCid;

            import pl.gsmservice.gateway.models.components.SmsMessage;

            import pl.gsmservice.gateway.models.components.SmsMessageRecipients;

            import pl.gsmservice.gateway.models.errors.ErrorResponse;

            import
            pl.gsmservice.gateway.models.operations.GetSmsPriceRequestBody;

            import pl.gsmservice.gateway.models.operations.GetSmsPriceResponse;


            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    GetSmsPriceRequestBody req = GetSmsPriceRequestBody.of(List.of(
                            SmsMessage.builder()
                                .recipients(SmsMessageRecipients.of(PhoneNumberWithCid.builder()
                                    .nr("+48999999999")
                                    .cid("my-id-1113")
                                    .build()))
                                .message("To jest treść wiadomości")
                                .build()));

                    GetSmsPriceResponse res = sdk.outgoing().sms().getPrice()
                            .request(req)
                            .call();

                    if (res.prices().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"github.com/gsmservice-pl/messaging-sdk-go/v3/models/components\"\n\t\"github.com/gsmservice-pl/messaging-sdk-go/v3/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Outgoing.Sms.GetPrice(ctx, operations.CreateGetSmsPriceRequestBodyArrayOfSmsMessage(\n        []components.SmsMessage{\n            components.SmsMessage{\n                Recipients: components.CreateSmsMessageRecipientsPhoneNumberWithCid(\n                    components.PhoneNumberWithCid{\n                        Nr: \"+48999999999\",\n                        Cid: messagingsdkgo.String(\"my-id-1113\"),\n                    },\n                ),\n                Message: \"To jest treść wiadomości\",\n            },\n        },\n    ))\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Prices != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/messages/sms/price",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"recipients\":\"+48999999999\",\"message\":\"To jest treść wiadomości\",\"sender\":\"Bramka SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/messages/sms/price",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              recipients: '+48999999999',
              message: 'To jest treść wiadomości',
              sender: 'Bramka SMS',
              type: 1,
              unicode: true,
              flash: false,
              date: null
            }));
            req.end();
        - lang: Python 3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.szybkisms.pl")


            payload = "{\"recipients\":\"+48999999999\",\"message\":\"To jest
            treść wiadomości\",\"sender\":\"Bramka
            SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/rest/messages/sms/price", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/messages/sms/price\"\n\n\tpayload := strings.NewReader(\"{\\\"recipients\\\":\\\"+48999999999\\\",\\\"message\\\":\\\"To jest treść wiadomości\\\",\\\"sender\\\":\\\"Bramka SMS\\\",\\\"type\\\":1,\\\"unicode\\\":true,\\\"flash\\\":false,\\\"date\\\":null}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/messages/sms/price");

            var request = new RestRequest(Method.POST);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            request.AddHeader("content-type", "application/json");

            request.AddParameter("application/json",
            "{\"recipients\":\"+48999999999\",\"message\":\"To jest treść
            wiadomości\",\"sender\":\"Bramka
            SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}",
            ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://api.szybkisms.pl/rest/messages/sms/price")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"recipients\":\"+48999999999\",\"message\":\"To jest treść wiadomości\",\"sender\":\"Bramka SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}")
              .asString();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url = URI("https://api.szybkisms.pl/rest/messages/sms/price")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"recipients\":\"+48999999999\",\"message\":\"To
            jest treść wiadomości\",\"sender\":\"Bramka
            SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}"


            response = http.request(request)

            puts response.read_body
  /messages/mms:
    post:
      tags:
        - Outgoing messages
      summary: Send MMS Messages
      description: "Send single or multiple MMS messages at the same time. You have to pass as request body the `MmsMessage` object (for single message) or `array` of `MmsMessage` objects (for multiple messages). Each object has several properties, describing message parameters such recipient phone number, content of the message, attachments or scheduled sending date, etc. Please mind that some of them are required.\r\nThe system will accept maximum 50 messages in one call. If you need to send larger volume of messages, please split it to several separate requests.\r\n\r\nAs a successful result an `array` with `Message` objects will be returned, one object per each single message. You should check the `status_code` property of each message in a response body to make sure which were accepted by gateway (queued) and which were rejected. In case of rejection, `status_description` property will include a reason. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were processed successfully), `X-Error-Count` (count of messages which were rejected) and `X-Sandbox` (if a request was made in Sandbox or Production system).\r\n\r\nIf you send duplicated messages in one call, API will process such message only once. This request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: sendMms
      requestBody:
        description: >-
          To send a single MMS or messages with the same content to multiple
          recipients, pass in the Request Body a single `MmsMessage` object with
          the properties of this message. To send multiple messages with
          different content at the same time, pass in the Request Body an
          `array` of `MmsMessage` objects with the properties of each message.
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/MmsMessage'
                - title: Array of MmsMessage
                  type: array
                  items:
                    $ref: '#/components/schemas/MmsMessage'
                  maxItems: 50
                  minItems: 1
            examples:
              single:
                summary: MMS to single recipient
                description: Example of sending a single message to one recipient.
                value:
                  recipients: '+48999999999'
                  message: This is MMS message content.
                  subject: This is a subject of the message
                  attachments: <file body in base64 format>
              bulk:
                summary: MMS with different content to multiple recipients
                description: >-
                  Example of sending multiple messages with different content to
                  multiple recipients. Maximum number of messages in one
                  request: 50. Please split larger volumes into separate calls.
                value:
                  - recipients: '+48999999999'
                    message: This is first MMS message content
                    subject: This is a subject of the first message
                    attachments: <file 1 body in base64 format>
                  - recipients: '+48999888777'
                    message: This is second MMS message content
                    subject: This is a subject of the second message
                    attachments: <file 2 body in base64 format>
              multi:
                summary: MMS with the same content to multiple recipients
                description: >-
                  Example of sending multiple messages with the same content to
                  multiple recipients. Maximum number of messages in one
                  request: 50. Please split larger volumes into separate calls.
                value:
                  recipients:
                    - '+48999999999'
                    - '+48999888777'
                  message: This is MMS message content.
                  subject: This is a subject of the message
                  attachments: <file body in base64 format>
              single_cid:
                summary: MMS to single recipient with custom message ID (cid)
                description: >-
                  Example of sending a single message to one recipient. Contains
                  the "cid" property, which specifies the user-defined
                  identifier for the message.
                value:
                  recipients:
                    nr: '+48999999999'
                    cid: custom-id-A44445T
                  message: This is MMS message content
                  subject: This is a subject of the message
                  attachments: <file body in base64 format>
              bulk_cid:
                summary: >-
                  MMS with different content to multiple recipients with custom
                  message IDs (cid)
                description: >-
                  Example of sending multiple messages with different content to
                  multiple recipients. Maximum number of messages in one
                  request: 50. Please split larger volumes into separate calls.
                  Contains the "cid" properties, which specifies the
                  user-defined identifier for messages.
                value:
                  - recipients:
                      nr: '+48999999999'
                      cid: custom-id-A44445T
                    message: This is first MMS message content
                    subject: This is a subject of the first message
                    attachments: <file 1 body in base64 format>
                  - recipients:
                      nr: '+48999888777'
                      cid: custom-id-F44445R
                    message: This is second MMS message content
                    subject: This is a subject of the second message
                    attachments: <file 2 body in base64 format>
              multi_cid:
                summary: >-
                  MMS with the same content to multiple recipients with custom
                  message IDs (cid)
                description: >-
                  Example of sending multiple messages with the same content to
                  multiple recipients. Maximum number of messages in one
                  request: 50. Please split larger volumes into separate calls.
                  Contains the "cid" properties, which specifies the
                  user-defined identifier for messages.
                value:
                  recipients:
                    - nr: '+48999999999'
                      cid: custom-id-A44445T
                    - nr: '+48999888777'
                      cid: custom-id-F44445R
                  message: This is MMS message content
                  subject: This is a subject of the message
                  attachments: <file body in base64 format>
      responses:
        '200':
          description: >-
            The request was processed successfully. Please check statuses of
            particular messages in response body.
          headers:
            X-Success-Count:
              description: Count of messages processed correctly
              schema:
                type: integer
                example: 1
            X-Error-Count:
              description: Count of messages processed with errors
              schema:
                type: integer
                example: 0
            X-Sandbox:
              description: >-
                Determines whether the request was processed in the SANDBOX test
                system
              schema:
                type: boolean
                example: false
          content:
            application/json:
              schema:
                description: Array of sent messages
                type: array
                items:
                  $ref: '#/components/schemas/Message'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: outgoing.mms
      x-speakeasy-name-override: send
      x-speakeasy-usage-example:
        title: Sending single MMS Message
        description: >-
          This example demonstrates simple sending MMS message to a single
          recipient:
        position: 2
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;
            use Gsmservice\Gateway\Models\Components;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();

            $request = [
                new Components\MmsMessage(
                    recipients: [
                        '+48999999999',
                    ],
                    subject: 'To jest temat wiadomości',
                    message: 'To jest treść wiadomości',
                    attachments: [
                        '<file_body in base64 format>',
                    ],
                ),
            ];

            $response = $sdk->outgoing->mms->send(
                request: $request
            );

            if ($response->messages !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.outgoing.mms.send([
                {
                  recipients: [
                    "+48999999999",
                  ],
                  subject: "To jest temat wiadomości",
                  message: "To jest treść wiadomości",
                  attachments: [
                    "<file_body in base64 format>",
                  ],
                  date: null,
                },
              ]);

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.outgoing.mms.send(request=[
                    {
                        "recipients": [
                            "+48999999999",
                        ],
                        "subject": "To jest temat wiadomości",
                        "message": "To jest treść wiadomości",
                        "attachments": [
                            "<file_body in base64 format>",
                        ],
                        "date_": None,
                    },
                ])

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;
            using Gsmservice.Gateway.Models.Requests;
            using System.Collections.Generic;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            SendMmsRequestBody req = SendMmsRequestBody.CreateArrayOfMmsMessage(
                new List<MmsMessage>() {
                    new MmsMessage() {
                        Recipients = Recipients.CreateArrayOfStr(
                            new List<string>() {
                                "+48999999999",
                            }
                        ),
                        Subject = "To jest temat wiadomości",
                        Message = "To jest treść wiadomości",
                        Attachments = Attachments.CreateArrayOfStr(
                            new List<string>() {
                                "<file_body in base64 format>",
                            }
                        ),
                    },
                }
            );

            var res = await sdk.Outgoing.Mms.SendAsync(req);

            // handle response
        - lang: java
          label: Java SDK
          source: |-
            package hello.world;

            import java.lang.Exception;
            import java.util.List;
            import pl.gsmservice.gateway.Client;
            import pl.gsmservice.gateway.models.components.Attachments;
            import pl.gsmservice.gateway.models.components.MmsMessage;
            import pl.gsmservice.gateway.models.components.Recipients;
            import pl.gsmservice.gateway.models.errors.ErrorResponse;
            import pl.gsmservice.gateway.models.operations.SendMmsRequestBody;
            import pl.gsmservice.gateway.models.operations.SendMmsResponse;

            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    SendMmsRequestBody req = SendMmsRequestBody.of(List.of(
                            MmsMessage.builder()
                                .recipients(Recipients.of2(List.of(
                                    "+48999999999")))
                                .subject("To jest temat wiadomości")
                                .message("To jest treść wiadomości")
                                .attachments(Attachments.of(List.of(
                                    "<file_body in base64 format>")))
                                .build()));

                    SendMmsResponse res = sdk.outgoing().mms().send()
                            .request(req)
                            .call();

                    if (res.messages().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"github.com/gsmservice-pl/messaging-sdk-go/v3/models/components\"\n\t\"github.com/gsmservice-pl/messaging-sdk-go/v3/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Outgoing.Mms.Send(ctx, operations.CreateSendMmsRequestBodyMmsMessage(\n        components.MmsMessage{\n            Recipients: components.CreateRecipientsPhoneNumberWithCid(\n                components.PhoneNumberWithCid{\n                    Nr: \"+48999999999\",\n                    Cid: messagingsdkgo.String(\"my-id-1113\"),\n                },\n            ),\n            Subject: messagingsdkgo.String(\"To jest temat wiadomości\"),\n            Message: messagingsdkgo.String(\"To jest treść wiadomości\"),\n            Attachments: messagingsdkgo.Pointer(components.CreateAttachmentsStr(\n                \"<file_body in base64 format>\",\n            )),\n        },\n    ))\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Messages != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/messages/mms",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"recipients\":\"+48999999999\",\"subject\":\"To jest temat wiadomości\",\"message\":\"To jest treść wiadomości\",\"attachments\":\"<file_body in base64 format>\",\"date\":null}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/messages/mms",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              recipients: '+48999999999',
              subject: 'To jest temat wiadomości',
              message: 'To jest treść wiadomości',
              attachments: '<file_body in base64 format>',
              date: null
            }));
            req.end();
        - lang: Python 3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.szybkisms.pl")


            payload = "{\"recipients\":\"+48999999999\",\"subject\":\"To jest
            temat wiadomości\",\"message\":\"To jest treść
            wiadomości\",\"attachments\":\"<file_body in base64
            format>\",\"date\":null}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/rest/messages/mms", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/messages/mms\"\n\n\tpayload := strings.NewReader(\"{\\\"recipients\\\":\\\"+48999999999\\\",\\\"subject\\\":\\\"To jest temat wiadomości\\\",\\\"message\\\":\\\"To jest treść wiadomości\\\",\\\"attachments\\\":\\\"<file_body in base64 format>\\\",\\\"date\\\":null}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/messages/mms");

            var request = new RestRequest(Method.POST);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            request.AddHeader("content-type", "application/json");

            request.AddParameter("application/json",
            "{\"recipients\":\"+48999999999\",\"subject\":\"To jest temat
            wiadomości\",\"message\":\"To jest treść
            wiadomości\",\"attachments\":\"<file_body in base64
            format>\",\"date\":null}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://api.szybkisms.pl/rest/messages/mms")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"recipients\":\"+48999999999\",\"subject\":\"To jest temat wiadomości\",\"message\":\"To jest treść wiadomości\",\"attachments\":\"<file_body in base64 format>\",\"date\":null}")
              .asString();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url = URI("https://api.szybkisms.pl/rest/messages/mms")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"recipients\":\"+48999999999\",\"subject\":\"To
            jest temat wiadomości\",\"message\":\"To jest treść
            wiadomości\",\"attachments\":\"<file_body in base64
            format>\",\"date\":null}"


            response = http.request(request)

            puts response.read_body
  /messages/sms:
    post:
      tags:
        - Outgoing messages
      summary: Send SMS Messages
      description: "Send single or multiple SMS messages at the same time. You have to pass as request body the `SmsMessage` object (for single message) or `array` of `SmsMessage` objects (for multiple messages). Each object has several properties, describing message parameters such recipient phone number, content of the message, type or scheduled sending date, etc. Please mind that some of them are required.\r\nThe system will accept maximum 100 messages in one call. If you need to send larger volume of messages, please split it to several separate requests.\r\n\r\nAs a successful result an `array` with `Message` objects will be returned, one object per each single message. You should check the `status_code` property of each message in a response body to make sure which were accepted by gateway (queued) and which were rejected. In case of rejection, `status_description` property will include a reason. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were processed successfully), `X-Error-Count` (count of messages which were rejected) and `X-Sandbox` (if a request was made in Sandbox or Production system).\r\n\r\nIf you send duplicated messages in one call, API will process such message only once. This request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: sendSms
      requestBody:
        description: >-
          To send a single SMS or messages with the same content to multiple
          recipients, pass in the Request Body a single `SmsMessage` object with
          the properties of this message. To send multiple messages with
          different content at the same time, pass in the Request Body an
          `array` of `SmsMessage` objects with the properties of each message.
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/SmsMessage'
                - title: Array of SmsMessage
                  type: array
                  items:
                    $ref: '#/components/schemas/SmsMessage'
                  maxItems: 100
                  minItems: 1
            examples:
              single:
                summary: SMS to single recipient
                description: Example of sending a single message to one recipient.
                value:
                  recipients: '+48999999999'
                  message: This is SMS message content.
                  sender: Bramka SMS
                  type: 1
                  unicode: true
                  flash: false
              bulk:
                summary: SMS with different content to multiple recipients
                description: >-
                  Example of sending multiple messages with different content to
                  multiple recipients. Maximum number of messages in one
                  request: 100. Please split larger volumes into separate calls.
                value:
                  - recipients: '+48999999999'
                    message: This is first SMS message content
                    sender: Bramka SMS
                    type: 1
                    unicode: true
                    flash: false
                  - recipients: '+48999888777'
                    message: This is second SMS message content
                    sender: Bramka SMS
                    type: 1
                    unicode: true
              multi:
                summary: SMS with the same content to multiple recipients
                description: >-
                  Example of sending multiple messages with the same content to
                  multiple recipients. Maximum number of messages in one
                  request: 100. Please split larger volumes into separate calls.
                value:
                  recipients:
                    - '+48999999999'
                    - '+48999888777'
                  message: This is SMS message content.
                  sender: Bramka SMS
                  type: 1
                  unicode: true
                  flash: false
              single_cid:
                summary: SMS to single recipient with custom message ID (cid)
                description: >-
                  Example of sending a single message to one recipient. Contains
                  the "cid" property, which specifies the user-defined
                  identifier for the message.
                value:
                  recipients:
                    nr: '+48999999999'
                    cid: custom-id-A44445T
                  message: This is SMS message content
                  sender: Bramka SMS
                  type: 1
                  unicode: true
                  flash: false
              bulk_cid:
                summary: >-
                  SMS with different content to multiple recipients with custom
                  message IDs (cid)
                description: >-
                  Example of sending multiple messages with different content to
                  multiple recipients. Maximum number of messages in one
                  request: 100. Please split larger volumes into separate calls.
                  Contains the "cid" properties, which specifies the
                  user-defined identifier for messages.
                value:
                  - recipients:
                      nr: '+48999999999'
                      cid: custom-id-A44445T
                    message: This is first SMS message content
                    sender: Bramka SMS
                    type: 1
                    unicode: true
                    flash: false
                  - recipients:
                      nr: '+48999888777'
                      cid: custom-id-F44445R
                    message: This is second SMS message content
                    sender: Bramka SMS
                    type: 1
                    unicode: true
              multi_cid:
                summary: >-
                  SMS with the same content to multiple recipients with custom
                  message IDs (cid)
                description: >-
                  Example of sending multiple messages with the same content to
                  multiple recipients. Maximum number of messages in one
                  request: 100. Please split larger volumes into separate calls.
                  Contains the "cid" properties, which specifies the
                  user-defined identifier for messages.
                value:
                  recipients:
                    - nr: '+48999999999'
                      cid: custom-id-A44445T
                    - nr: '+48999888777'
                      cid: custom-id-F44445R
                  message: This is SMS message content
                  sender: Bramka SMS
                  type: 1
                  unicode: true
                  flash: false
      responses:
        '200':
          description: >-
            The request was processed successfully. Please check statuses of
            particular messages in response body.
          headers:
            X-Success-Count:
              description: Count of messages processed correctly
              schema:
                type: integer
                example: 1
            X-Error-Count:
              description: Count of messages processed with errors
              schema:
                type: integer
                example: 0
            X-Sandbox:
              description: >-
                Determines whether the request was processed in the SANDBOX test
                system
              schema:
                type: boolean
                example: false
          content:
            application/json:
              schema:
                description: Array of sent messages
                type: array
                items:
                  $ref: '#/components/schemas/Message'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: outgoing.sms
      x-speakeasy-name-override: send
      x-speakeasy-usage-example:
        title: Sending single SMS Message
        description: >-
          This example demonstrates simple sending SMS message to a single
          recipient:
        position: 1
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;
            use Gsmservice\Gateway\Models\Components;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();

            $request = [
                new Components\SmsMessage(
                    recipients: [
                        '+48999999999',
                    ],
                    message: 'To jest treść wiadomości',
                ),
            ];

            $response = $sdk->outgoing->sms->send(
                request: $request
            );

            if ($response->messages !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.outgoing.sms.send([
                {
                  recipients: [
                    "+48999999999",
                  ],
                  message: "To jest treść wiadomości",
                  sender: "Bramka SMS",
                  type: 1,
                  unicode: false,
                  flash: false,
                  date: null,
                },
              ]);

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.outgoing.sms.send(request=[
                    {
                        "recipients": [
                            "+48999999999",
                        ],
                        "message": "To jest treść wiadomości",
                        "sender": "Bramka SMS",
                        "type": 1,
                        "unicode": False,
                        "flash": False,
                        "date_": None,
                    },
                ])

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;
            using Gsmservice.Gateway.Models.Requests;
            using System.Collections.Generic;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            SendSmsRequestBody req = SendSmsRequestBody.CreateArrayOfSmsMessage(
                new List<SmsMessage>() {
                    new SmsMessage() {
                        Recipients = SmsMessageRecipients.CreateArrayOfStr(
                            new List<string>() {
                                "+48999999999",
                            }
                        ),
                        Message = "To jest treść wiadomości",
                    },
                }
            );

            var res = await sdk.Outgoing.Sms.SendAsync(req);

            // handle response
        - lang: java
          label: Java SDK
          source: |-
            package hello.world;

            import java.lang.Exception;
            import java.util.List;
            import pl.gsmservice.gateway.Client;
            import pl.gsmservice.gateway.models.components.SmsMessage;
            import pl.gsmservice.gateway.models.components.SmsMessageRecipients;
            import pl.gsmservice.gateway.models.errors.ErrorResponse;
            import pl.gsmservice.gateway.models.operations.SendSmsRequestBody;
            import pl.gsmservice.gateway.models.operations.SendSmsResponse;

            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    SendSmsRequestBody req = SendSmsRequestBody.of(List.of(
                            SmsMessage.builder()
                                .recipients(SmsMessageRecipients.ofArrayOfStrings(List.of(
                                    "+48999999999")))
                                .message("To jest treść wiadomości")
                                .build()));

                    SendSmsResponse res = sdk.outgoing().sms().send()
                            .request(req)
                            .call();

                    if (res.messages().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"github.com/gsmservice-pl/messaging-sdk-go/v3/models/components\"\n\t\"github.com/gsmservice-pl/messaging-sdk-go/v3/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Outgoing.Sms.Send(ctx, operations.CreateSendSmsRequestBodyArrayOfSmsMessage(\n        []components.SmsMessage{\n            components.SmsMessage{\n                Recipients: components.CreateSmsMessageRecipientsStr(\n                    \"+48999999999\",\n                ),\n                Message: \"To jest treść wiadomości\",\n            },\n        },\n    ))\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Messages != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/messages/sms",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"recipients\":\"+48999999999\",\"message\":\"To jest treść wiadomości\",\"sender\":\"Bramka SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/messages/sms",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              recipients: '+48999999999',
              message: 'To jest treść wiadomości',
              sender: 'Bramka SMS',
              type: 1,
              unicode: true,
              flash: false,
              date: null
            }));
            req.end();
        - lang: Python 3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.szybkisms.pl")


            payload = "{\"recipients\":\"+48999999999\",\"message\":\"To jest
            treść wiadomości\",\"sender\":\"Bramka
            SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/rest/messages/sms", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/messages/sms\"\n\n\tpayload := strings.NewReader(\"{\\\"recipients\\\":\\\"+48999999999\\\",\\\"message\\\":\\\"To jest treść wiadomości\\\",\\\"sender\\\":\\\"Bramka SMS\\\",\\\"type\\\":1,\\\"unicode\\\":true,\\\"flash\\\":false,\\\"date\\\":null}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/messages/sms");

            var request = new RestRequest(Method.POST);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            request.AddHeader("content-type", "application/json");

            request.AddParameter("application/json",
            "{\"recipients\":\"+48999999999\",\"message\":\"To jest treść
            wiadomości\",\"sender\":\"Bramka
            SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}",
            ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://api.szybkisms.pl/rest/messages/sms")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"recipients\":\"+48999999999\",\"message\":\"To jest treść wiadomości\",\"sender\":\"Bramka SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}")
              .asString();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url = URI("https://api.szybkisms.pl/rest/messages/sms")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"recipients\":\"+48999999999\",\"message\":\"To
            jest treść wiadomości\",\"sender\":\"Bramka
            SMS\",\"type\":1,\"unicode\":true,\"flash\":false,\"date\":null}"


            response = http.request(request)

            puts response.read_body
  /senders:
    get:
      tags:
        - Senders
      summary: List allowed senders names
      description: "Get a list of allowed senders defined in your account. The request doesn't contain a body or any parameters. \r\n        \r\nAs a successful result an array with `Sender` objects will be returned, each object per single sender. Senders are being registered by providers and operators. Registered senders get *Active* status and can be used then to send messages. *Pending* senders are also returned by API (with proper `status`) but until registration they cannot be used. This request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: listSenders
      responses:
        '200':
          description: >-
            The request was processed successfully. Please find senders details
            in response body
          content:
            application/json:
              schema:
                description: Array od messages senders
                type: array
                items:
                  $ref: '#/components/schemas/Sender'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: senders
      x-speakeasy-name-override: list
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->senders->list(

            );

            if ($response->senders !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.senders.list();

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.senders.list()

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            var res = await sdk.Senders.ListAsync();

            // handle response
        - lang: java
          label: Java SDK
          source: |-
            package hello.world;

            import java.lang.Exception;
            import pl.gsmservice.gateway.Client;
            import pl.gsmservice.gateway.models.errors.ErrorResponse;
            import pl.gsmservice.gateway.models.operations.ListSendersResponse;

            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    ListSendersResponse res = sdk.senders().list()
                            .call();

                    if (res.senders().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Senders.List(ctx)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Senders != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/senders",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/senders",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.szybkisms.pl")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/rest/senders", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/senders\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/senders");

            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.szybkisms.pl/rest/senders")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/senders")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    post:
      tags:
        - Senders
      summary: Add a new sender name
      description: "Define a new allowed sender on your account. The request body should contain a `Sender` object with two properties: `sender` (defines sender name) and `description`. The secont parameter is very important - sender names are being registered by providers and operators. Only fully registered sender names can be used to send messages. Providers need sometimes detailed description of case in which the sender will be used to eliminate frauds. After verifing it they make a decisions if such sender name can be registered. Please carefully fill this property with the extensive description of a sender name (what will be its use, what the name mean, etc). \r\n        \r\nAs a successful result a single `Sender` object will be returned. Registered senders get *Active* status and can be used then to send messages. Pending Senders are also returned by API (with proper `status`) but until registration they cannot be used. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). This request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: addSender
      requestBody:
        description: >-
          To add a new sender in the request body pass an object with the
          properties of the sender.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Sender'
      responses:
        '201':
          description: The request was processed successfully (sender created)
          headers:
            X-Sandbox:
              description: >-
                Determines whether the request was processed in the SANDBOX test
                system
              schema:
                type: boolean
                example: false
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sender'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: senders
      x-speakeasy-name-override: add
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;
            use Gsmservice\Gateway\Models\Components;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();

            $request = new Components\SenderInput(
                sender: 'Bramka SMS',
                description: 'This is our company name. It contains our registered trademark.',
            );

            $response = $sdk->senders->add(
                request: $request
            );

            if ($response->sender !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.senders.add({
                sender: "Bramka SMS",
                description: "This is our company name. It contains our registered trademark.",
              });

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.senders.add(request={
                    "sender": "Bramka SMS",
                    "description": "This is our company name. It contains our registered trademark.",
                })

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            SenderInput req = new SenderInput() {
                Sender = "Bramka SMS",
                Description = "This is our company name. It contains our registered trademark.",
            };

            var res = await sdk.Senders.AddAsync(req);

            // handle response
        - lang: java
          label: Java SDK
          source: |-
            package hello.world;

            import java.lang.Exception;
            import pl.gsmservice.gateway.Client;
            import pl.gsmservice.gateway.models.components.SenderInput;
            import pl.gsmservice.gateway.models.errors.ErrorResponse;
            import pl.gsmservice.gateway.models.operations.AddSenderResponse;

            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    SenderInput req = SenderInput.builder()
                            .sender("Bramka SMS")
                            .description("This is our company name. It contains our registered trademark.")
                            .build();

                    AddSenderResponse res = sdk.senders().add()
                            .request(req)
                            .call();

                    if (res.sender().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"github.com/gsmservice-pl/messaging-sdk-go/v3/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Senders.Add(ctx, components.SenderInput{\n        Sender: \"Bramka SMS\",\n        Description: \"This is our company name. It contains our registered trademark.\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Sender != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/senders",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"sender\":\"Bramka SMS\",\"description\":\"This is our company name. It contains our registered trademark.\"}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/senders",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              sender: 'Bramka SMS',
              description: 'This is our company name. It contains our registered trademark.'
            }));
            req.end();
        - lang: Python 3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.szybkisms.pl")


            payload = "{\"sender\":\"Bramka SMS\",\"description\":\"This is our
            company name. It contains our registered trademark.\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/rest/senders", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/senders\"\n\n\tpayload := strings.NewReader(\"{\\\"sender\\\":\\\"Bramka SMS\\\",\\\"description\\\":\\\"This is our company name. It contains our registered trademark.\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/senders");

            var request = new RestRequest(Method.POST);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            request.AddHeader("content-type", "application/json");

            request.AddParameter("application/json", "{\"sender\":\"Bramka
            SMS\",\"description\":\"This is our company name. It contains our
            registered trademark.\"}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://api.szybkisms.pl/rest/senders")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"sender\":\"Bramka SMS\",\"description\":\"This is our company name. It contains our registered trademark.\"}")
              .asString();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url = URI("https://api.szybkisms.pl/rest/senders")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"sender\":\"Bramka SMS\",\"description\":\"This is
            our company name. It contains our registered trademark.\"}"


            response = http.request(request)

            puts response.read_body
  /senders/{sender}:
    delete:
      tags:
        - Senders
      summary: Delete a sender name
      description: "Removes defined sender name from your account. This endpoint accepts a path `sender` parameter with empty request body. You should pass the full sender name to delete it. Sender name will be deleted immediately.\r\n\r\nAs a successful response only HTTP status code of *204* will be returned in header with empty response body. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system).\r\nThis request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: deleteSender
      parameters:
        - name: sender
          in: path
          description: Sender name to be removed
          required: true
          schema:
            type: string
          example: Podpis
      responses:
        '204':
          description: The sender was deleted successfully
          headers:
            X-Sandbox:
              description: >-
                Determines whether the request was processed in the SANDBOX test
                system
              schema:
                type: boolean
                example: false
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: senders
      x-speakeasy-name-override: delete
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->senders->delete(
                sender: 'Podpis'
            );

            if ($response->statusCode === 200) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.senders.delete({
                sender: "Podpis",
              });

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.senders.delete(sender="Podpis")

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            var res = await sdk.Senders.DeleteAsync(sender: "Podpis");

            // handle response
        - lang: java
          label: Java SDK
          source: |-
            package hello.world;

            import java.lang.Exception;
            import pl.gsmservice.gateway.Client;
            import pl.gsmservice.gateway.models.errors.ErrorResponse;
            import pl.gsmservice.gateway.models.operations.DeleteSenderResponse;

            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    DeleteSenderResponse res = sdk.senders().delete()
                            .sender("Podpis")
                            .call();

                    // handle response
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Senders.Delete(ctx, \"Podpis\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/senders/Podpis",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "DELETE",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/senders/Podpis",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.szybkisms.pl")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/rest/senders/Podpis", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/senders/Podpis\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/senders/Podpis");

            var request = new RestRequest(Method.DELETE);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.delete("https://api.szybkisms.pl/rest/senders/Podpis")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/senders/Podpis")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    patch:
      tags:
        - Senders
      summary: Set default sender name
      description: "Set default sender name to one of the senders names already defined on your account. Default sender name can be used while sending messages when you not pass any other defined sender to `SmsMessage` object while sending message. \r\n\r\nThis endpoint accepts a path `sender` parameter with empty request body. You should pass the full sender name to set it as default on your account.\r\n\r\nAs a successful response only HTTP status code of *204* will be returned in header with empty response body. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system).\r\nThis request have to be authenticated using **API Access Token**.\r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807))."
      operationId: setDefaultSender
      parameters:
        - name: sender
          in: path
          description: Sender name to set as default
          required: true
          schema:
            type: string
          example: Podpis
      responses:
        '204':
          description: The default sender name has been set succesfully
          headers:
            X-Sandbox:
              description: >-
                Determines whether the request was processed in the SANDBOX test
                system
              schema:
                type: boolean
                example: false
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          description: Sender name was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: senders
      x-speakeasy-name-override: setDefault
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->senders->setDefault(
                sender: 'Podpis'
            );

            if ($response->statusCode === 200) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.senders.setDefault({
                sender: "Podpis",
              });

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.senders.set_default(sender="Podpis")

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            var res = await sdk.Senders.SetDefaultAsync(sender: "Podpis");

            // handle response
        - lang: java
          label: Java SDK
          source: >-
            package hello.world;


            import java.lang.Exception;

            import pl.gsmservice.gateway.Client;

            import pl.gsmservice.gateway.models.errors.ErrorResponse;

            import
            pl.gsmservice.gateway.models.operations.SetDefaultSenderResponse;


            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    SetDefaultSenderResponse res = sdk.senders().setDefault()
                            .sender("Podpis")
                            .call();

                    // handle response
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Senders.SetDefault(ctx, \"Podpis\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/senders/Podpis",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "PATCH",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "PATCH",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/senders/Podpis",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.szybkisms.pl")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("PATCH", "/rest/senders/Podpis", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/senders/Podpis\"\n\n\treq, _ := http.NewRequest(\"PATCH\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/senders/Podpis");

            var request = new RestRequest(Method.PATCH);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.patch("https://api.szybkisms.pl/rest/senders/Podpis")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/senders/Podpis")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Patch.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /messages:
    get:
      tags:
        - Outgoing messages
      summary: Lists the history of sent messages
      description: "Get the details and current status of all of sent messages from your account message history. This endpoint supports pagination so you have to pass as query parameters a `page` value (number of page with messages which you want to access) and a `limit` value (max of messages per page). Messages are fetched from the latest one. The system will accept maximum **50** as `limit` parameter value. If you need to get details of larger volume of messages, please access them with next pages.\r\n    \r\nAs a successful result an array with `Message` objects will be returned, each object per single message. Response will also include meta-data headers: `X-Total-Results` (a total count of all messages which are available in history on your account), `X-Total-Pages` (a total number of all pages with results), `X-Current-Page` (A current page number) and `X-Limit` (messages count per single page). This request have to be authenticated using **API Access Token**. \r\n\r\nA response contains also a special `Link` header which includes *URIs* to access next, previous, first and last page with messages (which complies with [RFC 5988](https://www.rfc-editor.org/rfc/rfc5988)). \r\n\r\nIn case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).\r\n"
      operationId: listMessages
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: >-
            The request was processed successfully. Please check messages
            details in response body.
          headers:
            X-Total-Results:
              description: Total Results
              schema:
                type: integer
                example: 1
            X-Total-Pages:
              description: Total number of results pages
              schema:
                type: integer
                example: 1
            X-Current-Page:
              description: Current results page number
              schema:
                type: integer
                example: 1
            X-Limit:
              description: Message limit per results page
              schema:
                type: integer
                example: 10
          content:
            application/json:
              schema:
                description: Array of sent messages
                type: array
                items:
                  $ref: '#/components/schemas/Message'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        4XX:
          $ref: '#/components/responses/GenericError'
        5XX:
          $ref: '#/components/responses/InternalError'
      x-speakeasy-group: outgoing
      x-speakeasy-name-override: list
      x-codeSamples:
        - lang: php
          label: PHP 8.2 SDK
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Gsmservice\Gateway;

            $sdk = Gateway\Client::builder()
                ->setSecurity(
                    '<YOUR API ACCESS TOKEN>'
                )
                ->build();



            $response = $sdk->outgoing->list(
                page: 1,
                limit: 10

            );

            if ($response->messages !== null) {
                // handle response
            }
        - lang: typescript
          label: Typescript SDK
          source: |-
            import { Client } from "@gsmservice-pl/messaging-sdk-typescript";

            const client = new Client({
              bearer: "<YOUR API ACCESS TOKEN>",
            });

            async function run() {
              const result = await client.outgoing.list({});

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: Python SDK
          source: |-
            from gsmservice_gateway import Client


            with Client(
                bearer="<YOUR API ACCESS TOKEN>",
            ) as client:

                res = client.outgoing.list()

                # Handle response
                print(res)
        - lang: csharp
          label: C# SDK
          source: |-
            using Gsmservice.Gateway;
            using Gsmservice.Gateway.Models.Components;

            var sdk = new Client(bearer: "<YOUR API ACCESS TOKEN>");

            var res = await sdk.Outgoing.ListAsync(
                page: 1,
                limit: 10
            );

            // handle response
        - lang: java
          label: Java SDK
          source: |-
            package hello.world;

            import java.lang.Exception;
            import pl.gsmservice.gateway.Client;
            import pl.gsmservice.gateway.models.errors.ErrorResponse;
            import pl.gsmservice.gateway.models.operations.ListMessagesResponse;

            public class Application {

                public static void main(String[] args) throws ErrorResponse, ErrorResponse, Exception {

                    Client sdk = Client.builder()
                            .bearer("<YOUR API ACCESS TOKEN>")
                        .build();

                    ListMessagesResponse res = sdk.outgoing().list()
                            .page(1L)
                            .limit(10L)
                            .call();

                    if (res.messages().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: go
          label: Go SDK
          source: "package main\n\nimport(\n\t\"context\"\n\tmessagingsdkgo \"github.com/gsmservice-pl/messaging-sdk-go/v3\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := messagingsdkgo.New(\n        messagingsdkgo.WithSecurity(\"<YOUR API ACCESS TOKEN>\"),\n    )\n\n    res, err := s.Outgoing.List(ctx, nil, nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Messages != nil {\n        // handle response\n    }\n}"
        - lang: PHP (cURL)
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.szybkisms.pl/rest/messages?page=1&limit=10",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.szybkisms.pl",
              "port": null,
              "path": "/rest/messages?page=1&limit=10",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python 3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.szybkisms.pl")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET", "/rest/messages?page=1&limit=10",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.szybkisms.pl/rest/messages?page=1&limit=10\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: C# (RestSharp)
          source: >-
            var client = new
            RestClient("https://api.szybkisms.pl/rest/messages?page=1&limit=10");

            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            IRestResponse response = client.Execute(request);
        - lang: JAVA (UniRest)
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.szybkisms.pl/rest/messages?page=1&limit=10")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://api.szybkisms.pl/rest/messages?page=1&limit=10")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
components:
  schemas:
    AccountResponse:
      description: An object containing information about the User's account and balance
      properties:
        login:
          description: User Login
          type: string
          example: some_login
        account_type:
          description: Account type
          type: string
          enum:
            - PRE-PAID
            - POST-PAID
          example: PRE-PAID
        limit:
          description: Acount limit
          type: number
          format: float
          example: 0
        credit:
          description: Current account balance
          type: number
          format: float
          example: 130.44
        subcredit:
          description: Subaccount credit balance (null if unlimited)
          type: number
          format: float
          example: 65.32
          nullable: true
        currency:
          description: Account currency
          type: string
          example: PLN
        name:
          description: User name and surname
          type: string
          example: Andrzej Nowak
        is_main:
          description: Is main account?
          type: boolean
          example: true
      type: object
    Attachment:
      title: string
      description: An image, audio or video file body encoded by `base64`
      type: string
      format: byte
      example: <file_body in base64 format>
    CancelledMessage:
      description: >-
        An object containing information about results of cancelling single
        message
      properties:
        id:
          description: Message ID
          type: integer
          example: 43456
        status:
          description: >-
            Status of cancellation (204 if cancelled successfully or error
            status code)
          type: integer
          example: 400
        error:
          $ref: '#/components/schemas/ErrorResponse'
      type: object
    ErrorResponse:
      description: >-
        An object that complies with RFC 9457 containing information about a
        request error
      properties:
        type:
          title: URI reference for problem type
          description: A URI reference that identifies the problem type
          type: string
          format: uri
          example: https://problems-registry.smartbear.com/invalid-body-property-format
        status:
          title: HTTP status code
          description: >-
            The HTTP status code generated by the origin server for this
            occurrence of the problem
          type: integer
          example: 400
        title:
          title: Error summary
          description: A short, human-readable summary of the problem type
          type: string
          example: Invalid Body property format
        detail:
          title: Error description
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem
          type: string
          example: The request body contains a malformed property
          x-speakeasy-error-message: true
        code:
          title: Internal API error code
          description: >-
            An API specific error code aiding the provider team understand the
            error based on their own potential taxonomy or registry
          type: string
          example: 400-21
        instance:
          title: URI reference for occurrence of the problem
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem
          type: string
          format: uri
          example: /rest/messages/sms
      type: object
      nullable: true
    IncomingMessage:
      description: An object with the properties of the received message
      properties:
        id:
          description: Unique identifier of incoming message
          type: integer
          example: 45544
        login:
          description: Login of the account (sub-account) on which the message was received
          type: string
          example: some-user
        recipient:
          description: Recipient number (or service name)
          type: string
          example: '+48999000555'
        sender:
          description: Message sender number (or alphanumeric name)
          type: string
          example: '+48999888777'
        phonebook_sender_name:
          description: Sender name (matched with phonebook)
          type: string
          example: Jan Nowak
          nullable: true
        date:
          description: Date and time of message receipt in ISO 8601 format
          type: string
          format: date-time
          example: '2024-05-31T05:17:35Z'
        message:
          description: Received message content
          type: string
          example: To jest treść odebranego SMSa
        dedicated_number:
          description: >-
            Dedicated Mobile Originated service number (if the message was
            received on this number)
          type: string
          example: '+48111222444'
          nullable: true
        dedicated_prefix:
          description: >-
            Dedicated Mobile Originated service prefix (if the message was
            received on this number with such prefix)
          type: string
          example: LATO
          nullable: true
      type: object
    Message:
      description: An object defining the properties of a single message
      properties:
        id:
          description: Unique message identifier
          type: integer
          example: 323234
          nullable: true
        cid:
          description: Custom message ID assigned by the User
          type: string
          example: custom-id-A44445T
          nullable: true
        type:
          $ref: '#/components/schemas/MessageType'
        recipient:
          $ref: '#/components/schemas/PhoneNumber'
        sender:
          description: Message sender name
          type: string
          example: Bramka SMS
          nullable: true
        parts:
          description: The count of parts that message consists of
          type: integer
          example: 1
          nullable: true
        sent_date:
          description: Sending date and time (in ISO 8601 format)
          type: string
          format: date-time
          example: '2024-06-01T16:22:05Z'
          nullable: true
        status_date:
          description: Date and time of last status change (in ISO 8601 format)
          type: string
          format: date-time
          example: '2024-06-01T16:22:07Z'
          nullable: true
        status_code:
          description: Message status code
          type: string
          example: QUEUED
        status_description:
          description: Human redable description of message status
          type: string
          example: The message has been accepted
        unicode:
          description: Did the message contain special characters, e.g. Polish diacritics?
          type: boolean
          example: true
        flash:
          description: Was the message sent with class 0 (FLASH)?
          type: boolean
          example: false
        price:
          description: The price of message (in PLN)
          type: number
          format: float
          example: 0.16
      type: object
    MessageType:
      description: "Message type according to the table:\r\n    \r\n|type|Description|\r\n|----|-----------|\r\n|  1 | SMS PRO   |\r\n|  3 | SMS ECO   |\r\n|  4 | SMS 2WAY  |\r\n| 10 | MMS       |"
      type: integer
      enum:
        - 1
        - 3
        - 4
        - 10
      example: 1
      x-speakeasy-unknown-values: allow
      x-speakeasy-enums:
        - SmsPro
        - SmsEco
        - SmsTwoWay
        - Mms
    MmsMessage:
      description: An object with a new MMS message properties
      required:
        - recipients
      properties:
        recipients:
          description: >-
            The recipient number or multiple recipients numbers of single
            message. To set one recipient, simply pass here a `string` with his
            phone number. To set multiple recipients, pass here a simple `array`
            of `string`. Optionally you can also set custom id (user identifier)
            for each message - pass `PhoneNumberWithCid` object (in case of
            single recipient) or `Array` of `PhoneNumberWithCid` (in case of
            multiple recipients).
          oneOf:
            - $ref: '#/components/schemas/PhoneNumber'
            - title: Array of strings
              type: array
              items:
                $ref: '#/components/schemas/PhoneNumber'
              maxItems: 50
              minItems: 1
            - $ref: '#/components/schemas/PhoneNumberWithCid'
            - title: Array of PhoneNumberWithCid
              type: array
              items:
                $ref: '#/components/schemas/PhoneNumberWithCid'
              maxItems: 50
              minItems: 1
        subject:
          description: MMS message subject
          type: string
          example: To jest temat wiadomości
          nullable: true
        message:
          description: MMS message content
          type: string
          example: To jest treść wiadomości
          nullable: true
        attachments:
          description: >-
            Attachments for the message. You can pass here images, audio and
            video files bodies. To set one attachment please pass a `string`
            with attachment body encoded by `base64`. To set multiple
            attachments - pass an `array` of `strings` with attachment bodies
            encoded by `base64`. Max 3 attachments per message.
          oneOf:
            - $ref: '#/components/schemas/Attachment'
            - title: Array of strings
              type: array
              items:
                $ref: '#/components/schemas/Attachment'
              maxItems: 3
              minItems: 1
        date:
          description: >-
            Scheduled future date and time of sending the message (in ISO 8601
            format). If missing or null - message will be sent immediately
          type: string
          format: date-time
          default: null
          example: null
          nullable: true
      type: object
    PhoneNumber:
      title: string
      description: >-
        A telephone number in international format (with a plus sign and the
        country code at the beginning, e.g. +48 for Poland)
      type: string
      maxLength: 16
      minLength: 7
      pattern: ^\+[0-9]+$
      example: '+48999999999'
    PhoneNumberWithCid:
      description: >-
        An object defining the message recipient telephone number with the
        message's custom identifier assigned by the User
      required:
        - nr
      properties:
        nr:
          $ref: '#/components/schemas/PhoneNumber'
        cid:
          description: Custom message ID assigned by the User
          type: string
          maxLength: 32
          example: my-id-1113
      type: object
    PingResponse:
      description: '''Ping'' response object'
      properties:
        status:
          description: 'API service status: OK - API available, ERR - API unavailable'
          type: string
          example: OK
        version:
          description: Current API Version
          type: string
          example: '1.0'
        sandbox:
          description: Was the connection established with the test system (SANDBOX)?
          type: boolean
          example: false
      type: object
    Price:
      description: An object with the properties and price of a single message
      properties:
        error:
          description: Information about a possible error
          type: string
          example: null
          nullable: true
        cid:
          description: Custom message ID assigned by the User
          type: string
          example: custom-id-A44445T
          nullable: true
        type:
          $ref: '#/components/schemas/MessageType'
        recipient:
          $ref: '#/components/schemas/PhoneNumber'
        sender:
          description: Message sender name
          type: string
          example: Bramka SMS
          nullable: true
        parts:
          description: The count of parts that message consists of
          type: integer
          example: 1
          nullable: true
        unicode:
          description: Did the message contain special characters, e.g. Polish diacritics?
          type: boolean
          example: true
        flash:
          description: Was the message sent with class 0 (FLASH)?
          type: boolean
          example: false
        price:
          description: The price of message (in PLN)
          type: number
          format: float
          example: 0.16
      type: object
    Sender:
      description: An object with the properties of the message sender
      required:
        - sender
        - description
        - status
        - is_default
      properties:
        sender:
          description: Message sender name
          type: string
          maxLength: 11
          minLength: 2
          example: Bramka SMS
        description:
          description: >-
            Description of the purpose of the sender name (required when adding
            new sender name)
          type: string
          writeOnly: true
          example: This is our company name. It contains our registered trademark.
        status:
          description: Sender name status
          type: string
          readOnly: true
          example: Active
        is_default:
          description: Is the sender default?
          type: boolean
          readOnly: true
          example: true
      type: object
    SmsMessage:
      description: An object with a new SMS message properties
      required:
        - recipients
        - message
      properties:
        recipients:
          description: >-
            The recipient number or multiple recipients numbers of single
            message. To set one recipient, simply pass here a `string` with his
            phone number. To set multiple recipients, pass here a simple `array`
            of `string`. Optionally you can also set custom id (user identifier)
            for each message - pass `PhoneNumberWithCid` object (in case of
            single recipient) or `Array` of `PhoneNumberWithCid` (in case of
            multiple recipients).
          oneOf:
            - $ref: '#/components/schemas/PhoneNumber'
            - title: Array of strings
              type: array
              items:
                $ref: '#/components/schemas/PhoneNumber'
              maxItems: 100
              minItems: 1
            - $ref: '#/components/schemas/PhoneNumberWithCid'
            - title: Array of PhoneNumberWithCid
              type: array
              items:
                $ref: '#/components/schemas/PhoneNumberWithCid'
              maxItems: 100
              minItems: 1
        message:
          description: SMS message content
          type: string
          example: To jest treść wiadomości
        sender:
          description: SMS sender name
          type: string
          default: Bramka SMS
          maxLength: 12
          example: Bramka SMS
        type:
          $ref: '#/components/schemas/SmsType'
        unicode:
          description: >-
            Should the message be sent with special characters, e.g. Polish
            diacritics (if any)? If *false*, those characters will be
            automatically replaced with their equivalents. If *true* your
            message will be sent as **unicode** but the message will be able to
            consist of fewer characters.
          type: boolean
          default: false
          example: true
        flash:
          description: Should the message to be sent with class 0 (FLASH)?
          type: boolean
          default: false
          example: false
        date:
          description: >-
            Scheduled future date and time of sending the message (in ISO 8601
            format). If missing or null - message will be sent immediately
          type: string
          format: date-time
          default: null
          example: null
          nullable: true
      type: object
    SmsType:
      description: "SMS type according to the table\r\n    \r\n|type|Description|\r\n|----|-----------|\r\n|  1 |  SMS PRO  |\r\n|  3 |  SMS ECO  |\r\n|  4 |  SMS 2WAY |"
      type: integer
      default: 1
      enum:
        - 1
        - 3
        - 4
      example: 1
      x-speakeasy-unknown-values: allow
      x-speakeasy-enums:
        - SmsPro
        - SmsEco
        - SmsTwoWay
  responses:
    InternalError:
      description: Internal API Server Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: https://problems-registry.smartbear.com/server-error/
            status: 500
            title: Internal API Server Error
            detail: There was an error on API Server side
            code: 500-1
            instance: /rest-sandbox/account/
    BadRequestError:
      description: There was an error in your request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnauthorizedError:
      description: Unauthorized Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: https://problems-registry.smartbear.com/unauthorized/
            status: 401
            title: Unauthorized
            detail: >-
              Authorization token is invalid or missing and the requested
              resource could not be returned
            code: 401-7
            instance: /rest-sandbox/account/
    ForbiddenError:
      description: Access Denied Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: https://problems-registry.smartbear.com/forbidden/
            status: 403
            title: Access denied
            detail: >-
              Your account doesn't have sufficient permissions to access this
              resource
            code: 403-5
            instance: /rest-sandbox/account/
    NotFoundError:
      description: Not Found Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: https://problems-registry.smartbear.com/not-found/
            status: 404
            title: Not Found
            detail: The requested resource was not found
            code: 404-6
            instance: /rest-sandbox/account/
    GenericError:
      description: Generic Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: https://problems-registry.smartbear.com/bad-request/
            status: 400
            title: Bad Request
            detail: The request is invalid
            code: 4XX-1
            instance: /rest-sandbox/account/
  parameters:
    ids:
      name: ids
      in: path
      description: >-
        Message IDs assigned by the system (separated by comma). The system will
        accept a maximum of 50 identifiers in one call.
      required: true
      style: simple
      explode: true
      schema:
        type: array
        items:
          type: integer
          minimum: 1
          example: 43456
        maxItems: 50
        minItems: 1
    page:
      name: page
      in: query
      description: Page number of results
      schema:
        type: integer
        default: 1
        minimum: 1
        example: 1
    limit:
      name: limit
      in: query
      description: Number of results on one page
      schema:
        type: integer
        default: 10
        maximum: 50
        minimum: 1
        example: 10
  securitySchemes:
    Bearer:
      type: http
      description: >-
        API Access Token generated on your account (see *introduction* to this
        specification)
      bearerFormat: JWT
      scheme: bearer
      x-speakeasy-example: <YOUR API ACCESS TOKEN>
    User_Bearer:
      type: http
      description: A TOKEN supplied by User to authorize all Callback URL calls
      bearerFormat: JWT
      scheme: bearer
security:
  - Bearer: []
tags:
  - name: Outgoing messages
    description: >-
      This section describes how to manipulate Mobile Terminated (outgoing)
      messages. You can send new messages, check their current status and price,
      cancel scheduled messages or get the full message history from your
      account.
  - name: Incoming messages
    description: >-
      This section describes how to access Mobile Originated (incoming)
      messages. You can retrieve received messages or access incoming message
      box on your account.
  - name: Senders
    description: >-
      This section describes how to manage message senders names on your
      account. You can add, delete, get or set as default a sender name, which
      can be used to send messages.
  - name: Accounts
    description: This section describes simple operations on user accounts.
  - name: Common
    description: This section describes other usefull operations and tools
  - name: Callbacks
    description: >-
      This section describes *Callbacks* generated and triggered by API Server
      to pass information to developer's apps and systems about new statuses of
      messages and new received messages
x-speakeasy-retries:
  strategy: backoff
  backoff:
    initialInterval: 500
    maxInterval: 60000
    maxElapsedTime: 3600000
    exponent: 1.5
  statusCodes:
    - 5XX
  retryConnectionErrors: true
x-webhooks:
  - post:
      tags:
        - Callbacks
      summary: Messages status change
      description: "If a message status changes, the configured custom *Callback URL* will be automatically trigerred with an `array` of `Message` objects sent by `POST` request (in request body), containing information about new status of a messages. You can setup a callback URL in [User Panel](https://panel.szybkisms.pl/api) in API configuration section. In one call system can pass information about up to **50 messages** status changes.\r\n                             \r\nYou can optionally configure User Token - all calllbacks will be triggered then with `Authorization: Bearer <token>` header.                              \r\n                             \r\nAfter receiving a Callback you should response with correct HTTP code (`200`). If a response will contain another code (`4XX` or `5XX`), a callback will be triggered by system again after 5 minutes then 15 minutes, 1 hour and last attempt after 6 hours."
      operationId: statusChanges
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Message'
              maxItems: 50
              minItems: 1
      responses:
        '200':
          description: >-
            Callback was received correctly. System won't trigger callback URL
            again
        4XX:
          description: >-
            Problem with received data. System will try to trigger callback URL
            again
        5XX:
          description: >-
            User System Internal Error. System will try to trigger callback URL
            again
      security:
        - User_Bearer: []
        - {}
    webhook: status-changes
  - post:
      tags:
        - Callbacks
      summary: New incoming messages
      description: "If a new incoming message will be received by the Gateway, the configured custom *Callback URL* will be automatically trigerred with an `array` of `IncomingMessage` objects sent by `POST` request (in request body), containing information about new incoming messages. You can setup a callback URL in [User Panel](https://panel.szybkisms.pl) in Incoming Messages configuration section. In one call system will pass information about up to **50 incoming messages**.\r\n                             \r\nYou can optionally configure User Token - all calllbacks will be triggered then with `Authorization: Bearer <token>` header.                              \r\n                             \r\nAfter receiving a Callback you should response with correct HTTP code (`200`). If a response will contain another code (`4XX` or `5XX`), a callback will be triggered by system again after 5 minutes then 15 minutes, 1 hour and last attempt after 6 hours."
      operationId: incomingMessages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/IncomingMessage'
              maxItems: 50
              minItems: 1
      responses:
        '200':
          description: >-
            Callback was received correctly. System won't trigger callback URL
            again
        4XX:
          description: >-
            Problem with received data. System will try to trigger callback URL
            again
        5XX:
          description: >-
            User System Internal Error. System will try to trigger callback URL
            again
      security:
        - User_Bearer: []
        - {}
    webhook: incoming-messages
