---
title: "Incoming messages of a workspace"
method: GET
path: "/api/v1/workspaces/{workspaceId}/inbox"
tags: ["Messages"]
---

# Incoming messages of a workspace

`GET /api/v1/workspaces/{workspaceId}/inbox`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/workspaces/{workspaceId}/inbox`
- Auth: HTTP bearer

## Path parameters

- `workspaceId` integer, required

## Query parameters

- `cursor` string
- `limit` integer
- `slot_id` string: Only messages received by this slot

## Response `200`

OK

- InboxOutputBody
  - `items` InboundMessageBody[], nullable, required
    - `contact_name` string, required: Name of the sender in the address book, empty if not saved
    - `from_phone` string, required
    - `id` string, uuid, required
    - `media` InboundMediaBody, required
      - `content_type` string, required
      - `duration_seconds` integer, nullable, required: Length of voice, audio and video messages, null for others
      - `size` integer, required: Bytes
      - `url` string, required: Signed link that needs no key and works for 72 hours after it was issued; the file is kept 7 days after it was received
    - `push_name` string, required: Name the sender set in their WhatsApp profile, empty when not shared
    - `received_at` string, date-time, required
    - `slot_id` string, required
    - `text` string, required: The text, or a note such as [photo] with the caption, or [voice message, 12 s], for other kinds
    - `transcript` string, nullable, required: Text of a voice message when transcription is on, otherwise null
    - `type` 'text' | 'voice' | 'audio' | 'image' | 'video' | 'document' | 'sticker' | 'location' | 'contact' | 'reaction' | 'other', required
  - `next_cursor` string, nullable, required

## Other responses

- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
