Skip to content

Trunk Settings

All operations require authentication.

16 operationsv1/telephony/trunks · /telephony/{billingAccount}
Agent setup

List trunksProduction

GET
/1.0/telephony/trunks

Query parameters

iamTags
object

Filter resources on IAM tags

Response

200string[]successful operation

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/telephony/trunks \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Get a line or trunkProduction

GET
/1.0/telephony/trunks/{serviceName}

Path parameters

serviceName
required
string

Your trunk number

Response

200TelephonyGenericServiceWithIAMsuccessful operation
iam
read-only
ResourceMetadata

IAM resource metadata

serviceName
read-only
string
—

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/trunks/{serviceName} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "iam": { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "state": "EXPIRED", "tags": { "key": "string" }, "urn": "string" }, "serviceName": "string"}

Change service contactsProduction

POST
/1.0/telephony/trunks/{serviceName}/changeContact

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

Path parameters

serviceName
required
string

Your trunk number

Request body (required)

contactAdmin
string

The contact to set as admin contact

contactBilling
string

The contact to set as billing contact

contactTech
string

The contact to set as tech contact

Response

200integer[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/trunks/{serviceName}/changeContact \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Get service informationProduction

GET
/1.0/telephony/trunks/{serviceName}/serviceInfos

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

Path parameters

serviceName
required
string

Your trunk number

Response

200Servicesuccessful operation
canDeleteAtExpiration
read-only
boolean

Indicates that the service can be set up to be deleted at expiration

contactAdmin
read-only
string
—
contactBilling
read-only
string
—
contactTech
read-only
string
—
creation
read-only
stringdate
—
domain
read-only
string
—
engagedUpTo
read-only
stringdate
—
expiration
read-only
stringdate
—
possibleRenewPeriod
read-only
integer[]

All the possible renew period of your service in month

renew
RenewType

Way of handling the renew

renewalType
read-only
RenewalTypeEnum

Detailed renewal type of a service

ValuesautomaticForcedProductautomaticV2012automaticV2014automaticV2016automaticV2024manualoneShotoption
serviceId
read-only
integer
—
status
read-only
StateEnum
—
ValuesautorenewInProgressexpiredinCreationokpendingDebtunPaid

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/trunks/{serviceName}/serviceInfos \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "canDeleteAtExpiration": true, "contactAdmin": "string", "contactBilling": "string", "contactTech": "string", "creation": "2024-01-01", "domain": "string", "engagedUpTo": "2024-01-01", "expiration": "2024-01-01", "possibleRenewPeriod": [ 0 ], "renew": { "automatic": true, "deleteAtExpiration": true, "forced": true, "manualPayment": true, "period": 0 }, "renewalType": "automaticForcedProduct", "serviceId": 0, "status": "autorenewInProgress"}

Update service informationProduction

PUT
/1.0/telephony/trunks/{serviceName}/serviceInfos

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

Path parameters

serviceName
required
string

Your trunk number

Request body (required)

canDeleteAtExpiration
read-only
boolean

Indicates that the service can be set up to be deleted at expiration

contactAdmin
read-only
string
—
contactBilling
read-only
string
—
contactTech
read-only
string
—
creation
read-only
stringdate
—
domain
read-only
string
—
engagedUpTo
read-only
stringdate
—
expiration
read-only
stringdate
—
possibleRenewPeriod
read-only
integer[]

All the possible renew period of your service in month

renew
RenewType

Way of handling the renew

renewalType
read-only
RenewalTypeEnum

Detailed renewal type of a service

ValuesautomaticForcedProductautomaticV2012automaticV2014automaticV2016automaticV2024manualoneShotoption
serviceId
read-only
integer
—
status
read-only
StateEnum
—
ValuesautorenewInProgressexpiredinCreationokpendingDebtunPaid

Response

200—successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/trunks/{serviceName}/serviceInfos \
  -H "authorization: Bearer $OVH_TOKEN"

Get the maximum simultaneous linesProduction

GET
/1.0/telephony/{billingAccount}/line/{serviceName}/maximumAvailableSimultaneousLines

Path parameters

billingAccount
required
string

The name of your billingAccount

serviceName
required
string
—

Response

200integersuccessful operation

Example uses billingAccount = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/maximumAvailableSimultaneousLines \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
0

Remove extra simultaneous linesProduction

POST
/1.0/telephony/{billingAccount}/line/{serviceName}/removeSimultaneousLines

Path parameters

billingAccount
required
string

The name of your billingAccount

serviceName
required
string
—

Request body (required)

quantityRemove
required
integer

The quantity of extra simultaneous lines to remove

Response

200—successful operation

Example uses billingAccount = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/removeSimultaneousLines \
  -H "authorization: Bearer $OVH_TOKEN"

Get simultaneous channels detailsProduction

GET
/1.0/telephony/{billingAccount}/line/{serviceName}/simultaneousChannelsDetails

Path parameters

billingAccount
required
string

The name of your billingAccount

serviceName
required
string
—

Response

200SimultaneousChannelsDetailssuccessful operation
basic
integer

Basic quantity of simultaneous channels included in the line.

current
integer

Current quantity of simultaneous channels.

extra
integer

Extra quantity of simultaneous channels added to the line.

maximum
integer

Maximum quantity of simultaneous channels the line can have.

toBeDeleted
integer

Quantity of simultaneous channels going to be deleted at the end of the billing cycle.

Example uses billingAccount = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/line/{serviceName}/simultaneousChannelsDetails \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "basic": 0, "current": 0, "extra": 0, "maximum": 0, "toBeDeleted": 0}

List trunksProduction

GET
/1.0/telephony/{billingAccount}/trunk

Path parameters

billingAccount
required
string

The name of your billingAccount

Response

200string[]successful operation

Example uses billingAccount = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/trunk \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Get a trunkProduction

GET
/1.0/telephony/{billingAccount}/trunk/{serviceName}

Path parameters

billingAccount
required
string

The name of your billingAccount

serviceName
required
string

Name of the service

Response

200Trunksuccessful operation
description
read-only
string

Description of the service

serviceName
read-only
string

Name of the service

serviceType
read-only
TypeServiceEnum

Type of the service

Valuesaliasline

Example uses billingAccount = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/trunk/{serviceName} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "description": "string", "serviceName": "string", "serviceType": "alias"}

Get the best channel packsProduction

GET
/1.0/telephony/{billingAccount}/trunk/{serviceName}/channelsPacksRepartition

Path parameters

billingAccount
required
string

The name of your billingAccount

serviceName
required
string

Name of the service

Query parameters

quantity
required
integer

Channels quantity to get the best repartition on

Response

200TrunkSimultaneousPacksRepartitionsuccessful operation
optimizedChannelsQuantity
integer

The optimized quantity of channels to order

packsRepartition
TrunkSimultaneousPack[]

The repartition of the packs

totalPrice
Price

The total price of the channels packs combination

Example uses billingAccount = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/trunk/{serviceName}/channelsPacksRepartition \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "optimizedChannelsQuantity": 0, "packsRepartition": [ { "channels": 0, "quantity": 0, "unitPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }}

List external displayed numbersProduction

GET
/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber

Path parameters

billingAccount
required
string

The name of your billingAccount

serviceName
required
string

Name of the service

Response

200phoneNumber[]successful operation

Example uses billingAccount = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Get an external displayed numberProduction

GET
/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}

Path parameters

billingAccount
required
string

The name of your billingAccount

number
required
phoneNumber

External displayed number linked to a trunk

serviceName
required
string

Name of the service

Response

200TrunkExternalDisplayedNumbersuccessful operation
createdAt
read-only
stringdate-time

Creation date

number
read-only
phoneNumber

External displayed number linked to a trunk

status
read-only
TrunkExternalDisplayedNumberStatusEnum

Validation status

ValuesenabledrefusedtoDeletewaitingValidation
validatedAt
read-only
stringdate-time

Validation date

Example uses billingAccount = string, number = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "createdAt": "2024-01-01T12:00:00Z", "number": "string", "status": "enabled", "validatedAt": "2024-01-01T12:00:00Z"}

Create an external displayed numberProduction

POST
/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber

Path parameters

billingAccount
required
string

The name of your billingAccount

serviceName
required
string

Name of the service

Request body (required)

autoValidation
boolean

External displayed number auto-validation. Only available for partner. Must be owner of the number.

number
required
phoneNumber

External displayed number to create, in international format

Response

200TrunkExternalDisplayedNumbersuccessful operation
createdAt
read-only
stringdate-time

Creation date

number
read-only
phoneNumber

External displayed number linked to a trunk

status
read-only
TrunkExternalDisplayedNumberStatusEnum

Validation status

ValuesenabledrefusedtoDeletewaitingValidation
validatedAt
read-only
stringdate-time

Validation date

Example uses billingAccount = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "createdAt": "2024-01-01T12:00:00Z", "number": "string", "status": "enabled", "validatedAt": "2024-01-01T12:00:00Z"}

Delete an external displayed numberProduction

DELETE
/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}

Path parameters

billingAccount
required
string

The name of your billingAccount

number
required
phoneNumber

External displayed number linked to a trunk

serviceName
required
string

Name of the service

Response

200—successful operation

Example uses billingAccount = string, number = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number} \
  -H "authorization: Bearer $OVH_TOKEN"

Validate an external displayed numberProduction

POST
/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}/validate

Path parameters

billingAccount
required
string

The name of your billingAccount

number
required
phoneNumber

External displayed number linked to a trunk

serviceName
required
string

Name of the service

Response

200TrunkExternalDisplayedNumberValidationsuccessful operation
phoneCallTaskId
integer

telephony.Task id of the validation phone call

validationCode
string

Validation code to type during phone call

Example uses billingAccount = string, number = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}/validate \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "phoneCallTaskId": 0, "validationCode": "string"}