This service sends message(s) to a single user or to all followers. To send to all followers, set type to 1 and omit the address; this works asynchronously. When a user follows the service a session is created; sending a valid message to the service refreshes the session. A valid session between the service and the user is required to send a message. The JSON format expected by the service changes based on the message type sent to followers. See content type formats for details.
Send the service username/password in the Header using Basic Authentication.
| Field | Value | Description |
|---|---|---|
| *txnid | string | Request id value |
| *receiver | object | |
| *type | int | Address type of the recipient. Values: 0 -> Hashed address 1 -> All addresses following the service 2 -> MSISDN (plain number) |
| *address | string | Address in the type specified by type. If type is 0, address is hashed (use the value provided by bipussu). If type is 1, the address must not be in the request. If type is 2, provide the address in 905XXXXXXXXX format. |
| *composition | object | |
| *list | list | List of messages to send. At least 1 item is required. |
| *type | int | Message type. Values: 0 – Text 2 – Photo 3 – Audio 4 – Video 5 – Sticker 6 – Caps 7 – Location 9 – Finish Line 10 – Contact 13 – Template Media Message 14 – Document. Additional parameters depend on the selected type. |
| expire | int | Seconds until the message disappears. Values: 3, 5, 10, 60 |
| ttl | int | Time to live. Seconds until the message expires and the send is cancelled. |
| Field | Value | Description |
|---|---|---|
| *txnid | string | Request id value |
| *resultcode | string | Response code. 0 for success; for failures see Error Codes. |
| *list | list | Filled if successful and reporting is available. |
| *resultcode | int | Send result. 0 for success; otherwise see Error Codes. |
| *receiver | string | Recipient. |
| *reportid | string | Id of the message sent to the user. |
| *numberofmessage | int | Number of messages to the user. |
| *totalnumberofmessage | int | Total number of messages sent to the user. |
{
{
"txnid": "156",
"receiver": {
"type": 2,
"address": "9053XXXXXXXX"
}
},
"composition": {
"list": [{
"type": 4,
"message": "https://timsac.turkcell.com.tr/scontent/p2p/04032016/10/Vedb8d12f22a3ac286622841e61203b2d09805a24c893c47548d98ef675e771295.mp4",
"size": 120,
"ratio": 1
}]
}
}
{
"txnid": "156",
"resultcode": 0
}
{
"txnid": "200",
"resultcode": 0,
"list": [{
"resultcode": 0,
"receiver": "905XXXXXXXXX",
"reportid": "34cvA-2542",
"numberofmessage": 1,
"totalnumberofmessage": 1
}]
}
{
"txnid": "156",
"resultcode": 312
}
{
"txnid": "2200",
"receiver": {
"type": 1
},
"composition": {
"list": [{
"type": 0,
"message": "test"
}]
}
}
{
"txnid": "2200",
"resultcode": 0
}
txnid cannot be null, empty, or longer than 40 characters. [1000]receiver cannot be null or empty. [1008]type cannot be null or empty. Only 0, 1, or 2 are allowed. [1008]Address value:
type is 0 (hashed number), it must not be null or empty. [1008]type is 1 (all followers), it must not be included in the request. [1008]type is 2 (plain number), it must not be null or empty, must be 3–15 characters long, and must be MSISDN (E164 format). [1008]expire may be null, but cannot be any value other than 3, 5, 10, or 60. [1001].composition cannot be empty; its list cannot be null or empty. The list cannot contain more than 5 items. [1002]list, content-type validations are applied. Each content type has its own format and validations; ensure they are checked.| resultcode | Description |
|---|---|
| 1000 | invalid txnid |
| 1001 | invalid expire value |
| 1002 | invalid content |
| 1008 | invalid receiver address |