Configure Direct Routing
API Endpoint
Method: POST
Path: /provisioning/provisionDirectRouting
Request Body (JSON) With Required Fields only
{
"authenticationResult": {
"authenticationResult": {
"accessToken": "string",
"accessTokenType": "string",
"expiresAfter": 0,
"expiresOn": 0,
"expiresOnDate": "2025-03-07T12:46:35.173Z",
"idToken": "string",
"multipleResourceRefreshToken": true,
"refreshToken": "string",
"userInfo": {
"displayableId": "string",
"identityProvider": "string",
"tenantId": "string"
}
}
},
"sbcGatewayId": 0
}Example cURL Command
curl --silent --location --request POST 'https://api.connecttoteams.com/provisioning/provisionDirectRouting' \
--header 'Authorization: Bearer eyJraWQiOiJlbbQo.....' \
--header 'Content-Type: application/json' \
--data-raw '{
"authenticationResult": {
"authenticationResult": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJub25jZSI6Ikx6eFQyU.....",
"accessTokenType": "login.microsoftonline.com",
"expiresOn": 1743097299177667,
"idToken": "eyJ0eXAiOiJKV1Q.....",
"multipleResourceRefreshToken": false,
"userInfo": {
"displayableId": "<ent-admin-id>",
"identityProvider": "user",
"tenantId": "<tenant-id>"
}
}
},
"sbcGatewayId": 805
}'Response
On success, the API returns
200 OKConfigure Unified App Settings for an Enterprise
The method described here pertains to the API method to configure the Unified app settings as depicted in this page from the Service Portal.

API Endpoint
Method: POST
Path: /reseller/saveOrUpdateTeamsApplicationTemplate
Request Body (JSON)
{
"enterpriseId": 12345,
"resellerId": 67890,
"name": "Sample Unified App",
"bIconFileName": "branding_icon.png",
"oIconFileName": "outline_icon.png",
"portalURL": "https://portal.example.com",
"ssoURL": "https://sso.example.com",
"type": "UNIFIED",
"portalTabName": "PBX",
"brandingImageInBytes": "Base64EncodedString",
"outlineImageInBytes": "Base64EncodedString",
"turnOffCard": false,
"turnOffVMCard": true,
"showCard": true,
"showVMCard": false,
"tenantID": "tenant-12345",
"teamName": "Sample Team",
"allowEnterpriseToOverride": true,
"sendMessageNotificationOnZeroMessages": false,
"tabOrder": [],
"fcTabName": "Features",
"accentColor": "#FF5733",
"version": "1.0.0",
"packageName": "com.example.app",
"devName": "Example Devs",
"privacyURL": "https://privacy.example.com",
"termsURL": "https://terms.example.com",
"shortName": "Example Comm",
"fullName": "Example Communications App",
"shortDesc": "A short description of the app",
"fullDesc": "A detailed description of the app and its features",
"showUtilityCard": true
}Configure PBX
This method is used to create or update a PBX Location of an Enterprise.
API Endpoint
Method: POST
Path: /pbx/updatePBXSettingsForTenant
Request Body (JSON)
{
"codecs": [
"G.711 A-law",
"G.711 U-law"
],
"dnsLookupType": "Host",
"domainAliases": [],
"pbxIdOrPBXLocationId": 7,
"pbxLocationName": "broadworks",
"pbxSIPDomain": "<pbx-sip-domain>",
"pbxSIPDomainProxy": "",
"pbxSIPDomainProxyPort": 5060,
"presencePackageType": "call-info",
"regExpiresValue": 600,
"tenantID": "tenant-id",
"transportType": "UDP",
"update": false,
"voicemailFeatureCode": "*62",
"topologyHiding": false,
"pbxCallPolicyInfo": {
"callPolicyCNAM": "TRANSPARENT",
"callPolicyName": "Global",
"forwardedCallsCallerId": "USER_CALLER_ID"
},
"metaSwitchSubscriptionCompatibility": false,
"sipWaitForAlegAck": true,
"enforceCodecsOnInbound": false,
"enableMWIEvents": false,
"rejectMethod": "SIP 480",
"rejectCalling": false,
"rejectInterval": 0,
"acceptsEncodedFeatureCode": false,
"escapeRequestUri": false,
"convertHistoryInfoToDiversion": false,
"oldStyleHold": false
}Required Fields
tenantId
pbxSIPDomain
transportType
pbxSIPDomainProxy
voicemailFeatureCode
pbxLocationName
dnsLookupType
update
pbxIdOrPBXLocationId
Example cURL Command
curl --silent --location --request POST 'https://api.connecttoteams.com/pbx/updatePBXSettingsForTenant' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJlYTdiZm.....' \
--data-raw '{
"codecs": [
"G.711 A-law",
"G.711 U-law"
],
"dnsLookupType": "Host",
"domainAliases": [],
"pbxIdOrPBXLocationId": 7,
"pbxLocationName": "broadworks",
"pbxSIPDomain": "yahoo.com",
"pbxSIPDomainProxy": "",
"pbxSIPDomainProxyPort": 5060,
"presencePackageType": "call-info",
"regExpiresValue": 600,
"tenantID": "5c0068f3-dfbb-4f4a",
"transportType": "UDP",
"update": false,
"voicemailFeatureCode": "*62",
"topologyHiding": false,
"pbxCallPolicyInfo": {
"callPolicyCNAM": "TRANSPARENT",
"callPolicyName": "Global",
"forwardedCallsCallerId": "USER_CALLER_ID"
},
"metaSwitchSubscriptionCompatibility": false,
"sipWaitForAlegAck": true,
"enforceCodecsOnInbound": false,
"enableMWIEvents": false,
"rejectMethod": "SIP 480",
"rejectCalling": false,
"rejectInterval": 0,
"acceptsEncodedFeatureCode": false,
"escapeRequestUri": false,
"convertHistoryInfoToDiversion": false,
"oldStyleHold": false
}'Response
On success, the API returns
trueEdit Enterprise
API Endpoint
Method: PUT
Path: /reseller/editEnterprise
Request Body (JSON)
{
"canAddExtensions": false,
"canResellerManageEnterpriseProvisioning": false,
"secureSMSEnabled": false,
"enterpriseId": 701,
"enterpriseName": "enterprise_name",
"pbxId": [0],
"pbxMOH": false,
"registeredBy": "user@example.com",
"resellerId": 999,
"sbcGateways": [0],
"services": [
"PBX",
"SMS",
"CALLAPP",
"CHAT"
],
"userLimit": -1,
"allowExternalNumbers": true,
"userProvisioningEnabled": true,
"restrictAdminAccess": true
}Required Fields
enterpriseName (String) - The name of the enterprise to be created. This field is mandatory as it uniquely identifies the enterprise in the system.
pbxId (Array of Integers) - The ids of the PBX Types if using PBX service.
sbcGateways (Array of Integers) - The ids of the Session Border Controller (SBC) gateways if using either PBX and/or Trunk service.
services (Array of Strings) - Defines the services enabled for the enterprise. Expected values include PBX, Trunk, SMS, CALLAPP, CallRecording, and CHAT.
registeredBy
Response
On success, the API returns
trueGet O365 User Info
Method: POST
Path: /provisioning/getO365UserInfo
Request Body (JSON)
{
"authenticationResult": {
"accessToken": "accessToken",
"accessTokenType": "login.microsoftonline.com",
"expiresAfter": null,
"expiresOn": 1752158590229555,
"expiresOnDate": null,
"idToken": "idToken",
"multipleResourceRefreshToken": false,
"refreshToken": null,
"userInfo": {
"displayableId": "globaladmin@example.com",
"identityProvider": "user",
"tenantId": "tenantId"
}
}
}Response
On success, the API returns
{
"msalAuthenticationResult": {
"authenticationResult": {
"accessToken": "accessToken",
"accessTokenType": "login.microsoftonline.com",
"expiresAfter": null,
"expiresOn": 1754832571389936,
"expiresOnDate": null,
"idToken": "idToken",
"multipleResourceRefreshToken": false,
"refreshToken": null,
"userInfo": {
"displayableId": "globaladmin@example.com",
"identityProvider": "user",
"tenantId": "tenantId"
}
},
"resellerId": null,
"tenantId": null
},
"organization": "MSFT",
"officeUserType": "GLOBAL_ADMIN",
"companyAdmin": true,
"containsTeamsTenantAdminAPI": true
}Sync Unified app
API Endpoint
Method: POST
Path: /provisioning/provisionChatApplication
Request Body (JSON)
{
"authenticationResult": {
"authenticationResult": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJub25jZSI6IjdKbXh..............",
"accessTokenType": "login.microsoftonline.com",
"expiresOn": 1743285790991831,
"idToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1..............",
"multipleResourceRefreshToken": false,
"userInfo": {
"displayableId": "user@example.com",
"identityProvider": "user",
"tenantId": "tenantId"
}
}
}
"templateType": "UNIFIED"
}Required Field
templateType = UNIFIEDAPI Response
On success, the API returns
200 OKSync Teams Users
This task may be carried out using an Enterprise access or, if GET_SERVICE_PROVIDER_MANAGEMENT_CONSENT has been granted, using the Reseller access.
API Endpoint
Method: POST
Path: /provisioning/syncTeamsRegistrations
Request Body (JSON)
{
"authenticationResult": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJub25jZSI6I.......",
"accessTokenType": "login.microsoftonline.com",
"expiresOn": 1743105617860946,
"idToken": "eyJ0eXAiOiJKV1QiLCJh........",
"multipleResourceRefreshToken": false,
"userInfo": {
"displayableId": "admin@example.com",
"identityProvider": "user",
"tenantId": "5c0068f3-df..."
}
}
}API Response
On success, the API returns
200 OKUpdate App Consent List for an Enterprise
Method: POST
Path: /provisioning/updateAppConsent/{type}
Request Body (JSON)
{
"authenticationResult": {
"authenticationResult": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJub25jZSI6IjdKbXh..............",
"accessTokenType": "login.microsoftonline.com",
"expiresOn": 1743285790991831,
"idToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1..............",
"multipleResourceRefreshToken": false,
"userInfo": {
"displayableId": "user@example.com",
"identityProvider": "user",
"tenantId": "tenantId"
}
}
}
}Required Fields
type = possible values are CDR, Presence, TeamsContactManagement, UserSync, EnterpriseManagement, Valet, SMS, Contacts, CallRecording
API Response
On success, the API returns
200 OKVerify Tenant for Direct Routing
The operation to verify the readiness to set up Direct Routing for a Microsoft Office365 Organization.
API Endpoint
Method: POST
Path: /provisioning/verifyTenantForDR
Request Body (JSON)
{
"authenticationResult": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJub25jZSI6Ikx6.......",
"accessTokenType": "login.microsoftonline.com",
"expiresOn": 1743097299177667,
"idToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSU.....",
"multipleResourceRefreshToken": false,
"userInfo": {
"displayableId": "<ent admin id>",
"identityProvider": "user",
"tenantId": "<tenant Id>"
}
}
}Example cURL Command
curl --silent --location --request POST 'https://api.connecttoteams.com/provisioning/verifyTenantForDR' \
--header 'Authorization: Bearer eyJraWQiOiJlYTdi........' \
--header 'Content-Type: application/json' \
--data-raw '{
"authenticationResult": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJ ......",
"accessTokenType": "login.microsoftonline.com",
"expiresOn": 1743093181665540,
"idToken": "eyJ0eXAiOiJKV1QiLCJhbGciOi.....",
"multipleResourceRefreshToken": false,
"userInfo": {
"displayableId": "<ent admin id>",
"identityProvider": "user",
"tenantId": "<tenant Id>"
}
}
}'Response
On success, the API returns
200 OK