Webhooks
Jenny avatar
Written by Jenny
Updated over a week ago

Webhooks are user configured HTTP callbacks that fire when an event occurs to send data to a location of your choosing. In Textline, you can create webhooks to 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 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 to 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 message 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 a conversation 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.

{"webhook": "customer_updated",
"customer": {
"avatar_url": "https://example.com/image.png",
"blocked": false,
"archived": false,
"name": "Chuck Finley",
"notes": "",
"phone_number": "(222) 222-2222",
"facebook_id": null,
"instagram_id": null,
"reachable_by_sms": true,
"tags": [
"foo",
"bar"
],
"uuid": "a7fc8cf4-d3b9-47c5-be08-3ccf7bb805fa",
"custom_fields": {
"5214743d-d4e7-4ae0-a7b2-895a63abaeb1": "",
"6401e737-8844-4ceb-b1d8-365775994ed0": "",
"a330028f-79d7-4f95-a5b6-fbabb17aa881": ""
}
}
}

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 [email protected].

Did this answer your question?