Class Senders

    • Method Detail

      • list

        public ListSendersRequestBuilder list()
        List allowed senders names Get a list of allowed senders defined in your account. The request doesn't contain a body or any parameters. As 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**. In 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)).
        Returns:
        The call builder
      • listDirect

        public ListSendersResponse listDirect()
                                       throws java.lang.Exception
        List allowed senders names Get a list of allowed senders defined in your account. The request doesn't contain a body or any parameters. As 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**. In 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)).
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • list

        public ListSendersResponse list​(java.util.Optional<Options> options)
                                 throws java.lang.Exception
        List allowed senders names Get a list of allowed senders defined in your account. The request doesn't contain a body or any parameters. As 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**. In 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)).
        Specified by:
        list in interface SDKMethodInterfaces.MethodCallListSenders
        Parameters:
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • add

        public AddSenderRequestBuilder add()
        Add a new sender name 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). As 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**. In 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)).
        Returns:
        The call builder
      • add

        public AddSenderResponse add​(SenderInput request)
                              throws java.lang.Exception
        Add a new sender name 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). As 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**. In 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)).
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • add

        public AddSenderResponse add​(SenderInput request,
                                     java.util.Optional<Options> options)
                              throws java.lang.Exception
        Add a new sender name 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). As 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**. In 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)).
        Specified by:
        add in interface SDKMethodInterfaces.MethodCallAddSender
        Parameters:
        request - The request object containing all of the parameters for the API call.
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • delete

        public DeleteSenderRequestBuilder delete()
        Delete a sender name 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. As 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). This request have to be authenticated using **API Access Token**. In 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)).
        Returns:
        The call builder
      • delete

        public DeleteSenderResponse delete​(java.lang.String sender)
                                    throws java.lang.Exception
        Delete a sender name 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. As 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). This request have to be authenticated using **API Access Token**. In 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)).
        Parameters:
        sender - Sender name to be removed
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • delete

        public DeleteSenderResponse delete​(java.lang.String sender,
                                           java.util.Optional<Options> options)
                                    throws java.lang.Exception
        Delete a sender name 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. As 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). This request have to be authenticated using **API Access Token**. In 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)).
        Specified by:
        delete in interface SDKMethodInterfaces.MethodCallDeleteSender
        Parameters:
        sender - Sender name to be removed
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • setDefault

        public SetDefaultSenderRequestBuilder setDefault()
        Set default sender name 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 `Sms` object while sending message. This 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. As 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). This request have to be authenticated using **API Access Token**. In 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)).
        Returns:
        The call builder
      • setDefault

        public SetDefaultSenderResponse setDefault​(java.lang.String sender)
                                            throws java.lang.Exception
        Set default sender name 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 `Sms` object while sending message. This 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. As 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). This request have to be authenticated using **API Access Token**. In 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)).
        Parameters:
        sender - Sender name to set as default
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • setDefault

        public SetDefaultSenderResponse setDefault​(java.lang.String sender,
                                                   java.util.Optional<Options> options)
                                            throws java.lang.Exception
        Set default sender name 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 `Sms` object while sending message. This 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. As 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). This request have to be authenticated using **API Access Token**. In 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)).
        Specified by:
        setDefault in interface SDKMethodInterfaces.MethodCallSetDefaultSender
        Parameters:
        sender - Sender name to set as default
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails