Webhooks

Webhooks are user configured HTTP callbacks that fire when an event occurs to send data to a location of your choosing.  In Textline, you have the ability to create webhooks so that you can be alerted to certain changes in your account.

To configure a webhook in Textline, login to your Textline account and head to Settings -> Tools & Integrations -> Developer API -> New Webhook (You will need to be an Admin or have a custom role with the "Update organization details" permission). On this page, you will select the type of webhook (the event that triggers the callback), enter in the URL for your HTTP target, and the method for sending the payload.

Below you will find a list of the webhooks, what they are, and a sample payload delivered anytime the webhook fires.

Conversation

New Customer Post

This webhook is triggered anytime a contact sends a message into your Textline account.

{"conversation": {
        "customer": {
                "avatar_url": "https://example.com/image.png",
                "blocked": false,
                "name": "Chuck Finley",
                "notes": null,
                "phone_number": "(222) 222-2222",
                "reachable": true,
                "tags": [
                    "foo",
                    "bar"
                    ],
                "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
                },
        "resolved": true,
        "uuid": "84a2c56f-6b79-4764-811d-90880e2757b4"
        },
    "post": {
        "attachments": [
                    {
                        "content_type": "image/jpeg",
                        "name": "my_photo.png",
                        "url": "https://example.com/image.png"
                    },
                ],
        "body": "hello world",
        "conversation_uuid": "84a2c56f-6b79-4764-811d-90880e2757b4",
        "created_at": 1493923935,
        "creator": {
                "name": "Chuck Finley",
                "type": "user"
                },
        "is_whisper": false,
        "marked_as_resolved": false,
        "transferred_to": {
                "avatar_url": "https://example.com/image.png",
                "name": "Chuck Finley",
                "on_call": true,
                "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
                },
        "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
        },
    "group": {
        "name": "Sales",
        "phone_number": "(222) 222-2222",
        "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
        }
    }

New Outbound Post

This webhook is triggered anytime a messages is sent from your Textline account.  This includes Agents, Automations, and Scheduled Messages, but not Surveys.

{"conversation": {
        "customer": {
                "avatar_url": "https://example.com/image.png",
                "blocked": false,
                "name": "Chuck Finley",
                "notes": null,
                "phone_number": "(222) 222-2222",
                "reachable": true,
                "tags": [
                    "foo",
                    "bar"
                    ],
                "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
                },
        "resolved": true,
        "uuid": "84a2c56f-6b79-4764-811d-90880e2757b4"
        },
    "post": {
        "attachments": [
                    {
                        "content_type": "image/jpeg",
                        "name": "my_photo.png",
                        "url": "https://example.com/image.png"
                    },
                ],
        "body": "hello world",
        "conversation_uuid": "84a2c56f-6b79-4764-811d-90880e2757b4",
        "created_at": 1493923935,
        "creator": {
                "name": "Chuck Finley",
                "type": "user"
                },
        "is_whisper": false,
        "marked_as_resolved": false,
        "transferred_to": {
                "avatar_url": "https://example.com/image.png",
                "name": "Chuck Finley",
                "on_call": true,
                "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
                },
        "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
        },
    "group": {
        "name": "Sales",
        "phone_number": "(222) 222-2222",
        "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
        }
    }

New Whisper

This webhook is triggered anytime an Agent sends a whisper in your Textline account.

{"conversation": {
        "customer": {
                "avatar_url": "https://example.com/image.png",
                "blocked": false,
                "name": "Chuck Finley",
                "notes": null,
                "phone_number": "(222) 222-2222",
                "reachable": true,
                "tags": [
                    "foo",
                    "bar"
                    ],
                "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
                },
        "resolved": true,
        "uuid": "84a2c56f-6b79-4764-811d-90880e2757b4"
        },
    "post": {
        "attachments": [
                    {
                        "content_type": "image/jpeg",
                        "name": "my_photo.png",
                        "url": "https://example.com/image.png"
                    },
                ],
        "body": "hello world",
        "conversation_uuid": "84a2c56f-6b79-4764-811d-90880e2757b4",
        "created_at": 1493923935,
        "creator": {
                "name": "Chuck Finley",
                "type": "user"
                },
        "is_whisper": true,
        "marked_as_resolved": false,
        "transferred_to": {
                "avatar_url": "https://example.com/image.png",
                "name": "Chuck Finley",
                "on_call": true,
                "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
                },
        "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
        },
    "group": {
        "name": "Sales",
        "phone_number": "(222) 222-2222",
        "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
        }
    }

Conversation Status Change

This webhook is triggered anytime the conversation's status changes.  This includes opening, re-opening, claiming, transferring, and resolving a conversation.

 {"conversation": {
        "customer": {
                "avatar_url": "https://example.com/image.png",
                "blocked": false,
                "name": "Chuck Finley",
                "notes": null,
                "phone_number": "(222) 222-2222",
                "reachable": true,
                "tags": [
                    "foo",
                    "bar"
                    ],
                "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
                },
        "resolved": true,
        "uuid": "84a2c56f-6b79-4764-811d-90880e2757b4"
        },
    "post": {
        "attachments": [
                    {
                        "content_type": "image/jpeg",
                        "name": "my_photo.png",
                        "url": "https://example.com/image.png"
                    },
                ],
        "body": "hello world",
        "conversation_uuid": "84a2c56f-6b79-4764-811d-90880e2757b4",
        "created_at": 1493923935,
        "creator": {
                "name": "Chuck Finley",
                "type": "user"
                },
        "is_whisper": false,
        "marked_as_resolved": false,
        "transferred_to": {
                "avatar_url": "https://example.com/image.png",
                "name": "Chuck Finley",
                "on_call": true,
                "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
                },
        "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
        },
    "group": {
        "name": "Sales",
        "phone_number": "(222) 222-2222",
        "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
        }
    }

Contact

Customer (Contact) Updated

This webhook is triggered anytime a contact in your account is created, has details added, or has their status changed.

{"customer": {
            "avatar_url": "https://example.com/image.png",
            "blocked": false,
            "archived": false,
            "name": "Chuck Finley",
            "notes": null,
            "phone_number": "(222) 222-2222",
            "reachable": true,
            "tags": [
                    "foo",
                    "bar"
                    ],
            "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
            }
    }

Account

User Status Change

This webhook is triggered anytime an Agent changes their status in your account.  The status is also referred to as the availability setting, which manages an agent's notifications.

{
"user": {
"avatar_url": "",
"name": "Chuck Finley",
"on_call": true,
"username": "Chuck",
"uuid": "b07e3e60-52cb-4161-bf18-d1d2d81803d7"
}
}

 

Need more help?

Text us at +1 (415) 849-4349 or email us at support@textline.com