---
title: "Longest wait time in queue"
method: POST
path: "/inbox/v1/queue/metrics/longest-wait-time"
tags: ["Inbox"]
---

# Longest wait time in queue

`POST /inbox/v1/queue/metrics/longest-wait-time`

## Request

- Base URL: `https://platform.hootsuite.com`
- URL: `https://platform.hootsuite.com/inbox/v1/queue/metrics/longest-wait-time`
- Auth: OAuth 2
  - Authorization code: `https://platform.hootsuite.com/oauth2/auth`
  - Token URL: `https://platform.hootsuite.com/oauth2/token`

The current longest time in seconds that a contact is waiting for a response. If no mediumId filter is provided, the
messages sent in any connected mediums will be included.

## Request body

- MetricRequest
  - `channelIds` string[]
  - `teamIds` string[]
  - `mediumId` 'fb' | 'twit' | 'instagram' | 'rtm' | 'whatsapp' | 'linkedin': Filter by medium identifier
  - `groupBy` 'CHANNEL' | 'OWNER' | 'TOPIC' | 'TEAM'
  - `status` 'NEW' | 'PENDING', required

## Response `200`

Success

- union
  - NumberMetricResponse
    - `value` integer
  - GroupedMetricResponse
    - `value` object

## Other responses

- `401`: Unauthorized: when using an invalid or expired access token.

---

[API](https://skmtc.dev/hootsuite/apis/hootsuite-rest-api.md) - [All operations](https://skmtc.dev/hootsuite/apis/hootsuite-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hootsuite/apis/hootsuite-rest-api/revisions/adac53bd28bb?raw)
