Messages

Messages belong to Conversations and can include media (video, audio) and/or text messages.

Create a message

A text-only message, or a message created from a message template (the template can have video, audio, and/or text).

Create a text-only message or template-based message

POST https://app.clarityflow.com/api/v1/messages/create_message

Query Parameters

NameTypeDescription

conversation_id*

integer

Pass the ID of the Conversation that this message will be added to.

text*

string

Pass the text for the content of the message. It can include HTML. If a full URL is included in the text, it will be automatically converted to a link.

message_template_id

integer

Pass the ID of a message template to use as the content for this message. If the message template contains text, then this text would override the value you pass along with the text parameter. If the message template does not contain text, then any text you pass in the query parameter will be added to the message underneath the media player. The message will be attributed to the user who created this message template.

user_email

String

Email address of the user that this message should be attributed to. This user with this email address must be an owner or team member in the account. If blank, then the message will be posted anonymously.

internal

boolean

If true, then this message will be posted as an "internal" message, which is only visible to team members in the account. Internal messages are not visible to guests and non-logged-in users.

{
    "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": "<p>New Text Message</p><p>This is the second paragraph with <strong>bold text</strong>.</p><p>This URL will automatically link: https://google.com</p>",
    "message_template": null,
    "message_created_time": "2022-02-01 17:21:37.455575",
    "message_credated_time_nice": "February 2nd, 2022 05:21PM UTC",
}

Get messages

Get messages

GET https://app.clarityflow.com/api/v1/messages/get_messages

Query Parameters

NameTypeDescription

conversation_slug

String

If the conversation_slug is passed, then only messages from this conversation will be returned. If conversation_slug is not present, then messages from all conversationsn will be returned.

page

integer

A maximum of 50 messages will be returned starting from th most recently created message. To retrieve messages further back than 50, pass the page number.

date_time

yyyy-mm-dd

If date_time is passed, then only messages that were created after this date will be returned.

email

String

If email is passed, only messages authored by the user who has this email will be returned.

{
    "messages": [
        {
            "id": 1184,
            "conversation_id": 512,
            "message_type": "screen",
            "recorded_duration_seconds": 4,
            "author": {
                "id": 50,
                "email": "user@example.com",
                "name": "User"
            },
            "message_url": "https://awesomecompany.clarityflow.com/c/14c8ec4e530e129b6fe73ca81#message-1184",
            "embed_message_url": "https://awesomecompany.clarityflow.com/embeds/messages/Your_account/1184&show_author=true' id='zm-iframe' style='width:100%;min-height:400px;'></iframe><script src='http://localhost:3000/scripts/embed.js' async></script>",
            "download_media_url": "https://zipmessage.s3.amazonaws.com/14c8ec4e530e129b6fe73ca81?response-content-disposition=attachment%3B%20filename%3D%22recording.webm%22%3B%20filename%2A%3DUTF-8%27%27recording.webm&response-content-type=video%2Fwebm&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3ARUPDB3HFYUPVYV%2F20220103%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220103T113838Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=4ac76944b0efdf9d4c91b7cb313318f81ce094a13a8e695ca3577d43bef6d739",
            "text": "",
            "message_template": null,
            "message_created_time": "2022-02-01 17:21:37.455575",
            "message_credated_time_nice": "February 2nd, 2022 05:21PM UTC"
        },
        {
            "id": 1183,
            "conversation_id": 512,
            "message_type": "screen",
            "recorded_duration_seconds": 7,
            "author": {
                "id": 50,
                "email": "user@example.com",
                "name": "User"
            },
            "message_url": "https://awesomecompany.clarityflow.com/c/14c8ec4e530e129b6fe73ca81#message-1183",
            "embed_message_url": "https://awesomecompany.clarityflow.com/embeds/messages/Your_account/1183",
            "download_media_url": "https://zipmessage.s3.amazonaws.com/3nn3vc5mhcsvq58fciz0d7usamyd?response-content-disposition=attachment%3B%20filename%3D%22recording.webm%22%3B%20filename%2A%3DUTF-8%27%27recording.webm&response-content-type=video%2Fwebm&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3ARUPDB3HFYUPVYV%2F20220103%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220103T113838Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=7b32fc5fbf32d642808afa8c6fa20b63af30e639b84a9df0c722e78d01c65899",
            "text": "",
            "message_template": null,
            "message_created_time": "2022-02-01 17:21:37.455575",
            "message_credated_time_nice": "February 2nd, 2022 05:21PM UTC"
        }
    ],
    "pages": 1
}

Last updated