Conversations

Conversations in Clarityflow can contain one or several messages exchanged between multiple people.

Creating a new conversation

Create conversation.

POST https://app.clarityflow.com/api/v1/conversations/create_conversation

Creates a new conversation.

Request Body

{
    "id": 1,
    "title": "Test conversation",
    "slug": "096a594dd11759d1f6876d842",
    "public": true,
    "via_primary_intake_page": false,
    "intake_page_id": null,
    "conversation_url": "https://awesomecompany.clarityflow.com/c/096a594dd11759d1f6876d842",
    "conversation_embed_url": "https://awesomecompany.clarityflow.com/embeds/conversations/Your_account/096a594dd11759d1f6876d842",
    "anyone_can_post": true,
    "allow_anonymous_messages": true,
    "allow_search_engines": false,
    "tags": [],
    "users": [
        {
            "id": 1,
            "email": "user@example.com",
            "name": "User"
        }
    ],
    "messages": []
}

Get a conversation(s)

Get a single conversation

GET https://app.clarityflow.com/api/v1/conversations/get_conversation

Retrieves a single conversation the account. If neither title nor slug are passed, then this will return the most recently created conversation in the account.

Query Parameters

{
    "id": 547,
    "title": "January 3rd, 2022 Conversation",
    "slug": "77a41d5a8e71d5f64998348f6",
    "public": false,
    "via_primary_intake_page": false,
    "intake_page_id": null,
    "conversation_url": "https://awesomecompany.clarityflow.com/c/77a41d5a8e71d5f64998348f6",
    "conversation_embed_url": "https://awesomecompany.clarityflow.com/embeds/conversations/Your_account/77a41d5a8e71d5f64998348f6",
    "anyone_can_post": false,
    "allow_anonymous_messages": false,
    "allow_search_engines": false,
    "conversation_created_time": "2022-02-01 17:21:37.455575",
    "conversation_credated_time_nice": "February 2nd, 2022 05:21PM UTC",
    "tags": [],
    "users": [
        {
            "id": 50,
            "email": "user@example.com",
            "name": "User"
        }
    ],
    "messages": [],
    "workflow": {}
}

Get conversations

GET https://app.clarityflow.com/api/v1/conversations/get_conversations

Returns an array of conversations from the account.

Query Parameters

{
    "conversations": [
        {
            "id": 544,
            "title": "Test conversation",
            "slug": "096a594dd11759d1f6876d842",
            "public": true,
            "via_primary_intake_page": false,
            "intake_page_id": null,
            "conversation_url": "https://awesomecompany.clarityflow.com/c/096a594dd11759d1f6876d842",
            "conversation_embed_url": "https://awesomecompany.clarityflow.com/embeds/conversations/oz3jqo57/096a594dd11759d1f6876d842",
            "anyone_can_post": true,
            "allow_anonymous_messages": true,
            "allow_search_engines": false,
            "tags": [],
            "users": [
                {
                    "id": 50,
                    "email": "user@example.com",
                    "name": "User"
                }
            ],
            "messages": [
                {
                    "id": 1206,
                    "conversation_id": 544,
                    "message_type": "text",
                    "recorded_duration_seconds": 0,
                    "author": {
                        "anonymous": true
                    },
                    "message_url": "https://awesomecompany.clarityflow.com/c/096a594dd11759d1f6876d842#message-1206",
                    "embed_message_url": "https://awesomecompany.clarityflow.com/embeds/messages/Your_account/1206&show_author=true",
                    "download_media_url": null,
                    "text": "Create new text message 1"
                },
                {
                    "id": 1207,
                    "conversation_id": 544,
                    "message_type": "text",
                    "recorded_duration_seconds": 0,
                    "author": {
                        "anonymous": true
                    },
                    "message_url": "https://awesomecompany.clarityflow.com/c/096a594dd11759d1f6876d842#message-1207",
                    "embed_message_url": "https://awesomecompany.clarityflow.com/embeds/messages/Your_account/1207&show_author=true",
                    "download_media_url": null,
                    "text": "Create new text message 2"
                }
            ],
            "workflow": {}
        },
        {
            "id": 545,
            "title": "New conversation",
            "slug": "ecf2c8ba4b95724ca54cea439",
            "public": true,
            "via_primary_intake_page": false,
            "intake_page_id": null,
            "conversation_url": "https://awesomecompany.clarityflow.com/c/ecf2c8ba4b95724ca54cea439",
            "conversation_embed_url": "https://awesomecompany.clarityflow.com/embeds/conversations/Your_account/ecf2c8ba4b95724ca54cea439",
            "anyone_can_post": true,
            "allow_anonymous_messages": true,
            "allow_search_engines": false,
            "tags": [],
            "users": [
                {
                    "id": 50,
                    "email": "user@example.com",
                    "name": "User"
                }
            ],
            "messages": [],
            "workflow": {}
        }
  ]
}

Last updated