Skip to main content
POST
/
api
/
v2
/
communication
/
letters
Python
from samplehc import SampleHealthcare

client = SampleHealthcare(
    api_key="My API Key",
)
response = client.v2.communication.send_letter(
    document={
        "id": "id",
        "file_name": "fileName",
    },
    to_address={
        "address": {
            "city": "city",
            "state": "state",
            "street_lines": ["string"],
            "zip_code": "zipCode",
        },
        "name": "name",
    },
)
print(response.tracking_id)
{
  "trackingId": "<string>"
}

Headers

Idempotency-Key
string

A unique identifier for the request. If the same request is sent with the same idempotency key, it will be ignored.

Body

application/json
document
object
required

The document to send

toAddress
object
required
fromAddress
object

Optional sender address (defaults to Sample Healthcare)

metadata
object

Optional metadata to include with the letter

Response

Letter sent successfully

trackingId
string
required

The letter ID for tracking the mail delivery

I