GetOTP Documentation

Senders

The Senders API provides a way to get your custom Sender IDs.

Request for Senders API

To get your Senders, make a GET request to our Senders endpoint.

https://api.otp.dev/v1/senders

With the following Basic HTTP verification method:

DescriptionRequiredData TypeExample
Your API KeyYesStringmtbi2w4hlendfpxa1igthcu5p6mzxf7k

Note

With the following parameters:

NameDescriptionRequiredData TypeExample
filter[status]Status of the senderNoStringAvailable
page_sizeThe number of senders to returnNoString10
page_tokenFound in pagination links and can be used to get 'previous' or 'next' itemsNoString

Note

Notes on the filter[status] parameter:

  • You can filter senders by status. Available statuses are: Pending, Available, Rejected, Canceled.
  • Notes on the page_size parameter:

  • You can specify the number of senders to return. Defaults to 10, with a maximum of 1000.
  • Examples

    Below is an example request using cURL:

    curl --request GET \
         --url 'https://api.otp.dev/v1/senders?page_size=10&filter[status]=Available' \
         --header 'X-OTP-Key: {YOUR_API_KEY}' \
         --header 'accept: application/json'

    The response would be a JSON structure, returned with HTTP 200 Codestatus code:

    {
        "data": [ 
            {
                "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "name": "My Sender",
                "code": "MySender",
                "channel": "SMS",
                "type": "Alphanumeric",
                "status": "Available",
                "country": "de",
                "countries": [
                    "de"
                ],
                "monthly_cost": "2",
                "setup_cost": "2",
                "create_date": "2025-09-24 07:09:20",
                "update_date": "2025-09-24 07:09:20"
            }
        ],
        "pagination": {
            "number": 1,
            "size": 10,
            "total": 11,
            "links": {
                "first": "string",
                "current": "string",
                "previous": "string",
                "next": "string"
            }
        }
    }
    

    Response data details:

    NameDescriptionData TypeExample
    data[].idThe unique identifier of the senderString (UUID)3fa85f64-5717-4562-b3fc-2c963f66afa6
    data[].account_idThe unique identifier of the accountString (UUID)3fa85f64-5717-4562-b3fc-2c963f66afa6
    data[].nameHuman-friendly sender nameStringMy Sender
    data[].codeSender ID/code used for messagingStringMySender
    data[].channelMessaging channelStringSMS
    data[].typeSender typeStringAlphanumeric
    data[].statusApproval/availability statusStringAvailable
    data[].countryPrimary country (ISO 3166-1 alpha-2)Stringde
    data[].countriesSupported countries (ISO 3166-1 alpha-2)Array<String>["de"]
    data[].monthly_costMonthly cost for the senderString2
    data[].setup_costOne-time setup cost for the senderString2
    data[].create_dateCreation date of the sender in UTC, formatted as yyyy-mm-dd hh:mm:ssString (datetime)2025-09-24 07:09:20
    data[].update_dateUpdated date of the sender in UTC, formatted as yyyy-mm-dd hh:mm:ssString (datetime)2025-09-24 07:09:20
    pagination.numberCurrent page numberInteger1
    pagination.sizeRequested page sizeInteger10
    pagination.totalTotal items availableInteger11
    pagination.links.firstURL of the first pageString (URL)string
    pagination.links.currentURL of the current pageString (URL)string
    pagination.links.previousURL of the previous pageString (URL)string
    pagination.links.nextURL of the next pageString (URL)string

    If there is an error with the API call, you will receive a JSON response with 400+ status code, error code and message.

    {
        "errors": [{
            "timestamp": "2025-08-18 00:00:00",
            "path": "/v1/senders",
            "method": "GET",
            "status": 400,
            "message": "Invalid status",
            "code": "1439"
        }]
    }

    Please refer to this table for details:

    Error CodeDescriptionHTTP Code
    1439Invalid status400