You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8a76b14
Browse filesBrowse the repository at this point in the historyBrowse files
**A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
192
192
193
193
**A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished message — typically one BLOCKED for insufficient balance — back through the send pipeline. It is a new attempt, not a free retry: every policy runs again, the message is billed again, and its status webhooks fire again. A FILTERED message is never resendable.
194
+
195
+
**A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free, fires `message.cancelled`, and is final — a cancelled message cannot be resent.
**A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
496
498
497
499
**A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished message — typically one BLOCKED for insufficient balance — back through the send pipeline. It is a new attempt, not a free retry: every policy runs again, the message is billed again, and its status webhooks fire again. A FILTERED message is never resendable.
500
+
501
+
**A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free, fires `message.cancelled`, and is final — a cancelled message cannot be resent.
498
502
"""
499
503
from .resources.messagesimportAsyncMessagesResource
**A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
742
746
743
747
**A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished message — typically one BLOCKED for insufficient balance — back through the send pipeline. It is a new attempt, not a free retry: every policy runs again, the message is billed again, and its status webhooks fire again. A FILTERED message is never resendable.
748
+
749
+
**A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free, fires `message.cancelled`, and is final — a cancelled message cannot be resent.
744
750
"""
745
751
from .resources.messagesimportMessagesResourceWithRawResponse
**A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
869
875
870
876
**A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished message — typically one BLOCKED for insufficient balance — back through the send pipeline. It is a new attempt, not a free retry: every policy runs again, the message is billed again, and its status webhooks fire again. A FILTERED message is never resendable.
877
+
878
+
**A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free, fires `message.cancelled`, and is final — a cancelled message cannot be resent.
871
879
"""
872
880
from .resources.messagesimportAsyncMessagesResourceWithRawResponse
**A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
996
1004
997
1005
**A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished message — typically one BLOCKED for insufficient balance — back through the send pipeline. It is a new attempt, not a free retry: every policy runs again, the message is billed again, and its status webhooks fire again. A FILTERED message is never resendable.
1006
+
1007
+
**A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free, fires `message.cancelled`, and is final — a cancelled message cannot be resent.
998
1008
"""
999
1009
from .resources.messagesimportMessagesResourceWithStreamingResponse
**A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
1123
1133
1124
1134
**A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished message — typically one BLOCKED for insufficient balance — back through the send pipeline. It is a new attempt, not a free retry: every policy runs again, the message is billed again, and its status webhooks fire again. A FILTERED message is never resendable.
1135
+
1136
+
**A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free, fires `message.cancelled`, and is final — a cancelled message cannot be resent.
1125
1137
"""
1126
1138
from .resources.messagesimportAsyncMessagesResourceWithStreamingResponse
Copy file name to clipboardExpand all lines: src/sent_dm/resources/messages.py
+14-8Lines changed: 14 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ class MessagesResource(SyncAPIResource):
34
34
**A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
35
35
36
36
**A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished message — typically one BLOCKED for insufficient balance — back through the send pipeline. It is a new attempt, not a free retry: every policy runs again, the message is billed again, and its status webhooks fire again. A FILTERED message is never resendable.
37
+
38
+
**A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free, fires `message.cancelled`, and is final — a cancelled message cannot be resent.
37
39
"""
38
40
39
41
@cached_property
@@ -110,10 +112,11 @@ def retrieve_status(
110
112
111
113
Includes delivery
112
114
status, timestamps, and error information if applicable. A message that is or
113
-
was held for a later time (a send you scheduled with scheduled_at, or a
114
-
quiet-hours hold) is returned as a ScheduledMessageResponse: the same fields
115
-
plus scheduled_at, the release instant in UTC. A message sent immediately has no
116
-
scheduled_at key.
115
+
was held for a later time (a send you scheduled with scheduled_at, a quiet-hours
116
+
hold, or a message you cancelled while it was held) is returned as a
117
+
ScheduledMessageResponse: the same fields plus scheduled_at, the instant it is
118
+
held for in UTC — or, on a CANCELLED message, the instant that was called off. A
119
+
message sent immediately has no scheduled_at key.
117
120
118
121
Args:
119
122
extra_headers: Send extra headers
@@ -270,6 +273,8 @@ class AsyncMessagesResource(AsyncAPIResource):
270
273
**A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
271
274
272
275
**A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished message — typically one BLOCKED for insufficient balance — back through the send pipeline. It is a new attempt, not a free retry: every policy runs again, the message is billed again, and its status webhooks fire again. A FILTERED message is never resendable.
276
+
277
+
**A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free, fires `message.cancelled`, and is final — a cancelled message cannot be resent.
273
278
"""
274
279
275
280
@cached_property
@@ -346,10 +351,11 @@ async def retrieve_status(
346
351
347
352
Includes delivery
348
353
status, timestamps, and error information if applicable. A message that is or
349
-
was held for a later time (a send you scheduled with scheduled_at, or a
350
-
quiet-hours hold) is returned as a ScheduledMessageResponse: the same fields
351
-
plus scheduled_at, the release instant in UTC. A message sent immediately has no
352
-
scheduled_at key.
354
+
was held for a later time (a send you scheduled with scheduled_at, a quiet-hours
355
+
hold, or a message you cancelled while it was held) is returned as a
356
+
ScheduledMessageResponse: the same fields plus scheduled_at, the instant it is
357
+
held for in UTC — or, on a CANCELLED message, the instant that was called off. A
0 commit comments