Microsoft Azure Communication Services Manage purchased phone numbers API

The Manage purchased phone numbers API from Microsoft Azure Communication Services — 3 operation(s) for manage purchased phone numbers.

GitHub OpenAPI

Operations 4

PATCH /phoneNumbers/{phoneNumber}/capabilities Updates the capabilities of a phone number #
GET /phoneNumbers/{phoneNumber} Gets the details of the given purchased phone number #
DELETE /phoneNumbers/{phoneNumber} Releases a purchased phone number #
GET /phoneNumbers Gets the list of all purchased phone numbers #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-communication-services:microsoft-azure-communication-services-manage-purchased-phone-numbers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-communication-services-manage-purchased-phone-numbers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PhoneNumbersClient Manage purchased phone numbers API
  description: The phone numbers client uses Azure Communication Services to purchase and manage phone numbers.
  version: '2025-06-01'
tags:
- name: Manage purchased phone numbers
paths:
  /phoneNumbers/{phoneNumber}/capabilities:
    patch:
      tags:
      - Manage purchased phone numbers
      summary: Updates the capabilities of a phone number
      operationId: PhoneNumbers_UpdateCapabilities
      parameters:
      - in: path
        name: phoneNumber
        description: The phone number id in E.164 format. The leading plus can be either + or encoded as %2B, e.g. +11234567890.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '202':
          description: The service has accepted the request and will start processing later. It will return 'Accepted' immediately and include an 'Operation-Location' and 'Location' headers. Client side should further query the operation status using the URL specified in 'Operation-Location' header. When operation completes successfully query final result using URL specified in 'Location' header.
          headers:
            Location:
              description: URL to retrieve the final result after operation completes.
              schema:
                type: string
            Operation-Location:
              description: URL to query for status of the operation.
              schema:
                type: string
            operation-id:
              description: The operation id.
              schema:
                type: string
            capabilities-id:
              description: The capabilities operation id.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchasedPhoneNumber'
        default:
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
      requestBody:
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/PhoneNumberCapabilitiesRequest'
        description: Defines the update capabilities request.
  /phoneNumbers/{phoneNumber}:
    get:
      tags:
      - Manage purchased phone numbers
      summary: Gets the details of the given purchased phone number
      operationId: PhoneNumbers_GetByNumber
      parameters:
      - in: path
        name: phoneNumber
        description: The purchased phone number whose details are to be fetched in E.164 format, e.g. +11234567890.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchasedPhoneNumber'
        default:
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
    delete:
      tags:
      - Manage purchased phone numbers
      summary: Releases a purchased phone number
      operationId: PhoneNumbers_ReleasePhoneNumber
      parameters:
      - in: path
        name: phoneNumber
        description: Phone number to be released, e.g. +11234567890.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '202':
          description: The service has accepted the request and will start processing later. It will return 'Accepted' immediately and include an 'Operation-Location' header. Client side should further query the operation status using the URL specified in 'Operation-Location' header.
          headers:
            Operation-Location:
              description: URL to query for status of the operation.
              schema:
                type: string
            operation-id:
              description: The operation id.
              schema:
                type: string
            release-id:
              description: The release operation id.
              schema:
                type: string
        default:
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
      x-ms-long-running-operation: true
  /phoneNumbers:
    get:
      tags:
      - Manage purchased phone numbers
      summary: Gets the list of all purchased phone numbers
      operationId: PhoneNumbers_ListPhoneNumbers
      parameters:
      - in: query
        name: skip
        description: An optional parameter for how many entries to skip, for pagination purposes. The default value is 0.
        schema:
          type: integer
          format: int32
          default: 0
      - in: query
        name: top
        description: An optional parameter for how many entries to return, for pagination purposes. The default value is 100.
        schema:
          type: integer
          format: int32
          default: 100
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchasedPhoneNumbers'
        default:
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
      x-ms-pageable:
        nextLinkName: nextLink
        itemName: phoneNumbers
components:
  schemas:
    PhoneNumberCapabilities:
      description: Capabilities of a phone number.
      required:
      - calling
      - sms
      type: object
      properties:
        calling:
          description: Capability value for calling.
          enum:
          - none
          - inbound
          - outbound
          - inbound+outbound
          type: string
          x-ms-enum:
            name: PhoneNumberCapabilityType
            modelAsString: true
        sms:
          description: Capability value for SMS.
          enum:
          - none
          - inbound
          - outbound
          - inbound+outbound
          type: string
          x-ms-enum:
            name: PhoneNumberCapabilityType
            modelAsString: true
    PhoneNumberCost:
      description: The incurred cost for a single phone number.
      required:
      - amount
      - billingFrequency
      - currencyCode
      type: object
      properties:
        amount:
          format: double
          description: The cost amount.
          type: number
        currencyCode:
          description: The ISO 4217 currency code for the cost amount, e.g. USD.
          type: string
        billingFrequency:
          description: The frequency with which the cost gets billed.
          enum:
          - monthly
          type: string
          x-ms-enum:
            name: BillingFrequency
            modelAsString: true
    PurchasedPhoneNumber:
      description: Represents a purchased phone number.
      required:
      - assignmentType
      - capabilities
      - cost
      - countryCode
      - id
      - phoneNumber
      - phoneNumberType
      - purchaseDate
      type: object
      properties:
        id:
          description: The id of the phone number, e.g. 11234567890.
          type: string
        phoneNumber:
          description: String of the E.164 format of the phone number, e.g. +11234567890.
          type: string
        countryCode:
          description: The ISO 3166-2 code of the phone number's country, e.g. US.
          type: string
        phoneNumberType:
          description: The phone number's type, e.g. geographic, tollFree, mobile.
          enum:
          - geographic
          - tollFree
          - mobile
          type: string
          x-ms-enum:
            name: PhoneNumberType
            modelAsString: true
        capabilities:
          $ref: '#/components/schemas/PhoneNumberCapabilities'
        assignmentType:
          description: The assignment type of the phone number. A phone number can be assigned to a person, or to an application.
          enum:
          - person
          - application
          type: string
          x-ms-enum:
            name: PhoneNumberAssignmentType
            modelAsString: true
        purchaseDate:
          format: date-time
          description: The date and time that the phone number was purchased.
          type: string
        cost:
          $ref: '#/components/schemas/PhoneNumberCost'
    PurchasedPhoneNumbers:
      description: The list of purchased phone numbers.
      required:
      - phoneNumbers
      type: object
      properties:
        phoneNumbers:
          description: Represents a list of phone numbers.
          type: array
          items:
            $ref: '#/components/schemas/PurchasedPhoneNumber'
        nextLink:
          description: Represents the URL link to the next page of phone number results.
          type: string
    PhoneNumberCapabilitiesRequest:
      description: Capabilities of a phone number.
      type: object
      properties:
        calling:
          description: Capability value for calling.
          enum:
          - none
          - inbound
          - outbound
          - inbound+outbound
          type: string
          x-ms-enum:
            name: PhoneNumberCapabilityType
            modelAsString: true
        sms:
          description: Capability value for SMS.
          enum:
          - none
          - inbound
          - outbound
          - inbound+outbound
          type: string
          x-ms-enum:
            name: PhoneNumberCapabilityType
            modelAsString: true
    CommunicationErrorResponse:
      description: The Communication Services error.
      type: object
      required:
      - error
      properties:
        error:
          description: The Communication Services error.
          $ref: '#/components/schemas/CommunicationError'
    CommunicationError:
      description: The Communication Services error.
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: The error code.
        message:
          type: string
          description: The error message.
        target:
          type: string
          readOnly: true
          description: The error target.
        details:
          type: array
          items:
            $ref: '#/components/schemas/CommunicationError'
          readOnly: true
          description: Further details about specific errors that led to this error.
        innererror:
          x-ms-client-name: innerError
          readOnly: true
          $ref: '#/components/schemas/CommunicationError'
          description: The inner error if any.
  parameters:
    ApiVersionParameter:
      in: query
      name: api-version
      description: Version of API to invoke
      required: true
      x-ms-parameter-location: client
      schema:
        type: string
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow
x-ms-parameterized-host:
  hostTemplate: '{endpoint}'
  useSchemePrefix: false
  parameters:
  - $ref: '#/components/parameters/Endpoint'