Sender IDs
Register and manage the sender IDs your messages go out on.
reqs = client.sender_ids.requirements()
print(reqs.eligibility.can_request)
print([r.name for r in reqs.countries])
usable = client.sender_ids.usable()
for sid in usable:
print(sid.name, sid.type, sid.is_default)
listed = client.sender_ids.list()
new_id = client.sender_ids.create(
name="MYBRAND",
country="TZ",
purpose="Marketing",
sample_message="Welcome to MYBRAND",
documents=[{"requirement_uid": "...", "filename": "doc.pdf", "content_base64": "..."}],
)
print(new_id.id, new_id.status)
one = client.sender_ids.get(new_id.id)
client.sender_ids.set_default(new_id.id)| Method | Endpoint |
|---|---|
sender_ids.requirements() | GET /sender-ids/requirements |
sender_ids.usable(*, provider) | GET /sender-ids/usable |
sender_ids.list() | GET /sender-ids |
sender_ids.create(...) | POST /sender-ids |
sender_ids.get(sender_id) | GET /sender-ids/{id} |
sender_ids.set_default(sender_id) | PUT /sender-ids/default |
Returned SenderID objects carry id, name, status, type, and is_default. Only usable sender IDs can appear in the sender/from field of a send.
Last updated on