openapi: 3.1.0 info: title: Microsoft Azure Cognitive Services Accounts Identity API description: APIs for vision, speech, language, and decision-making AI capabilities including Computer Vision, Text Analytics, and Translator services. version: '3.2' contact: name: Microsoft Azure Support url: https://azure.microsoft.com/en-us/support/ termsOfService: https://www.microsoft.com/en-us/legal/terms-of-use servers: - url: https://{region}.api.cognitive.microsoft.com description: Azure Cognitive Services Regional Endpoint variables: region: default: eastus description: Azure region for the Cognitive Services resource security: - apiKey: [] tags: - name: Identity description: Create and manage communication identities paths: /identities: post: operationId: createIdentity summary: Microsoft Create an identity description: Create a new Communication Services identity. tags: - Identity parameters: - $ref: '#/components/parameters/apiVersion' requestBody: required: true content: application/json: schema: type: object properties: createTokenWithScopes: type: array items: type: string enum: - chat - voip description: Also create an access token with these scopes responses: '201': description: Identity created content: application/json: schema: $ref: '#/components/schemas/CommunicationIdentityAccessTokenResult' '401': description: Unauthorized /identities/{id}: delete: operationId: deleteIdentity summary: Microsoft Delete an identity description: Delete a Communication Services identity and revoke all tokens. tags: - Identity parameters: - name: id in: path required: true description: Identifier of the identity to delete schema: type: string - $ref: '#/components/parameters/apiVersion' responses: '204': description: Identity deleted '401': description: Unauthorized '404': description: Identity not found /identities/{id}/:issueAccessToken: post: operationId: issueAccessToken summary: Microsoft Issue an access token description: Issue a new access token for an identity. tags: - Identity parameters: - name: id in: path required: true schema: type: string - $ref: '#/components/parameters/apiVersion' requestBody: required: true content: application/json: schema: type: object required: - scopes properties: scopes: type: array items: type: string enum: - chat - voip expiresInMinutes: type: integer minimum: 60 maximum: 1440 default: 1440 responses: '200': description: Access token issued content: application/json: schema: $ref: '#/components/schemas/CommunicationIdentityAccessToken' '401': description: Unauthorized components: parameters: apiVersion: name: api-version in: query required: true description: API version schema: type: string default: 2024-03-15-preview schemas: CommunicationIdentityAccessTokenResult: type: object properties: identity: type: object properties: id: type: string accessToken: $ref: '#/components/schemas/CommunicationIdentityAccessToken' CommunicationIdentityAccessToken: type: object properties: token: type: string expiresOn: type: string format: date-time securitySchemes: apiKey: type: apiKey name: Ocp-Apim-Subscription-Key in: header description: Azure Cognitive Services subscription key externalDocs: description: Azure AI Services Documentation url: https://learn.microsoft.com/en-us/azure/ai-services/