Views

Update Many Views

Allowed For

  • Agents

Request Parameters

The PUT request expects a views object that lists the views to update.

Each view may have the following properties:

NameMandatoryDescription
idyesThe ID of the view to update
positionnoThe new position of the view
activenoThe active status of the view (true or false)

Example Request Body

{
  "views": [
    {"id": 25, "position": 3},
    {"id": 23, "position": 5},
    {"id": 27, "position": 9},
    {"id": 22, "position": 7}
  ]
}
put/api/v2/views/update_many

Response

Success response

countinteger
next_pagestring nullable
previous_pagestring nullable

Example response

{
  "views": [
    {
      "active": true,
      "conditions": {
        "all": [
          {
            "field": "status",
            "operator": "less_than",
            "value": "solved"
          },
          {
            "field": "assignee_id",
            "operator": "is",
            "value": "296220096"
          }
        ],
        "any": []
      },
      "default": false,
      "description": "View for recent tickets",
      "execution": {
        "columns": [
          {
            "id": "status",
            "title": "Status"
          },
          {
            "id": "updated",
            "title": "Updated"
          },
          {
            "id": 5,
            "title": "Account",
            "type": "text",
            "url": "https://example.zendesk.com/api/v2/ticket_fields/5.json"
          }
        ],
        "group": {
          "id": "status",
          "order": "desc",
          "title": "Status"
        },
        "sort": {
          "id": "updated",
          "order": "desc",
          "title": "Updated"
        }
      },
      "id": 25,
      "position": 8,
      "restriction": {
        "id": 4,
        "type": "User"
      },
      "title": "Tickets updated <12 Hours"
    }
  ]
}

Changes