Register sender

Before sending messages using our APIs you need to register the sender that you are going to use. You can have as many senders registered as you want and you can unregister the ones that you do not use anymore.

In order for you to be able to use your own sender, one of our subscriptions is required, alternatively the extra service "Custom Sender ID", which is purchased separately if you use our SMS balance system.

Notice! If you are developing with a trial account you need to use the sender iP1 or iP1sms.

Reading Registered Senders

Endpoint: GET /v2/me/senders

This endpoint will provide you with the documents of all registered senders in your account like the response data type below. Ordered alphabetically by sender.

Read an individual registered sender

Endpoint: GET v2/me/senders/{sender}

This endpoint allows you to read a specific sender.

Register a sender

Endpoint: PUT v2/me/senders/{sender}

This endpoint allows you to register a new sender.

Unregister a sender

Endpoint: DELETE v2/me/senders/{sender}

This endpoint allows you to unregister a sender. The output is the same as when registering the sender

You can also register and remove senders via the user portal

Response data type

{ "sender": "TestNOS", "created": "2018-10-23T17:43:19Z" }

sender

The registered sender.

created

The date the sender was registered

Code example

Register Sender C#

using (var client = new HttpClient()) { client.BaseAddress = new Uri("https://api.ip1sms.com/v2/"); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "API Key"); var sender = "iP1"; HttpResponseMessage response = await client.PutAsync($"me/senders/{sender}", null); if (response.IsSuccessStatusCode) { Console.WriteLine("Sender registered"); } else { Console.WriteLine("Failed, " + response.StatusCode + ": " + await response.Content.ReadAsStringAsync()); } }

Register sender PHP

$conf = array( 'password' => 'API Key', 'apiUrl' => 'api.ip1sms.com/v2/', 'method' => 'PUT', 'endpoint' => 'me/senders/' , ); $sender = "iP1"; // Set up request options $options = array( 'http' => array( 'header' => array( 'Authorization: Bearer '.$conf['password'] ), 'method' => $conf['method'] ) ); $url = "https://" . $conf['apiUrl'] . $conf['endpoint'] . $ transmitter; $context = stream_context_create(1TP4Options); // Send the request $response = file_get_contents($url, false, $context); // Print the response echo $response;

Register Sender VisualBasic

Imports System.Net.Http Imports System.Net.Http.Headers Module Module1 Sub Main() Dim client As New HttpClient() client.BaseAddress = New Uri("https://api.ip1sms.com/v2/") client .DefaultRequestHeaders.Accept.Clear() client.DefaultRequestHeaders.Accept.Add(New MediaTypeWithQualityHeaderValue("application/json")) client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", "API Key") Dim sender As String = " iP1" Dim response As HttpResponseMessage = client.PutAsync($"me/senders/{sender}", Nothing).Result If response.IsSuccessStatusCode Then Console.WriteLine("Sender registered") Else Console.WriteLine("Failed, " & response.StatusCode.ToString() & ": " & response.Content.ReadAsStringAsync().Result) End If End Sub End Module