Upload Operator Connect Numbers Patch
The Upload Operator Connect Numbers Patch request lets you update specific Operator Connect number properties and then asynchronously update the Microsoft platform. A work flow process is implemented to streamline the synchronization mechanism. This process groups numbers for each Microsoft tenant and processes each scope independently. A failure in the processing for one scope (e.g. Capabilities) does not cause a roll back for another scope (e.g. Configuration).
| ■ | Backend Scopes: Live Platform classifies each field in the request into one of the following scopes: |
| ● | Capabilities: capabilities field that is processed using Microsoft tn-capability-update API. |
| ● | Configuration: callingProfileId, locationId, usage, additionalUsages, allowedCustomerActions, routingOptions that is processed using Microsoft tn-update-orders API. |
| ● | SbcScript: scriptTemplateId, scriptParameters. Executes a Handlebars script template on all SBC devices where the numbers are stored. Limit: 500 numbers per request in this scope. |
| ■ | Validation Rules: Synchronous pre-flight checks before the workflow process commences are described below. In the event where these checks fail, "400: Bad Request" is returned. |
| ● | Numbers list must have at least one entry (EMPTY_NUMBER_LIST). |
| ● | Null entries are not allowed in the Numbers array (NULL_ENTRIES). |
| ● | No duplicate telephone numbers within the same request (DUPLICATE_NUMBERS). |
| ● | Each entry must have at least one non-null patchable field (NO_FIELDS_SPECIFIED). |
| ● | Each Add/Remove Usage/Capability must include at least one item (EMPTY_DELTA). |
| ● | Telephone numbers must be in E.164 format (e.g. +14155551234) (INVALID_PHONE_FORMAT). |
| ● | All numbers must exist in the acquired numbers inventory (NUMBERS_NOT_FOUND). |
| ● | scriptParameters cannot be provided without scriptTemplateId (SCRIPT_TEMPLATE_REQUIRED). |
| ● | The referenced scriptTemplateId must exist (SCRIPT_TEMPLATE_NOT_FOUND). |
| ● | Numbers in the SBC Script scope must be programmed on at least one SBC (NO_SBCS_PROGRAMMED). |
| ● | SBC Script scope is limited to 500 numbers per request (BUCKET_LIMIT_EXCEEDED). |
| ■ | Concurrency: If any number in the batch has a pending operation in the same scope, the entire request is rejected. In this case, a 409 error is returned with the following: CONCURRENT_OPERATION and a lockedNumbers array listing the conflicting numbers. |
| ■ | Infrastructure Error State: If a previous SBC Script scope failure arose on any number, this number is blocked from further PATCH operations until the following error is cleared: |
| ● | 409 with errorCode: NUMBER_IN_INFRASTRUCTURE_ERROR_STATE and an errorStateNumbers array. |
Rate Limit
This request has a global rate limit of 300 calls per minute. Exceeding this limit will result in a HTTP 429: Too Many Requests error.
URI
{{baseUrl}}/api/v3/oc/numbers
HTTP Method
PATCH
Request Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
msTenantId |
string |
Microsoft TenantId (Azure Tenant ID of the customer). |
Request Body
|
Parameter |
Type |
Description |
|||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
idempotencyKey |
string |
An idempotencyKey is used to enable safe retries to prevent sending duplication requests to Microsoft for update actions to the same number.
|
|||||||||||||||||||||||||||||||||||||||||||||
|
ticket ID |
Related Service Request ticket (see Managing Service Requests). |
Ticket ID |
|||||||||||||||||||||||||||||||||||||||||||||
|
numbers |
list array |
A list of telephone numbers including capabilities (add and removed).
|
|||||||||||||||||||||||||||||||||||||||||||||
|
capabilities |
|
One of the following values with matching supported usages (see above) (configure bolded value):
|
|||||||||||||||||||||||||||||||||||||||||||||
|
callingProfileId |
string |
The Id string for the Microsoft Operator Connect Calling Profile that is attached to the tenant service (see Get Calling Profiles). Each Calling Profile is mapped to an SBC trunk used to manage call functionality for tenant service. |
|||||||||||||||||||||||||||||||||||||||||||||
|
locationId |
string |
Id of the site location (see Get Services Brief Details (V3)). |
|||||||||||||||||||||||||||||||||||||||||||||
|
usage |
integer |
One of the following values (mapping to Teams admin center values is shown in parenthesis):
Verify that the 'ThirdPartyAppAssignment' value is supported on your Microsoft tenant. |
|||||||||||||||||||||||||||||||||||||||||||||
|
additionalUsage |
|
Support for an Additional usage type. For example if you configure 'CallingUserAssignment' as the Usage, then you can choose 'Conference Assignment' or 'FirstPartyAppAssignment' for the Additional Usage. Configuration of Additional usage requires workflow Version 3. |
|||||||||||||||||||||||||||||||||||||||||||||
|
allowedCustomerActions |
|
For future use |
|||||||||||||||||||||||||||||||||||||||||||||
|
routingOptions |
|
For future use |
|||||||||||||||||||||||||||||||||||||||||||||
|
scriptTemplateId |
integer |
The unique id of the script. See SBC Template Scenarios for references to IDs for default SBC script templates. See M365 Template Scenarios for references to IDs for default M365 script templates. |
|||||||||||||||||||||||||||||||||||||||||||||
|
scriptParameters refers to: CustomVar.Variable<VariableSequenceNumber> |
dictionary where <VariableSequenceNumber> is the sequence in database that the variable is defined in the 'Customer variables' column for the script properties (see Customer Variables). For example, when the following IP-PBX variables are defined in the database in the order: IPPBX-ProxyAddress, IPPBX-ProxyAddress-SIPPort, SIP-HostName then Custom variables should be defined as follows:
|
Custom variables can be defined to update specific parameters on the SBC device. These variables must be predefined in the UMP-365 database (see Customer Variables). Also verify that the custom variables notation has been added to the script (see parameter 'sbcOnboardingScript' above) that you are applying to the request. There are three fields displayed in the schema additionalProp1-3, however there is no limitation for the number of variables that can be added. |
|||||||||||||||||||||||||||||||||||||||||||||
|
additionalProp1 V CustomVar.Variable<VariableSequenceNumber> |
string |
The Proxy Set name. |
|||||||||||||||||||||||||||||||||||||||||||||
|
additionalProp2 CustomVar.Variable<VariableSequenceNumber> |
string |
The CAC Profile value. For example, |
|||||||||||||||||||||||||||||||||||||||||||||
|
additionalProp3 CustomVar.Variable<VariableSequenceNumber> |
string |
The OnlinePstnGateway name. |
Example Request Body
{
"idempotencyKey": "r2c4d3d5-vbgt-6540-erfu-ef1234554380",
"ticketId": "TICKET-001",
"numbers": [
{
"telephoneNumber": "+61395557002",
"callingProfileId": "fcdd70da-df67-4ac5-a9fa-5d69da190622",
"capabilities": { "add": ["InboundCalling"], "remove": [] }
},
{
"telephoneNumber": "+61395557004",
"scriptTemplateId": 2020,
"scriptParameters": { "ProxySet": "SIPTrunk" }
}
]
}
202 Accepted Response
The initial response displays the Task Id.
|
Parameter |
Type |
Description |
|---|---|---|
|
Task Id |
string |
The queued task Id that is generated for this action. You must run the Task request to retrieve the status of the action. See Task Status. Note that the wup string in the prefix is unique for this endpoint. |
{
"taskId": "wup_c14a0a55-fcc5-4598-b405-c978e7da1af4"
}
The execution of the request may take a few minutes. The status will progress from 'In Progress' to 'Completed Success'.
{
"numbers": [
{
"number": "+61395557002",
"status": "Submitted",
"failures": null
},
{
"number": "+61395557004",
"status": "Pending",
"failures": null
}
],
"id": "ocn_p_14ce135c-15f1-4ff2-be62-4760a7d30a2d",
"status": "Queued",
"executionMessages": [
{
"level": "User",
"message": "Starting patch operation for 2 number(s) across 1 tenant(s)."
},
{
"level": "Information",
"message": "Started child workflow c6906169-c565-4b94-8a69-3ba618e9225c for tenant '3bc57cac-5794-457f-ad36-2c88cade9dbb'."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Locking 2 number(s) for exclusive access."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Acquired exclusive access to 2 number(s)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Lock acquired."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Submitting capability update for 1 number(s)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update submitted to Microsoft Operator Connect."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update order submitted (MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking capability update status (attempt 1/15, MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update in progress. Next check in 60s."
}
],
"outputData": {},
"createTime": "2026-07-07T08:16:54.6103857Z"
}
{
"numbers": [
{
"number": "+61395557002",
"status": "Completed",
"failures": null
},
{
"number": "+61395557004",
"status": "Completed",
"failures": null
}
],
"id": "ocn_p_14ce135c-15f1-4ff2-be62-4760a7d30a2d",
"status": "CompletedSuccess",
"executionMessages": [
{
"level": "User",
"message": "Starting patch operation for 2 number(s) across 1 tenant(s)."
},
{
"level": "Information",
"message": "Started child workflow c6906169-c565-4b94-8a69-3ba618e9225c for tenant '3bc57cac-5794-457f-ad36-2c88cade9dbb'."
},
{
"level": "Information",
"message": "Detected child c6906169-c565-4b94-8a69-3ba618e9225c completed (status=Complete); 1/1 done."
},
{
"level": "User",
"message": "Patch operation completed: 1 of 1 tenant(s) succeeded."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Locking 2 number(s) for exclusive access."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Acquired exclusive access to 2 number(s)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Lock acquired."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Submitting capability update for 1 number(s)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update submitted to Microsoft Operator Connect."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update order submitted (MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking capability update status (attempt 1/15, MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update in progress. Next check in 60s."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking capability update status (attempt 2/15, MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update confirmed by Microsoft."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update completed successfully."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Submitting configuration update for 1 number(s)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update submitted to Microsoft Operator Connect."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update order submitted (MS order: 138ddbfe-8d02-47bc-a6c1-ac3431c4619e)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking configuration update status (attempt 1/15, MS order: 138ddbfe-8d02-47bc-a6c1-ac3431c4619e)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update in progress. Next check in 60s."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking configuration update status (attempt 2/15, MS order: 138ddbfe-8d02-47bc-a6c1-ac3431c4619e)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update confirmed by Microsoft."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update completed successfully."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Exclusive access released."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Lock released."
}
],
"outputData": {},
"createTime": "2026-07-07T08:16:54.6103857Z",
"completeTime": "2026-07-07T08:19:21.6337647Z"
}
HTTP Responses
| ■ | 200 OK |
|
Parameter |
Type |
Description |
|||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id |
string |
Task Id |
|||||||||||||||||||||||||||||||||||||||||||||
|
status |
string |
Task status is one of the following
The cache mechanism used to Upload numbers is according to Distributed Cache. |
|||||||||||||||||||||||||||||||||||||||||||||
|
details |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
executionMessages |
list array |
This list array includes the following parameters:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
level |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
message |
string |
The following 'Information' messages may appear:
The following 'Error' messages may appear:
The following are example error messages:
Copy
Copy
The following error is raised because the Copy
Copy
When attempting to upload a a Toll-free number with the usage "CallingUserAssignment". Copy
The following error message is displayed as Toll-free numbers must be configured with the usage 'FirstPartyAppAssignment'. Copy
The following message is displayed if there are no SBC devices assigned to the Calling Profile and therefore you cannot make or receive calls to this number. Copy
|
|||||||||||||||||||||||||||||||||||||||||||||
|
outputData |
List array |
This array includes the following parameters:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
CreateTime |
string($date-time) |
Timestamp at the commencement of the number upload. |
|||||||||||||||||||||||||||||||||||||||||||||
|
CompleteTime |
string($date-time) |
Timestamp at the completion of the number upload. |
|||||||||||||||||||||||||||||||||||||||||||||
|
OcUploadNumberResult |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
WorkflowVersion |
integer |
Version of the Workflow API. |
|||||||||||||||||||||||||||||||||||||||||||||
|
SbcIdList |
integer |
Id of the SBC device in the Live Platform database. |
|||||||||||||||||||||||||||||||||||||||||||||
|
MsJobWhenUpdated |
string($date-time) |
Timestamp when the Microsoft tenant platform was updated with the new number. |
|||||||||||||||||||||||||||||||||||||||||||||
|
MsJobId |
string |
Id of the job to update the Microsoft platform. |
| ■ | 400 Bad Request: The following error message is raised when numbers are not found. |
{
"status": 400,
"title": "Numbers Not Found",
"errorCode": "NUMBERS_NOT_FOUND",
"invalidNumbers": ["+14155559999"],
"traceId": "00-abc123-def456-00"
}
| ■ | 409 Conflict: The following error is raised when there is a concurrent operation in progress |
{
"status": 409,
"title": "Concurrent Operation",
"errorCode": "CONCURRENT_OPERATION",
"lockedNumbers": ["+14155551234"],
"traceId": "00-abc123-def456-00"
}
| ■ |