Conversation Events Webhooks

Learn how to send a webhook when something happens in an Inbox conversation, choose the events, and read the request body.

A Conversation events webhook sends a request to your endpoint whenever something happens in a TextPeak Inbox conversation, such as a customer reply, an assignment, or a new tag. Use it to update your CRM or helpdesk, alert a team, or record conversation activity in your own database.

Events you can receive

When you set up the webhook, you choose which of these events it sends.

EventtypeSent when
Conversation startedconversation.startedA new conversation starts.
Customer repliedconversation.customer_repliedThe contact sends a message.
Agent repliedconversation.agent_repliedAn agent sends a message.
Internal note addedconversation.note_addedAn agent adds an internal note.
Assignedconversation.assignedThe conversation is assigned.
Unassignedconversation.unassignedThe conversation is unassigned.
Closedconversation.closedThe conversation is closed.
Reopenedconversation.reopenedA closed conversation is reopened.
Tag addedconversation.tag_addedA tag is added to the conversation.
Tag removedconversation.tag_removedA tag is removed from the conversation.

Creating a conversation events webhook

Open Webhook Management

In the main TextPeak menu, expand Webhooks and click Management.

Screenshot of the Webhooks tab in the TextPeak main menu, expanded to show Management and Requests Log

Webhooks > Management tab

Add a webhook

Click Add webhook. The Create new webhook page opens.

Name the webhook

In Webhook name, enter a name that helps you find the webhook later.

Select the trigger

In Trigger, select Conversation events.

Screenshot of the Trigger list on the Create new webhook page with Conversation events highlighted

Trigger list

Choose the events

Under Events to send, select each event you want to receive. Request Preview stays empty until you select at least one event.

Screenshot of the Events to send checkboxes with Conversation started, Customer replied, Assigned, Closed, and Tag added selected

Events to send

Limit it to streams

Optionally, in Filter Stream, select the channels the webhook covers, such as a WebChat or WhatsApp channel. By default, it covers All streams. To select every channel at once or start over, click Select All or Clear All at the top of the list.

Set the endpoint

Under Endpoint Configuration, enter the URL of your endpoint. Conversation events are always sent with POST. If your endpoint expects headers, such as an authorization token, enter a Key and a Value for each, and click Add more to add another.

Screenshot of Endpoint Configuration with an endpoint URL and an Authorization header

Endpoint Configuration with an authorization header

Check the request body

In Request Preview, select an event in Example for to see the body TextPeak sends for it. The list shows only the events you selected.

Screenshot of Request Preview with the Example for list open, showing only the selected events

Example for in Request Preview

Create the webhook

Click create webhook.

Screenshot of the Create new webhook page with the Conversation events trigger, selected events, endpoint URL, and the Request Preview for Conversation started

The completed Create new webhook page

To turn the webhook off, test it, edit it, or delete it, see the Working With Webhooks page.

Request body

Every event is sent as a JSON body with the same envelope.

FieldWhat it holds
idThe unique ID of the event.
typeThe event type, for example conversation.started.
created_atWhen the event happened, in UTC.
delivery_attemptWhich delivery attempt this request is.
actorWho caused the event: its type (for example, customer or agent), id (for an agent, their email address), and name.
data.conversationThe conversation: its id, status, stream_id, channel, contact (phone and name), agent, team, and tags. Tags are sent as tag keys, not tag names.

Each event adds its own fields to data:

Event typeFields added to data
conversation.startedmessage (the first message: id, type, and text) and started_by
conversation.customer_replied, conversation.agent_repliedmessage
conversation.note_addednote, with the note text
conversation.assigned, conversation.unassignedassignment, with kind (for example, agent), from, and to
conversation.closedclosed_by
conversation.reopenedreopened_by
conversation.tag_added, conversation.tag_removedtag

Sample bodies by event

Select an event to see the body TextPeak sends for it. These are the samples TextPeak shows in Request Preview. Fields with no value, such as an agent's name or the from of a first assignment, are sent as null.

{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.started",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "customer",
    "id": null,
    "name": "Sample Contact"
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "active",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": "[email protected]",
      "team": "sample-team",
      "tags": [
        "refund"
      ]
    },
    "message": {
      "id": "sample-message-1",
      "type": "text",
      "text": "Hello, this is a sample message."
    },
    "started_by": "customer"
  }
}
{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.customer_replied",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "customer",
    "id": null,
    "name": "Sample Contact"
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "active",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": "[email protected]",
      "team": "sample-team",
      "tags": [
        "refund"
      ]
    },
    "message": {
      "id": "sample-message-1",
      "type": "text",
      "text": "Hello, this is a sample message."
    }
  }
}
{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.agent_replied",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "agent",
    "id": "[email protected]",
    "name": null
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "active",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": "[email protected]",
      "team": "sample-team",
      "tags": [
        "refund"
      ]
    },
    "message": {
      "id": "sample-message-1",
      "type": "text",
      "text": "Hello, this is a sample message."
    }
  }
}
{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.note_added",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "agent",
    "id": "[email protected]",
    "name": null
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "active",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": "[email protected]",
      "team": "sample-team",
      "tags": [
        "refund"
      ]
    },
    "note": {
      "text": "This is a sample internal note."
    }
  }
}
{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.assigned",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "agent",
    "id": "[email protected]",
    "name": null
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "active",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": "[email protected]",
      "team": "sample-team",
      "tags": [
        "refund"
      ]
    },
    "assignment": {
      "kind": "agent",
      "from": null,
      "to": "[email protected]"
    }
  }
}
{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.unassigned",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "agent",
    "id": "[email protected]",
    "name": null
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "active",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": null,
      "team": "sample-team",
      "tags": [
        "refund"
      ]
    },
    "assignment": {
      "kind": "agent",
      "from": "[email protected]",
      "to": null
    }
  }
}
{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.closed",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "agent",
    "id": "[email protected]",
    "name": null
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "closed",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": "[email protected]",
      "team": "sample-team",
      "tags": [
        "refund"
      ]
    },
    "closed_by": "agent"
  }
}
{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.reopened",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "agent",
    "id": "[email protected]",
    "name": null
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "active",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": "[email protected]",
      "team": "sample-team",
      "tags": [
        "refund"
      ]
    },
    "reopened_by": "agent"
  }
}
{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.tag_added",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "agent",
    "id": "[email protected]",
    "name": null
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "active",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": "[email protected]",
      "team": "sample-team",
      "tags": [
        "refund"
      ]
    },
    "tag": "refund"
  }
}
{
  "id": "053b1bbc-9bda-5e35-b967-85a8cd686798",
  "type": "conversation.tag_removed",
  "created_at": "2026-01-01T09:00:00Z",
  "delivery_attempt": 1,
  "actor": {
    "type": "agent",
    "id": "[email protected]",
    "name": null
  },
  "data": {
    "conversation": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "active",
      "stream_id": "sample-stream",
      "channel": "whatsapp_business",
      "contact": {
        "phone": "15550100000",
        "name": "Sample Contact"
      },
      "agent": "[email protected]",
      "team": "sample-team",
      "tags": []
    },
    "tag": "refund"
  }
}

Checking the requests TextPeak sent

Every request appears in Webhooks > Request Log, with the time it was sent, the status your endpoint returned, and the trigger. Click View in a row to see the URL and the body TextPeak sent. For details, see the Request Log page.


Did this page help you?