Conversations

Conversations are an essential part of Oblic — they are the containers for the messages between you, your contacts, and groups. On this page, we’ll dive into the different conversation endpoints you can use to manage conversations programmatically. We'll look at how to query, create, update, and delete conversations.

The conversation model

The conversation model contains all the information about the conversations between you and your contacts. In addition, conversations can also be group-based with more than one contact, they can have a pinned message, and they can be muted.

Properties

  • ନାମ
    id
    ଟାଇପ୍ କରନ୍ତୁ |
    string
    ବର୍ଣ୍ଣନା

    Unique identifier for the conversation.

  • ନାମ
    contact_id
    ଟାଇପ୍ କରନ୍ତୁ |
    string
    ବର୍ଣ୍ଣନା

    Unique identifier for the other contact in the conversation.

  • ନାମ
    group_id
    ଟାଇପ୍ କରନ୍ତୁ |
    string
    ବର୍ଣ୍ଣନା

    Unique identifier for the group that the conversation belongs to.

  • ନାମ
    pinned_message_id
    ଟାଇପ୍ କରନ୍ତୁ |
    string
    ବର୍ଣ୍ଣନା

    Unique identifier for the pinned message.

  • ନାମ
    is_pinned
    ଟାଇପ୍ କରନ୍ତୁ |
    boolean
    ବର୍ଣ୍ଣନା

    Whether or not the conversation has been pinned.

  • ନାମ
    is_muted
    ଟାଇପ୍ କରନ୍ତୁ |
    boolean
    ବର୍ଣ୍ଣନା

    Whether or not the conversation has been muted.

  • ନାମ
    last_active_at
    ଟାଇପ୍ କରନ୍ତୁ |
    timestamp
    ବର୍ଣ୍ଣନା

    Timestamp of when the conversation was last active.

  • ନାମ
    last_opened_at
    ଟାଇପ୍ କରନ୍ତୁ |
    timestamp
    ବର୍ଣ୍ଣନା

    Timestamp of when the conversation was last opened by the authenticated user.

  • ନାମ
    created_at
    ଟାଇପ୍ କରନ୍ତୁ |
    timestamp
    ବର୍ଣ୍ଣନା

    Timestamp of when the conversation was created.

  • ନାମ
    archived_at
    ଟାଇପ୍ କରନ୍ତୁ |
    timestamp
    ବର୍ଣ୍ଣନା

    Timestamp of when the conversation was archived.


GET/v1/conversations

List all conversations

This endpoint allows you to retrieve a paginated list of all your conversations. By default, a maximum of ten conversations are shown per page.

Optional attributes

  • ନାମ
    limit
    ଟାଇପ୍ କରନ୍ତୁ |
    integer
    ବର୍ଣ୍ଣନା

    Limit the number of conversations returned.

  • ନାମ
    muted
    ଟାଇପ୍ କରନ୍ତୁ |
    boolean
    ବର୍ଣ୍ଣନା

    Only show conversations that are muted when set to true.

  • ନାମ
    archived
    ଟାଇପ୍ କରନ୍ତୁ |
    boolean
    ବର୍ଣ୍ଣନା

    Only show conversations that are archived when set to true.

  • ନାମ
    pinned
    ଟାଇପ୍ କରନ୍ତୁ |
    boolean
    ବର୍ଣ୍ଣନା

    Only show conversations that are pinned when set to true.

  • ନାମ
    group_id
    ଟାଇପ୍ କରନ୍ତୁ |
    string
    ବର୍ଣ୍ଣନା

    Only show conversations for the specified group.

Request

GET
/v1/conversations
curl -G https://api.oblic.app/external/conversations \
  -H "Authorization: Bearer {token}" \
  -d limit=10

Response

{
  "has_more": false,
  "data": [
    {
      "id": "xgQQXg3hrtjh7AvZ",
      "contact_id": "WAz8eIbvDR60rouK",
      "group_id": null,
      "pinned_message_id": null,
      "is_pinned": false,
      "is_muted": false,
      "last_active_at": 705103200,
      "last_opened_at": 705103200,
      "created_at": 692233200,
      "archived_at": null
    },
    {
      "id": "hSIhXBhNe8X1d8Et"
      // ...
    }
  ]
}

POST/v1/conversations

Create a conversation

This endpoint allows you to add a new conversation between you and a contact or group. A contact or group id is required to create a conversation.

Required attributes

  • ନାମ
    contact_id
    ଟାଇପ୍ କରନ୍ତୁ |
    string
    ବର୍ଣ୍ଣନା

    Unique identifier for the other contact in the conversation.

  • ନାମ
    group_id
    ଟାଇପ୍ କରନ୍ତୁ |
    string
    ବର୍ଣ୍ଣନା

    Unique identifier for the group that the conversation belongs to.

Request

POST
/v1/conversations
curl https://api.oblic.app/external/conversations \
  -H "Authorization: Bearer {token}" \
  -d 'contact_id'="WAz8eIbvDR60rouK"

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "contact_id": "WAz8eIbvDR60rouK",
  "group_id": null,
  "pinned_message_id": null,
  "is_pinned": false,
  "is_muted": false,
  "last_active_at": null,
  "last_opened_at": null,
  "created_at": 692233200,
  "archived_at": null
}

GET/v1/conversations/:id

Retrieve a conversation

This endpoint allows you to retrieve a conversation by providing the conversation id. Refer to the list at the top of this page to see which properties are included with conversation objects.

Request

GET
/v1/conversations/xgQQXg3hrtjh7AvZ
curl https://api.oblic.app/external/conversations/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}"

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "contact_id": "WAz8eIbvDR60rouK",
  "group_id": null,
  "pinned_message_id": null,
  "is_pinned": false,
  "is_muted": false,
  "last_active_at": 705103200,
  "last_opened_at": 705103200,
  "created_at": 692233200,
  "archived_at": null
}

PUT/v1/conversations/:id

Update a conversation

This endpoint allows you to perform an update on a conversation. Examples of updates are pinning a message, muting or archiving the conversation, or pinning the conversation itself.

Optional attributes

  • ନାମ
    pinned_message_id
    ଟାଇପ୍ କରନ୍ତୁ |
    string
    ବର୍ଣ୍ଣନା

    Unique identifier for the pinned message.

  • ନାମ
    is_pinned
    ଟାଇପ୍ କରନ୍ତୁ |
    boolean
    ବର୍ଣ୍ଣନା

    Whether or not the conversation has been pinned.

  • ନାମ
    is_muted
    ଟାଇପ୍ କରନ୍ତୁ |
    boolean
    ବର୍ଣ୍ଣନା

    Whether or not the conversation has been muted.

  • ନାମ
    archived_at
    ଟାଇପ୍ କରନ୍ତୁ |
    timestamp
    ବର୍ଣ୍ଣନା

    Timestamp of when the conversation was archived.

Request

PUT
/v1/conversations/xgQQXg3hrtjh7AvZ
curl -X PUT https://api.oblic.app/external/conversations/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}" \
  -d 'is_muted'=true

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "contact_id": "WAz8eIbvDR60rouK",
  "group_id": null,
  "pinned_message_id": null,
  "is_pinned": false,
  "is_muted": true,
  "last_active_at": 705103200,
  "last_opened_at": 705103200,
  "created_at": 692233200,
  "archived_at": null
}

DELETE/v1/conversations/:id

Delete a conversation

This endpoint allows you to delete your conversations in Oblic. Note: This will permanently delete the conversation and all its messages — archive it instead if you want to be able to restore it later.

Request

DELETE
/v1/conversations/xgQQXg3hrtjh7AvZ
curl -X DELETE https://api.oblic.app/external/conversations/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}"
ଏହି ପୃଷ୍ଠାଟି ସାହାଯ୍ୟକାରୀ ଥିଲା କି?

Note: This page is not yet available in your language. Showing English version.