Skip to main content

Communication Tools

Sunset provides integrated tools for communicating with financial institutions and handling legal documents. All tools are case-scoped and maintain a full audit trail.

Phone Tool

Make outbound calls to financial institutions via Twilio. Calls are automatically recorded, transcribed, and summarized by AI.

Initiate a Call

curl -X POST "https://api.example.com/v1/cases/{case_id}/phone-calls" \
  -H "Content-Type: application/json" \
  -d '{
    "to_number": "+11112223333",
    "institution_contact_id": "01K8IC04DJ3T10HRYE78AN7DDD",
    "notes": "Calling to request account closure forms."
  }'

What Happens After a Call

Once the call completes, the system automatically:
  1. Records the full call audio
  2. Transcribes the recording to text
  3. Summarizes the call with AI, extracting key outcomes
  4. Extracts action items from the conversation

Retrieve Call Details

curl "https://api.example.com/v1/cases/{case_id}/phone-calls/{call_id}"```

Response includes:
```json
{
  "data": {
    "id": "...",
    "to_number": "+11112223333",
    "status": "completed",
    "duration_seconds": 342,
    "recording_url": "https://recordings.example.com/...",
    "recording_status": "completed",
    "transcript": "Agent: Thank you for calling Chase...",
    "summary": "Called Chase estate services. Spoke with John Johnson. He confirmed they received the death certificate. Letters Testamentary are still needed before they can release account info. Ref# EST-2025-00456.",
    "action_items": [
      {
        "description": "Mail Letters Testamentary to Chase Estate Services",
        "completed": false
      },
      {
        "description": "Call back in 5-7 business days after mailing",
        "completed": false
      }
    ]
  }
}

Download Recording

curl "https://api.example.com/v1/cases/{case_id}/phone-calls/{call_id}/recording" \
  --output recording.mp3

Call Statuses

StatusDescription
initiatedCall request sent to Twilio
ringingPhone is ringing
in_progressCall is connected
completedCall ended normally
failedCall could not be completed
no_answerNo one answered
busyLine was busy
cancelledCall was cancelled before connecting

Email Tool

Send emails with forms and attachments from case documents. Delivery is tracked with read receipts.

Send an Email

curl -X POST "https://api.example.com/v1/cases/{case_id}/emails" \
  -H "Content-Type: application/json" \
  -d '{
    "to_addresses": ["estates@chase.com"],
    "subject": "Estate of John J. Johnson - Death Certificate and Account Closure Request",
    "body_text": "Dear Estate Services,\n\nPlease find attached the death certificate and account closure form for the estate of John J. Johnson.\n\nCase Reference: EST-2025-00456\n\nThank you.",
    "attachment_document_ids": [
      "01K5XB07CJ5T22HRYE78AN7DEF",
      "01K5XB08CJ5T33HRYE78AN7GHI"
    ],
    "institution_contact_id": "01K8IC04DJ3T10HRYE78AN7DDD"
  }'

Checking Delivery Status

curl "https://api.example.com/v1/cases/{case_id}/emails/{email_id}"```

### Email Receipt

Get the delivery receipt with provider-level details:

```bash
curl "https://api.example.com/v1/cases/{case_id}/emails/{email_id}/receipt"```

Response:
```json
{
  "data": {
    "email_id": "...",
    "message_id": "msg_01abc123def456",
    "provider": "sendgrid",
    "status": "delivered",
    "sent_at": "2025-10-15T14:30:00Z",
    "delivered_at": "2025-10-15T14:30:05Z",
    "opened_at": "2025-10-15T15:12:00Z"
  }
}

Email Statuses

StatusDescription
draftEmail created but not yet sent
queuedQueued for sending
sentSent to email provider
deliveredConfirmed delivered to recipient’s server
bouncedDelivery failed (invalid address, full inbox, etc.)
failedCould not be sent

Notarization Tool

Initiate online notarization sessions powered by DocuSign’s Notary API. Signers join a live video session with a commissioned notary.

Initiate Notarization

curl -X POST "https://api.example.com/v1/cases/{case_id}/notarizations" \
  -H "Content-Type: application/json" \
  -d '{
    "document_id": "01K5XB07CJ5T22HRYE78AN7DEF",
    "title": "Small Estate Affidavit - Notarization",
    "description": "Online notarization for Cache County probate filing.",
    "signers": [
      {
        "name": "John Jonas Johnson",
        "email": "john.johnson@example.com",
        "role": "signer"
      },
      {
        "name": "John Jonas Johnson",
        "email": "john.johnson@example.com",
        "role": "witness"
      }
    ]
  }'

Notarization Flow

Create request  ->  Status: pending_signer
                    (signers receive email with session link)

Signer joins    ->  Status: pending_notary
                    (waiting for notary to join)

Session starts  ->  Status: in_session
                    (live video notarization)

Notary stamps   ->  Status: completed
                    (notarized document available for download)

Download Notarized Document

curl "https://api.example.com/v1/cases/{case_id}/notarizations/{id}/download" \
  --output notarized_document.pdf

Notarization Statuses

StatusDescription
draftNot yet sent to signers
pending_signerWaiting for signers to join
pending_notarySigner ready, waiting for notary
in_sessionLive notarization session in progress
completedDocument notarized successfully
declinedA signer or notary declined
expiredSession expired before completion
failedTechnical failure

Fax Tool

One-click fax sending. Attach case documents and optionally include a cover page.

Send a Fax

curl -X POST "https://api.example.com/v1/cases/{case_id}/faxes" \
  -H "Content-Type: application/json" \
  -d '{
    "to_number": "+11112223333",
    "institution_contact_id": "01K8IC04DJ3T10HRYE78AN7DDD",
    "document_ids": [
      "01K5XB07CJ5T22HRYE78AN7DEF",
      "01K5XB08CJ5T33HRYE78AN7GHI"
    ],
    "cover_page": true,
    "cover_page_note": "Re: Estate of John J. Johnson. Please process enclosed death certificate and account closure form. Reference: EST-2025-00456."
  }'

Fax Receipt

Get the delivery receipt with confirmation details:
curl "https://api.example.com/v1/cases/{case_id}/faxes/{fax_id}/receipt"```

Response:
```json
{
  "data": {
    "fax_id": "...",
    "confirmation_number": "FAX-2025-1015-001",
    "pages_sent": 3,
    "duration_seconds": 45,
    "status": "confirmed",
    "remote_station_id": "CHASE FAX",
    "timestamp": "2025-10-15T14:35:00Z"
  }
}

Fax Statuses

StatusDescription
queuedFax queued for sending
sendingFax transmission in progress
deliveredFax confirmed delivered
failedDelivery failed (busy, no answer, error)
cancelledFax cancelled before sending