Create a WireGuard Interface
POST/wireguard_interfaces
Create a new WireGuard Interface. Current limitation of 10 interfaces per user can be created.
Request
- application/json
Body
required
network_id uuidrequired
The id of the network associated with the interface.
name string
A user specified name for the interface.
enable_sip_trunking boolean
Enable SIP traffic forwarding over VPN interface.
region_code stringrequired
The region the interface should be deployed to.
Responses
202: Successful response
- application/json
422: Unprocessable entity. Check the 'detail' field in response for details.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/wireguard_interfaces' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"name": "test interface",
"enable_sip_trunking": false,
"region_code": "ashburn-va"
}'
Response samples
{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"name": "test interface",
"status": "provisioned",
"endpoint": "203.0.113.0:51871",
"public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
"enable_sip_trunking": false,
"region_code": "ashburn-va",
"region": {
"code": "ashburn-va",
"name": "Ashburn",
"record_type": "region"
}
}
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}