Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Message Queue
  • Access management
  • Pricing policy
  • Terraform reference
    • Overview
    • Common errors
  • Audit Trails events
  • Monitoring metrics
  • Public materials
  • FAQ

In this article:

  • Making API requests
  • Request headers
  • Request parameters
  • Passing arrays of parameters
  • API response
  • Successful response
  • Error response
  1. API reference
  2. Overview

Yandex Message Queue API

Written by
Yandex Cloud
Updated at May 13, 2024
  • Making API requests
    • Request headers
    • Request parameters
    • Passing arrays of parameters
  • API response
    • Successful response
    • Error response

Yandex Message Queue provides an HTTP API that is partially compatible with the Amazon SQS API.

Making API requestsMaking API requests

To make a request to the Yandex Message Queue API, send an HTTP POST request to the path / at https://message-queue.api.cloud.yandex.net.

POST / HTTP/1.1
Host: message-queue.api.cloud.yandex.net
Content-Length: length
Content-Type: application/x-www-form-urlencoded
Authorization: authorization string (AWS Signature Version 4)

Request parameters

Request headersRequest headers

All requests must have standard headers:

  • Content-Type: application/x-www-form-urlencoded.
  • Authorization: Request signature as per Authenticating Requests in the Amazon SQS documentation. If you use the SDK or a console client, a request and its signature are generated automatically and you only need to pass the request parameters.

Request parametersRequest parameters

All requests must contain standard parameters:

  • Action: the name of the API method being called.
  • Version: always equal to 2012-11-05.

Parameters are passed in the request body in the form-urlencoded format.

Passing arrays of parametersPassing arrays of parameters

Some message parameters, such as message or queue attributes, are passed as arrays. Each element of an array is passed as two or more request parameters. For example, for attributes, this is the name and value of an array element.

Example of using an attribute with multiple parameters:

Attribute.1.Name=VisibilityTimeout
Attribute.1.Value=40
Attribute.2.Name=MessageRetentionPeriod
Attribute.2.Value=1000

In this example, attribute 1 is the VisibilityTimeout set to 40; attribute 2 is the MessageRetentionPeriod set to 1000.

API responseAPI response

In response to an API request, Message Queue returns an XML structure containing the request result.

Successful responseSuccessful response

If the request execution is successful, the main element of the response gets the name of the method being called plus the Response suffix (<Action> + "Response").

This element contains the following child elements:

Tag Description
ActionNameResult Contains elements specific to the method being called. For possible elements, see the documentation for each method. For example, CreateQueueResult contains the QueueUrl element with the URL of the queue created.
ResponseMetadata Contains the RequestId with the UUID of the request.

Example of a successful response:

<?xml version="1.0" encoding="UTF-8"?>
<CreateQueueResponse>
   <CreateQueueResult>
      <QueueUrl>https://message-queue.api.cloud.yandex.net/b1g8ad42m6he********/dj6000000000********/sample-queue</QueueUrl>
   </CreateQueueResult>
   <ResponseMetadata>
      <RequestId>3c9b76fb-f35fb266-48e9c5bf-faca-ddc10b592cfce6ffdf83329a********</RequestId>
   </ResponseMetadata>
</CreateQueueResponse>

Error responseError response

If a request fails, the main element of the response is named ErrorResponse. This element contains such child elements as Error and RequestId.

The Error element contains the following child elements:

Tag Description
Type Error type indicating whether the error occurred on the producer or consumer's side.
Code Error ID.

For a list of common errors, see Common errors.
Message Error description in English.
Detail Additional information about the error (optional).

The RequestId element contains the UUID of the request.

Sample error response:

<ErrorResponse>
   <Error>
      <Type>Sender</Type>
      <Code>InvalidParameterValue</Code>
      <Message>
         Value (queuename_nonalpha) for parameter QueueName is invalid.
         Must be an alphanumeric String of 1 to 80 in length.
      </Message>
   </Error>
   <RequestId>42d59b56-7407-4c4a-be0f-4c88********</RequestId>
</ErrorResponse>

Was the article helpful?

Previous
Terraform reference
Next
CreateQueue
© 2025 Direct Cursus Technology L.L.C.