Skip to content

Commit a492eb1

Browse files
author
stlc-bot
committed
feat(api)!: sync OpenAPI spec from production
Stainless-Generated-From: 1d999eb
1 parent 1f92e2b commit a492eb1

20 files changed

Lines changed: 256 additions & 35 deletions

‎api.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ from sent_dm.types.channels import (
415415
SMSMarket,
416416
SMSNumber,
417417
SMSNumberRequest,
418+
SuppliedCampaign,
418419
SuppliedCompliance,
419420
SuppliedDocument,
420421
)

‎src/sent_dm/_client.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def sender_profiles(self) -> SenderProfilesResource:
184184
185185
**Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone gives you a usable profile immediately, running on your identity, your inbox and your billing. Supply a capability's fields and the profile owns that one instead.
186186
187-
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or terminates through your shared routes.
187+
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or reaches only the countries Sent runs a shared route for, and the US is not one of them.
188188
189189
To act for a profile on any other resource, send `x-profile-id` with your organization key rather than looking for a parallel set of endpoints.
190190
"""
@@ -526,7 +526,7 @@ def sender_profiles(self) -> AsyncSenderProfilesResource:
526526
527527
**Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone gives you a usable profile immediately, running on your identity, your inbox and your billing. Supply a capability's fields and the profile owns that one instead.
528528
529-
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or terminates through your shared routes.
529+
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or reaches only the countries Sent runs a shared route for, and the US is not one of them.
530530
531531
To act for a profile on any other resource, send `x-profile-id` with your organization key rather than looking for a parallel set of endpoints.
532532
"""
@@ -810,7 +810,7 @@ def sender_profiles(self) -> sender_profiles.SenderProfilesResourceWithRawRespon
810810
811811
**Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone gives you a usable profile immediately, running on your identity, your inbox and your billing. Supply a capability's fields and the profile owns that one instead.
812812
813-
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or terminates through your shared routes.
813+
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or reaches only the countries Sent runs a shared route for, and the US is not one of them.
814814
815815
To act for a profile on any other resource, send `x-profile-id` with your organization key rather than looking for a parallel set of endpoints.
816816
"""
@@ -975,7 +975,7 @@ def sender_profiles(self) -> sender_profiles.AsyncSenderProfilesResourceWithRawR
975975
976976
**Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone gives you a usable profile immediately, running on your identity, your inbox and your billing. Supply a capability's fields and the profile owns that one instead.
977977
978-
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or terminates through your shared routes.
978+
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or reaches only the countries Sent runs a shared route for, and the US is not one of them.
979979
980980
To act for a profile on any other resource, send `x-profile-id` with your organization key rather than looking for a parallel set of endpoints.
981981
"""
@@ -1140,7 +1140,7 @@ def sender_profiles(self) -> sender_profiles.SenderProfilesResourceWithStreaming
11401140
11411141
**Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone gives you a usable profile immediately, running on your identity, your inbox and your billing. Supply a capability's fields and the profile owns that one instead.
11421142
1143-
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or terminates through your shared routes.
1143+
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or reaches only the countries Sent runs a shared route for, and the US is not one of them.
11441144
11451145
To act for a profile on any other resource, send `x-profile-id` with your organization key rather than looking for a parallel set of endpoints.
11461146
"""
@@ -1305,7 +1305,7 @@ def sender_profiles(self) -> sender_profiles.AsyncSenderProfilesResourceWithStre
13051305
13061306
**Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone gives you a usable profile immediately, running on your identity, your inbox and your billing. Supply a capability's fields and the profile owns that one instead.
13071307
1308-
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or terminates through your shared routes.
1308+
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or reaches only the countries Sent runs a shared route for, and the US is not one of them.
13091309
13101310
To act for a profile on any other resource, send `x-profile-id` with your organization key rather than looking for a parallel set of endpoints.
13111311
"""

‎src/sent_dm/resources/channels/rcs.py‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@ def create(
156156
agent_use_case: Which kind of traffic the agent carries. One of the accepted use cases; the
157157
error names the set.
158158
159+
- `VERIFICATION` - One-time passcodes and identity checks. Expects no reply, and
160+
is held to the strictest delivery review.
161+
- `NOTIFICATIONS` - Transactional updates the recipient asked for — orders,
162+
deliveries, appointments, account activity.
163+
- `MARKETING` - Promotional content. Requires the clearest opt-in evidence of
164+
the four, because the carriers review consent hardest here.
165+
- `MULTI_USE` - More than one of the above from a single agent. Vetted against
166+
the strictest use case it covers, so declare it only if you genuinely need one
167+
agent to do several jobs.
168+
159169
brand_color: Primary brand colour, as #RRGGBB. Three-digit shorthand is refused: the value is
160170
submitted verbatim, so two spellings of one colour is only a way for the stored
161171
value to disagree with the form.
@@ -379,6 +389,16 @@ async def create(
379389
agent_use_case: Which kind of traffic the agent carries. One of the accepted use cases; the
380390
error names the set.
381391
392+
- `VERIFICATION` - One-time passcodes and identity checks. Expects no reply, and
393+
is held to the strictest delivery review.
394+
- `NOTIFICATIONS` - Transactional updates the recipient asked for — orders,
395+
deliveries, appointments, account activity.
396+
- `MARKETING` - Promotional content. Requires the clearest opt-in evidence of
397+
the four, because the carriers review consent hardest here.
398+
- `MULTI_USE` - More than one of the above from a single agent. Vetted against
399+
the strictest use case it covers, so declare it only if you genuinely need one
400+
agent to do several jobs.
401+
382402
brand_color: Primary brand colour, as #RRGGBB. Three-digit shorthand is refused: the value is
383403
submitted verbatim, so two spellings of one colour is only a way for the stored
384404
value to disagree with the form.

‎src/sent_dm/resources/channels/sms.py‎

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ def create(
151151
read as `PROVISIONING` in the response's `numbers`, each with the area code it
152152
was asked for. A profile inheriting your organization's campaign cannot request
153153
`numbers` (`400`). `numbers` on a `TEN_DLC` market you already hold is `409`:
154-
its numbers belong to its one campaign and are set when the market is created.
154+
change its campaign's numbers with `PATCH /v3/channels/sms/{country}/{type}`,
155+
add numbers to one of its campaigns with
156+
`POST /v3/channels/sms/numbers/US/TEN_DLC`, or add a new campaign with
157+
`POST /v3/channels/sms/compliances/US/TEN_DLC/campaigns`.
155158
156159
**A market you already send in is `409`**: adding what is already there is a
157160
mistake worth reporting rather than a silent no-op. A market is a
@@ -190,6 +193,23 @@ def create(
190193
silently does not for number_type. A client generating a request from our
191194
OpenAPI therefore sent what the document called sufficient and was answered 400.
192195
196+
- `LOCAL` - A geographic number for the country. The ordinary choice:
197+
recognisable to recipients, and available almost everywhere.
198+
- `TOLL_FREE` - A toll-free number. High throughput and no per-country
199+
registration, but US toll-free traffic goes through its own verification.
200+
- `SHORT_CODE` - A short code — five or six digits, leased rather than
201+
provisioned. Highest throughput, longest lead time, and the most expensive.
202+
- `ALPHANUMERIC` - A sender name rather than a number, up to 11 characters.
203+
Recipients cannot reply. Not available in every country, and several require
204+
it to be pre-registered with documents.
205+
- `TEN_DLC` - A US 10-digit long code registered with The Campaign Registry. The
206+
only sender type that registers with a compliance regime, so it is the only
207+
one whose market declares `compliance.brand` and `compliance.campaign`.
208+
- `MOBILE` - A mobile number. Where a country distinguishes it from a landline,
209+
some carriers treat mobile traffic differently.
210+
- `10DLC` - The industry's spelling of `TEN_DLC`, accepted so an integrator can
211+
send the term it knows. Resolves to the same market.
212+
193213
area_codes: The area codes to put this sender in, in your own order of preference, e.g.
194214
["415", "628"] for the US or ["20"] for London. Omit it and a number is claimed
195215
anywhere in the country.
@@ -666,7 +686,10 @@ async def create(
666686
read as `PROVISIONING` in the response's `numbers`, each with the area code it
667687
was asked for. A profile inheriting your organization's campaign cannot request
668688
`numbers` (`400`). `numbers` on a `TEN_DLC` market you already hold is `409`:
669-
its numbers belong to its one campaign and are set when the market is created.
689+
change its campaign's numbers with `PATCH /v3/channels/sms/{country}/{type}`,
690+
add numbers to one of its campaigns with
691+
`POST /v3/channels/sms/numbers/US/TEN_DLC`, or add a new campaign with
692+
`POST /v3/channels/sms/compliances/US/TEN_DLC/campaigns`.
670693
671694
**A market you already send in is `409`**: adding what is already there is a
672695
mistake worth reporting rather than a silent no-op. A market is a
@@ -705,6 +728,23 @@ async def create(
705728
silently does not for number_type. A client generating a request from our
706729
OpenAPI therefore sent what the document called sufficient and was answered 400.
707730
731+
- `LOCAL` - A geographic number for the country. The ordinary choice:
732+
recognisable to recipients, and available almost everywhere.
733+
- `TOLL_FREE` - A toll-free number. High throughput and no per-country
734+
registration, but US toll-free traffic goes through its own verification.
735+
- `SHORT_CODE` - A short code — five or six digits, leased rather than
736+
provisioned. Highest throughput, longest lead time, and the most expensive.
737+
- `ALPHANUMERIC` - A sender name rather than a number, up to 11 characters.
738+
Recipients cannot reply. Not available in every country, and several require
739+
it to be pre-registered with documents.
740+
- `TEN_DLC` - A US 10-digit long code registered with The Campaign Registry. The
741+
only sender type that registers with a compliance regime, so it is the only
742+
one whose market declares `compliance.brand` and `compliance.campaign`.
743+
- `MOBILE` - A mobile number. Where a country distinguishes it from a landline,
744+
some carriers treat mobile traffic differently.
745+
- `10DLC` - The industry's spelling of `TEN_DLC`, accepted so an integrator can
746+
send the term it knows. Resolves to the same market.
747+
708748
area_codes: The area codes to put this sender in, in your own order of preference, e.g.
709749
["415", "628"] for the US or ["20"] for London. Omit it and a number is claimed
710750
anywhere in the country.

‎src/sent_dm/resources/channels/voice.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,13 @@ def update(
319319
ignoring case. Turning the default line off is refused while other active voice
320320
numbers remain.
321321
322+
- `ACTIVE` - Turns calls on for the number again. The callback URL and the
323+
signing secret it had are kept; send `callback_url` in the same call to
324+
replace the URL.
325+
- `INACTIVE` - Turns calls off for the number. Refused while the number is the
326+
default line for app calls and other active voice numbers remain; move the
327+
default first. The callback URL and the secret stay on the number.
328+
322329
extra_headers: Send extra headers
323330
324331
extra_query: Add additional query parameters to the request
@@ -803,6 +810,13 @@ async def update(
803810
ignoring case. Turning the default line off is refused while other active voice
804811
numbers remain.
805812
813+
- `ACTIVE` - Turns calls on for the number again. The callback URL and the
814+
signing secret it had are kept; send `callback_url` in the same call to
815+
replace the URL.
816+
- `INACTIVE` - Turns calls off for the number. Refused while the number is the
817+
default line for app calls and other active voice numbers remain; move the
818+
default first. The callback URL and the secret stay on the number.
819+
806820
extra_headers: Send extra headers
807821
808822
extra_query: Add additional query parameters to the request

‎src/sent_dm/resources/profiles/campaigns.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,10 @@ def list(
211211
explicitly.
212212
213213
Retrieves all campaigns linked to the profile's brand, including use cases and
214-
sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
214+
sample messages. A profile with inherit_tcr_campaign=true gets its
215+
organization's campaigns and, beside them, any campaign of its own (added with
216+
POST /v3/channels/sms/compliances/US/TEN_DLC/campaigns); `isInherited` says
217+
which is which.
215218
216219
Args:
217220
extra_headers: Send extra headers
@@ -474,7 +477,10 @@ async def list(
474477
explicitly.
475478
476479
Retrieves all campaigns linked to the profile's brand, including use cases and
477-
sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
480+
sample messages. A profile with inherit_tcr_campaign=true gets its
481+
organization's campaigns and, beside them, any campaign of its own (added with
482+
POST /v3/channels/sms/compliances/US/TEN_DLC/campaigns); `isInherited` says
483+
which is which.
478484
479485
Args:
480486
extra_headers: Send extra headers

‎src/sent_dm/resources/sender_profiles.py‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class SenderProfilesResource(SyncAPIResource):
3939
4040
**Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone gives you a usable profile immediately, running on your identity, your inbox and your billing. Supply a capability's fields and the profile owns that one instead.
4141
42-
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or terminates through your shared routes.
42+
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or reaches only the countries Sent runs a shared route for, and the US is not one of them.
4343
4444
To act for a profile on any other resource, send `x-profile-id` with your organization key rather than looking for a parallel set of endpoints.
4545
"""
@@ -98,7 +98,9 @@ def create(
9898
9999
**A sender is not one of them.** The brand and the campaign can be inherited; a
100100
number cannot. A profile either has a sender of its own — `channels.sms` — or it
101-
has none and terminates through the shared routes for that country.
101+
has none and reaches only the countries Sent runs a shared route for. The US has
102+
none: without a `TEN_DLC` number of its own, a profile's SMS to US numbers ends
103+
as `FAILED` with `DELIVERY_003`.
102104
103105
## Saying what a profile owns
104106
@@ -623,7 +625,7 @@ class AsyncSenderProfilesResource(AsyncAPIResource):
623625
624626
**Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone gives you a usable profile immediately, running on your identity, your inbox and your billing. Supply a capability's fields and the profile owns that one instead.
625627
626-
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or terminates through your shared routes.
628+
**A sender is the exception.** A brand and a campaign can be inherited; a number cannot. A profile either has a sender of its own or reaches only the countries Sent runs a shared route for, and the US is not one of them.
627629
628630
To act for a profile on any other resource, send `x-profile-id` with your organization key rather than looking for a parallel set of endpoints.
629631
"""
@@ -682,7 +684,9 @@ async def create(
682684
683685
**A sender is not one of them.** The brand and the campaign can be inherited; a
684686
number cannot. A profile either has a sender of its own — `channels.sms` — or it
685-
has none and terminates through the shared routes for that country.
687+
has none and reaches only the countries Sent runs a shared route for. The US has
688+
none: without a `TEN_DLC` number of its own, a profile's SMS to US numbers ends
689+
as `FAILED` with `DELIVERY_003`.
686690
687691
## Saying what a profile owns
688692

0 commit comments

Comments
 (0)