---
title: "Messages exchanged with one phone, oldest first"
method: GET
path: "/api/v1/workspaces/{workspaceId}/conversations/{phone}"
tags: ["Messages"]
---

# Messages exchanged with one phone, oldest first

`GET /api/v1/workspaces/{workspaceId}/conversations/{phone}`

## Request

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

## Path parameters

- `workspaceId` integer, required
- `phone` string, required: Phone or saved contact name

## Query parameters

- `slot_id` string: Only messages through this number
- `limit` integer

## Response `200`

OK

- ThreadOutputBody
  - `messages` TurnBody[], nullable, required
    - `at` string, date-time, required
    - `by` 'api' | 'owner' | 'contact', required: api: sent through OTP Run; owner: the owner typed it on the phone; contact: the other person wrote it
    - `direction` 'sent' | 'received', required
    - `error_code` string, required
    - `id` string, 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: WhatsApp profile name of the sender of a received message
    - `slot_id` string: Number the message went through
    - `status` string, required
    - `text` string, required
    - `transcript` string, nullable, required: Text of a received voice message when transcription is on
    - `type` string, required: text, voice, audio, image, video, document, sticker, location, contact, reaction or other; messages from the phone history are text with media shown as a note
  - `name` string, required
  - `phone` string, required

## Other responses

- `404`: Not Found
- `409`: Conflict
- `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)
