Number configuration

Create and manage application configurations for receiving messages.

Besides sending SMS messages, our platform fully supports the reception of incoming SMS messages and Voice calls from your users. Configuration and Action setup will enable you to achieve that.

How to receive incoming SMS?

Setup for receiving incoming SMS messages is a two step process, assuming you have already purchased a phone number.

  1. Configuration setup
  2. Action setup

During the Action setup, you can decide about the method how to receive messages:

  1. Pull method
  2. Forward method

Configuration is a logical container for Actions. You can choose the method of incoming message delivery through the Action setup, but before you do that, a Configuration must be created since the Action can only exist inside the Configuration container.

Configuration with the keyword

Each phone number can have one or many Configuration containers. A Configuration container may be assigned a keyword. Only one container without a keyword is allowed, and all others must have unique keywords.

When an SMS is received on this phone number, the first word of the message will be compared with the Configuration keywords, and if there is a match, the Action rule of the matched container will be executed as message delivery method (Pull or Forward).

Configuration with no keyword

Besides Configurations with keywords, we recommend you always have a Configuration that is not keyword-enabled to serve as a “catch all” fail safe in cases where SMS without keywords are received.

Available methods

Configuration model

Property name Type Description
configurationKey string Unique ID of the Configuration.
keyword string Keyword expected in received message.
activeFrom string Date since the Configuration has been active.
activeUntil string Expiration date of the Configuration.
isActive bool Current status of the Configuration.

Create new Configuration

This method allows you to create a Configuration container for the new Action.

https://api.infobip.com/numbers/1/numbers/{numberKey}/configurations

Request example:

POST /numbers/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json	
  

Response:

{
  "configurationKey": "64GD2CA328536A09DD2CA328536A09D8",
  "activeFrom": "2016-12-14T13:21:14.806+0000",
  "isActive": true
}	
  

A successful response is represented by the HTTP status code 200 OK.

Configuration with the keyword

Request example:

POST /numbers/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json

{
	"keyword": "INFOBIP"
}	
  

Response:

{
  "configurationKey": "54AD2CA328536A09AD2CA328536A09D8",
  "keyword": "INFOBIP",
  "activeFrom": "2016-12-14T13:21:51.349+0000",
  "isActive": true
}	
  

A successful response is represented by the HTTP status code 200 OK.

List all Configurations

This method will list all of your Configurations for the selected number.

https://api.infobip.com/numbers/1/numbers/{numberKey}/configurations

Request example:

GET /numbers/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json	
  

Response:

{
  "configurations": [
    {
      "configurationKey": "64GD2CA328536A09DD2CA328536A09D8",
      "activeFrom": "2016-12-14T13:21:14.807+0000",
      "isActive": true
    },
    {
      "configurationKey": "54AD1CA328536A09AD1CA328536A09D8",
      "keyword": "INFOBIP",
      "activeFrom": "2016-12-14T13:21:51.350+0000",
      "isActive": true
    }
  ],
  "configurationCount": 2
}	
  

A successful response is represented by the HTTP status code 200 OK.

Get single Configuration

This method will get a single Configuration by configuration key.

https://api.infobip.com/numbers/1/numbers/{numberKey}/configurations/{configurationKey}

Request example:

GET /numbers/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations/54AD1CA328536A09AD1CA328536A09D8 HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json	
  

Response:

{
  "configurationKey": "54D053219829339BAD1CA328536A09D8",
  "keyword": "INFOBIP",
  "activeFrom": "2016-12-14T13:21:51.350+0000",
  "isActive": true
}	
  

A successful response is represented by an HTTP status code 200 OK.

Update Configuration

This method allows you to update the keyword and validity period for a single Configuration by configuration key.

https://api.infobip.com/numbers/1/numbers/{numberKey}/configurations/{configurationKey}

Request example:

PUT /numbers/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations/54AD1CA328536A09AD1CA328536A09D8 HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json

{
  "keyword": "API",
  "activeFrom": "2016-09-29T11:50:16.000+0000",
  "activeUntil": "2017-09-29T11:50:16.000+0000"
}	
  

Response:

{
  "configurationKey": "54AD1CA328536A09AD1CA328536A09D8",
  "keyword": "API",
  "activeFrom": "2016-09-29T11:50:16.000+0000",
  "activeUntil": "2017-09-29T11:50:16.000+0000",
  "isActive": true
}	
  

A successful response is represented by an HTTP status code 200 OK.

Delete Configuration

This method allows you to delete a Configuration according to a configuration key.

https://api.infobip.com/numbers/1/numbers/{numberKey}/configurations/{configurationKey}
DELETE /numbers/1/numbers/78D8394AC5EG0460B4CF0E723FC31B49/configurations/54AD1CA328536A09AD1CA328536A09D8 HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json	
  

A successful response is presented by the HTTP status code 204 No Content. There is no response body.