Reply, forward, and keep a thread together

Threading is done for you from In-Reply-To, with the subject as the fallback for inbound mail. Reply and forward endpoints keep the conversation intact.

Mails.ai — Reply, forward, and keep a thread together

Every send and every inbound is grouped into a thread: by In-Reply-To where it points at a message we know, and for inbound mail by the subject of an open thread the sender is already in, where it does not. You do not have to track thread ids yourself — but you can, and they are stable.

One thread: the billing agent's payment reminder, the customer's reply under it with its authentication results, and the start of the agent's next message

Replying

POST /v1/messages/{id}/reply sends into the same thread as the message you name, with the right headers and subject already set. That is the endpoint your agent should call when it has read an inbound and decided what to say.

Forwarding

POST /v1/messages/{id}/forward passes a received message on to new recipients, keeping the original intact. Useful when the agent decides a human needs to see something.

Reading a thread

GET /v1/threads lists conversations; GET /v1/threads/{id} returns the full message history in order. In the dashboard, clicking a thread shows the same thing plus a one-click reply.

A thread's participants array is the set of addresses that have appeared in it. It is the fastest way to answer "has this person been in touch before?" without a search.

Browse your threads
Did this answer your question?
😞
😐
😁