Microsoft Azure Text API

The Text API from Microsoft Azure, for text.

GitHub OpenAPI

Operations 8

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

GET /text/blocklists List text blocklists · Microsoft Azure Get All Text Blocklists #
Ask an LLM
“Which text blocklists have I set up in Content Safety?”
“What custom blocklists exist for text moderation?”
Tell an agent
List all my text blocklists.
Show every text blocklist with its description.
GET /text/blocklists/{blocklistName} Get a text blocklist · Microsoft Azure Get Text Blocklist By Blocklistname #
Ask an LLM
“How do I see the details of one text blocklist?”
“What description does a given blocklist have?”
Tell an agent
Get text blocklist {blocklistName}.
Show details of blocklist {blocklistName}.
PATCH /text/blocklists/{blocklistName} Create or update a text blocklist · Microsoft Azure Create Or Update Text Blocklist #
Ask an LLM
“Can I create a new text blocklist for content moderation?”
“How do I change the description of an existing blocklist?”
Tell an agent
Create text blocklist {blocklistName} described as {description}.
Update blocklist {blocklistName} with description {description}.
DELETE /text/blocklists/{blocklistName} Delete a text blocklist · Microsoft Azure Delete Text Blocklist By Blocklistname #
Ask an LLM
“How do I delete a text blocklist entirely?”
“Can I remove a custom blocklist I no longer need?”
Tell an agent destructive · confirm first
Delete text blocklist {blocklistName}.
Remove the blocklist named {blocklistName}.
POST /text/blocklists/{blocklistName}:addOrUpdateBlocklistItems Add or update items in a text blocklist · Microsoft Azure Add Or Update Blocklistitems To Text Blocklist #
Ask an LLM
“How many terms can I add to a text blocklist in one request?”
“Can I add new blocked terms to an existing blocklist?”
Tell an agent
Add blocklist items {blocklistItems} to blocklist {blocklistName}.
Add or update terms {blocklistItems} in text blocklist {blocklistName}.
POST /text/blocklists/{blocklistName}:removeBlocklistItems Remove items from a text blocklist · Microsoft Azure Remove Blocklistitems From Text Blocklist #
Ask an LLM
“Can I remove specific blocked terms from a blocklist?”
“What is the maximum number of blocklist items I can remove at once?”
Tell an agent destructive · confirm first
Remove items {blocklistItemIds} from blocklist {blocklistName}.
Delete blocklist item IDs {blocklistItemIds} from text blocklist {blocklistName}.
GET /text/blocklists/{blocklistName}/blocklistItems List items in a text blocklist · Microsoft Azure Get All Blocklistitems By Blocklistname #
Ask an LLM
“What terms are in my text blocklist?”
“Can I page through blocklist items with top and skip?”
Tell an agent
List items in text blocklist {blocklistName}.
List {top} items of blocklist {blocklistName}, skipping {skip}.
GET /text/blocklists/{blocklistName}/blocklistItems/{blocklistItemId} Get a single text blocklist item · Microsoft Azure Get Blocklistitem By Blocklistname And Blocklistitemid #
Ask an LLM
“How do I look up one blocked term by its item ID?”
“What does an individual blocklist item contain?”
Tell an agent
Get blocklist item {blocklistItemId} from blocklist {blocklistName}.
Show item {blocklistItemId} in text blocklist {blocklistName}.

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-text-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-text-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure ContentSafety Service Text API
  version: 2024-02-15-preview
  description: Analyze harmful content
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
security:
- ApiKeyAuth: []
- OAuth2Auth:
  - https://cognitiveservices.azure.com/.default
tags:
- name: Text
paths:
  /text/blocklists:
    get:
      operationId: microsoftAzureTextblocklistsListtextblocklists
      summary: Microsoft Azure Get All Text Blocklists
      description: Get all text blocklists details.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedTextBlocklist'
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse'
      x-ms-examples:
        Get All Text Blocklists:
          $ref: ./examples/ListTextBlocklists.json
      x-ms-pageable:
        nextLinkName: nextLink
      tags:
      - Text
  /text/blocklists/{blocklistName}:
    get:
      operationId: microsoftAzureTextblocklistsGettextblocklist
      summary: Microsoft Azure Get Text Blocklist By Blocklistname
      description: Returns text blocklist details.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: blocklistName
        in: path
        description: Text blocklist name.
        required: true
        schema:
          type: string
          maxLength: 64
          pattern: ^[0-9A-Za-z._~-]+$
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextBlocklist'
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse'
      x-ms-examples:
        Get Text Blocklist By blocklistName:
          $ref: ./examples/GetTextBlocklist.json
      tags:
      - Text
    patch:
      operationId: microsoftAzureTextblocklistsCreateorupdatetextblocklist
      summary: Microsoft Azure Create Or Update Text Blocklist
      description: Updates a text blocklist. If the blocklistName does not exist, a new blocklist will be created.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: blocklistName
        in: path
        description: Text blocklist name.
        required: true
        schema:
          type: string
          maxLength: 64
          pattern: ^[0-9A-Za-z._~-]+$
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextBlocklist'
        '201':
          description: The request has succeeded and a new resource has been created as a result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextBlocklist'
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse'
      x-ms-examples:
        Create Or Update Text Blocklist:
          $ref: ./examples/CreateOrUpdateTextBlocklist.json
      tags:
      - Text
      requestBody:
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/TextBlocklistCreateOrUpdate'
        description: The resource instance.
        required: true
    delete:
      operationId: microsoftAzureTextblocklistsDeletetextblocklist
      summary: Microsoft Azure Delete Text Blocklist By Blocklistname
      description: Deletes a text blocklist.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: blocklistName
        in: path
        description: Text blocklist name.
        required: true
        schema:
          type: string
          maxLength: 64
          pattern: ^[0-9A-Za-z._~-]+$
      responses:
        '204':
          description: 'There is no content to send for this request, but the headers may be useful. '
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse'
      x-ms-examples:
        Delete Text Blocklist By blocklistName:
          $ref: ./examples/DeleteTextBlocklist.json
      tags:
      - Text
  /text/blocklists/{blocklistName}:addOrUpdateBlocklistItems:
    post:
      operationId: microsoftAzureTextblocklistsAddorupdateblocklistitems
      summary: Microsoft Azure Add Or Update Blocklistitems To Text Blocklist
      description: Add or update blocklistItems to a text blocklist. You can add or update at most 100 blocklistItems in one request.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: blocklistName
        in: path
        description: Text blocklist name.
        required: true
        schema:
          type: string
          maxLength: 64
          pattern: ^[0-9A-Za-z._~-]+$
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddOrUpdateTextBlocklistItemsResult'
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse'
      x-ms-examples:
        Add or Update BlocklistItems To Text Blocklist:
          $ref: ./examples/AddOrUpdateBlocklistItems.json
      tags:
      - Text
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrUpdateTextBlocklistItemsOptions'
        description: Options for adding or updating blocklist items.
        required: true
  /text/blocklists/{blocklistName}:removeBlocklistItems:
    post:
      operationId: microsoftAzureTextblocklistsRemoveblocklistitems
      summary: Microsoft Azure Remove Blocklistitems From Text Blocklist
      description: Remove blocklistItems from a text blocklist. You can remove at most 100 BlocklistItems in one request.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: blocklistName
        in: path
        description: Text blocklist name.
        required: true
        schema:
          type: string
          maxLength: 64
          pattern: ^[0-9A-Za-z._~-]+$
      responses:
        '204':
          description: 'There is no content to send for this request, but the headers may be useful. '
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse'
      x-ms-examples:
        Remove BlockItems From Text Blocklist:
          $ref: ./examples/RemoveBlocklistItems.json
      tags:
      - Text
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveTextBlocklistItemsOptions'
        description: Options for removing blocklist items.
        required: true
  /text/blocklists/{blocklistName}/blocklistItems:
    get:
      operationId: microsoftAzureTextblocklistsListtextblocklistitems
      summary: Microsoft Azure Get All Blocklistitems By Blocklistname
      description: Get all blocklistItems in a text blocklist.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: blocklistName
        in: path
        description: Text blocklist name.
        required: true
        schema:
          type: string
          maxLength: 64
          pattern: ^[0-9A-Za-z._~-]+$
      - $ref: '#/components/parameters/Azure.Core.TopQueryParameter'
      - $ref: '#/components/parameters/Azure.Core.SkipQueryParameter'
      - $ref: '#/components/parameters/Azure.Core.MaxPageSizeQueryParameter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedTextBlocklistItem'
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse'
      x-ms-examples:
        Get All BlockItems By blocklistName:
          $ref: ./examples/ListTextBlocklistItems.json
      x-ms-pageable:
        nextLinkName: nextLink
      tags:
      - Text
  /text/blocklists/{blocklistName}/blocklistItems/{blocklistItemId}:
    get:
      operationId: microsoftAzureTextblocklistsGettextblocklistitem
      summary: Microsoft Azure Get Blocklistitem By Blocklistname And Blocklistitemid
      description: Get blocklistItem by blocklistName and blocklistItemId from a text blocklist.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: blocklistName
        in: path
        description: Text blocklist name.
        required: true
        schema:
          type: string
          maxLength: 64
          pattern: ^[0-9A-Za-z._~-]+$
      - name: blocklistItemId
        in: path
        description: The service will generate a BlocklistItemId, which will be a UUID.
        required: true
        schema:
          type: string
          maxLength: 64
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextBlocklistItem'
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse'
      x-ms-examples:
        Get BlockItem By blocklistName And blocklistItemId:
          $ref: ./examples/GetTextBlocklistItem.json
      tags:
      - Text
components:
  schemas:
    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: '#/components/schemas/Azure.Core.Foundations.Error'
          x-ms-identifiers: []
        innererror:
          $ref: '#/components/schemas/Azure.Core.Foundations.InnerError'
          description: An object containing more specific information than the current object about the error.
      required:
      - code
      - message
    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: '#/components/schemas/Azure.Core.Foundations.InnerError'
          description: Inner error.
    PagedTextBlocklist:
      type: object
      description: Paged collection of TextBlocklist items
      properties:
        value:
          type: array
          description: The TextBlocklist items on this page
          items:
            $ref: '#/components/schemas/TextBlocklist'
          x-ms-identifiers: []
        nextLink:
          type: string
          format: uri
          description: The link to the next page of items
      required:
      - value
    AddOrUpdateTextBlocklistItemsOptions:
      type: object
      description: The request to add blocklistItems to a text blocklist.
      properties:
        blocklistItems:
          type: array
          description: Array of blocklistItems to add.
          items:
            $ref: '#/components/schemas/TextBlocklistItem'
          x-ms-identifiers: []
      required:
      - blocklistItems
    PagedTextBlocklistItem:
      type: object
      description: Paged collection of TextBlocklistItem items
      properties:
        value:
          type: array
          description: The TextBlocklistItem items on this page
          items:
            $ref: '#/components/schemas/TextBlocklistItem'
          x-ms-identifiers: []
        nextLink:
          type: string
          format: uri
          description: The link to the next page of items
      required:
      - value
    TextBlocklistCreateOrUpdate:
      type: object
      description: Text Blocklist.
      properties:
        blocklistName:
          type: string
          description: Text blocklist name.
          maxLength: 64
          pattern: ^[0-9A-Za-z._~-]+$
          x-ms-mutability:
          - read
          - create
        description:
          type: string
          description: Text blocklist description.
          maxLength: 1024
    RemoveTextBlocklistItemsOptions:
      type: object
      description: The request to remove blocklistItems from a text blocklist.
      properties:
        blocklistItemIds:
          type: array
          description: Array of blocklistItemIds to remove.
          items:
            type: string
      required:
      - blocklistItemIds
    Azure.Core.Foundations.ErrorResponse:
      type: object
      description: A response containing error details.
      properties:
        error:
          $ref: '#/components/schemas/Azure.Core.Foundations.Error'
          description: The error object.
      required:
      - error
    AddOrUpdateTextBlocklistItemsResult:
      type: object
      description: The response of adding blocklistItems to the text blocklist.
      properties:
        blocklistItems:
          type: array
          description: Array of blocklistItems have been added.
          items:
            $ref: '#/components/schemas/TextBlocklistItem'
          x-ms-identifiers: []
      required:
      - blocklistItems
    TextBlocklist:
      type: object
      description: Text Blocklist.
      properties:
        blocklistName:
          type: string
          description: Text blocklist name.
          maxLength: 64
          pattern: ^[0-9A-Za-z._~-]+$
          x-ms-mutability:
          - read
          - create
        description:
          type: string
          description: Text blocklist description.
          maxLength: 1024
      required:
      - blocklistName
    TextBlocklistItem:
      type: object
      description: Item in a TextBlocklist.
      properties:
        blocklistItemId:
          type: string
          description: The service will generate a BlocklistItemId, which will be a UUID.
          maxLength: 64
          readOnly: true
        description:
          type: string
          description: BlocklistItem description.
          maxLength: 1024
        text:
          type: string
          description: BlocklistItem content.
          maxLength: 128
      required:
      - blocklistItemId
      - text
  parameters:
    Azure.Core.MaxPageSizeQueryParameter:
      name: maxpagesize
      in: query
      description: The maximum number of result items per page.
      required: false
      x-ms-parameter-location: method
      schema:
        type: integer
        format: int32
    Azure.Core.SkipQueryParameter:
      name: skip
      in: query
      description: The number of result items to skip.
      required: false
      x-ms-parameter-location: method
      schema:
        type: integer
        format: int32
        default: 0
    Azure.Core.TopQueryParameter:
      name: top
      in: query
      description: The number of result items to return.
      required: false
      x-ms-parameter-location: method
      schema:
        type: integer
        format: int32
    Azure.Core.Foundations.ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      x-ms-parameter-location: method
      x-ms-client-name: apiVersion
      schema:
        type: string
        minLength: 1
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Ocp-Apim-Subscription-Key
      in: header
    OAuth2Auth:
      type: oauth2
      flows:
        clientCredentials:
          scopes:
            https://cognitiveservices.azure.com/.default: ''
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
x-ms-parameterized-host:
  hostTemplate: '{endpoint}/contentsafety'
  useSchemePrefix: false
  parameters:
  - name: endpoint
    in: path
    description: 'Supported Cognitive Services endpoints (protocol and hostname, for example:

      https://<resource-name>.cognitiveservices.azure.com).'
    required: true
    type: string