Spaces
Triggers

Your agent notices the moment it matters.

A trigger is something that happens in your chats: a message lands, a customer follows up, an account needs you. Tell your AI agent what to do when it does, and it handles it while you get on with your day.

A clay robot agent with a headset answering customer chats
How it works

Say it once. It just happens.

  1. 1

    Something happens

    A customer writes, a chat changes hands, or an account needs attention.

  2. 2

    Your agent hears right away

    Spaces tells it the moment it happens. No checking back, no waiting.

  3. 3

    It does what you asked

    It replies, takes a note, or hands the chat to you.

21 triggers

What your agent can react to.

Copy a line, paste it to your AI agent, and it takes it from there.

Messages

What people send, read, edit and react to.

A message arrives

Someone sends a message to one of your connected accounts.

Try saying

When a customer messages me, answer from my saved snippets, and hand anything about refunds or complaints to me.

A comment arrives

Someone comments on one of your posts.

Try saying

When someone comments with a question on my posts, reply with the answer or invite them to message me.

A send is confirmed

A message sent through Spaces was confirmed.

Try saying

After each message goes out, add a note to the customer record with what was sent.

A message is delivered

The platform reports that your message reached the person.

Try saying

Keep a note of which follow-ups have been delivered, and which have not after a day.

A message is read

The platform reports that your message was read.

Try saying

If a quote was read and nobody replied in two days, remind me to follow up.

Someone reacts

Someone reacts to a message.

Try saying

Treat a thumbs up on a booking confirmation as confirmed, and note it.

A message is edited

Someone edits a message they sent.

Try saying

If a customer edits their order message, update the order notes.

A message is deleted

Someone deletes a message.

Try saying

If a customer deletes a message, do not quote it back to them.
Conversations

When a chat moves between your agent and your team.

A chat goes to a person

A chat is handed to someone on your team.

Try saying

When a chat is handed to my team, send me a summary of what was asked so far.

A chat returns to your agent

A chat is handed back to your agent.

Try saying

When a chat comes back, pick up from my team’s last reply and carry on.

A draft needs approval

A message your agent wrote is waiting for a person to approve it.

Try saying

When a draft is waiting for approval, tell me what it says and ask whether to send it.
People

New followers and connection activity.

A new follower

Someone starts following an Instagram account you connected.

Try saying

When someone new follows me, send a short welcome message only if they have messaged us before.

An invitation is accepted

On LinkedIn, someone accepts an invitation your account sent.

Try saying

When someone accepts my invitation, thank them and ask what they are working on.

An invitation arrives

On LinkedIn, someone sends your account an invitation, when the platform reports it.

Try saying

When an invitation arrives with a note, tell me who it is from and what they wrote.
Accounts

When an account needs attention.

An account changes status

A connected account’s status changes.

Try saying

If an account needs reconnecting, tell me which one and how to fix it.

An account disconnects

A connected account loses its connection.

Try saying

If an account disconnects, pause what you were doing on it and message me the reconnect link.

An account reconnects

A disconnected account is connected again.

Try saying

When an account reconnects, catch up on messages that arrived while it was away.

An account rests

The platform asked Spaces to slow down, so the account rests until a set time.

Try saying

If an account is resting, stop sending on it until it resumes and tell me when that is.
Posts

What happens around your posts.

A post goes live

A post made through Spaces is published.

Try saying

When a post goes live, watch its comments for the first day and answer questions.
Workspace

Things about your workspace as a whole.

A card is needed

Your workspace needs a card to keep going.

Try saying

If a card is needed, tell me so I can add one before sending stops.

Your agent is not using Spaces

You connected accounts, but your AI agent is not using Spaces.

Try saying

If my agent has not used Spaces for a while, remind me what it can do for me.
Safe by default

Fast, and still in your hands.

01

Limits stay on

Everything your agent sends is paced and kept inside each account’s safe limits.

02

You stay in charge

Your agent can hand any chat to you, and can leave drafts waiting for your approval.

03

Conversations people start

Triggers tell your agent what happened. They never turn Spaces into a way to message strangers.

FAQ

Questions, answered.

01What is a trigger?

A trigger is something that happens in your chats, like a message arriving or a chat being handed to your team. You tell your AI agent what to do when it happens, and it does it straight away.

02Do I need to set anything up or write code?

No. Connect your accounts, then tell your AI agent what you want in your own words, like the examples above. Your agent does the setup.

03Can my agent message people who have not written to me?

No. Triggers tell your agent what happened. Anything it sends still follows the same limits and pacing as every other message, and Spaces is for conversations people start or people who expect to hear from you.

04What if my agent is switched off when something happens?

Spaces keeps recent events for 14 days, so an agent that comes back online can catch up on what it missed.

05Can I stay in charge?

Yes. Your agent can hand any chat to you, and it can leave drafts waiting for your approval before anything is sent.

06Is this the same as a webhook?

Under the hood, yes. If you build software and want the technical details, open the developer section below, or read the docs.

For developers Building your own? Webhooks, signatures and the event stream

Every trigger is also an event you can receive in your own software. Three ways, same events: register a webhook and Spaces posts each event to your server, read the event stream with GET /v1/events, or let an MCP client call wait_for_events.

Register a webhook

POST https://api.spacesos.com/v1/messaging/webhooks
Authorization: Bearer spc_live_...

{
  "url": "https://your-app.example.com/spaces",
  "events": ["message.received", "chat.handed_over"],
  "account_id": "acc_example"
}

What arrives

POST /your-webhook HTTP/1.1
Spacesos-Signature: t=1763000000,v1=5b1c0a7e...
Spacesos-Event-Id: 6f1d2c0e-3b2a-4c7e-9f4b-1a2b3c4d5e6f

{
  "id": "6f1d2c0e-3b2a-4c7e-9f4b-1a2b3c4d5e6f",
  "type": "message.received",
  "created_at": "2026-11-13T09:14:02Z",
  "account_id": "acc_example",
  "channel": "whatsapp",
  "data": {
    "chat_id": "chat_example",
    "message": {
      "id": "msg_example",
      "text": "Hi, is the blue one still in stock?",
      "is_sender": false,
      "sender": { "id": "usr_example", "name": "Priya" },
      "sent_at": "2026-11-13T09:14:01Z",
      "attachments": []
    }
  }
}

Check it came from Spaces

Every delivery is signed. Check the signature, and reject old timestamps, before your code acts.

import { createHmac, timingSafeEqual } from 'node:crypto';

// header: "t=<unix seconds>,v1=<hex>"
export function verify(header, rawBody, secret, maxAgeSeconds = 300) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const age = Math.abs(Date.now() / 1000 - Number(parts.t));
  if (!parts.t || !parts.v1 || age > maxAgeSeconds) return false;
  const expected = createHmac('sha256', secret).update(parts.t + '.' + rawBody).digest('hex');
  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1);
  return a.length === b.length && timingSafeEqual(a, b);
}

Failed deliveries are retried for about 24 hours. You can send a signed test event, list the past week of deliveries and redeliver one. Events: message.received, comment.received, message.sent, message.delivered, message.read, message.reaction, message.edited, message.deleted, chat.handed_over, chat.handed_back, approval.pending, follower.new, invitation.accepted, invitation.received, account.status, account.disconnected, account.reconnected, account.resting, post.published, billing.card_required, workspace.idle. The event stream carries 13 of them. Full details are in the docs.

Tell your agent what to watch for.