Quickstart

This quickstart builds the smallest complete phone-system loop: create an action called Interested, receive the webhook when an agent applies it, then add a post-call disposition so the workflow has a required final classification.

You will finish with:

  • One action outcome agents can use during a call.
  • One webhook receiver that returns 2xx.
  • One disposition outcome that turns on the post-call disposition step.

Prerequisites

  • A Sailor API token.
  • A Smart List ID from the workspace you want to update.
  • An HTTPS endpoint that can receive POST requests.

1. List Existing Outcomes

Start by reading the current configuration.

$curl https://api.sailorhq.io/phone-system/outcomes \
> -H "Authorization: Bearer $SAILOR_API_TOKEN"

The response includes disposition_popup_enabled. It becomes true when at least one post-call disposition outcome is configured.

2. Create An Action Outcome

Action outcomes are available during a live call. They require a webhook_url because Sailor posts an event when the action runs.

$curl https://api.sailorhq.io/phone-system/outcomes \
> -X POST \
> -H "Authorization: Bearer $SAILOR_API_TOKEN" \
> -H "Idempotency-Key: $SAILOR_REQUEST_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "outcome_name": "Interested",
> "outcome_type": "action",
> "order": 10,
> "destination_type": "smart_list",
> "destination_id": "00000000-0000-4000-8000-000000000000",
> "webhook_url": "https://example.com/sailor/outcomes"
> }'

Sailor returns the created outcome and the current disposition_popup_enabled value.

1{
2 "ok": true,
3 "outcome": {
4 "outcome_id": "00000000-0000-4000-8000-000000000001",
5 "outcome_name": "Interested",
6 "outcome_type": "action",
7 "order": 10,
8 "destination_type": "smart_list",
9 "destination": {
10 "destination_type": "smart_list",
11 "destination_id": "00000000-0000-4000-8000-000000000000",
12 "destination_name": "Follow up"
13 },
14 "webhook_url": "https://example.com/sailor/outcomes",
15 "created_at": "2026-06-25T00:00:00.000Z",
16 "updated_at": "2026-06-25T00:00:00.000Z"
17 },
18 "disposition_popup_enabled": false
19}

3. Receive The Webhook

Your endpoint should accept a JSON body and return any 2xx status.

express-example.js
1import express from "express";
2
3const app = express();
4app.use(express.json());
5
6app.post("/sailor/outcomes", async (req, res) => {
7 const payload = req.body;
8
9 // Store or enqueue the event before returning 2xx.
10 console.log("Sailor outcome received", {
11 outcome: payload.outcome?.outcome_name,
12 call: payload.call?.call_id,
13 destination: payload.destination?.destination_type,
14 });
15
16 res.sendStatus(204);
17});
18
19app.listen(3000);

Do not wait on a slow CRM, email tool, or enrichment job before responding. Store the payload, return 2xx, then do slow downstream work asynchronously.

4. Add A Post-Call Disposition

Disposition outcomes are shown after a call. Use them for required post-call classification.

$curl https://api.sailorhq.io/phone-system/outcomes \
> -X POST \
> -H "Authorization: Bearer $SAILOR_API_TOKEN" \
> -H "Idempotency-Key: $SAILOR_REQUEST_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "outcome_name": "Not Qualified",
> "outcome_type": "disposition",
> "order": 20,
> "destination_type": "none"
> }'

After this, GET /phone-system/outcomes should return disposition_popup_enabled: true.

5. Verify The Loop

1

Confirm the outcome exists

Call GET /phone-system/outcomes and verify the new outcome is present.

2

Apply the outcome from Sailor

Use the phone-system workflow to apply the outcome to a call.

3

Check your receiver logs

Confirm your webhook endpoint received the outcome payload and returned a 2xx status.

4

Check destination behavior

If the outcome targets a Smart List, confirm the contacted person moved as expected.

Done When

CheckExpected result
GET /phone-system/outcomesReturns the new action and disposition.
disposition_popup_enabledtrue after the disposition exists.
Webhook receiverLogs the Sailor payload and returns 2xx.
Smart ListThe contacted person moves when the action is applied.

Next Steps