{"_id":"589c84adccb0c72500327c2f","parentDoc":null,"__v":0,"category":{"_id":"589b19b4fec2730f0082e040","version":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-02-08T13:14:28.054Z","from_sync":false,"order":16,"slug":"viber","title":"Viber messaging"},"project":"54eb50e5615ffc1900305a16","user":"57a98d832242630e00cc8df7","version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":27,"createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf","592e7685c58275000f20174f","59392839e376d4002f8a0474","59393064e376d4002f8a05a1","5947ae0d4005e2000f3a4fec","594a74df1d1de5001ab3517a","5954bc387a147f001b918915"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-02-09T15:03:09.023Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"POST /viber/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{  \n  \"from\":\"8F0792F86035A9F4290821F1EE6BC06A\",\n  \"to\":\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n  \"message\": {\n    \"type\":\"TEXT\",\n    \"text\":\"Hello, World!\"\n  }\n}","language":"json","name":""}]},"method":"post","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"to\": \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n  \"messageCount\": 1,\n  \"messageId\": \"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb\",\n  \"status\": {\n    \"groupId\": 1,\n    \"groupName\": \"PENDING\",\n    \"id\": 7,\n    \"name\": \"PENDING_ENROUTE\",\n    \"description\": \"Message sent to next instance\"\n  }\n}","name":""},{"status":400,"language":"json","code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"BAD_REQUEST\",\n      \"text\": \"Bad request\"\n    }\n  }\n}","name":""},{"code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"UNAUTHORIZED\",\n      \"text\": \"Invalid login details\"\n    }\n  }\n}","language":"json","status":401}]},"settings":"554860d6d2c8410d006c215e","auth":"required","params":[{"_id":"55155f2abc466623002afe8b","ref":"","in":"body","required":true,"desc":"Application key you are using to send messages.","default":"","type":"string","name":"from"},{"_id":"55155f2abc466623002afe8a","ref":"","in":"body","required":true,"desc":"User key.","default":"","type":"string","name":"to"},{"_id":"55155f2abc466623002afe89","ref":"","in":"body","required":true,"desc":"Message object.","default":"","type":"object","name":"message"}],"url":"/viber/:version/single"},"isReference":false,"order":1,"body":"# Request Format\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property name\",\n    \"h-1\": \"Type\",\n    \"0-0\": \"from\",\n    \"1-0\": \"to\",\n    \"2-0\": \"message\",\n    \"0-1\": \"String\",\n    \"1-1\": \"String\",\n    \"2-1\": \"Object\",\n    \"0-2\": \"Application key you are using to send messages.\",\n    \"1-2\": \"User key.\",\n    \"2-2\": \"Message object.\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n## Message Object\n\nSupported message objects are text, imageWithText, video, file, contact, location, url and sticker.\n\n\n### Text Message\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"type\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Constant value - \\\"TEXT\\\".\",\n    \"1-0\": \"text\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Text of the message.\",\n    \"h-0\": \"Property name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /viber/1/single HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\\n{  \\n  \\\"from\\\":\\\"8F0792F86035A9F4290821F1EE6BC06A\\\",\\n  \\\"to\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\n  \\\"message\\\": {\\n    \\\"type\\\":\\\"TEXT\\\",\\n    \\\"text\\\":\\\"Hello, World!\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### Image With Text Message\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"type\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Constant value - \\\"IMAGE_WITH_TEXT\\\".\",\n    \"1-0\": \"url\",\n    \"1-1\": \"String\",\n    \"1-2\": \"URL of the image.\",\n    \"2-0\": \"text\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Text of the message.\",\n    \"3-0\": \"thumbnailUrl\",\n    \"3-1\": \"String\",\n    \"3-2\": \"URL of thumbnail (optional).\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /viber/1/single HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\\n{  \\n  \\\"from\\\":\\\"8F0792F86035A9F4290821F1EE6BC06A\\\",\\n  \\\"to\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\n  \\\"message\\\": {\\n    \\\"type\\\":\\\"IMAGE\\\",\\n    \\\"url\\\":\\\"https://example.com/original.jpg\\\",\\n    \\\"text\\\":\\\"Hello, World!\\\",\\n    \\\"thumbnailUrl\\\":\\\"https://example.com/thumbnail.jpg\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### Video Message\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"type\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Constant value - \\\"VIDEO\\\".\",\n    \"1-0\": \"url\",\n    \"1-1\": \"String\",\n    \"1-2\": \"URL of the video.\",\n    \"2-0\": \"sizeInBytes\",\n    \"2-1\": \"Number\",\n    \"2-2\": \"Size of the video.\",\n    \"h-0\": \"Property name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /viber/1/single HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\\n{  \\n  \\\"from\\\":\\\"8F0792F86035A9F4290821F1EE6BC06A\\\",\\n  \\\"to\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\n  \\\"message\\\": {\\n    \\\"type\\\":\\\"VIDEO\\\",\\n    \\\"url\\\":\\\"https://example.com/original.mp4\\\",\\n    \\\"sizeInBytes\\\":10000,\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### File Message\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"type\",\n    \"0-1\": \"String\",\n    \"1-1\": \"String\",\n    \"2-1\": \"Number\",\n    \"0-2\": \"Constant value - \\\"FILE\\\".\",\n    \"1-0\": \"url\",\n    \"2-0\": \"sizeInBytes\",\n    \"1-2\": \"URL of the file.\",\n    \"2-2\": \"Size of the file.\",\n    \"h-0\": \"Property name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"3-0\": \"fileName\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Name of the file.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /viber/1/single HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\\n{  \\n  \\\"from\\\":\\\"8F0792F86035A9F4290821F1EE6BC06A\\\",\\n  \\\"to\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\n  \\\"message\\\": {\\n    \\\"type\\\":\\\"FILE\\\",\\n    \\\"url\\\":\\\"https://example.com/original.m4a\\\",\\n    \\\"sizeInBytes\\\":10000,\\n    \\\"fileName\\\":\\\"original.m4a\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### Contact Message\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"type\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Constant value - \\\"CONTACT\\\"\",\n    \"1-0\": \"name\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Name of the contact.\",\n    \"2-0\": \"phoneNumber\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Phone number of the contact.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /viber/1/single HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\\n{  \\n  \\\"from\\\":\\\"8F0792F86035A9F4290821F1EE6BC06A\\\",\\n  \\\"to\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\n  \\\"message\\\": {\\n    \\\"type\\\":\\\"CONTACT\\\",\\n    \\\"name\\\":\\\"Alex\\\",\\n    \\\"phoneNumber\\\":\\\"+972511123123\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### Location Message\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"type\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Constant value - \\\"LOCATION\\\"\",\n    \"h-0\": \"Property name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"1-0\": \"latitude\",\n    \"1-1\": \"Number\",\n    \"2-0\": \"longitude\",\n    \"2-1\": \"Number\",\n    \"1-2\": \"Latitude of the location.\",\n    \"2-2\": \"Longitude of the location.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /viber/1/single HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\\n{  \\n  \\\"from\\\":\\\"8F0792F86035A9F4290821F1EE6BC06A\\\",\\n  \\\"to\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\n  \\\"message\\\": {\\n    \\\"type\\\":\\\"LOCATION\\\",\\n    \\\"latitude\\\": 48.85837,\\n    \\\"longitude\\\": 2.294481\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### Url message\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"type\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Constant value - \\\"URL\\\"\",\n    \"1-1\": \"String\",\n    \"1-0\": \"url\",\n    \"1-2\": \"Url of content.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /viber/1/single HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\\n{  \\n  \\\"from\\\":\\\"8F0792F86035A9F4290821F1EE6BC06A\\\",\\n  \\\"to\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\n  \\\"message\\\": {\\n    \\\"type\\\":\\\"CONTACT\\\",\\n    \\\"url\\\":\\\"http://www.website.com/go_here\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n### Sticker Message\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"type\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Constant value - \\\"STICKER\\\"\",\n    \"1-0\": \"stickerId\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Id of the sticker.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /viber/1/single HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\\n{  \\n  \\\"from\\\":\\\"8F0792F86035A9F4290821F1EE6BC06A\\\",\\n  \\\"to\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\n  \\\"message\\\": {\\n    \\\"type\\\":\\\"STICKER\\\",\\n    \\\"stickerId\\\": 46105\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n# Response format\n\nOn success, the response header HTTP status code will be `200 OK` and the message will be sent.\n\nIf you try to send the message without authorization, you will receive a `401 Unauthorized` error.\n\nOn an incorrectly formatted request, the HTTP status code will be `400 Bad Request`.","excerpt":"This method allows you to send a single message.","slug":"send-viber-message","type":"endpoint","title":"Send Viber message"}

postSend Viber message

This method allows you to send a single message.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

from:
required
string
Application key you are using to send messages.
to:
required
string
User key.
message:
required
object
Message object.

Examples


Result Format


Documentation

# Request Format [block:parameters] { "data": { "h-0": "Property name", "h-1": "Type", "0-0": "from", "1-0": "to", "2-0": "message", "0-1": "String", "1-1": "String", "2-1": "Object", "0-2": "Application key you are using to send messages.", "1-2": "User key.", "2-2": "Message object.", "h-2": "Description" }, "cols": 3, "rows": 3 } [/block] ## Message Object Supported message objects are text, imageWithText, video, file, contact, location, url and sticker. ### Text Message [block:parameters] { "data": { "0-0": "type", "0-1": "String", "0-2": "Constant value - \"TEXT\".", "1-0": "text", "1-1": "String", "1-2": "Text of the message.", "h-0": "Property name", "h-1": "Type", "h-2": "Description" }, "cols": 3, "rows": 2 } [/block] [block:code] { "codes": [ { "code": "POST /viber/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{ \n \"from\":\"8F0792F86035A9F4290821F1EE6BC06A\",\n \"to\":\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n \"message\": {\n \"type\":\"TEXT\",\n \"text\":\"Hello, World!\"\n }\n}", "language": "json" } ] } [/block] ### Image With Text Message [block:parameters] { "data": { "h-0": "Property name", "h-1": "Type", "h-2": "Description", "0-0": "type", "0-1": "String", "0-2": "Constant value - \"IMAGE_WITH_TEXT\".", "1-0": "url", "1-1": "String", "1-2": "URL of the image.", "2-0": "text", "2-1": "String", "2-2": "Text of the message.", "3-0": "thumbnailUrl", "3-1": "String", "3-2": "URL of thumbnail (optional)." }, "cols": 3, "rows": 4 } [/block] [block:code] { "codes": [ { "code": "POST /viber/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{ \n \"from\":\"8F0792F86035A9F4290821F1EE6BC06A\",\n \"to\":\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n \"message\": {\n \"type\":\"IMAGE\",\n \"url\":\"https://example.com/original.jpg\",\n \"text\":\"Hello, World!\",\n \"thumbnailUrl\":\"https://example.com/thumbnail.jpg\"\n }\n}", "language": "json" } ] } [/block] ### Video Message [block:parameters] { "data": { "0-0": "type", "0-1": "String", "0-2": "Constant value - \"VIDEO\".", "1-0": "url", "1-1": "String", "1-2": "URL of the video.", "2-0": "sizeInBytes", "2-1": "Number", "2-2": "Size of the video.", "h-0": "Property name", "h-1": "Type", "h-2": "Description" }, "cols": 3, "rows": 3 } [/block] [block:code] { "codes": [ { "code": "POST /viber/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{ \n \"from\":\"8F0792F86035A9F4290821F1EE6BC06A\",\n \"to\":\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n \"message\": {\n \"type\":\"VIDEO\",\n \"url\":\"https://example.com/original.mp4\",\n \"sizeInBytes\":10000,\n }\n}", "language": "json" } ] } [/block] ### File Message [block:parameters] { "data": { "0-0": "type", "0-1": "String", "1-1": "String", "2-1": "Number", "0-2": "Constant value - \"FILE\".", "1-0": "url", "2-0": "sizeInBytes", "1-2": "URL of the file.", "2-2": "Size of the file.", "h-0": "Property name", "h-1": "Type", "h-2": "Description", "3-0": "fileName", "3-1": "String", "3-2": "Name of the file." }, "cols": 3, "rows": 4 } [/block] [block:code] { "codes": [ { "code": "POST /viber/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{ \n \"from\":\"8F0792F86035A9F4290821F1EE6BC06A\",\n \"to\":\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n \"message\": {\n \"type\":\"FILE\",\n \"url\":\"https://example.com/original.m4a\",\n \"sizeInBytes\":10000,\n \"fileName\":\"original.m4a\"\n }\n}", "language": "json" } ] } [/block] ### Contact Message [block:parameters] { "data": { "0-0": "type", "0-1": "String", "0-2": "Constant value - \"CONTACT\"", "1-0": "name", "1-1": "String", "1-2": "Name of the contact.", "2-0": "phoneNumber", "2-1": "String", "2-2": "Phone number of the contact." }, "cols": 3, "rows": 3 } [/block] [block:code] { "codes": [ { "code": "POST /viber/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{ \n \"from\":\"8F0792F86035A9F4290821F1EE6BC06A\",\n \"to\":\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n \"message\": {\n \"type\":\"CONTACT\",\n \"name\":\"Alex\",\n \"phoneNumber\":\"+972511123123\"\n }\n}", "language": "json" } ] } [/block] ### Location Message [block:parameters] { "data": { "0-0": "type", "0-1": "String", "0-2": "Constant value - \"LOCATION\"", "h-0": "Property name", "h-1": "Type", "h-2": "Description", "1-0": "latitude", "1-1": "Number", "2-0": "longitude", "2-1": "Number", "1-2": "Latitude of the location.", "2-2": "Longitude of the location." }, "cols": 3, "rows": 3 } [/block] [block:code] { "codes": [ { "code": "POST /viber/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{ \n \"from\":\"8F0792F86035A9F4290821F1EE6BC06A\",\n \"to\":\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n \"message\": {\n \"type\":\"LOCATION\",\n \"latitude\": 48.85837,\n \"longitude\": 2.294481\n }\n}", "language": "json" } ] } [/block] ### Url message [block:parameters] { "data": { "0-0": "type", "0-1": "String", "0-2": "Constant value - \"URL\"", "1-1": "String", "1-0": "url", "1-2": "Url of content." }, "cols": 3, "rows": 2 } [/block] [block:code] { "codes": [ { "code": "POST /viber/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{ \n \"from\":\"8F0792F86035A9F4290821F1EE6BC06A\",\n \"to\":\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n \"message\": {\n \"type\":\"CONTACT\",\n \"url\":\"http://www.website.com/go_here\"\n }\n}", "language": "json" } ] } [/block] ### Sticker Message [block:parameters] { "data": { "h-0": "Property name", "h-1": "Type", "h-2": "Description", "0-0": "type", "0-1": "String", "0-2": "Constant value - \"STICKER\"", "1-0": "stickerId", "1-1": "String", "1-2": "Id of the sticker." }, "cols": 3, "rows": 2 } [/block] [block:code] { "codes": [ { "code": "POST /viber/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{ \n \"from\":\"8F0792F86035A9F4290821F1EE6BC06A\",\n \"to\":\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\",\n \"message\": {\n \"type\":\"STICKER\",\n \"stickerId\": 46105\n }\n}", "language": "json" } ] } [/block] # Response format On success, the response header HTTP status code will be `200 OK` and the message will be sent. If you try to send the message without authorization, you will receive a `401 Unauthorized` error. On an incorrectly formatted request, the HTTP status code will be `400 Bad Request`.