Edit Sender-ids

Edit Sender-ids

Edit sender-ids using put method under your account

API Endpoint

https://portal.mobtexting.com/api/v2/

PUT

{endpoint}sms/senders/{id}

PARAMETERS

Name optional Descriptions
country_code No For which country this sender belongs to. 2 letters
entity_id No Input the entity id (required for india)
entity_name No Company name whom this sender belongs to (required for india)
service No The short code of the service name. ex: (MKT) full list

Example Request

Curl

curl -X PUT \
  '{endpoint}sms/senders/ff467e28-7170-4a72-952e-c999cxxxxxx' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer 5b02112fb7xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "entity_name":"xxxxx",
    "entity_id":"xxxxx",
    "service":"MKT",
    "country_code":"IN"
}'  

C#

var client = new RestClient("{endpoint}/api/v2/sms/senders/9c4500a8-608c-41bb-857a-0e4aae980cdb");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer 7160f04c05870ee88812a435f65xxxxx");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@"    ""entity_name"":""sample1""," + "\n" +
@"    ""entity_id"":""12349087""," + "\n" +
@"    ""service"":""G""," + "\n" +
@"    ""country_code"":""IN""" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Java Script

var settings = {
  "url": "{endpoint}/api/v2/sms/senders/9c4500a8-608c-41bb-857a-0e4aae98xxxx",
  "method": "PUT",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer 7160f04c05870ee88812a435f65xxxxx",
    "Content-Type": "application/json"
  },
  "data": JSON.stringify({
    "entity_name": "sample1",
    "entity_id": "12349087",
    "service": "G",
    "country_code": "IN"
  }),
};

$.ajax(settings).done(function (response) { console.log(response); });

Node

var axios = require('axios');
var data = JSON.stringify({
  "entity_name": "sample1",
  "entity_id": "12349087",
  "service": "G",
  "country_code": "IN"
});

var config = { method: ‘put’, url: ‘{endpoint}/api/v2/sms/senders/9c4500a8-608c-41bb-857a-0e4aae9xxxxx’, headers: { ‘Authorization’: ‘Bearer 7160f04c05870ee88812a435f65xxxxx’, ‘Content-Type’: ‘application/json’ }, data : data };

axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); });

Example Response

{
    "status": "OK",
    "code": 200,
    "message": "Sender Updated Successfully",
    "data": {
        "id": "ff467e28-7170-4a72-952e-c999cxxxxxx",
        "name": "SENDER",
        "service": {
            "id": 55,
            "display_name": "Global SMS",
            "name": "G"
        },
        "entity_name": "SAMPLE COMPANY",
        "entity_id": "123233434355345555",
        "header_id": null,
        "iso": "IN",
        "message": null,
        "document": null,
        "is_open": 0,
        "purpose": 1,
        "status": 1,
        "created_at": "2022-11-16T06:53:26.000000Z",
        "updated_at": "2022-11-16T06:55:55.000000Z"
    }
}