{ "swagger": "2.0", "info": { "title": "Azure Communication Services Management API", "version": "2025-05-01", "description": "REST API for Email Services" }, "consumes": [ "application/json" ], "produces": [ "application/json" ], "host": "management.azure.com", "schemes": [ "https" ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}": { "get": { "description": "Get the EmailService and its properties.", "operationId": "EmailServices_Get", "summary": "Get", "tags": [ "EmailServices" ], "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/EmailServiceName" } ], "responses": { "200": { "description": "Success. The response describe the corresponding EmailService resource.", "schema": { "$ref": "#/definitions/EmailServiceResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "produces": [ "application/json" ], "x-ms-examples": { "Get EmailService resource": { "$ref": "./examples/emailServices/get.json" } } }, "put": { "description": "Create a new EmailService or update an existing EmailService.", "operationId": "EmailServices_CreateOrUpdate", "summary": "Create Or Update", "tags": [ "EmailServices" ], "parameters": [ { "name": "parameters", "in": "body", "description": "Parameters for the create or update operation", "required": true, "schema": { "$ref": "#/definitions/EmailServiceResource" } }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/EmailServiceName" } ], "consumes": [ "application/json" ], "responses": { "200": { "description": "The create or update request was completed successfully", "schema": { "$ref": "#/definitions/EmailServiceResource" } }, "201": { "description": "The create or update request was accepted", "headers": { "Azure-AsyncOperation": { "description": "URL to query for status of the operation.", "type": "string" } }, "schema": { "$ref": "#/definitions/EmailServiceResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "produces": [ "application/json" ], "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "x-ms-examples": { "Create or update EmailService resource": { "$ref": "./examples/emailServices/createOrUpdate.json" } } }, "delete": { "description": "Operation to delete a EmailService.", "operationId": "EmailServices_Delete", "summary": "Delete", "tags": [ "EmailServices" ], "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/EmailServiceName" } ], "responses": { "200": { "description": "The delete operation was successful." }, "202": { "description": "The delete operation is being performed in the background.", "headers": { "location": { "description": "URL to query for status of the operation.", "type": "string" } } }, "204": { "description": "The resource did not exist." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-examples": { "Delete EmailService resource": { "$ref": "./examples/emailServices/delete.json" } } }, "patch": { "description": "Operation to update an existing EmailService.", "operationId": "EmailServices_Update", "summary": "Update", "tags": [ "EmailServices" ], "parameters": [ { "name": "parameters", "in": "body", "description": "Parameters for the update operation", "required": true, "schema": { "$ref": "#/definitions/EmailServiceResourceUpdate" } }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/EmailServiceName" } ], "responses": { "200": { "description": "The update request was successful", "schema": { "$ref": "#/definitions/EmailServiceResource" } }, "201": { "description": "The update request was accepted", "headers": { "Azure-AsyncOperation": { "description": "URL to query for status of the operation.", "type": "string" } }, "schema": { "$ref": "#/definitions/EmailServiceResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "produces": [ "application/json" ], "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "x-ms-examples": { "Update EmailService resource": { "$ref": "./examples/emailServices/update.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/emailServices": { "get": { "description": "Handles requests to list all resources in a subscription.", "operationId": "EmailServices_ListBySubscription", "summary": "List By Subscription", "tags": [ "EmailServices" ], "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Success. The response describes the list of EmailServices in the subscription.", "schema": { "$ref": "#/definitions/EmailServiceResourceList" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "produces": [ "application/json" ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "List EmailService resources by subscription": { "$ref": "./examples/emailServices/listBySubscription.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices": { "get": { "description": "Handles requests to list all resources in a resource group.", "operationId": "EmailServices_ListByResourceGroup", "summary": "List By Resource Group", "tags": [ "EmailServices" ], "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { "description": "Success. The response describes the list of EmailServices in a resourceGroup.", "schema": { "$ref": "#/definitions/EmailServiceResourceList" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "produces": [ "application/json" ], "x-ms-examples": { "List EmailService resources by resource group": { "$ref": "./examples/emailServices/listByResourceGroup.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/listVerifiedExchangeOnlineDomains": { "post": { "description": "Get a list of domains that are fully verified in Exchange Online.", "operationId": "EmailServices_ListVerifiedExchangeOnlineDomains", "summary": "List Verified Domains From Exchange Online", "tags": [ "EmailServices" ], "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Success. The response describe a list of verified domains from Exchange Online.", "schema": { "$ref": "#/definitions/VerifiedExchangeOnlineDomainList" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "produces": [ "application/json" ], "x-ms-examples": { "Get verified Exchange Online domains": { "$ref": "./examples/emailServices/getVerifiedExchangeOnlineDomains.json" } } } } }, "definitions": { "EmailServiceProperties": { "description": "A class that describes the properties of the EmailService.", "required": [ "dataLocation" ], "type": "object", "properties": { "provisioningState": { "description": "Provisioning state of the resource.", "enum": [ "Unknown", "Succeeded", "Failed", "Canceled", "Running", "Creating", "Updating", "Deleting", "Moving" ], "type": "string", "readOnly": true, "x-ms-enum": { "name": "EmailServices_ProvisioningState", "modelAsString": true } }, "dataLocation": { "description": "The location where the email service stores its data at rest.", "type": "string", "x-ms-mutability": [ "create", "read" ] } } }, "EmailServiceResource": { "description": "A class representing an EmailService resource.", "type": "object", "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" } ], "properties": { "properties": { "$ref": "#/definitions/EmailServiceProperties", "description": "The properties of the service.", "x-ms-client-flatten": true } } }, "EmailServiceResourceUpdate": { "description": "A class representing update parameters for EmailService resource.", "type": "object", "allOf": [ { "$ref": "CommunicationServices.json#/definitions/TaggedResource" } ] }, "VerifiedExchangeOnlineDomainList": { "description": "List of FQDNs of verified domains in Exchange Online.", "type": "array", "items": { "type": "string" } }, "EmailServiceResourceList": { "description": "Object that includes an array of EmailServices and a possible link for next set.", "type": "object", "properties": { "value": { "description": "List of EmailService", "type": "array", "items": { "$ref": "#/definitions/EmailServiceResource" } }, "nextLink": { "description": "The URL the client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", "type": "string" } } } }, "parameters": { "EmailServiceName": { "name": "emailServiceName", "in": "path", "description": "The name of the EmailService resource.", "pattern": "^[a-zA-Z0-9-]+$", "minLength": 1, "maxLength": 63, "required": true, "type": "string", "x-ms-parameter-location": "method" } } }