Api - Update
Updates the specified API of the API Management service instance.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}?api-version=2025-09-01-preview
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
api
|
path | True |
string minLength: 1maxLength: 80 pattern: ^[^*#&+:<>?]+$ |
API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
The name of the API Management service. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| If-Match | True |
string |
ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. |
Request Body
| Name | Type | Description |
|---|---|---|
| properties.apiRevision |
string minLength: 1maxLength: 100 |
Describes the revision of the API. If no value is provided, default revision 1 is created |
| properties.apiRevisionDescription |
string maxLength: 256 |
Description of the API Revision. |
| properties.apiVersion |
string maxLength: 100 |
Indicates the version identifier of the API if the API is versioned |
| properties.apiVersionDescription |
string maxLength: 256 |
Description of the API Version. |
| properties.apiVersionSetId |
string |
A resource identifier for the related ApiVersionSet. |
| properties.authenticationSettings |
Collection of authentication settings included into this API. |
|
| properties.contact |
Contact information for the API. |
|
| properties.description |
string |
Description of the API. May include HTML formatting tags. |
| properties.displayName |
string minLength: 1maxLength: 300 |
API name. |
| properties.isCurrent |
boolean |
Indicates if API revision is current api revision. |
| properties.license |
License information for the API. |
|
| properties.mcpProperties |
Properties specific to MCP API type. |
|
| properties.path |
string minLength: 0maxLength: 400 |
Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. |
| properties.protocols |
Protocol[] |
Describes on which protocols the operations in this API can be invoked. |
| properties.serviceUrl |
string minLength: 1maxLength: 2000 |
Absolute URL of the backend service implementing this API. |
| properties.subscriptionKeyParameterNames |
Protocols over which API is made available. |
|
| properties.subscriptionRequired |
boolean |
Specifies whether an API or Product subscription is required for accessing the API. |
| properties.termsOfServiceUrl |
string |
A URL to the Terms of Service for the API. MUST be in the format of a URL. |
| properties.type |
Type of API. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. Headers ETag: string |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
ApiManagementUpdateApi
Sample request
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api?api-version=2025-09-01-preview
{
"properties": {
"path": "newecho",
"displayName": "Echo API New",
"serviceUrl": "http://echoapi.cloudapp.net/api2"
}
}
Sample response
{
"name": "echo-api",
"type": "Microsoft.ApiManagement/service/apis",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api",
"properties": {
"path": "newecho",
"apiRevision": "1",
"displayName": "Echo API New",
"isCurrent": true,
"isOnline": true,
"protocols": [
"https"
],
"serviceUrl": "http://echoapi.cloudapp.net/api2",
"subscriptionKeyParameterNames": {
"header": "Ocp-Apim-Subscription-Key",
"query": "subscription-key"
}
}
}
Definitions
| Name | Description |
|---|---|
|
Api |
API contact information |
|
Api |
API details. |
|
Api |
API license information |
|
Api |
Type of API. |
|
Api |
API update contract details. |
|
Api |
An API Version Set contains the common configuration for a set of API Versions relating |
|
Authentication |
API Authentication Settings. |
|
Bearer |
Form of an authorization grant, which the client uses to request the access token. |
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Mcp |
Endpoint definition for MCP API type. |
|
Mcp |
Properties specific to MCP API type. |
|
Mcp |
Transport type for Model Context Protocol API. |
|
OAuth2Authentication |
API OAuth2 Authentication settings details. |
|
Open |
API OAuth2 Authentication settings details. |
| Protocol | |
|
Subscription |
Subscription key parameter names details. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Versioning |
An value that determines where the API Version identifier will be located in a HTTP request. |
ApiContactInformation
API contact information
| Name | Type | Description |
|---|---|---|
|
string |
The email address of the contact person/organization. MUST be in the format of an email address |
|
| name |
string |
The identifying name of the contact person/organization |
| url |
string |
The URL pointing to the contact information. MUST be in the format of a URL |
ApiContract
API details.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
The name of the resource |
| properties.apiRevision |
string minLength: 1maxLength: 100 |
Describes the revision of the API. If no value is provided, default revision 1 is created |
| properties.apiRevisionDescription |
string maxLength: 256 |
Description of the API Revision. |
| properties.apiVersion |
string maxLength: 100 |
Indicates the version identifier of the API if the API is versioned |
| properties.apiVersionDescription |
string maxLength: 256 |
Description of the API Version. |
| properties.apiVersionSet |
Version set details |
|
| properties.apiVersionSetId |
string |
A resource identifier for the related ApiVersionSet. |
| properties.authenticationSettings |
Collection of authentication settings included into this API. |
|
| properties.contact |
Contact information for the API. |
|
| properties.description |
string |
Description of the API. May include HTML formatting tags. |
| properties.displayName |
string minLength: 1maxLength: 300 |
API name. Must be 1 to 300 characters long. |
| properties.isCurrent |
boolean |
Indicates if API revision is current api revision. |
| properties.isOnline |
boolean |
Indicates if API revision is accessible via the gateway. |
| properties.license |
License information for the API. |
|
| properties.mcpProperties |
Properties specific to MCP API type. |
|
| properties.path |
string minLength: 0maxLength: 400 |
Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. |
| properties.protocols |
Protocol[] |
Describes on which protocols the operations in this API can be invoked. |
| properties.provisioningState |
string |
The provisioning state |
| properties.serviceUrl |
string minLength: 0maxLength: 2000 |
Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. |
| properties.sourceApiId |
string |
API identifier of the source API. |
| properties.subscriptionKeyParameterNames |
Protocols over which API is made available. |
|
| properties.subscriptionRequired |
boolean |
Specifies whether an API or Product subscription is required for accessing the API. |
| properties.termsOfServiceUrl |
string |
A URL to the Terms of Service for the API. MUST be in the format of a URL. |
| properties.type |
Type of API. |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
ApiLicenseInformation
API license information
| Name | Type | Description |
|---|---|---|
| name |
string |
The license name used for the API |
| url |
string |
A URL to the license used for the API. MUST be in the format of a URL |
ApiType
Type of API.
| Value | Description |
|---|---|
| http | |
| soap | |
| websocket | |
| graphql | |
| odata | |
| grpc | |
| mcp |
Model Context Protocol API. |
ApiUpdateContract
API update contract details.
| Name | Type | Description |
|---|---|---|
| properties.apiRevision |
string minLength: 1maxLength: 100 |
Describes the revision of the API. If no value is provided, default revision 1 is created |
| properties.apiRevisionDescription |
string maxLength: 256 |
Description of the API Revision. |
| properties.apiVersion |
string maxLength: 100 |
Indicates the version identifier of the API if the API is versioned |
| properties.apiVersionDescription |
string maxLength: 256 |
Description of the API Version. |
| properties.apiVersionSetId |
string |
A resource identifier for the related ApiVersionSet. |
| properties.authenticationSettings |
Collection of authentication settings included into this API. |
|
| properties.contact |
Contact information for the API. |
|
| properties.description |
string |
Description of the API. May include HTML formatting tags. |
| properties.displayName |
string minLength: 1maxLength: 300 |
API name. |
| properties.isCurrent |
boolean |
Indicates if API revision is current api revision. |
| properties.isOnline |
boolean |
Indicates if API revision is accessible via the gateway. |
| properties.license |
License information for the API. |
|
| properties.mcpProperties |
Properties specific to MCP API type. |
|
| properties.path |
string minLength: 0maxLength: 400 |
Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. |
| properties.protocols |
Protocol[] |
Describes on which protocols the operations in this API can be invoked. |
| properties.serviceUrl |
string minLength: 1maxLength: 2000 |
Absolute URL of the backend service implementing this API. |
| properties.subscriptionKeyParameterNames |
Protocols over which API is made available. |
|
| properties.subscriptionRequired |
boolean |
Specifies whether an API or Product subscription is required for accessing the API. |
| properties.termsOfServiceUrl |
string |
A URL to the Terms of Service for the API. MUST be in the format of a URL. |
| properties.type |
Type of API. |
ApiVersionSetContractDetails
An API Version Set contains the common configuration for a set of API Versions relating
| Name | Type | Description |
|---|---|---|
| description |
string |
Description of API Version Set. |
| id |
string |
Identifier for existing API Version Set. Omit this value to create a new Version Set. |
| name |
string |
The display Name of the API Version Set. |
| versionHeaderName |
string |
Name of HTTP header parameter that indicates the API Version if versioningScheme is set to |
| versionQueryName |
string |
Name of query parameter that indicates the API Version if versioningScheme is set to |
| versioningScheme |
An value that determines where the API Version identifier will be located in a HTTP request. |
AuthenticationSettingsContract
API Authentication Settings.
| Name | Type | Description |
|---|---|---|
| oAuth2 |
OAuth2 Authentication settings |
|
| oAuth2AuthenticationSettings |
Collection of OAuth2 authentication settings included into this API. |
|
| openid |
OpenID Connect Authentication Settings |
|
| openidAuthenticationSettings |
Collection of Open ID Connect authentication settings included into this API. |
BearerTokenSendingMethods
Form of an authorization grant, which the client uses to request the access token.
| Value | Description |
|---|---|
| authorizationHeader |
Access token will be transmitted in the Authorization header using Bearer schema |
| query |
Access token will be transmitted as query parameters. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
McpEndpoint
Endpoint definition for MCP API type.
| Name | Type | Description |
|---|---|---|
| name |
string minLength: 1maxLength: 300 |
MCP endpoint name, e.g. 'sse' or 'messages'. |
| uriTemplate |
string pattern: ^/.*$ |
Relative URL path that must start with '/'. |
McpProperties
Properties specific to MCP API type.
| Name | Type | Description |
|---|---|---|
| endpoints |
Collection of MCP endpoint definitions with relative URLs. |
|
| transportType |
Transport type for Model Context Protocol API. |
McpTransportType
Transport type for Model Context Protocol API.
| Value | Description |
|---|---|
| sse |
This API uses HTTP+SSE transport type. |
| streamable |
This API uses the Streamable HTTP transport type. |
OAuth2AuthenticationSettingsContract
API OAuth2 Authentication settings details.
| Name | Type | Description |
|---|---|---|
| authorizationServerId |
string |
OAuth authorization server identifier. |
| scope |
string |
operations scope. |
OpenIdAuthenticationSettingsContract
API OAuth2 Authentication settings details.
| Name | Type | Description |
|---|---|---|
| bearerTokenSendingMethods |
How to send token to the server. |
|
| openidProviderId |
string |
OAuth authorization server identifier. |
Protocol
| Value | Description |
|---|---|
| http | |
| https | |
| ws | |
| wss |
SubscriptionKeyParameterNamesContract
Subscription key parameter names details.
| Name | Type | Description |
|---|---|---|
| header |
string |
Subscription key header name. |
| query |
string |
Subscription key query string parameter name. |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |
VersioningScheme
An value that determines where the API Version identifier will be located in a HTTP request.
| Value | Description |
|---|---|
| Segment |
The API Version is passed in a path segment. |
| Query |
The API Version is passed in a query parameter. |
| Header |
The API Version is passed in a HTTP header. |