Create Endpoint
This request creates an endpoint.
post | /endpoints |
Sample 1
A sample POST request to create a Conference endpoint:
curl -X POST \
'https://api.carrierx.com/core/v2/endpoints' \
-H 'Content-Type: application/json' \
--data-binary '{"name":"my_conf", "type":"conference"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response 1
200
status code with a serialized copy of the Endpoint object:
{
"addresses": [],
"attributes": {},
"capacity": 0,
"cps_limit": null,
"endpoint_sid": "358d56f9-1482-4b3d-85a9-efd29afc6ff2",
"name": "my_conf",
"out_sip_password": null,
"out_sip_username": null,
"partner_sid": "ed437757-002d-4ecc-aa5a-efdf5e50dba0",
"properties": {
"account_sid": "6DcA986G-vcBel19O02iIbYUAawVidvB",
"api_url": "https://api.carrierx.com/conference/v1",
"container_sid": "null",
"login": "sample_conference_775",
"password": "YnAa9s8ixJKi"
},
"transformations": [],
"type": "conference",
"voip_token": null
}
Sample 2
The following request creates a Third-party endpoint:
curl -X POST \
'https://api.carrierx.com/core/v2/endpoints' \
-H 'Content-Type: application/json' \
--data-binary '{"name":"EP_Т_1","addresses": ["ip": "1.1.2.13", "port": "5060"], "type":"third_party"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response 2
200
status code with a serialized copy of the Endpoint object:
{
"addresses": [
{
"direction": "any",
"dst_port": 5060,
"ip": "1.1.2.13",
"location_sid": null,
"port": 5060,
"priority": 0,
"sip_password": null,
"sip_username": null,
"srtp": false,
"transport": "udp"
}
],
"attributes": {},
"capacity": 0,
"cps_limit": null,
"endpoint_sid": "473d1623-c615-4b43-ab4f-01cd5491c56b",
"name": "my_third_party",
"out_sip_password": null,
"out_sip_username": null,
"partner_sid": "ed437757-002d-4ecc-aa5a-efdf5e50dba0",
"properties": {},
"transformations": [],
"type": "third_party",
"voip_token": "0cac0ffe-fed4-4ee3-8212-e50659e28088"
}
For the Mediator, Conference, Conference Playback, and FlexML endpoints, only the name
and capacity
values can be edited after the endpoint has been created. For the Voicemail endpoint, the properties
attributes can be also modified.
Required Scopes
To create an Endpoint object, the partner must have one of the following scopes enabled:
endpoints.manage
endpoints.create
Body Arguments
JSON representation of the fields and values of the Endpoint object to be created.
A required field to create an endpoint is type
, for the third-party endpoint the required fields are ip
and type
. If no value for port
is specified, the value for port
will be assigned as 5060
.
Refer to this table to view all fields that appear in the Endpoint object.