# Update request queue


```
PUT 
https://api.apify.com/v2/request-queues/:queueId
```


Updates a request queue's name and general resource access level using a value specified by a JSON object passed in the PUT payload.

The response is the updated request queue object, as returned by the  API endpoint.

## Request

### Path Parameters

* **queueId** string required

  Queue ID or `username~queue-name`.

  **Example:** `WkzbQMuFYuamGv3YF`

### Body**required**

* **name** string

  The new name for the request queue.

* **generalAccess** GeneralAccess (string)

  Defines the general access level for the resource.

  **Possible values:** \[`ANYONE_WITH_ID_CAN_READ`, `ANYONE_WITH_NAME_CAN_READ`, `FOLLOW_USER_SETTING`, `RESTRICTED`]

  **Example:** `RESTRICTED`

### Status 200

**Response Headers**




```
{
  "data": {
    "id": "WkzbQMuFYuamGv3YF",
    "name": "some-name",
    "userId": "wRsJZtadYvn4mBZmm",
    "createdAt": "2019-12-12T07:34:14.202Z",
    "modifiedAt": "2030-12-13T08:36:13.202Z",
    "accessedAt": "2019-12-14T08:36:13.202Z",
    "totalRequestCount": 870,
    "handledRequestCount": 100,
    "pendingRequestCount": 670,
    "hadMultipleClients": true,
    "consoleUrl": "https://api.apify.com/v2/request-queues/27TmTznX9YPeAYhkC",
    "stats": {
      "deleteCount": 0,
      "headItemReadCount": 5,
      "readCount": 100,
      "storageBytes": 1024,
      "writeCount": 10
    },
    "generalAccess": "RESTRICTED"
  }
}
```


**Schema**

* **data** object required

  A request queue object containing metadata and statistics.

  * **id** string required

    A unique identifier assigned to the request queue.

    **Example:** `WkzbQMuFYuamGv3YF`

  * **name** string

    The name of the request queue.

    **Example:** `some-name`

  * **userId** string required

    The ID of the user who owns the request queue.

    **Example:** `wRsJZtadYvn4mBZmm`

  * **createdAt** string\<date-time> required

    The timestamp when the request queue was created.

    **Example:** `2019-12-12T07:34:14.202Z`

  * **modifiedAt** string\<date-time> required

    The timestamp when the request queue was last modified. Modifications include adding, updating, or removing requests, as well as locking or unlocking requests in the request queue.

    **Example:** `2030-12-13T08:36:13.202Z`

  * **accessedAt** string\<date-time> required

    The timestamp when the request queue was last accessed.

    **Example:** `2019-12-14T08:36:13.202Z`

  * **totalRequestCount** integer required

    The total number of requests in the request queue.

    **Possible values:** `>= 0`

    **Example:** `870`

  * **handledRequestCount** integer required

    The number of requests that have been handled.

    **Possible values:** `>= 0`

    **Example:** `100`

  * **pendingRequestCount** integer required

    The number of requests that are pending and have not been handled yet.

    **Possible values:** `>= 0`

    **Example:** `670`

  * **hadMultipleClients** boolean required

    Whether the request queue has been accessed by multiple different clients.

    **Example:** `true`

  * **consoleUrl** string\<uri> required

    The URL to view the request queue in the Apify console.

    **Example:** `https://api.apify.com/v2/request-queues/27TmTznX9YPeAYhkC`

  * **stats** object

    Statistics about request queue operations and storage.

    * **deleteCount** integer

      The number of delete operations performed on the request queue.

      **Example:** `0`

    * **headItemReadCount** integer

      The number of times requests from the head were read.

      **Example:** `5`

    * **readCount** integer

      The total number of read operations performed on the request queue.

      **Example:** `100`

    * **storageBytes** integer

      The total storage size in bytes used by the request queue.

      **Example:** `1024`

    * **writeCount** integer

      The total number of write operations performed on the request queue.

      **Example:** `10`

  * **generalAccess** GeneralAccess (string)

    Defines the general access level for the resource.

    **Possible values:** \[`ANYONE_WITH_ID_CAN_READ`, `ANYONE_WITH_NAME_CAN_READ`, `FOLLOW_USER_SETTING`, `RESTRICTED`]

    **Example:** `RESTRICTED`

### Status 400

Bad request - invalid input parameters or request body.


```
{
  "error": {
    "type": "invalid-input",
    "message": "Invalid input: The request body contains invalid data."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 401

Unauthorized - authentication required or invalid token.


```
{
  "error": {
    "type": "token-not-valid",
    "message": "Authentication token is not valid."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 403

Forbidden - insufficient permissions to perform this action.


```
{
  "error": {
    "type": "permission-denied",
    "message": "You do not have permission to perform this action."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 404

Not found - the requested resource was not found.


```
{
  "error": {
    "type": "record-not-found",
    "message": "Request Queue was not found"
  }
}
```


**Schema**

* **error** object

  * **type** string

    **Possible values:** \[`record-not-found`]

  * **message** string\
    **Example:** `Request Queue was not found`

### Status 405

Method not allowed.


```
{
  "error": {
    "type": "method-not-allowed",
    "message": "This API end-point can only be accessed using the following HTTP methods: OPTIONS,GET"
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 413

Payload too large - the request body exceeds the size limit.


```
{
  "error": {
    "type": "request-too-large",
    "message": "The POST payload is too large (limit: 9437184 bytes, actual length: 10485760 bytes)."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 415

Unsupported media type - the Content-Encoding of the request is not supported.


```
{
  "error": {
    "type": "unsupported-content-encoding",
    "message": "Content-Encoding \"bla\" is not supported."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 429

Too many requests - rate limit exceeded.


```
{
  "error": {
    "type": "rate-limit-exceeded",
    "message": "You have exceeded the rate limit. Please try again later."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`
