Update Phone Number Configurations

How to update phone number configurations

PUT https://api.cm.com/voice-phonenumberapi/v1/{accountGuid}/phonenumbers

Parameters

TypeNameDescriptionSchema
PathaccountGuid
required
Your account identifier. This can be either a voice account ID, or your account ID. See Authentication for more information.string (uuid)

Request

Request body

NameDescriptionRequiredSchema
typeThe application type that the phone number should be configured to, can be cxbot,directforwarding,flowbuilder,notification,sip,voicepbx, or none.Yesstring
phoneNumberPhone number.Yesnumber
distributionGroupGuidUnique identifier of distribution group.Yesstring (uuid)
algorithmThe algorithm that should be applied, can be either RoundRobin or FailOver.Yesstring
anonymousModeIf 1 is used and a call contains the Privacy:id header, the call will be passed 'as is'. If 2 is used and a call contains the Privacy:id header, all headers containing the callers' phone number will be stripped (P-Asserted-Identity, Remote-Party-ID) and the URI in the From header will be replaced with [email protected].Yesnumber
appAccountGuidUnique identifier of app account.Yesnumber
promptTypeType of prompt, can be either TTS or File.Yesstring
languageThe selected voice language, format can be found here (If PromptType = TTS).Yesstring
genderGender of the voice (If PromptType = TTS).Yesstring
voiceNumberThe selected voice number (If PromptType = TTS).Nonumber
timeoutInMillisecondsDetermines when the attempt of calling the recipient should be cancelled.Nonumber
callbackUrlCallback url for the voice API.Yesstring
destinationNumberDestination number bound to this configuration.Yesnumber
customCallerIdCustom number bound to this configuration.Yesnumber
[
  {
    "type": string,
    "phoneNumber": number
  },
  {
    "type": string,
    "phoneNumber": number,
    "distributionGroupGuid": uuid,
    "algorithm": string,
    "anonymousMode": number
  },
  {
    "type": string,
    "phoneNumber": number,
    "appAccountGuid": uuid,
    "promptType": string,
    "prompt": string,
    "language": string,
    "gender": string,
    "voiceNumber": number,
    "timeoutInMilliseconds": number,
    "callbackUrl": string
  },
  {
    "type": string,
    "phoneNumber": number,
    "appAccountGuid": uuid,
    "destinationNumber": number,
    "customCallerId": number
  }
  ...
]

It depends on the type of the configuration which items should be additionally added.
See the following example body for all the possible configurations.

Example request

[
  {
    "type": "none",
    "phoneNumber": 31612345678
  },
  {
    "type": "sip",
    "phoneNumber": 31612345678,
    "distributionGroupGuid": "00000000-0000-0000-0000-000000000000",
    "algorithm": "RoundRobin",
    "anonymousMode": 1
  },
  {
    "type": "notification",
    "phoneNumber": 31612345678,
    "appAccountGuid": "00000000-0000-0000-0000-000000000000",
    "promptType": "TTS",
    "prompt": "examplePrompt",
    "language": "en-GB",
    "gender": "Male",
    "voiceNumber": 1,
    "timeoutInMilliseconds": 0,
    "callbackUrl": null
  },
  {
    "type": "directforwarding",
    "phoneNumber": 31612345678,
    "appAccountGuid": "00000000-0000-0000-0000-000000000000",
    "destinationNumber": 31687654321,
    "customCallerId": null
  }
]

Response

200 OK, The function will return the complete settings of the inserted body without the null values.

Response body

[
  {
    "type": string,
    "phoneNumber": number
  },
  {
    "type": string,
    "phoneNumber": number,
    "distributionGroupGuid": uuid,
    "algorithm": string,
    "anonymousMode": number
  },
  {
    "type": string,
    "phoneNumber": number,
    "appAccountGuid": uuid,
    "promptType": string,
    "prompt": string,
    "language": string,
    "gender": string,
    "voiceNumber": number,
    "timeoutInMilliseconds": number,
    "callbackUrl": string
  },
  {
    "type": string,
    "phoneNumber": number,
    "appAccountGuid": uuid,
    "destinationNumber": number,
    "customCallerId": number
  }
  ...
]

Example Response

[
  {
    "type": "none",
    "phoneNumber": 31612345678
  },
  {
    "type": "sip",
    "phoneNumber": 31612345678,
    "distributionGroupGuid": "00000000-0000-0000-0000-000000000000",
    "algorithm": "RoundRobin",
    "anonymousMode": 1
  },
  {
    "type": "notification",
    "phoneNumber": 31612345678,
    "appAccountGuid": "00000000-0000-0000-0000-000000000000",
    "promptType": "TTS",
    "prompt": "examplePrompt",
    "language": "en-GB",
    "gender": "Male",
    "voiceNumber": 1,
    "timeoutInMilliseconds": 0
  },
  {
    "type": "directforwarding",
    "phoneNumber": 31612345678,
    "appAccountGuid": "00000000-0000-0000-0000-000000000000",
    "destinationNumber": 31687654321
  }
]

Did this page help you?