Aliases - Create

Creates a new search alias.

POST {endpoint}/aliases?api-version=2026-04-01

URI Parameters

Name In Required Type Description
endpoint
path True

string (uri)

The endpoint URL of the search service.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Header

Name Required Type Description
Accept

Accept

The Accept header.

x-ms-client-request-id

string (uuid)

An opaque, globally-unique, client-generated string identifier for the request.

Request Body

Name Required Type Description
indexes True

string[]

The name of the index this alias maps to. Only one index name may be specified.

name True

string

The name of the alias.

@odata.etag

string

The ETag of the alias.

Responses

Name Type Description
201 Created

SearchAlias

The request has succeeded and a new resource has been created as a result.

Other Status Codes

ErrorResponse

An unexpected error response.

Security

api-key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

Scopes

Name Description
https://search.azure.com/.default

Examples

SearchServiceCreateAlias

Sample request

POST https://exampleservice.search.windows.net/aliases?api-version=2026-04-01


{
  "name": "tempalias",
  "indexes": [
    "example-index"
  ],
  "@odata.etag": "0x1234568AE7E58A1"
}

Sample response

{
  "name": "tempalias",
  "indexes": [
    "example-index"
  ]
}

Definitions

Name Description
Accept

The Accept header.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

SearchAlias

Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations.

Accept

The Accept header.

Value Description
application/json;odata.metadata=minimal

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

Name Type Description
error

ErrorDetail

The error object.

SearchAlias

Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations.

Name Type Description
@odata.etag

string

The ETag of the alias.

indexes

string[]

The name of the index this alias maps to. Only one index name may be specified.

name

string

The name of the alias.