{"_id":"57624356653c2d2200fec7b9","parentDoc":null,"project":"55c8cff571d7580d0063a5e5","category":{"_id":"57624356653c2d2200fec7a0","__v":0,"version":"57624356653c2d2200fec79c","project":"55c8cff571d7580d0063a5e5","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-03-28T23:43:07.914Z","from_sync":false,"order":12,"slug":"extensions","title":"Account Extensions"},"editedParams2":true,"githubsync":"","version":{"_id":"57624356653c2d2200fec79c","__v":22,"project":"55c8cff571d7580d0063a5e5","createdAt":"2016-06-16T06:12:38.244Z","releaseDate":"2016-06-16T06:12:38.244Z","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"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"4.0.0","version":"4"},"user":"571fcfeea0acd42000af95be","__v":8,"editedParams":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-17T22:26:58.482Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","results":{"codes":[{"name":"","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            \"bobbo42@example.com\"\n        ],\n        \"sms\": \"+18587748888\"\n    }\n}","language":"json","status":201}]},"settings":"","examples":{"codes":[{"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                \"bobby@example.com\"\n            ],\n            \"sms\" => \"+18587741111\"\n        ],\n        \"transcription\" => \"automated\"\n    ],\n    \"call_notifications\" => [\n        \"emails\" => [\n            \"bobbo42@example.com\"\n        ],\n        \"sms\" => \"+18587748888\"\n    ]\n]]);","language":"php"}]},"auth":"required","params":[{"_id":"56f9c415338fbb2000ec3711","ref":"","in":"path","required":false,"desc":"Account ID","default":"","type":"int","name":"account_id"},{"_id":"573b9cbd74d9f20e00c14ee6","ref":"","in":"body","required":false,"desc":"Caller ID","default":"","type":"string","name":"caller_id"},{"_id":"56f9c415338fbb2000ec3710","ref":"","in":"body","required":false,"desc":"Extension type (limited or unlimited)","default":"","type":"string","name":"usage_type"},{"_id":"579a3f216a875420006a5df9","ref":"","in":"body","required":false,"desc":"Extension number (auto-generated if empty)","default":"","type":"int","name":"extension"},{"_id":"573b9c9974d9f20e00c14edf","ref":"","in":"body","required":false,"desc":"Include in dial-by-name directory","default":"","type":"boolean","name":"include_in_directory"},{"_id":"573b9c9974d9f20e00c14ee2","ref":"","in":"body","required":false,"desc":"Name (auto-generated if empty)","default":"","type":"string","name":"name"},{"_id":"573b9c9974d9f20e00c14ee4","ref":"","in":"body","required":false,"desc":"Contact name","default":"","type":"string","name":"full_name"},{"_id":"573b9c9974d9f20e00c14ee1","ref":"","in":"body","required":false,"desc":"Timezone","default":"","type":"string","name":"timezone"},{"_id":"573b9c9974d9f20e00c14ee0","ref":"","in":"body","required":false,"desc":"Recording lookup object","default":"","type":"object","name":"name_greeting"},{"_id":"573b9d61ee2b3b220042291c","ref":"","in":"body","required":false,"desc":"Recording lookup object","default":"","type":"object","name":"voicemail[greeting][alternate]"},{"_id":"573b9cda20832f29003fbd9d","ref":"","in":"body","required":false,"desc":"Local area code","default":"","type":"string","name":"local_area_code"},{"_id":"573b9d992cf9af3200d58874","ref":"","in":"body","required":false,"desc":"Enable the \"leave a message\" prompt for voicemail","default":"","type":"boolean","name":"voicemail[greeting][enable_leave_message_prompt]"},{"_id":"573b9cfe20832f29003fbd9e","ref":"","in":"body","required":false,"desc":"Enable voicemail","default":"","type":"boolean","name":"voicemail[enabled]"},{"_id":"577f234ca326490e000b74a3","ref":"","in":"body","required":false,"desc":"Enable outgoing calls","default":"1","type":"boolean","name":"enable_outbound_calls"},{"_id":"577f234ca326490e000b74a4","ref":"","in":"body","required":false,"desc":"Enable Call Waiting","default":"1","type":"boolean","name":"enable_call_waiting"},{"_id":"573b9d11ee2b3b2200422919","ref":"","in":"body","required":false,"desc":"Voicemail password","default":"","type":"int","name":"voicemail[password]"},{"_id":"573b9d2774d9f20e00c14eeb","ref":"","in":"body","required":false,"desc":"Voicemail greeting type","default":"","type":"string","name":"voicemail[greeting][type]"},{"_id":"573b9d50ee2b3b220042291b","ref":"","in":"body","required":false,"desc":"Recording lookup object","default":"","type":"object","name":"voicemail[greeting][standard]"},{"_id":"573b9db36c865e19007a5fc7","ref":"","in":"body","required":false,"desc":"Voicemail transcription type","default":"","type":"string","name":"voicemail[transcription]"},{"_id":"573b9ded29f6b50e007d26ae","ref":"","in":"body","required":false,"desc":"Email notifications for voicemails.  Can be a single email or an array of emails","default":"","type":"mixed","name":"voicemail[notifications][emails]"},{"_id":"573b9e29fd7f2e3400cf8ac5","ref":"","in":"body","required":false,"desc":"SMS notifications for voicemails","default":"","type":"string","name":"voicemail[notifications][sms]"},{"_id":"573b9e742cf9af3200d58878","ref":"","in":"body","required":false,"desc":"Email notifications for calls. Can be a single email or an array of emails","default":"","type":"mixed","name":"call_notifications[emails]"},{"_id":"573b9eb229f6b50e007d26b6","ref":"","in":"body","required":false,"desc":"SMS notifications for calls","default":"","type":"string","name":"call_notifications[sms]"}],"url":"/accounts/:account_id/extensions"},"isReference":true,"order":3,"body":"","excerpt":"Create an individual extension.  See [extension](doc:account-extensions) for more details.","slug":"create-account-extension","type":"endpoint","title":"Create Extension"}

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

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 }}