Skip to content

Commit 32ca119

Browse files
feat(api): api update
1 parent b8aa555 commit 32ca119

40 files changed

+204
-210
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 40
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-38aaadafbb2bf0c5d5bb9330a0a5e7a89052fe3e791569c8a12051e040193edf.yml
3-
openapi_spec_hash: 2d35c1223beebaf2c1b8d8a474cbf7c2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-2566cdc5d8e0bffe2a8c442692b0fc1b35d3bfe7e9bf578331fc19d402361c1f.yml
3+
openapi_spec_hash: 85e1feeb9bbc8d59bb34d6cdd679575a
44
config_hash: ad652575976c2c8db09e4575778f0e77

src/sent_dm/resources/messages.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ def send(
153153
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
154154
for testing integrations without actual execution
155155
156-
template: Template reference (by id or name, with optional parameters)
156+
template: SDK-style template reference: resolve by ID or by name, with optional
157+
parameters.
157158
158159
to: List of recipient phone numbers in E.164 format (multi-recipient fan-out)
159160
@@ -320,7 +321,8 @@ async def send(
320321
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
321322
for testing integrations without actual execution
322323
323-
template: Template reference (by id or name, with optional parameters)
324+
template: SDK-style template reference: resolve by ID or by name, with optional
325+
parameters.
324326
325327
to: List of recipient phone numbers in E.164 format (multi-recipient fan-out)
326328

src/sent_dm/resources/profiles/campaigns.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def create(
6666
campaign must include at least one use case with sample messages.
6767
6868
Args:
69-
campaign: Campaign data
69+
campaign: Campaign data for create or update operation
7070
7171
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
7272
for testing integrations without actual execution
@@ -127,7 +127,7 @@ def update(
127127
update campaigns that have already been submitted to TCR.
128128
129129
Args:
130-
campaign: Campaign data
130+
campaign: Campaign data for create or update operation
131131
132132
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
133133
for testing integrations without actual execution
@@ -293,7 +293,7 @@ async def create(
293293
campaign must include at least one use case with sample messages.
294294
295295
Args:
296-
campaign: Campaign data
296+
campaign: Campaign data for create or update operation
297297
298298
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
299299
for testing integrations without actual execution
@@ -354,7 +354,7 @@ async def update(
354354
update campaigns that have already been submitted to TCR.
355355
356356
Args:
357-
campaign: Campaign data
357+
campaign: Campaign data for create or update operation
358358
359359
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
360360
for testing integrations without actual execution

src/sent_dm/resources/profiles/profiles.py

Lines changed: 34 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,8 @@ def create(
139139
140140
allow_template_sharing: Whether templates are shared across profiles (default: false)
141141
142-
billing_contact: Billing contact for this profile. Required when billing_model is "profile" or
143-
"profile_and_organization". Identifies who receives invoices and who is
144-
responsible for payment.
142+
billing_contact: Billing contact information for a profile. Required when billing_model is
143+
"profile" or "profile_and_organization".
145144
146145
billing_model:
147146
Billing model: profile, organization, or profile_and_organization (default:
@@ -153,9 +152,7 @@ def create(
153152
- "profile_and_organization": the profile is billed first with the organization
154153
as fallback; billing_contact is required.
155154
156-
brand: Brand and KYC information for this profile (optional). When provided, creates
157-
the brand associated with this profile. Cannot be set when inherit_tcr_brand is
158-
true.
155+
brand: Brand and KYC data grouped into contact, business, and compliance sections
159156
160157
description: Profile description (optional)
161158
@@ -171,9 +168,9 @@ def create(
171168
172169
name: Profile name (required)
173170
174-
payment_details: Payment card details for this profile (optional). Accepted when billing_model is
175-
"profile" or "profile_and_organization". Not persisted on our servers
176-
forwarded to the payment processor.
171+
payment_details: Payment card details for a profile. Accepted when billing_model is "profile" or
172+
"profile_and_organization". These details are not stored on our servers and will
173+
be forwarded to the payment processor.
177174
178175
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
179176
for testing integrations without actual execution
@@ -182,11 +179,11 @@ def create(
182179
only letters, numbers, and spaces, and include at least one letter. Example:
183180
"SALES", "Mkt 2", "Support1".
184181
185-
whatsapp_business_account: Direct WhatsApp Business Account credentials for this profile. When provided,
186-
the profile uses its own WhatsApp Business Account instead of inheriting from
187-
the organization. When omitted, the profile inherits the organization's WhatsApp
188-
Business Account (requires the organization to have completed WhatsApp Embedded
189-
Signup).
182+
whatsapp_business_account: Direct WhatsApp Business Account credentials for a profile. Use this when the
183+
profile should have its own WhatsApp Business Account instead of inheriting from
184+
the organization. Credentials must be obtained from Meta Business Manager by
185+
creating a System User with whatsapp_business_messaging and
186+
whatsapp_business_management scopes.
190187
191188
extra_headers: Send extra headers
192189
@@ -332,9 +329,8 @@ def update(
332329
333330
allow_template_sharing: Whether templates are shared across profiles (optional)
334331
335-
billing_contact: Billing contact for this profile. Required when billing_model is "profile" or
336-
"profile_and_organization" and no billing contact has been configured yet.
337-
Identifies who receives invoices and who is responsible for payment.
332+
billing_contact: Billing contact information for a profile. Required when billing_model is
333+
"profile" or "profile_and_organization".
338334
339335
billing_model: Billing model: profile, organization, or profile_and_organization (optional).
340336
@@ -344,10 +340,7 @@ def update(
344340
- "profile_and_organization": the profile is billed first with the organization
345341
as fallback; billing_contact is required.
346342
347-
brand: Brand and KYC information for this profile (optional). When provided, creates or
348-
updates the brand associated with this profile. Cannot be set when
349-
inherit_tcr_brand is true. Once a brand has been submitted to TCR it cannot be
350-
modified.
343+
brand: Brand and KYC data grouped into contact, business, and compliance sections
351344
352345
description: Profile description (optional)
353346
@@ -363,9 +356,9 @@ def update(
363356
364357
name: Profile name (optional)
365358
366-
payment_details: Payment card details for this profile (optional). Accepted when billing_model is
367-
"profile" or "profile_and_organization". Not persisted on our servers
368-
forwarded to the payment processor.
359+
payment_details: Payment card details for a profile. Accepted when billing_model is "profile" or
360+
"profile_and_organization". These details are not stored on our servers and will
361+
be forwarded to the payment processor.
369362
370363
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
371364
for testing integrations without actual execution
@@ -687,9 +680,8 @@ async def create(
687680
688681
allow_template_sharing: Whether templates are shared across profiles (default: false)
689682
690-
billing_contact: Billing contact for this profile. Required when billing_model is "profile" or
691-
"profile_and_organization". Identifies who receives invoices and who is
692-
responsible for payment.
683+
billing_contact: Billing contact information for a profile. Required when billing_model is
684+
"profile" or "profile_and_organization".
693685
694686
billing_model:
695687
Billing model: profile, organization, or profile_and_organization (default:
@@ -701,9 +693,7 @@ async def create(
701693
- "profile_and_organization": the profile is billed first with the organization
702694
as fallback; billing_contact is required.
703695
704-
brand: Brand and KYC information for this profile (optional). When provided, creates
705-
the brand associated with this profile. Cannot be set when inherit_tcr_brand is
706-
true.
696+
brand: Brand and KYC data grouped into contact, business, and compliance sections
707697
708698
description: Profile description (optional)
709699
@@ -719,9 +709,9 @@ async def create(
719709
720710
name: Profile name (required)
721711
722-
payment_details: Payment card details for this profile (optional). Accepted when billing_model is
723-
"profile" or "profile_and_organization". Not persisted on our servers
724-
forwarded to the payment processor.
712+
payment_details: Payment card details for a profile. Accepted when billing_model is "profile" or
713+
"profile_and_organization". These details are not stored on our servers and will
714+
be forwarded to the payment processor.
725715
726716
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
727717
for testing integrations without actual execution
@@ -730,11 +720,11 @@ async def create(
730720
only letters, numbers, and spaces, and include at least one letter. Example:
731721
"SALES", "Mkt 2", "Support1".
732722
733-
whatsapp_business_account: Direct WhatsApp Business Account credentials for this profile. When provided,
734-
the profile uses its own WhatsApp Business Account instead of inheriting from
735-
the organization. When omitted, the profile inherits the organization's WhatsApp
736-
Business Account (requires the organization to have completed WhatsApp Embedded
737-
Signup).
723+
whatsapp_business_account: Direct WhatsApp Business Account credentials for a profile. Use this when the
724+
profile should have its own WhatsApp Business Account instead of inheriting from
725+
the organization. Credentials must be obtained from Meta Business Manager by
726+
creating a System User with whatsapp_business_messaging and
727+
whatsapp_business_management scopes.
738728
739729
extra_headers: Send extra headers
740730
@@ -880,9 +870,8 @@ async def update(
880870
881871
allow_template_sharing: Whether templates are shared across profiles (optional)
882872
883-
billing_contact: Billing contact for this profile. Required when billing_model is "profile" or
884-
"profile_and_organization" and no billing contact has been configured yet.
885-
Identifies who receives invoices and who is responsible for payment.
873+
billing_contact: Billing contact information for a profile. Required when billing_model is
874+
"profile" or "profile_and_organization".
886875
887876
billing_model: Billing model: profile, organization, or profile_and_organization (optional).
888877
@@ -892,10 +881,7 @@ async def update(
892881
- "profile_and_organization": the profile is billed first with the organization
893882
as fallback; billing_contact is required.
894883
895-
brand: Brand and KYC information for this profile (optional). When provided, creates or
896-
updates the brand associated with this profile. Cannot be set when
897-
inherit_tcr_brand is true. Once a brand has been submitted to TCR it cannot be
898-
modified.
884+
brand: Brand and KYC data grouped into contact, business, and compliance sections
899885
900886
description: Profile description (optional)
901887
@@ -911,9 +897,9 @@ async def update(
911897
912898
name: Profile name (optional)
913899
914-
payment_details: Payment card details for this profile (optional). Accepted when billing_model is
915-
"profile" or "profile_and_organization". Not persisted on our servers
916-
forwarded to the payment processor.
900+
payment_details: Payment card details for a profile. Accepted when billing_model is "profile" or
901+
"profile_and_organization". These details are not stored on our servers and will
902+
be forwarded to the payment processor.
917903
918904
sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
919905
for testing integrations without actual execution

src/sent_dm/resources/templates.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def create(
8282
8383
creation_source: Source of template creation (default: from-api)
8484
85-
definition: Template definition including header, body, footer, and buttons
85+
definition: Complete definition of a message template including header, body, footer, and
86+
buttons
8687
8788
language: Template language code (e.g., en_US) (optional, auto-detected if not provided)
8889
@@ -190,7 +191,8 @@ def update(
190191
Args:
191192
category: Template category: MARKETING, UTILITY, AUTHENTICATION
192193
193-
definition: Template definition including header, body, footer, and buttons
194+
definition: Complete definition of a message template including header, body, footer, and
195+
buttons
194196
195197
language: Template language code (e.g., en_US)
196198
@@ -410,7 +412,8 @@ async def create(
410412
411413
creation_source: Source of template creation (default: from-api)
412414
413-
definition: Template definition including header, body, footer, and buttons
415+
definition: Complete definition of a message template including header, body, footer, and
416+
buttons
414417
415418
language: Template language code (e.g., en_US) (optional, auto-detected if not provided)
416419
@@ -518,7 +521,8 @@ async def update(
518521
Args:
519522
category: Template category: MARKETING, UTILITY, AUTHENTICATION
520523
521-
definition: Template definition including header, body, footer, and buttons
524+
definition: Complete definition of a message template including header, body, footer, and
525+
buttons
522526
523527
language: Template language code (e.g., en_US)
524528

src/sent_dm/types/api_response_of_contact.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ class APIResponseOfContact(BaseModel):
1414
"""Standard API response envelope for all v3 endpoints"""
1515

1616
data: Optional[ContactResponse] = None
17-
"""The response data (null if error)"""
17+
"""Contact response for v3 API Uses snake_case for JSON property names"""
1818

1919
error: Optional[APIError] = None
20-
"""Error details (null if successful)"""
20+
"""Error information"""
2121

2222
meta: Optional[APIMeta] = None
23-
"""Metadata about the request and response"""
23+
"""Request and response metadata"""
2424

2525
success: Optional[bool] = None
2626
"""Indicates whether the request was successful"""

src/sent_dm/types/api_response_of_profile_detail.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ class APIResponseOfProfileDetail(BaseModel):
1414
"""Standard API response envelope for all v3 endpoints"""
1515

1616
data: Optional[ProfileDetail] = None
17-
"""The response data (null if error)"""
17+
"""Detailed profile response for v3 API"""
1818

1919
error: Optional[APIError] = None
20-
"""Error details (null if successful)"""
20+
"""Error information"""
2121

2222
meta: Optional[APIMeta] = None
23-
"""Metadata about the request and response"""
23+
"""Request and response metadata"""
2424

2525
success: Optional[bool] = None
2626
"""Indicates whether the request was successful"""

src/sent_dm/types/api_response_of_user.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ class APIResponseOfUser(BaseModel):
1414
"""Standard API response envelope for all v3 endpoints"""
1515

1616
data: Optional[UserResponse] = None
17-
"""The response data (null if error)"""
17+
"""User response for v3 API"""
1818

1919
error: Optional[APIError] = None
20-
"""Error details (null if successful)"""
20+
"""Error information"""
2121

2222
meta: Optional[APIMeta] = None
23-
"""Metadata about the request and response"""
23+
"""Request and response metadata"""
2424

2525
success: Optional[bool] = None
2626
"""Indicates whether the request was successful"""

src/sent_dm/types/api_response_template.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ class APIResponseTemplate(BaseModel):
1414
"""Standard API response envelope for all v3 endpoints"""
1515

1616
data: Optional[Template] = None
17-
"""The response data (null if error)"""
17+
"""Template response for v3 API"""
1818

1919
error: Optional[APIError] = None
20-
"""Error details (null if successful)"""
20+
"""Error information"""
2121

2222
meta: Optional[APIMeta] = None
23-
"""Metadata about the request and response"""
23+
"""Request and response metadata"""
2424

2525
success: Optional[bool] = None
2626
"""Indicates whether the request was successful"""

src/sent_dm/types/api_response_webhook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ class APIResponseWebhook(BaseModel):
1717
"""The response data (null if error)"""
1818

1919
error: Optional[APIError] = None
20-
"""Error details (null if successful)"""
20+
"""Error information"""
2121

2222
meta: Optional[APIMeta] = None
23-
"""Metadata about the request and response"""
23+
"""Request and response metadata"""
2424

2525
success: Optional[bool] = None
2626
"""Indicates whether the request was successful"""

0 commit comments

Comments
 (0)