Changes the visibility timeout of a message that has been consumed and is in the Inactive state. After you changes the visibility timeout of a message, the system returns a new receipt handle.


A request consists of the following parts:

  • Request line

    PUT /$queueName/messages? receiptHandle=<receiptHandle>&visibilityTimeout=<visibilitytimeout> HTTP/1.1

  • URI parameter
    Parameter Description Required
    ReceiptHandle The receipt handle that was returned when the message was last consumed. For more information, see ReceiveMessage. Yes
    VisibilityTimeout The length of time before the message can be consumed again. Unit: seconds. Yes
  • Operation-specific request headers

    None. For more information about common request parameters, see Common parameters.

  • Request body



A response consists of a status line, HTTP headers, and a response body.

  • HTTP status code

    HTTP/1.1 200 OK

  • Operation-specific response headers

    None. For more information about common response parameters, see Common parameters.

  • Response body
    Parameter Description
    ReceiptHandle The temporary receipt handle. You must specify the receipt handle if you need to delete or modify the message when it is in the Inactive state. The receipt handle is valid before the time that is specified by the NextVisibleTime parameter.
    NextVisibleTime The time when the message can be consumed again. This value is a Unix timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

Error codes

Error code Error message HTTP status code
QueueNotExist The queue name you provided is not exist. 404
InvalidArgument The value of Element should between Low and High seconds/bytes. 400
MessageNotExist Message not exist. 404
  • Sample requests
    PUT /queueName/messages
        ? receiptHandle=MbZj6wDWli+QEauMZc8ZRv37sIW2iJKq3M9Mx/KSbkJ0&visibilityTimeout=50 HTTP/1.1
        Host: $
        Date: Wed, 28 May 2012 22:32:00 GMT
        x-mqs-version: 2014-07-08
        Authorization: MQS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE            
  • Sample responses
        HTTP/1.1 200OK
        x-mqs-version: 2015-06-06
        <? xml version="1.0” encoding=”UTF-8” ? >
        <Message xmlns=””>
            <ReceiptHandle>TbZj6wDWli+9CEauMZc8ZRv37sIW2iJKq3M9Mx/TS1</ReceiptHandle >