Microsoft Azure Manage Purchased Phone Numbers API

The Manage Purchased Phone Numbers API from Microsoft Azure, for manage purchased phone numbers.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

PATCH /phoneNumbers/{phoneNumber}/capabilities Change calling and SMS capabilities of a number · Microsoft Azure Updates The Capabilities Of A Phone Number #
Ask an LLM
“How do I enable SMS on a phone number I already purchased in Communication Services?”
“Can I switch a purchased number's calling capability to inbound only?”
Tell an agent
Set SMS capability on {phoneNumber} to {sms}.
Update calling capability of {phoneNumber} to {calling}.
GET /phoneNumbers/{phoneNumber} Get details of a purchased phone number · Microsoft Azure Gets The Details Of The Given Purchased Phone Number #
Ask an LLM
“What capabilities and cost does one of my purchased phone numbers have?”
“How do I look up a specific number I own?”
Tell an agent
Show details of purchased number {phoneNumber}.
Get the capabilities of my phone number {phoneNumber}.
DELETE /phoneNumbers/{phoneNumber} Release a purchased phone number · Microsoft Azure Releases A Purchased Phone Number #
Ask an LLM
“How do I give back a phone number I no longer need?”
“Can I release a purchased number so I stop paying for it?”
Tell an agent destructive · confirm first
Release phone number {phoneNumber}.
Give up ownership of {phoneNumber}.
GET /phoneNumbers List purchased phone numbers · Microsoft Azure Gets The List Of All Purchased Phone Numbers #
Ask an LLM
“Which phone numbers have I purchased in my Communication Services resource?”
“Can I page through my purchased numbers with skip and top?”
Tell an agent
List all my purchased phone numbers.
List {top} purchased numbers skipping the first {skip}.

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:microsoft-azure-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

microsoft-azure-manage-purchased-phone-numbers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure PhoneNumbersClient Manage Purchased Phone…
  description: The phone numbers client uses Azure Communication Services to purchase and manage phone numbers.
  version: 2022-01-11-preview2
tags:
- name: Manage Purchased Phone Numbers
paths:
  /phoneNumbers/{phoneNumber}/capabilities:
    patch:
      tags:
      - Manage Purchased Phone Numbers
      summary: Microsoft Azure Updates The Capabilities Of A Phone Number
      operationId: microsoftAzurePhonenumbersUpdatecapabilities
      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: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
      x-ms-examples:
        Update phoneNumber capabilities:
          $ref: ./examples/UpdatePhoneNumberCapabilities.json
      description: Needs a more full description created.
      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: Microsoft Azure Gets The Details Of The Given Purchased Phone Number
      operationId: microsoftAzurePhonenumbersGetbynumber
      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: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse
      x-ms-examples:
        Fetch purchased phone number:
          $ref: ./examples/GetPhoneNumber.json
      description: Needs a more full description created.
    delete:
      tags:
      - Manage Purchased Phone Numbers
      summary: Microsoft Azure Releases A Purchased Phone Number
      operationId: microsoftAzurePhonenumbersReleasephonenumber
      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' 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:
            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: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse
      x-ms-long-running-operation: true
      x-ms-examples:
        Release phone number:
          $ref: ./examples/ReleasePhoneNumber.json
      description: Needs a more full description created.
  /phoneNumbers:
    get:
      tags:
      - Manage Purchased Phone Numbers
      summary: Microsoft Azure Gets The List Of All Purchased Phone Numbers
      operationId: microsoftAzurePhonenumbersListphonenumbers
      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: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse
      x-ms-pageable:
        nextLinkName: nextLink
        itemName: phoneNumbers
      x-ms-examples:
        List purchased phone numbers:
          $ref: ./examples/GetPhoneNumbers.json
      description: Needs a more full description created.
components:
  schemas:
    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.
          enum:
          - geographic
          - tollFree
          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'
    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
    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
    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
  parameters:
    ApiVersionParameter:
      in: query
      name: api-version
      description: Version of API to invoke.
      required: true
      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'