{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/accounts/:account_id/extensions","auth":"required","method":"post","params":[{"name":"account_id","type":"int","default":"","desc":"Account ID","required":false,"in":"path","ref":"","_id":"56f9c415338fbb2000ec3711"},{"name":"caller_id","type":"string","default":"","desc":"Caller ID","required":false,"in":"body","ref":"","_id":"573b9cbd74d9f20e00c14ee6"},{"name":"usage_type","type":"string","default":"","desc":"Extension type (limited or unlimited)","required":false,"in":"body","ref":"","_id":"56f9c415338fbb2000ec3710"},{"name":"extension","type":"int","default":"","desc":"Extension number (auto-generated if empty)","required":false,"in":"body","ref":"","_id":"579a3f216a875420006a5df9"},{"name":"include_in_directory","type":"boolean","default":"","desc":"Include in dial-by-name directory","required":false,"in":"body","ref":"","_id":"573b9c9974d9f20e00c14edf"},{"name":"name","type":"string","default":"","desc":"Name (auto-generated if empty)","required":false,"in":"body","ref":"","_id":"573b9c9974d9f20e00c14ee2"},{"name":"full_name","type":"string","default":"","desc":"Contact name","required":false,"in":"body","ref":"","_id":"573b9c9974d9f20e00c14ee4"},{"name":"timezone","type":"string","default":"","desc":"Timezone","required":false,"in":"body","ref":"","_id":"573b9c9974d9f20e00c14ee1"},{"name":"name_greeting","type":"object","default":"","desc":"Recording lookup object","required":false,"in":"body","ref":"","_id":"573b9c9974d9f20e00c14ee0"},{"name":"voicemail[greeting][alternate]","type":"object","default":"","desc":"Recording lookup object","required":false,"in":"body","ref":"","_id":"573b9d61ee2b3b220042291c"},{"name":"local_area_code","type":"string","default":"","desc":"Local area code","required":false,"in":"body","ref":"","_id":"573b9cda20832f29003fbd9d"},{"name":"voicemail[greeting][enable_leave_message_prompt]","type":"boolean","default":"","desc":"Enable the \"leave a message\" prompt for voicemail","required":false,"in":"body","ref":"","_id":"573b9d992cf9af3200d58874"},{"name":"voicemail[enabled]","type":"boolean","default":"","desc":"Enable voicemail","required":false,"in":"body","ref":"","_id":"573b9cfe20832f29003fbd9e"},{"name":"enable_outbound_calls","type":"boolean","default":"1","desc":"Enable outgoing calls","required":false,"in":"body","ref":"","_id":"577f234ca326490e000b74a3"},{"name":"enable_call_waiting","type":"boolean","default":"1","desc":"Enable Call Waiting","required":false,"in":"body","ref":"","_id":"577f234ca326490e000b74a4"},{"name":"voicemail[password]","type":"int","default":"","desc":"Voicemail password","required":false,"in":"body","ref":"","_id":"573b9d11ee2b3b2200422919"},{"name":"voicemail[greeting][type]","type":"string","default":"","desc":"Voicemail greeting type","required":false,"in":"body","ref":"","_id":"573b9d2774d9f20e00c14eeb"},{"name":"voicemail[greeting][standard]","type":"object","default":"","desc":"Recording lookup object","required":false,"in":"body","ref":"","_id":"573b9d50ee2b3b220042291b"},{"name":"voicemail[transcription]","type":"string","default":"","desc":"Voicemail transcription type","required":false,"in":"body","ref":"","_id":"573b9db36c865e19007a5fc7"},{"name":"voicemail[notifications][emails]","type":"mixed","default":"","desc":"Email notifications for voicemails.  Can be a single email or an array of emails","required":false,"in":"body","ref":"","_id":"573b9ded29f6b50e007d26ae"},{"name":"voicemail[notifications][sms]","type":"string","default":"","desc":"SMS notifications for voicemails","required":false,"in":"body","ref":"","_id":"573b9e29fd7f2e3400cf8ac5"},{"name":"call_notifications[emails]","type":"mixed","default":"","desc":"Email notifications for calls. Can be a single email or an array of emails","required":false,"in":"body","ref":"","_id":"573b9e742cf9af3200d58878"},{"name":"call_notifications[sms]","type":"string","default":"","desc":"SMS notifications for calls","required":false,"in":"body","ref":"","_id":"573b9eb229f6b50e007d26b6"},{"name":"bypass_hard_phone","type":"boolean","default":"","desc":"Set \"true\" if you want to use advanced call handling rules instead of device (applicable only if there is any device attached to the extension, see \"device_membership\"","required":false,"in":"body","ref":"","_id":"5de8347486b151004f18b583"}],"results":{"codes":[{"status":201,"language":"json","code":"{\n    \"id\": 456,\n    \"usage_type\": \"unlimited\",\n    \"extension\": 12300,\n    \"name\": \"Bobby\",\n    \"device_membership\": null,\n    \"full_name\": \"Bobby McFerrin\",\n    \"timezone\": \"America/Los_Angeles\",\n    \"name_greeting\": {\n        \"id\": 2984,\n        \"name\": \"Bobby McFerrin\"\n    },\n    \"include_in_directory\": true,\n    \"caller_id\": \"+13168493322\",\n    \"local_area_code\": \"619\",\n    \"enable_call_waiting\": true,\n    \"enable_outbound_calls\": true,\n    \"voicemail\": {\n        \"enabled\": true,\n        \"password\": \"12345\",\n        \"greeting\": {\n            \"type\": \"standard\",\n            \"alternate\": {\n                \"id\": 2984,\n                \"name\": \"Out of office\"\n            },\n            \"standard\": {\n                \"id\": 462,\n                \"name\": \"Bobby's desk\"\n            },\n            \"enable_leave_message_prompt\": true\n        },\n        \"attachments\": \"mp3\",\n        \"notifications\": {\n            \"emails\": [\n                \"bobby:::at:::example.com\"\n            ],\n            \"sms\": \"+18587741111\"\n        },\n        \"transcription\": \"automated\"\n    },\n    \"call_notifications\": {\n        \"emails\": [\n            \"[email protected]\"\n        ],\n        \"sms\": \"+18587748888\"\n    }\n}","name":""}]},"settings":"","examples":{"codes":[{"language":"php","code":"<?php\n$client = new \\GuzzleHttp\\Client([\n    'base_uri' => 'https://api.phone.com/v4/',\n    'headers' => ['Authorization' => \"Bearer $token\"]\n]);\n$response = $client->post('accounts/123/extensions', ['json' => [\n    \"usage_type\" => \"unlimited\",\n    \"extension\" => 12300,\n    \"name\" => \"Bobby\",\n    \"full_name\" => \"Bobby McFerrin\",\n    \"timezone\" => \"America/Los_Angeles\",\n    \"name_greeting\" => \"Bobby McFerrin\",\n    \"include_in_directory\" => true,\n    \"caller_id\" => \"+13168493322\",\n    \"local_area_code\" => \"619\",\n    \"enable_call_waiting\" => true,\n    \"enable_outbound_calls\" => true,\n    \"voicemail\" => [\n        \"enabled\" => true,\n        \"password\" => \"12345\",\n        \"greeting\" => [\n            \"type\" => \"standard\",\n            \"alternate\" => \"Out of office\",\n            \"standard\" => \"Bobby's desk\",\n            \"enable_leave_message_prompt\" => true\n        ],\n        \"attachments\" => \"mp3\",\n        \"notifications\" => [\n            \"emails\" => [\n                \"[email protected]\"\n            ],\n            \"sms\" => \"+18587741111\"\n        ],\n        \"transcription\" => \"automated\"\n    ],\n    \"call_notifications\" => [\n        \"emails\" => [\n            \"[email protected]\"\n        ],\n        \"sms\" => \"+18587748888\"\n    ]\n]]);"}]}},"next":{"description":"","pages":[]},"title":"Create Extension","type":"endpoint","slug":"create-account-extension","excerpt":"Create an individual extension.  See [extension](doc:account-extensions) for more details.","body":"","updates":[],"order":3,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"57624356653c2d2200fec7b9","parentDoc":null,"project":"55c8cff571d7580d0063a5e5","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Account Extensions","slug":"extensions","order":12,"from_sync":false,"reference":true,"_id":"57624356653c2d2200fec7a0","__v":0,"version":"57624356653c2d2200fec79c","project":"55c8cff571d7580d0063a5e5","createdAt":"2016-03-28T23:43:07.914Z"},"editedParams2":true,"githubsync":"","version":{"version":"4","version_clean":"4.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["57624356653c2d2200fec79d","57624356653c2d2200fec79e","57624356653c2d2200fec79f","57624356653c2d2200fec7a0","57624356653c2d2200fec7a1","57624356653c2d2200fec7a2","57624356653c2d2200fec7a3","57624356653c2d2200fec7a4","57624356653c2d2200fec7a5","57624356653c2d2200fec7a6","57624356653c2d2200fec7a7","57624356653c2d2200fec7a8","57624356653c2d2200fec7a9","57624356653c2d2200fec7aa","5779ca1b99b40b0e005abb3a","5779d198aea88b0e00f63277","5797d3ab17ced017003c4be4","57ac170ef1cdae0e0053cdfc","57dbfc723ed3450e00dc9e6d","5804d12d16161c0f0077df9b","5841064b652e5b0f0015a7c8","588b5e5f2966b2230009cbf9","58a68ebf3239fa0f00857619","58c23c8b4922930f0050ac91","58fd1460809fc30f00f2ee07","5934eaf5328680002d77de6a","594bf91601cfe6000f40f4c5","595c4ed696b447001ba0cf6d","596524495cee50001575f5be","5970d4f1313162004dd303b5","59780fac24dbd1001a1fa057","59a8cfd3ead78a002d63cafe","59e0323d93da1f001c9ec170","5b0c16f2be9fcb0003e28222","5ba8fd1a4c8c220003a08f0f","5ede526e75bc22005d0adecc"],"_id":"57624356653c2d2200fec79c","createdAt":"2016-06-16T06:12:38.244Z","releaseDate":"2016-06-16T06:12:38.244Z","__v":23,"project":"55c8cff571d7580d0063a5e5"},"user":"571fcfeea0acd42000af95be","__v":9,"createdAt":"2016-05-17T22:26:58.482Z","editedParams":true}

postCreate Extension

Create an individual extension. See [extension](doc:account-extensions) for more details.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

account_id:
integer
Account ID

Body Params

caller_id:
string
Caller ID
usage_type:
string
Extension type (limited or unlimited)
extension:
integer
Extension number (auto-generated if empty)
include_in_directory:
boolean
Include in dial-by-name directory
name:
string
Name (auto-generated if empty)
full_name:
string
Contact name
timezone:
string
Timezone
name_greeting:
object
Recording lookup object
voicemail[greeting][alternate]:
object
Recording lookup object
local_area_code:
string
Local area code
voicemail[greeting][enable_leave_message_prompt]:
boolean
Enable the "leave a message" prompt for voicemail
voicemail[enabled]:
boolean
Enable voicemail
enable_outbound_calls:
boolean1
Enable outgoing calls
enable_call_waiting:
boolean1
Enable Call Waiting
voicemail[password]:
integer
Voicemail password
voicemail[greeting][type]:
string
Voicemail greeting type
voicemail[greeting][standard]:
object
Recording lookup object
voicemail[transcription]:
string
Voicemail transcription type
voicemail[notifications][emails]:
mixed
Email notifications for voicemails. Can be a single email or an array of emails
voicemail[notifications][sms]:
string
SMS notifications for voicemails
call_notifications[emails]:
mixed
Email notifications for calls. Can be a single email or an array of emails
call_notifications[sms]:
string
SMS notifications for calls
bypass_hard_phone:
boolean
Set "true" if you want to use advanced call handling rules instead of device (applicable only if there is any device attached to the extension, see "device_membership"

Examples


Result Format


User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}