Update virtual sender
Description
Updates a virtual sender, changes settings.
Request URL
Method: POST
https://example.com/api/v1.1/vsenders/update
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
format | string | "json" | No | Response data format. By default – json |
id | int | 1 | Yes | Virtual sender ID |
name | string | "New virtual sender" | Yes | Virtual sender name |
email_rules | JSON array | Yes | Rules for email senders | |
sms_rules | JSON array | Yes | Rules for SMS senders |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"name": "Virtual sender",
"email_rules": [
{
"senders": [
{
"from_email": "",
"from_name": "",
"percent": 100,
"replyto_email": "",
"sender_id": 3
}
],
"type": "default",
"value": ""
}
],
"id": 9,
"sms_rules": []
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<name>Virtual sender</name>
<email_rules array='true'>
<senders array='true'>
<from_email></from_email>
<from_name></from_name>
<percent>100</percent>
<replyto_email></replyto_email>
<sender_id>3</sender_id>
</senders>
<type>default</type>
<value></value>
</email_rules>
<id>9</id>
</xml>
Response example
- JSON
- XML
{
"data": {
"saved_id": 9
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<saved_id>1</saved_id>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
saved_id | int | Virtual sender ID |