API Reference

Conversations

Get conversation

Returns one conversation in real time. Pass conversation_id as a query parameter (equal to the value returned by List conversations). The response always includes conversation_id / type / title / avatar_url (empty string when missing) plus type-specific fields such as members_count for groups; returns 404 when the conversation cannot be found.

GEThttps://api.unifyport.ai/v1/accounts/{account_id}/conversations/info

Before you call

Use a server-side X-Api-Key for the workspace that owns the resource. Replace every placeholder before running a sample.

Prepare your parameters
account_id
Use data.id from account creation or an account query. Account identifiers belong to the workspace selected by X-Api-Key. Get account
conversation_id
Conversation to look up — the value returned as conversation_id by List conversations.

Request parameters

Headers

X-Api-Key
stringrequired

Workspace API key. The workspace is resolved from this header.

Path parameters

account_id
stringrequired

Identifier used in the conversations route.

Query parameters

conversation_id
stringrequired

Conversation to look up — the value returned as conversation_id by List conversations.

type
string

Conversation type (user, group, or channel) to disambiguate the lookup.

enum: user, group, channel

Request body

This endpoint does not require a JSON request body.

Understand the result

Use the documented response fields and HTTP status. Successful 204 responses have no body; use X-Request-Id for diagnosis. Follow the related operations for the next step.

Response 200 OK

{
  "request_id": "<REQUEST_ID>",
  "data": {
    "conversation_id": "peer_example",
    "type": "group",
    "title": "Group title",
    "avatar_url": "",
    "description": "...",
    "unread_count": 0,
    "members_count": 42
  }
}

Response body

conversation_id
string

Conversation identifier. Use it as the target when sending messages or calling conversation routes.

type
string

Standard conversation type: user, group, or channel. WhatsApp community announcement groups continue to use group.

enum: user, group, channel

title
string

Display title of the conversation.

username
string

Provider username for the conversation, when available.

avatar_url
string

Avatar URL, or an empty string when none is set.

description
string

Group or channel description, when available.

last_message_at
string

RFC3339 timestamp of the most recent message.

format: date-time

last_message_text
string

Text preview of the most recent message, when available.

unread_count
integer

Number of unread messages in the conversation.

format: int64

members_count
integer

Number of members; returned for group conversations.

format: int64

subscribers_count
integer

Subscriber count for channel-style conversations, when available.

format: int64

is_pinned
boolean

Whether the connected account pinned the conversation.

is_muted
boolean

Whether the connected account muted the conversation.

created_at
string

Provider-reported conversation creation time, when available.

format: date-time

extra
object

Provider-specific fields. WhatsApp group conversations may include announcement-group classification; conversation lists do not guarantee that classification is available.

is_announcement_group
boolean

Only for WhatsApp groups. true confirms a community announcement group; false means the current data confirms the announcement-group criteria are not met. Missing means unknown; null is never returned. This classification does not indicate that the current account can send messages.

Responses

200

200 OK

Request succeeded. See the example response body.

400

Bad Request

The request body, path, or parameters are invalid.

401

Unauthorized

The X-Api-Key header is missing or invalid.

404

Not Found

The requested provider resource could not be found.

409

Conflict

The requested operation conflicts with an existing provider account or resource.

500

Internal Server Error

The service encountered an unexpected error.

501

Not Implemented

The selected provider does not implement this operation.

502

Bad Gateway

The provider adapter or upstream provider could not complete the operation.

If the request fails

Inspect HTTP status and error.code/numeric_code, and keep request_id for diagnosis. Correct invalid parameters, complete required authorization or check runtime state as appropriate. Confirm the outcome before retrying a send or another write. Error reference

invalid_request · 10000 · 400
Check required fields, formats and channel conditions, then correct the request.
invalid_api_key · 11001 · 401
Check X-Api-Key and whether the workspace is active.