swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector BatchNumbers API schemes: - https tags: - name: BatchNumbers paths: /account/{accountName}/numbers:batch: post: operationId: microsoftAzureAccountCreateorreplacenumbers consumes: - application/json produces: - application/json parameters: - in: path name: accountName pattern: ^([A-Za-z0-9_-]+)$ minLength: 1 maxLength: 100 required: true type: string description: Name of the account. Can only contain letters, numbers, underscores and dashes, and is case-sensitive. Can be up to 100 characters in length. - $ref: '#/parameters/ApiVersionParameter' - in: body name: body required: true schema: $ref: '#/definitions/BatchNumbers' description: Batch of numbers to create or replace. responses: '200': description: Success schema: $ref: '#/definitions/BatchNumbersResponse' default: description: An error response object. headers: x-ms-error-code: type: string description: Error code for specific error that occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-examples: Batch put numbers.: $ref: ./examples/BatchPutNumbers.json tags: - BatchNumbers description: Adds or replaces between 1 and 100 numbers (inclusive) in the specified account. In the body, specify a list of phone numbers and and the corresponding details (for example, the services to enable) for each number. This operation is atomic; if any item fails, then all items fail. summary: Microsoft Azure Post Account Accountname Numbers:batch /accounts/{accountName}:createOrUpdateNumbers: post: operationId: microsoftAzureAccountsCreateorupdatenumbers tags: - BatchNumbers summary: Microsoft Azure Create Or Update Numbers description: Create or update up to 100 Numbers on the specified account. parameters: - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter' - name: accountName in: path description: Name of the account. required: true type: string minLength: 1 maxLength: 100 pattern: ^([A-Za-z0-9_-]+)$ - $ref: '#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId' - $ref: '#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent' - $ref: '#/parameters/Azure.Core.ClientRequestIdHeader' - name: body in: body required: true schema: $ref: '#/definitions/BatchNumbers_2' responses: '200': description: The request has succeeded. schema: $ref: '#/definitions/BatchNumbers_2' headers: Repeatability-Result: type: string description: Indicates whether the repeatable request was accepted or rejected. enum: - accepted - rejected x-ms-enum: name: RepeatabilityResult modelAsString: false values: - name: accepted value: accepted description: If the request was accepted and the server guarantees that the server state reflects a single execution of the operation. - name: rejected value: rejected description: 'If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid or because the Repeatability-First-Sent value was outside the range of values held by the server.' x-ms-client-request-id: type: string format: uuid description: An opaque, globally-unique, client-generated string identifier for the request. default: description: An unexpected error response. schema: $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse' headers: x-ms-error-code: type: string description: String error code indicating what went wrong. x-ms-examples: Create or update Numbers.: $ref: ./examples/PostAccountNumbersBatch.json /accounts/{accountName}:deleteNumbers: post: operationId: microsoftAzureAccountsDeletenumbers tags: - BatchNumbers summary: Microsoft Azure Delete Numbers description: Delete up to 100 Numbers on the specified account. parameters: - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter' - name: accountName in: path description: Name of the account. required: true type: string minLength: 1 maxLength: 100 pattern: ^([A-Za-z0-9_-]+)$ - $ref: '#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId' - $ref: '#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent' - $ref: '#/parameters/Azure.Core.ClientRequestIdHeader' - name: body in: body required: true schema: $ref: '#/definitions/BatchNumbersDelete' responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' headers: Repeatability-Result: type: string description: Indicates whether the repeatable request was accepted or rejected. enum: - accepted - rejected x-ms-enum: name: RepeatabilityResult modelAsString: false values: - name: accepted value: accepted description: If the request was accepted and the server guarantees that the server state reflects a single execution of the operation. - name: rejected value: rejected description: 'If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid or because the Repeatability-First-Sent value was outside the range of values held by the server.' x-ms-client-request-id: type: string format: uuid description: An opaque, globally-unique, client-generated string identifier for the request. default: description: An unexpected error response. schema: $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse' headers: x-ms-error-code: type: string description: String error code indicating what went wrong. x-ms-examples: Delete batches of numbers.: $ref: ./examples/PostAccountNumbersDelete.json definitions: ErrorDetail: title: The code and message for an error. type: object properties: code: description: A machine readable error code. type: string message: description: A human readable representation of the error. type: string details: description: An array of details about specific errors that led to this error. type: array items: $ref: '#/definitions/ErrorDetail' innererror: description: An object containing more specific information about the error. $ref: '#/definitions/InnerError' additionalProperties: description: Additional properties that can be provided about the error. required: - code - message TeamsDirectRoutingNumberDetails: type: object description: Details for the Teams Direct Routing service on this Number. properties: enabled: type: boolean description: Boolean indicating if the service is enabled on this Number. x-ms-mutability: - read - update - create required: - enabled TeamsPhoneMobileNumberDetails: type: object description: Details for the Teams Phone Mobile service on this Number. properties: enabled: type: boolean description: Boolean indicating if the service is enabled on this Number. x-ms-mutability: - read - update - create assignmentStatus: $ref: '#/definitions/TelephoneNumberAssignmentStatus' description: The assignment status of this Number. x-ms-mutability: - read - update - create configuration: $ref: '#/definitions/TeamsPhoneMobileNumberConfig' description: The configuration for Teams Phone Mobile on this number. x-ms-mutability: - read - update - create required: - enabled TeamsOperatorConnectNumberDetails: type: object description: Details for the Teams Operator Connect service on this Number. properties: enabled: type: boolean description: Boolean indicating if the service is enabled on this Number. x-ms-mutability: - read - update - create assignmentStatus: $ref: '#/definitions/TelephoneNumberAssignmentStatus' description: The assignment status of this Number. x-ms-mutability: - read - update - create configuration: $ref: '#/definitions/TeamsOperatorConnectNumberConfig' description: The configuration for Teams Operator Connect on this number. x-ms-mutability: - read - update - create required: - enabled Azure.Core.Foundations.Error: type: object description: The error object. properties: code: type: string description: One of a server-defined set of error codes. message: type: string description: A human-readable representation of the error. target: type: string description: The target of the error. details: type: array description: An array of details about specific errors that led to this reported error. items: $ref: '#/definitions/Azure.Core.Foundations.Error' x-ms-identifiers: [] innererror: $ref: '#/definitions/Azure.Core.Foundations.InnerError' description: An object containing more specific information than the current object about the error. required: - code - message NumberConfiguration: additionalProperties: false properties: customSipHeader: pattern: ^([A-Za-z0-9_-])+$ minLength: 1 maxLength: 100 type: string description: Contents of the custom SIP header to use with this number. Can only contain letters, numbers, underscores and dashes. Can be up to 100 characters in length. The name of the custom header is set as part of deploying Azure Communications Gateway. type: object description: Configuration for this number. BatchNumbersDelete: type: object description: A list of telephone numbers to delete. properties: numbers: type: array description: The list of number to delete. At most 100 can be deleted in one request. maxItems: 100 items: $ref: '#/definitions/NumberIdentifier' x-ms-identifiers: [] x-ms-mutability: - read - update - create required: - numbers BatchNumbers_2: type: object description: List of telephone numbers to be uploaded to an account via a PUT request. properties: numbers: type: array description: The list of numbers to upload. At most 100 can be uploaded in one request. maxItems: 100 items: $ref: '#/definitions/NumberResource' x-ms-identifiers: [] x-ms-mutability: - read - update - create required: - numbers NumberResource: type: object description: The configuration for a telephone number provisioned in Azure Communications Gateway. properties: serviceProvisioningStatus: $ref: '#/definitions/ServiceProvisioningStatus' description: The status of the provisioning action associated with this resource. readOnly: true serviceProvisioningErrors: type: array description: Any errors pertaining to the provisioning of this resource. items: $ref: '#/definitions/Azure.Core.Foundations.Error' readOnly: true x-ms-identifiers: [] telephoneNumber: type: string description: Telephone number in E.164 format. minLength: 1 maxLength: 16 pattern: ^\+[1-9]\d+$ x-ms-mutability: - read - update - create accountName: type: string description: Name of the account. Can only contain letters, numbers, underscores and dashes, and is case-sensitive. Can be up to 100 characters in length. minLength: 1 maxLength: 100 pattern: ^([A-Za-z0-9_-]+)$ x-ms-mutability: - read - update - create serviceDetails: $ref: '#/definitions/NumberServiceDetails' description: Configuration of the individual backend services for this number. x-ms-mutability: - read - update - create configuration: $ref: '#/definitions/NumberConfiguration_2' description: Configuration for this number. x-ms-mutability: - read - update - create required: - telephoneNumber - accountName - serviceDetails Azure.Core.Foundations.ErrorResponse: type: object description: A response containing error details. properties: error: $ref: '#/definitions/Azure.Core.Foundations.Error' description: The error object. required: - error NumberServices: additionalProperties: false properties: teamsDrEnabled: type: boolean description: Enables/disables Microsoft Teams Direct Routing for the number. teamsOcEnabled: type: boolean description: Enables/disables Operator Connect for the number. zoomEnabled: type: boolean description: Enables/disables Zoom for the number. required: - teamsDrEnabled - teamsOcEnabled - zoomEnabled type: object description: Communications services enabled for this number. BatchNumbers: additionalProperties: false description: Batch of numbers with configuration. properties: numbers: items: $ref: '#/definitions/BatchNumbersItem' maxItems: 100 type: array description: Records to use for create/replace. required: - numbers type: object InnerError: title: More specific information on an error object. type: object properties: code: description: A machine readable error code. type: string innererror: description: Inner error details if they exist. $ref: '#/definitions/InnerError' NumberResponse: additionalProperties: false properties: etag: type: string description: ETag for use with If-Match headers for optimistic concurrency. accountName: minLength: 1 type: string description: Account name which owns this number. phoneNumber: minLength: 1 type: string description: The phone number corresponding to this entry. details: $ref: '#/definitions/NumberDetails' required: - accountName - details - phoneNumber type: object description: Details of the number as returned on a GET request. NumberServiceDetails: type: object description: Configuration of backend services for a telephone number. properties: teamsOperatorConnect: $ref: '#/definitions/TeamsOperatorConnectNumberDetails' description: Details for the Teams Operator Connect service on this Number. x-ms-mutability: - read - update - create teamsDirectRouting: $ref: '#/definitions/TeamsDirectRoutingNumberDetails' description: Details for the Teams Direct Routing service on this Number. x-ms-mutability: - read - update - create teamsPhoneMobile: $ref: '#/definitions/TeamsPhoneMobileNumberDetails' description: Details for the Teams Phone Mobile service on this Number. x-ms-mutability: - read - update - create zoomPhoneCloudPeering: $ref: '#/definitions/ZoomPhoneCloudPeeringNumberDetails' description: Details for the Zoom Phone Cloud Peering service on this Number. x-ms-mutability: - read - update - create azureOperatorCallProtection: $ref: '#/definitions/AzureOperatorCallProtectionNumberDetails' description: Details for the Azure Operator Call Protection service on this Number. x-ms-mutability: - read - update - create NumberConfiguration_2: type: object description: Configuration for this number. properties: customSipHeader: type: string description: Contents of the custom SIP header to use with this number. Can only contain letters, numbers, underscores and dashes. Can be up to 100 characters in length. The name of the custom header is set as part of the provisioning platform configuration on Azure Communications Gateway. minLength: 1 maxLength: 100 pattern: ^([A-Za-z0-9_-])+$ x-ms-mutability: - read - update - create NumberDetails: additionalProperties: false properties: configuration: $ref: '#/definitions/NumberConfiguration' services: $ref: '#/definitions/NumberServices' required: - services type: object description: Details of the number. TeamsOperatorConnectNumberConfig: type: object description: Telephone number configuration for Teams Operator Connect telephone numbers. properties: usage: type: string description: The usage for this telephone number. x-ms-mutability: - read - update - create choosableCapabilities: type: array description: The choosable capabilities for this telephone number. items: type: string x-ms-mutability: - read - update - create acquiredCapabilities: type: array description: The acquired capabilities for this telephone number. items: type: string readOnly: true availableCapabilities: type: array description: The available capabilities for this telephone number. items: type: string readOnly: true additionalUsages: type: array description: The additional usages for this telephone number. items: type: string x-ms-mutability: - read - update - create civicAddressId: type: string description: The ID of the civic address to be used as the emergency address for this telephone number. x-ms-mutability: - read - update - create locationId: type: string description: The ID of the location to be used as the emergency address for this telephone number. x-ms-mutability: - read - update - create allowTenantAddressUpdate: type: boolean description: If the enterprise is allowed to update the address for this telephone number. default: false x-ms-mutability: - read - update - create displayedCountryCode: type: string description: The country code to be displayed with this telephone number x-ms-mutability: - read - update - create required: - usage - choosableCapabilities TelephoneNumberAssignmentStatus: type: string description: Indicates whether a number is assigned to a user. enum: - assigned - unassigned x-ms-enum: name: TelephoneNumberAssignmentStatus modelAsString: true values: - name: assigned value: assigned description: The telephone number is assigned to a user. - name: unassigned value: unassigned description: The telephone number is not assigned to a user. Azure.Core.Foundations.InnerError: type: object description: An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. properties: code: type: string description: One of a server-defined set of error codes. innererror: $ref: '#/definitions/Azure.Core.Foundations.InnerError' description: Inner error. BatchNumbersResponse: additionalProperties: false properties: numbers: items: $ref: '#/definitions/NumberResponse' type: array description: Details of the created/replaced numbers. required: - numbers type: object description: List of created or replaced numbers. NumberIdentifier: type: object description: An identifier, used to identify a Number resource. properties: telephoneNumber: type: string description: Telephone number in E.164 format. minLength: 3 maxLength: 16 pattern: ^\+[1-9]\d+$ x-ms-mutability: - read - update - create required: - telephoneNumber BatchNumbersItem: additionalProperties: false description: Details for a single number. properties: details: $ref: '#/definitions/NumberDetails' phoneNumber: pattern: ^\+[1-9]\d+$ minLength: 3 maxLength: 16 type: string description: The E.164 phone number whose record should be created/replaced. required: - details - phoneNumber type: object ZoomPhoneCloudPeeringNumberDetails: type: object description: Details for the Zoom Phone Cloud Peering service on this Number. properties: enabled: type: boolean description: Boolean indicating if the service is enabled on this Number. x-ms-mutability: - read - update - create required: - enabled ErrorResponse: title: Error details. description: Contains details when the response code indicates an error. type: object properties: error: description: The error details. $ref: '#/definitions/ErrorDetail' required: - error AzureOperatorCallProtectionNumberDetails: type: object description: Details for the Azure Operator Call Protection service on this Number. properties: enabled: type: boolean description: Boolean indicating if the service is enabled on this Number. x-ms-mutability: - read - update - create required: - enabled ServiceProvisioningStatus: type: string description: The provisioning states of an object on any relevant backend service. enum: - pending - synced - failed x-ms-enum: name: ServiceProvisioningStatus modelAsString: true values: - name: pending value: pending description: The object is pending provisioning. - name: synced value: synced description: The object has been synced with the relevant backend service. - name: failed value: failed description: The object provisioning operation failed with the relevant backend service. TeamsPhoneMobileNumberConfig: type: object description: Telephone number configuration for Teams Phone Mobile telephone numbers. properties: usage: type: string description: The usage for this telephone number. x-ms-mutability: - read - update - create choosableCapabilities: type: array description: The choosable capabilities for this telephone number. items: type: string x-ms-mutability: - read - update - create acquiredCapabilities: type: array description: The acquired capabilities for this telephone number. items: type: string readOnly: true availableCapabilities: type: array description: The available capabilities for this telephone number. items: type: string readOnly: true additionalUsages: type: array description: The additional usages for this telephone number. items: type: string x-ms-mutability: - read - update - create civicAddressId: type: string description: The ID of the civic address to be used as the emergency address for this telephone number. x-ms-mutability: - read - update - create locationId: type: string description: The ID of the location to be used as the emergency address for this telephone number. x-ms-mutability: - read - update - create allowTenantAddressUpdate: type: boolean description: If the enterprise is allowed to update the address for this telephone number. default: false x-ms-mutability: - read - update - create displayedCountryCode: type: string description: The country code to be displayed with this telephone number x-ms-mutability: - read - update - create required: - usage - choosableCapabilities parameters: Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent: name: Repeatability-First-Sent in: header description: Specifies the date and time at which the request was first created. required: false type: string format: date-time x-ms-parameter-location: method x-ms-client-name: repeatabilityFirstSent Azure.Core.ClientRequestIdHeader: name: x-ms-client-request-id in: header description: An opaque, globally-unique, client-generated string identifier for the request. required: false type: string format: uuid x-ms-parameter-location: method x-ms-client-name: clientRequestId ApiVersionParameter: name: api-version in: query required: true type: string description: Client API version x-ms-parameter-location: client Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId: name: Repeatability-Request-ID in: header description: An opaque, globally-unique, client-generated string identifier for the request. required: false type: string x-ms-parameter-location: method x-ms-client-name: repeatabilityRequestId Azure.Core.Foundations.ApiVersionParameter: name: api-version in: query description: The API version to use for this operation. required: true type: string minLength: 1 x-ms-parameter-location: method x-ms-client-name: apiVersion x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'