{"__v":0,"_id":"58512b6a3dfed91900d535f3","category":{"__v":3,"_id":"5515472ac28d6125001b8884","pages":["551924db45b0d80d00152254","55194fec71a8cc210031db15","551e55590a72c50d0085b911"],"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-03-27T12:03:54.990Z","from_sync":false,"order":2,"slug":"receive-sms","title":"Receive SMS"},"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"54eb4fdedf7add210007b29b","version":{"__v":19,"_id":"54eb63b859b1172100334fae","forked_from":"54eb63a1867e1917009b711d","project":"54eb50e5615ffc1900305a16","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"],"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":"2016-12-14T11:22:18.805Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":7,"body":"Besides sending SMS messages, our platform fully supports **the reception of incoming SMS messages from your users**. Configuration and Action setup will enable you to achieve that.\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"How to receive incoming SMS?\",\n  \"body\": \"Setup for receiving incoming SMS messages is a two step process, assuming you have already [puchased a phone number](/docs/phone-number).\\n1. Configuration setup\\n2. Action setup\\n\\nDuring the Action setup, you can decide about the method how to receive messages:\\n* Pull method\\n* Forward method\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/10760f4-sms1.PNG\",\n        \"sms1.PNG\",\n        489,\n        88,\n        \"#e1d3d6\"\n      ]\n    }\n  ]\n}\n[/block]\n**Configuration **is a logical container for Actions. You can choose a method of incoming message delivery through the Action setup, but before you do that, Configuration must be created since the Action can only exist inside of the Configuration container.\n\n###Configuration with the keyword\nEach phone number can have one or many Configuration containers. Configuration container may be assigned a **keyword**. Only one container without keyword is allowed, and others must all have unique keywords.\n\nWhen SMS is received on this phone number, the first word of the message will be compared with Configuration keywords, and if matched, Action rule of matched container will be executed as message delivery method (Pull or Forward).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Configuration with no keyword\",\n  \"body\": \"Besides Configurations with keywords, we recommend always to have a Configuration without a keyword-enabled to serve as \\\"catch all\\\" fail safe in case of SMS with no keyword match is received.\"\n}\n[/block]\n###Available methods\n* [Create new Configuration](#create-new-configuration)\n* [List all Configurations](#list-all-configurations)\n* [Get single Configuration](#get-single-configuration)\n* [Update Configuration](#update-configuration)\n* [Delete Configuration](#delete-configuration)\n\n##Configuration model\n|Property name|Type|Description|\n|-|-|-|\n|configurationKey|string|Unique ID of the Confguration.|\n|keyword|string|Keyword expected in received message.|\n|activeFrom|string|Date since when Configuration is active.|\n|activeUntil|string|Expiration date of the Configuration.|\n|isActive|bool|Current status of the Configuration.|\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"Create new Configuration\"\n}\n[/block]\nThis method allows you to create Configuration container for the new Action.\n\n```\nhttps://api.infobip.com/sms/1/numbers/{numberKey}/configurations\n``` \nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"configurationKey\\\": \\\"64GD2CA328536A09DD2CA328536A09D8\\\",\\n  \\\"activeFrom\\\": \\\"2016-12-14T13:21:14.806+0000\\\",\\n  \\\"isActive\\\": true\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe success response is represented by an HTTP status code `200 OK`.\n\n###Configuration with the keyword\n\nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\\n\\n{\\n\\t\\\"keyword\\\": \\\"INFOBIP\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"configurationKey\\\": \\\"54AD2CA328536A09AD2CA328536A09D8\\\",\\n  \\\"keyword\\\": \\\"INFOBIP\\\",\\n  \\\"activeFrom\\\": \\\"2016-12-14T13:21:51.349+0000\\\",\\n  \\\"isActive\\\": true\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe success response is represented by an HTTP status code `200 OK`.\n\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"List all Configurations\"\n}\n[/block]\nThis method will list all of your Configurations for selected number.\n```\nhttps://api.infobip.com/sms/1/numbers/{numberKey}/configurations\n``` \nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"configurations\\\": [\\n    {\\n      \\\"configurationKey\\\": \\\"64GD2CA328536A09DD2CA328536A09D8\\\",\\n      \\\"activeFrom\\\": \\\"2016-12-14T13:21:14.807+0000\\\",\\n      \\\"isActive\\\": true\\n    },\\n    {\\n      \\\"configurationKey\\\": \\\"54AD1CA328536A09AD1CA328536A09D8\\\",\\n      \\\"keyword\\\": \\\"INFOBIP\\\",\\n      \\\"activeFrom\\\": \\\"2016-12-14T13:21:51.350+0000\\\",\\n      \\\"isActive\\\": true\\n    }\\n  ],\\n  \\\"configurationCount\\\": 2\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nThe success response is represented by an HTTP status code `200 OK`.\n\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"Get single Configuration\"\n}\n[/block]\nThis method will get a single Configurations by configuration key.\n```\nhttps://api.infobip.com/sms/1/numbers/{numberKey}/configurations/{configurationKey}\n``` \n\nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations/54AD1CA328536A09AD1CA328536A09D8 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"configurationKey\\\": \\\"54D053219829339BAD1CA328536A09D8\\\",\\n  \\\"keyword\\\": \\\"INFOBIP\\\",\\n  \\\"activeFrom\\\": \\\"2016-12-14T13:21:51.350+0000\\\",\\n  \\\"isActive\\\": true\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe success response is represented by an HTTP status code `200 OK`.\n\n[block:api-header]\n{\n  \"type\": \"put\",\n  \"title\": \"Update Configuration\"\n}\n[/block]\nThis method allows you to update keyword and validity period for single Configurations by configuration key.\n```\nhttps://api.infobip.com/sms/1/numbers/{numberKey}/configurations/{configurationKey}\n``` \n\nRequest example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PUT /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations/54AD1CA328536A09AD1CA328536A09D8 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\\n\\n{\\n  \\\"keyword\\\": \\\"API\\\",\\n  \\\"activeFrom\\\": \\\"2016-09-29T11:50:16.000+0000\\\",\\n  \\\"activeUntil\\\": \\\"2017-09-29T11:50:16.000+0000\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"configurationKey\\\": \\\"54AD1CA328536A09AD1CA328536A09D8\\\",\\n  \\\"keyword\\\": \\\"API\\\",\\n  \\\"activeFrom\\\": \\\"2016-09-29T11:50:16.000+0000\\\",\\n  \\\"activeUntil\\\": \\\"2017-09-29T11:50:16.000+0000\\\",\\n  \\\"isActive\\\": true\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe success response is represented by an HTTP status code `200 OK`.\n\n[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"Delete Configuration\"\n}\n[/block]\nThis method allows you to delete a Configuration by configuration key.\n```\nhttps://api.infobip.com/sms/1/numbers/{numberKey}/configurations/{configurationKey}\n``` \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"DELETE /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations/54AD1CA328536A09AD1CA328536A09D8 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe success response is presented by an HTTP status code `204 No Content`. There is no response body.","excerpt":"Create and manage application configurations for receiving messages.","slug":"message-configuration","type":"basic","title":"Configuration"}

Configuration

Create and manage application configurations for receiving messages.

Besides sending SMS messages, our platform fully supports **the reception of incoming SMS messages from your users**. Configuration and Action setup will enable you to achieve that. [block:callout] { "type": "warning", "title": "How to receive incoming SMS?", "body": "Setup for receiving incoming SMS messages is a two step process, assuming you have already [puchased a phone number](/docs/phone-number).\n1. Configuration setup\n2. Action setup\n\nDuring the Action setup, you can decide about the method how to receive messages:\n* Pull method\n* Forward method" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/10760f4-sms1.PNG", "sms1.PNG", 489, 88, "#e1d3d6" ] } ] } [/block] **Configuration **is a logical container for Actions. You can choose a method of incoming message delivery through the Action setup, but before you do that, Configuration must be created since the Action can only exist inside of the Configuration container. ###Configuration with the keyword Each phone number can have one or many Configuration containers. Configuration container may be assigned a **keyword**. Only one container without keyword is allowed, and others must all have unique keywords. When SMS is received on this phone number, the first word of the message will be compared with Configuration keywords, and if matched, Action rule of matched container will be executed as message delivery method (Pull or Forward). [block:callout] { "type": "info", "title": "Configuration with no keyword", "body": "Besides Configurations with keywords, we recommend always to have a Configuration without a keyword-enabled to serve as \"catch all\" fail safe in case of SMS with no keyword match is received." } [/block] ###Available methods * [Create new Configuration](#create-new-configuration) * [List all Configurations](#list-all-configurations) * [Get single Configuration](#get-single-configuration) * [Update Configuration](#update-configuration) * [Delete Configuration](#delete-configuration) ##Configuration model |Property name|Type|Description| |-|-|-| |configurationKey|string|Unique ID of the Confguration.| |keyword|string|Keyword expected in received message.| |activeFrom|string|Date since when Configuration is active.| |activeUntil|string|Expiration date of the Configuration.| |isActive|bool|Current status of the Configuration.| [block:api-header] { "type": "post", "title": "Create new Configuration" } [/block] This method allows you to create Configuration container for the new Action. ``` https://api.infobip.com/sms/1/numbers/{numberKey}/configurations ``` Request example [block:code] { "codes": [ { "code": "POST /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" } ] } [/block] Response [block:code] { "codes": [ { "code": "{\n \"configurationKey\": \"64GD2CA328536A09DD2CA328536A09D8\",\n \"activeFrom\": \"2016-12-14T13:21:14.806+0000\",\n \"isActive\": true\n}", "language": "json" } ] } [/block] The success response is represented by an HTTP status code `200 OK`. ###Configuration with the keyword Request example [block:code] { "codes": [ { "code": "POST /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json\n\n{\n\t\"keyword\": \"INFOBIP\"\n}", "language": "json" } ] } [/block] Response [block:code] { "codes": [ { "code": "{\n \"configurationKey\": \"54AD2CA328536A09AD2CA328536A09D8\",\n \"keyword\": \"INFOBIP\",\n \"activeFrom\": \"2016-12-14T13:21:51.349+0000\",\n \"isActive\": true\n}", "language": "json" } ] } [/block] The success response is represented by an HTTP status code `200 OK`. [block:api-header] { "type": "get", "title": "List all Configurations" } [/block] This method will list all of your Configurations for selected number. ``` https://api.infobip.com/sms/1/numbers/{numberKey}/configurations ``` Request example [block:code] { "codes": [ { "code": "GET /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" } ] } [/block] Response [block:code] { "codes": [ { "code": "{\n \"configurations\": [\n {\n \"configurationKey\": \"64GD2CA328536A09DD2CA328536A09D8\",\n \"activeFrom\": \"2016-12-14T13:21:14.807+0000\",\n \"isActive\": true\n },\n {\n \"configurationKey\": \"54AD1CA328536A09AD1CA328536A09D8\",\n \"keyword\": \"INFOBIP\",\n \"activeFrom\": \"2016-12-14T13:21:51.350+0000\",\n \"isActive\": true\n }\n ],\n \"configurationCount\": 2\n}", "language": "text" } ] } [/block] The success response is represented by an HTTP status code `200 OK`. [block:api-header] { "type": "get", "title": "Get single Configuration" } [/block] This method will get a single Configurations by configuration key. ``` https://api.infobip.com/sms/1/numbers/{numberKey}/configurations/{configurationKey} ``` Request example [block:code] { "codes": [ { "code": "GET /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations/54AD1CA328536A09AD1CA328536A09D8 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" } ] } [/block] Response [block:code] { "codes": [ { "code": "{\n \"configurationKey\": \"54D053219829339BAD1CA328536A09D8\",\n \"keyword\": \"INFOBIP\",\n \"activeFrom\": \"2016-12-14T13:21:51.350+0000\",\n \"isActive\": true\n}", "language": "json" } ] } [/block] The success response is represented by an HTTP status code `200 OK`. [block:api-header] { "type": "put", "title": "Update Configuration" } [/block] This method allows you to update keyword and validity period for single Configurations by configuration key. ``` https://api.infobip.com/sms/1/numbers/{numberKey}/configurations/{configurationKey} ``` Request example [block:code] { "codes": [ { "code": "PUT /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations/54AD1CA328536A09AD1CA328536A09D8 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json\n\n{\n \"keyword\": \"API\",\n \"activeFrom\": \"2016-09-29T11:50:16.000+0000\",\n \"activeUntil\": \"2017-09-29T11:50:16.000+0000\"\n}", "language": "json" } ] } [/block] Response [block:code] { "codes": [ { "code": "{\n \"configurationKey\": \"54AD1CA328536A09AD1CA328536A09D8\",\n \"keyword\": \"API\",\n \"activeFrom\": \"2016-09-29T11:50:16.000+0000\",\n \"activeUntil\": \"2017-09-29T11:50:16.000+0000\",\n \"isActive\": true\n}", "language": "json" } ] } [/block] The success response is represented by an HTTP status code `200 OK`. [block:api-header] { "type": "delete", "title": "Delete Configuration" } [/block] This method allows you to delete a Configuration by configuration key. ``` https://api.infobip.com/sms/1/numbers/{numberKey}/configurations/{configurationKey} ``` [block:code] { "codes": [ { "code": "DELETE /sms/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations/54AD1CA328536A09AD1CA328536A09D8 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" } ] } [/block] The success response is presented by an HTTP status code `204 No Content`. There is no response body.