---
title: "Create a conversation"
method: POST
path: "/v1/messenger/{channel_id}/contacts/{contact_id}/conversations"
tags: ["Public Chat: Conversations"]
---

# Create a conversation

`POST /v1/messenger/{channel_id}/contacts/{contact_id}/conversations`

## Request

- Base URL: `https://api.oxvo.com`
- URL: `https://api.oxvo.com/v1/messenger/{channel_id}/contacts/{contact_id}/conversations`
- Auth: none required

Create a conversation

## Request body

- PublicConversationCreatePayload
  - `custom_attributes` object: Custom attributes of the conversation

## Response `200`

Success

- PublicConversation
  - `id` integer: Id of the conversation
  - `uuid` string: UUID of the conversation
  - `inbox_id` integer: The inbox id of the conversation
  - `contact_last_seen_at` integer: Timestamp of when the contact last seen the conversation (Unix timestamp)
  - `status` 'open' | 'resolved' | 'pending' | 'snoozed': The status of the conversation
  - `agent_last_seen_at` integer: Timestamp of when the agent last seen the conversation (Unix timestamp)
  - `messages` PublicMessage[]: Messages in the conversation
    - `id` integer: Id of the message
    - `content` string, nullable: Text content of the message. Can be null for attachment-only messages.
    - `message_type` integer: Denotes the message type. Possible values: 0 (incoming), 1 (outgoing), 2 (activity), 3 (template)
    - `content_type` string: Content type of the message
    - `content_attributes` object: Additional content attributes of the message
    - `created_at` integer: Created at Unix timestamp of the message
    - `conversation_id` integer: Display Id of the conversation the message belongs to
    - `attachments` PublicMessageAttachment[]: Attachments if any
      - `id` integer: Id of the attachment
      - `message_id` integer: Id of the parent message
      - `file_type` 'image' | 'audio' | 'video' | 'file' | 'location' | 'fallback' | 'share' | 'story_mention' | 'contact' | 'ig_reel' | 'ig_post' | 'ig_story' | 'embed': Type of the attached file
      - `account_id` integer: Id of the account
      - `extension` string, nullable: File extension
      - `data_url` string, nullable: URL of the file. Can be null when an attachment variant has no external URL.
      - `thumb_url` string: URL of the file thumbnail
      - `file_size` integer: File size in bytes
      - `width` integer, nullable: Width of the attachment when available
      - `height` integer, nullable: Height of the attachment when available
      - `coordinates_lat` number: Latitude for location attachments
      - `coordinates_long` number: Longitude for location attachments
      - `fallback_title` string, nullable: Fallback title for location, fallback, and contact attachments when available
      - `meta` object: Metadata for contact attachments
      - `transcribed_text` string: Transcribed text for audio attachments
    - `sender` PublicMessageSender: Polymorphic sender payload returned by push_event_data. Available fields vary by sender type.
      - `id` integer: Id of the sender
      - `name` string, nullable: Name of the sender when available
      - `avatar_url` string: Avatar URL of the sender. Present for senders of type user, agent_bot, and captain_assistant. Not present for contact senders (use thumbnail instead).
      - `thumbnail` string: Avatar/thumbnail URL of the sender. Contact senders use this field; user senders may also include it.
      - `type` 'contact' | 'user' | 'agent_bot' | 'captain_assistant': Type of the sender
      - `available_name` string, nullable: Display name for user senders
      - `availability_status` string, nullable: Availability status for user senders
      - `email` string, nullable: Email of the sender when the sender is a contact
      - `phone_number` string, nullable: Phone number of the sender when the sender is a contact
      - `identifier` string, nullable: Identifier of the sender when the sender is a contact
      - `blocked` boolean: Whether the sender is blocked when the sender is a contact
      - `additional_attributes` object, nullable: Additional attributes when the sender is a contact and available
      - `custom_attributes` object, nullable: Custom attributes when the sender is a contact and available
      - `description` string, nullable: Description when the sender is an OXVO AI assistant
      - `created_at` string, nullable: Created timestamp in ISO 8601 format when the sender is an OXVO AI assistant
  - `contact` PublicContactRecord: Full serialized contact record returned when the public API renders a Contact model directly.
    - `id` integer: Id of the contact
    - `name` string, nullable: Name of the contact when available
    - `email` string, nullable: Email of the contact
    - `phone_number` string, nullable: Phone number of the contact
    - `identifier` string, nullable: Identifier of the contact
    - `blocked` boolean: Whether the contact is blocked
    - `additional_attributes` object, nullable: Additional attributes of the contact when present
    - `custom_attributes` object, nullable: Custom attributes of the contact when present
    - `contact_type` string, nullable: Contact type of the contact when available
    - `country_code` string, nullable: Country code of the contact
    - `last_activity_at` string, nullable: Last activity timestamp of the contact in ISO 8601 format
    - `created_at` string, nullable: Created timestamp of the contact in ISO 8601 format
    - `updated_at` string, nullable: Updated timestamp of the contact in ISO 8601 format
    - `last_name` string, nullable: Last name of the contact
    - `middle_name` string, nullable: Middle name of the contact
    - `location` string, nullable: Location of the contact
    - `account_id` integer: Account id of the contact
    - `company_id` integer, nullable: Company id of the contact
    - `label_list` string[]: Labels applied to the contact

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/oxvo/apis/oxvo-apis.md) · [All operations](https://skmtc.dev/oxvo/apis/oxvo-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/oxvo/apis/oxvo-apis/revisions/9a8448cbd1fe?raw)
