Spaces

What is a webhook?

A webhook is a message one service sends automatically to another's web address the moment something happens, such as a new customer message arriving.

In plain words

Without webhooks, software has to keep asking "anything new?" every few minutes. With a webhook, the service tells you straight away. You give it a web address, choose which events you care about, and it sends a short notice there each time one happens.

Webhooks are how many businesses connect tools together: a new message could create a lead in your sales system, a sign-out could alert your team, or a handed-over chat could ping a colleague.

Each notice is usually signed with a secret, so the receiving system can check it really came from the service. Most owners never set one up by hand. A developer, or a tool you already use, does it once.

Webhooks are one-way: they tell another system that something happened, and that system decides what to do. If the receiving system is down, a good service tries again later and keeps a record of what it sent, so nothing is lost. It is also worth knowing that a notice can occasionally arrive twice, which is why each one carries an id the receiving system can check.

How it works in Spaces

Spaces webhooks can announce new messages, reads, deliveries, edits, reactions, comments, account status changes, disconnections and reconnections, sent messages, published posts, approvals waiting, and chats handed over or back. Each notice is signed, and a repeated delivery of the same event is not a second message.

You can send a test notice, see the past week of deliveries and send one again. Which plans include webhooks is shown on the pricing page.

Related terms

FAQ

Do I need webhooks to use Spaces?

No. Your AI agent works without them. Webhooks are for connecting Spaces to your other systems.

Can a webhook tell me when an account is signed out?

Yes. Spaces sends an event when an account is disconnected, with the reason, and another when it is working again.

How do I know a webhook really came from Spaces?

Each one is signed with a secret you receive when you create it, so your system can check it.

What if my server missed a webhook?

You can see the past week of deliveries and send any of them again.

Do webhooks contain message text?

A new message event carries the message. A redelivered message event has its text removed, and your system reads the message instead.

Useful next: Webhooks in the docs, Pricing, Reconnect an account after a sign-out. Every term: the glossary.