Configure a virtual phone number

Request

POST https://api.46elks.com/a1/numbers/{id}

Request parameters

Parameter Example Description
sms_url http://hello.io/new_sms
{forward":"+46766861004"}
A webhook URL for incoming SMS or a JSON struct, see Receive an SMS for details.
mms_url http://hello.io/new_call
{"connect":"+46766861004"}
A webhook URL for incoming MMS or a JSON struct, see Receive an MMS for details.
voice_start http://hello.io/new_mms A webhook URL for incoming voice calls, see Receive a call for details.
sms_replies no
yes
no prevents automatic reply of messages if your endpoint gives a response back. yes is the default setting and allow automatic reply.

Response structure

Example JSON response
{
  "id": "n57c8f48af76bf986a14f251b35389e8b",
  "active": "yes",
  "country": "se",
  "number": "+46766861001",
  "capabilities": [ "sms", "voice", "mms" ],
  "sms_url": "https://yourapp.io/elks/sms",
  "mms_url": "https://yourapp.io/elks/mms",
  "voice_start": "https://yourapp.io/elks/calls",
}
Parameter Type Description
id string ID of the allocated number
active string If the number is active or not, allways "yes" on newly allocated numbers
country string A two-letter (ISO alpha 2) country code.
number string The phone number in E.164 format.
capabilities list A comma-seperated string denoting the capabilities the number should have. For example "sms", "sms,voice" or "sms,mms,voice".
sms_url string If the has SMS support this url it where the API will send incomming SMS.
voice_start string If the has Voice support this url it where the API will send incomming calls to be handeled.
mms_url string If the has MMS support this url it where the API will send incomming MMS.