GetOTP Documentation

Sender

The Sender API provides a way to get a specific Sender ID.

Request for Sender API

To get a specific Sender, make a GET request to our Senders endpoint with the Sender ID.

https://api.otp.dev/v1/senders/{sender_id}

With the following Basic HTTP verification method:

DescriptionRequiredData TypeExample
Your API KeyYesStringmtbi2w4hlendfpxa1igthcu5p6mzxf7k

Note

With the following parameters:

NameDescriptionRequiredData TypeExample
sender_idThe unique identifier of the senderYesString3fa85f64-5717-4562-b3fc-2c963f66afa6

Examples

Below is an example request using cURL:

curl --request GET \
     --url 'https://api.otp.dev/v1/senders/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
     --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": "My Sender",
        "channel": "SMS",
        "type": "Alphanumeric",
        "status": "Available",
        "country": "de",
        "countries": [
            "de"
        ],
        "monthly_cost": "2",
        "setup_cost": "2",
        "create_date": "2025-09-24 07:44:25",
        "update_date": "2025-09-24 07:44:25",
        "links": { 
            "self": "string",
            "account": "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
data.links.selfURL of the senderString (URL)string
data.links.accountURL of the accountString (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/3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "method": "GET",
        "status": 404,
        "message": "Sender not found",
        "code": "1402"
    }]
}

Please refer to this table for details:

Error CodeDescriptionHTTP Code
1402Sender not found404