# List support requests

`GET /api/v1/support-requests`

List the support requests of your account, the most recently active first. The messages are left out of a list. Read one request to get its thread.

This endpoint also answers QUERY, with the same parameters sent in the request body. [How QUERY works](https://my.monicahq.com/docs/api/query-method).

## Query parameters

- `status` (string, optional): Keep only the requests in this status: to_handle, waiting_on_user or solved. Any other value answers 422 on status.
- `page` (integer, optional, defaults to 1): Which page to answer with.
- `per_page` (integer, optional, defaults to 25): How many records one page holds, between 1 and 100. A number outside the range is brought back into it rather than refused.

## Returns

A page of support request objects, and how many there are in all. Only the requests of your account are listed.

- `data` (array): The support requests on this page. An empty list rather than an error when there are none.
- `data[]` (object): One support request.
- `data[].type` (string): Always support_request. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.
- `data[].id` (string): The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.
- `data[].attributes` (object): Everything the record holds.
- `data[].attributes.reference` (string): The reference to quote when writing to the support team, such as MON-482913.
- `data[].attributes.category` (string): What the request is about: feature, billing, email, question or technical.
- `data[].attributes.subject` (string): The title the request was opened with.
- `data[].attributes.status` (string): Where the request stands: to_handle when the support team has yet to answer, waiting_on_user when it has and awaits you, or solved.
- `data[].attributes.status_label` (string): The status as the application words it for the person who asked, in the language of the account.
- `data[].attributes.opened_at` (timestamp): When the request was opened, as a count of seconds since 1970.
- `data[].attributes.last_activity_at` (timestamp): When anybody last wrote in it, the person who asked or the support team, as a count of seconds since 1970. A change of status alone does not move it.
- `data[].attributes.solved_at` (timestamp): When it was marked as solved, as a count of seconds since 1970, or null while it is open.
- `data[].links` (object): Where to find this record.
- `data[].links.self` (string): The absolute address this record is read from.
- `meta` (object): Where you are in the collection.
- `meta.page` (integer): The page this is, counting from 1.
- `meta.per_page` (integer): How many one page holds, which is the size that was asked for once it has been brought into the allowed range.
- `meta.total` (integer): How many support requests there are in all, not how many are on this page.

## Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in `X-RateLimit-Remaining`.

## Request

```sh
curl https://my.monicahq.com/api/v1/support-requests \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/support-requests', {
  headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
```

```php
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/support-requests');
```

## Response

`200`

```json
{
    "data": [
        {
            "type": "support_request",
            "id": "7c1e4a92-5b3d-4f08-a6e1-93d2c8b05f17",
            "attributes": {
                "reference": "MON-482913",
                "category": "question",
                "subject": "My conference room reminder never arrived",
                "status": "waiting_on_user",
                "status_label": "Reply from support",
                "opened_at": 1791547200,
                "last_activity_at": 1791550800,
                "solved_at": null
            },
            "links": {
                "self": "https://my.monicahq.com/api/v1/support-requests/7c1e4a92-5b3d-4f08-a6e1-93d2c8b05f17"
            }
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1
    }
}
```
