Jabee — ask a person on WhatsApp
v0.1.3Ask a person on WhatsApp and wait for the answer.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ask_person Ask a person to approve something on WhatsApp
Ask a named person to approve, reject or amend something, on WhatsApp, and wait for their answer. Use this before doing anything that is expensive or impossible to undo: issuing a refund, sending a quote, posting publicly, emailing a list, deleting data. The person gets buttons on their phone and can also reply with free text to amend what you proposed. Returns their decision, or the request id if nobody has answered yet.
| Parameter | Type | Description |
|---|---|---|
title * | string | The decision, in one line. 'Refund AED 450 to Sara'. |
allow_amendment | boolean | Offer an Edit button that asks for free text. Use it when the answer could reasonably be 'yes but change this' rather than only yes or no. |
body | string | Why you are asking, and anything they need in order to decide. |
expires_in_minutes | integer | How long the decision stays useful. Defaults to a day. |
external_id | string | Your own id for the thing being decided. Sending the same one twice returns the existing request rather than asking a second time, so a retry is safe. |
url | string | A link to the thing being decided. |
wait_seconds | integer | How long to wait for an answer before returning. Defaults to 120. Pass 0 to return immediately and poll with check_approval. |
check_approval Check whether a request has been answered
Read the current state of a request you asked earlier, by its id. Use this when ask_person returned while still pending.
| Parameter | Type | Description |
|---|---|---|
id * | string | The id ask_person gave you. |
tell_person Tell a person something on WhatsApp
Send a one-way notification to your own phone on WhatsApp: a build failed, an order shipped, a job finished. This reaches your own verified people, never your customers. Returns once it has been sent; it does not wait for a reply.
| Parameter | Type | Description |
|---|---|---|
title * | string | The headline, in one line. |
body | string | The detail. |
external_id | string | Your own id, so a retry does not send it twice. |
url | string | A link to the thing. |