Replies

List Replies

Every classified reply in the workspace, newest first, including the ones that get no draft (out of office, unsubscribe, bounce, ...). `sort` / `order` (RO-232) sort on the server: `created_at`, `received_at`, `category` or `lead` (name).

API key access

Needs the replies:read scope with an API key (ro_pat_...). A signed-in session uses the caller's role.
GET/api/v1/replies
AuthorizationBearer <token>

Access token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).

In: header

Query Parameters

category?Category

Repeat to match any of

lead_id?Lead Id
has_draft?Has Draft

Only replies with (true) / without (false) a draft.

needs_attention?Needs Attention

Only replies whose draft still waits for a person (true), or not (false).

since?Since

Classified at or after this time.

until?Until

Classified before this time.

sort?Sort

Sort by this field instead of newest first (then by id); the cursor of a sorted page only continues that sort.

order?Order

Direction of sort (nulls last).

Default"asc"
Value in"asc" | "desc"
cursor?Cursor

next_cursor of the previous page (at most 64 characters without sort).

limit?Limit
Default50
Range1 <= value <= 200

Header Parameters

X-Workspace-Id?X-Workspace-Id

Id of the workspace to act on (must be a member).

Response Body

curl -X GET "http://localhost:8000/api/v1/replies?category=interested&lead_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&has_draft=true&needs_attention=true&since=2019-08-24T14%3A15%3A22Z&until=2019-08-24T14%3A15%3A22Z&sort=created_at&order=asc&cursor=string&limit=50" \  -H "X-Workspace-Id: string"
{
  "items": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "lead_id": "9bddab70-98e6-43a9-8f32-c9788b9de0c0",
      "mailbox_message_id": "70110ef4-25a2-4117-84a9-a72d91bdd00a",
      "category": "interested",
      "confidence": 0,
      "angry": true,
      "objection_type": "string",
      "referral_contact": {
        "name": "string",
        "email": "string",
        "title": "string"
      },
      "return_date": "2019-08-24",
      "summary": "string",
      "actions": [
        "string"
      ],
      "prompt_id": "string",
      "model": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "lead": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string",
        "email": "string",
        "company_name": "string"
      },
      "received_at": "2019-08-24T14:15:22Z",
      "subject": "string",
      "snippet": "string",
      "draft": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "status": "pending"
      },
      "needs_attention": true
    }
  ],
  "next_cursor": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}