sentdm 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +9 -9
  4. data/lib/sentdm/client.rb +0 -1
  5. data/lib/sentdm/models/api_meta.rb +1 -9
  6. data/lib/sentdm/models/brand_data.rb +235 -198
  7. data/lib/sentdm/models/brand_with_kyc.rb +249 -214
  8. data/lib/sentdm/models/brands/api_response_tcr_campaign_with_use_cases.rb +0 -1
  9. data/lib/sentdm/models/contact_create_params.rb +13 -6
  10. data/lib/sentdm/models/contact_delete_params.rb +8 -1
  11. data/lib/sentdm/models/contact_list_params.rb +10 -2
  12. data/lib/sentdm/models/contact_retrieve_params.rb +7 -1
  13. data/lib/sentdm/models/contact_update_params.rb +13 -6
  14. data/lib/sentdm/models/me_retrieve_params.rb +7 -1
  15. data/lib/sentdm/models/me_retrieve_response.rb +152 -7
  16. data/lib/sentdm/models/message_retrieve_activities_params.rb +7 -1
  17. data/lib/sentdm/models/message_retrieve_activities_response.rb +19 -5
  18. data/lib/sentdm/models/message_retrieve_status_params.rb +7 -1
  19. data/lib/sentdm/models/message_retrieve_status_response.rb +8 -1
  20. data/lib/sentdm/models/message_send_params.rb +17 -10
  21. data/lib/sentdm/models/mutation_request.rb +6 -6
  22. data/lib/sentdm/models/profile_complete_params.rb +13 -6
  23. data/lib/sentdm/models/profile_create_params.rb +192 -10
  24. data/lib/sentdm/models/profile_delete_params.rb +18 -18
  25. data/lib/sentdm/models/profile_detail.rb +144 -95
  26. data/lib/sentdm/models/profile_list_params.rb +7 -1
  27. data/lib/sentdm/models/profile_retrieve_params.rb +7 -1
  28. data/lib/sentdm/models/profile_update_params.rb +142 -22
  29. data/lib/sentdm/models/template_create_params.rb +17 -10
  30. data/lib/sentdm/models/template_delete_params.rb +13 -6
  31. data/lib/sentdm/models/template_list_params.rb +18 -2
  32. data/lib/sentdm/models/template_retrieve_params.rb +7 -1
  33. data/lib/sentdm/models/template_update_params.rb +17 -10
  34. data/lib/sentdm/models/template_variable.rb +7 -1
  35. data/lib/sentdm/models/user_invite_params.rb +13 -6
  36. data/lib/sentdm/models/user_list_params.rb +7 -1
  37. data/lib/sentdm/models/user_remove_params.rb +17 -17
  38. data/lib/sentdm/models/user_retrieve_params.rb +7 -1
  39. data/lib/sentdm/models/user_update_role_params.rb +15 -16
  40. data/lib/sentdm/models/webhook_create_params.rb +13 -6
  41. data/lib/sentdm/models/webhook_delete_params.rb +7 -1
  42. data/lib/sentdm/models/webhook_list_event_types_params.rb +7 -1
  43. data/lib/sentdm/models/webhook_list_events_params.rb +7 -1
  44. data/lib/sentdm/models/webhook_list_params.rb +7 -1
  45. data/lib/sentdm/models/webhook_retrieve_params.rb +7 -1
  46. data/lib/sentdm/models/webhook_rotate_secret_params.rb +7 -1
  47. data/lib/sentdm/models/webhook_test_params.rb +13 -6
  48. data/lib/sentdm/models/webhook_toggle_status_params.rb +13 -6
  49. data/lib/sentdm/models/webhook_update_params.rb +13 -6
  50. data/lib/sentdm/models.rb +0 -12
  51. data/lib/sentdm/resources/brands/campaigns.rb +0 -129
  52. data/lib/sentdm/resources/brands.rb +0 -112
  53. data/lib/sentdm/resources/contacts.rb +43 -20
  54. data/lib/sentdm/resources/lookup.rb +0 -21
  55. data/lib/sentdm/resources/me.rb +24 -5
  56. data/lib/sentdm/resources/messages.rb +24 -8
  57. data/lib/sentdm/resources/profiles.rb +116 -32
  58. data/lib/sentdm/resources/templates.rb +47 -24
  59. data/lib/sentdm/resources/users.rb +40 -23
  60. data/lib/sentdm/resources/webhooks.rb +92 -34
  61. data/lib/sentdm/version.rb +1 -1
  62. data/lib/sentdm.rb +1 -14
  63. data/rbi/sentdm/client.rbi +0 -1
  64. data/rbi/sentdm/models/api_meta.rbi +4 -18
  65. data/rbi/sentdm/models/brand_data.rbi +326 -203
  66. data/rbi/sentdm/models/brand_with_kyc.rbi +334 -216
  67. data/rbi/sentdm/models/brands/tcr_campaign_with_use_cases.rbi +6 -8
  68. data/rbi/sentdm/models/contact_create_params.rbi +19 -10
  69. data/rbi/sentdm/models/contact_delete_params.rbi +9 -0
  70. data/rbi/sentdm/models/contact_list_params.rbi +11 -0
  71. data/rbi/sentdm/models/contact_retrieve_params.rbi +13 -2
  72. data/rbi/sentdm/models/contact_update_params.rbi +19 -10
  73. data/rbi/sentdm/models/me_retrieve_params.rbi +16 -5
  74. data/rbi/sentdm/models/me_retrieve_response.rbi +316 -16
  75. data/rbi/sentdm/models/message_retrieve_activities_params.rbi +13 -2
  76. data/rbi/sentdm/models/message_retrieve_activities_response.rbi +18 -6
  77. data/rbi/sentdm/models/message_retrieve_status_params.rbi +13 -2
  78. data/rbi/sentdm/models/message_retrieve_status_response.rbi +6 -0
  79. data/rbi/sentdm/models/message_send_params.rbi +22 -13
  80. data/rbi/sentdm/models/mutation_request.rbi +10 -10
  81. data/rbi/sentdm/models/profile_complete_params.rbi +19 -10
  82. data/rbi/sentdm/models/profile_create_params.rbi +323 -15
  83. data/rbi/sentdm/models/profile_delete_params.rbi +36 -24
  84. data/rbi/sentdm/models/profile_detail.rbi +184 -128
  85. data/rbi/sentdm/models/profile_list_params.rbi +16 -5
  86. data/rbi/sentdm/models/profile_retrieve_params.rbi +13 -2
  87. data/rbi/sentdm/models/profile_update_params.rbi +231 -30
  88. data/rbi/sentdm/models/template_create_params.rbi +22 -13
  89. data/rbi/sentdm/models/template_delete_params.rbi +19 -10
  90. data/rbi/sentdm/models/template_list_params.rbi +19 -0
  91. data/rbi/sentdm/models/template_retrieve_params.rbi +13 -2
  92. data/rbi/sentdm/models/template_update_params.rbi +22 -13
  93. data/rbi/sentdm/models/template_variable.rbi +6 -0
  94. data/rbi/sentdm/models/user_invite_params.rbi +19 -10
  95. data/rbi/sentdm/models/user_list_params.rbi +16 -5
  96. data/rbi/sentdm/models/user_remove_params.rbi +35 -23
  97. data/rbi/sentdm/models/user_retrieve_params.rbi +13 -2
  98. data/rbi/sentdm/models/user_update_role_params.rbi +23 -25
  99. data/rbi/sentdm/models/webhook_create_params.rbi +19 -10
  100. data/rbi/sentdm/models/webhook_delete_params.rbi +13 -2
  101. data/rbi/sentdm/models/webhook_list_event_types_params.rbi +16 -5
  102. data/rbi/sentdm/models/webhook_list_events_params.rbi +16 -1
  103. data/rbi/sentdm/models/webhook_list_params.rbi +9 -0
  104. data/rbi/sentdm/models/webhook_retrieve_params.rbi +13 -2
  105. data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +15 -1
  106. data/rbi/sentdm/models/webhook_test_params.rbi +19 -10
  107. data/rbi/sentdm/models/webhook_toggle_status_params.rbi +19 -10
  108. data/rbi/sentdm/models/webhook_update_params.rbi +19 -10
  109. data/rbi/sentdm/models.rbi +0 -12
  110. data/rbi/sentdm/resources/brands/campaigns.rbi +0 -95
  111. data/rbi/sentdm/resources/brands.rbi +0 -80
  112. data/rbi/sentdm/resources/contacts.rbi +37 -12
  113. data/rbi/sentdm/resources/lookup.rbi +0 -12
  114. data/rbi/sentdm/resources/me.rbi +25 -7
  115. data/rbi/sentdm/resources/messages.rbi +17 -4
  116. data/rbi/sentdm/resources/profiles.rbi +178 -38
  117. data/rbi/sentdm/resources/templates.rbi +47 -19
  118. data/rbi/sentdm/resources/users.rbi +47 -25
  119. data/rbi/sentdm/resources/webhooks.rbi +92 -20
  120. data/sig/sentdm/models/api_meta.rbs +2 -16
  121. data/sig/sentdm/models/brand_data.rbs +188 -142
  122. data/sig/sentdm/models/brand_with_kyc.rbs +184 -133
  123. data/sig/sentdm/models/contact_create_params.rbs +16 -5
  124. data/sig/sentdm/models/contact_delete_params.rbs +11 -1
  125. data/sig/sentdm/models/contact_list_params.rbs +8 -1
  126. data/sig/sentdm/models/contact_retrieve_params.rbs +12 -2
  127. data/sig/sentdm/models/contact_update_params.rbs +13 -6
  128. data/sig/sentdm/models/me_retrieve_params.rbs +14 -3
  129. data/sig/sentdm/models/me_retrieve_response.rbs +134 -7
  130. data/sig/sentdm/models/message_retrieve_activities_params.rbs +12 -2
  131. data/sig/sentdm/models/message_retrieve_activities_response.rbs +9 -4
  132. data/sig/sentdm/models/message_retrieve_status_params.rbs +12 -2
  133. data/sig/sentdm/models/message_retrieve_status_response.rbs +5 -0
  134. data/sig/sentdm/models/message_send_params.rbs +15 -8
  135. data/sig/sentdm/models/mutation_request.rbs +5 -5
  136. data/sig/sentdm/models/profile_complete_params.rbs +13 -6
  137. data/sig/sentdm/models/profile_create_params.rbs +111 -7
  138. data/sig/sentdm/models/profile_delete_params.rbs +23 -13
  139. data/sig/sentdm/models/profile_detail.rbs +105 -84
  140. data/sig/sentdm/models/profile_list_params.rbs +14 -3
  141. data/sig/sentdm/models/profile_retrieve_params.rbs +8 -1
  142. data/sig/sentdm/models/profile_update_params.rbs +86 -17
  143. data/sig/sentdm/models/template_create_params.rbs +15 -8
  144. data/sig/sentdm/models/template_delete_params.rbs +16 -5
  145. data/sig/sentdm/models/template_list_params.rbs +13 -1
  146. data/sig/sentdm/models/template_retrieve_params.rbs +12 -2
  147. data/sig/sentdm/models/template_update_params.rbs +15 -8
  148. data/sig/sentdm/models/template_variable.rbs +5 -0
  149. data/sig/sentdm/models/user_invite_params.rbs +13 -6
  150. data/sig/sentdm/models/user_list_params.rbs +14 -3
  151. data/sig/sentdm/models/user_remove_params.rbs +23 -13
  152. data/sig/sentdm/models/user_retrieve_params.rbs +8 -1
  153. data/sig/sentdm/models/user_update_role_params.rbs +17 -17
  154. data/sig/sentdm/models/webhook_create_params.rbs +13 -6
  155. data/sig/sentdm/models/webhook_delete_params.rbs +12 -2
  156. data/sig/sentdm/models/webhook_list_event_types_params.rbs +13 -3
  157. data/sig/sentdm/models/webhook_list_events_params.rbs +13 -1
  158. data/sig/sentdm/models/webhook_list_params.rbs +13 -1
  159. data/sig/sentdm/models/webhook_retrieve_params.rbs +12 -2
  160. data/sig/sentdm/models/webhook_rotate_secret_params.rbs +8 -1
  161. data/sig/sentdm/models/webhook_test_params.rbs +13 -6
  162. data/sig/sentdm/models/webhook_toggle_status_params.rbs +17 -5
  163. data/sig/sentdm/models/webhook_update_params.rbs +13 -6
  164. data/sig/sentdm/models.rbs +0 -12
  165. data/sig/sentdm/resources/brands/campaigns.rbs +0 -29
  166. data/sig/sentdm/resources/brands.rbs +0 -25
  167. data/sig/sentdm/resources/contacts.rbs +7 -2
  168. data/sig/sentdm/resources/lookup.rbs +0 -5
  169. data/sig/sentdm/resources/me.rbs +1 -0
  170. data/sig/sentdm/resources/messages.rbs +4 -1
  171. data/sig/sentdm/resources/profiles.rbs +19 -8
  172. data/sig/sentdm/resources/templates.rbs +9 -3
  173. data/sig/sentdm/resources/users.rbs +10 -7
  174. data/sig/sentdm/resources/webhooks.rbs +18 -5
  175. metadata +1 -40
  176. data/lib/sentdm/models/api_response_brand_with_kyc.rb +0 -43
  177. data/lib/sentdm/models/brand_create_params.rb +0 -41
  178. data/lib/sentdm/models/brand_delete_params.rb +0 -34
  179. data/lib/sentdm/models/brand_list_params.rb +0 -14
  180. data/lib/sentdm/models/brand_list_response.rb +0 -43
  181. data/lib/sentdm/models/brand_update_params.rb +0 -48
  182. data/lib/sentdm/models/brands/campaign_create_params.rb +0 -50
  183. data/lib/sentdm/models/brands/campaign_delete_params.rb +0 -43
  184. data/lib/sentdm/models/brands/campaign_list_params.rb +0 -22
  185. data/lib/sentdm/models/brands/campaign_list_response.rb +0 -47
  186. data/lib/sentdm/models/brands/campaign_update_params.rb +0 -57
  187. data/lib/sentdm/models/lookup_retrieve_phone_info_params.rb +0 -20
  188. data/lib/sentdm/models/lookup_retrieve_phone_info_response.rb +0 -104
  189. data/rbi/sentdm/models/api_response_brand_with_kyc.rbi +0 -74
  190. data/rbi/sentdm/models/brand_create_params.rbi +0 -68
  191. data/rbi/sentdm/models/brand_delete_params.rbi +0 -68
  192. data/rbi/sentdm/models/brand_list_params.rbi +0 -27
  193. data/rbi/sentdm/models/brand_list_response.rbi +0 -71
  194. data/rbi/sentdm/models/brand_update_params.rbi +0 -74
  195. data/rbi/sentdm/models/brands/campaign_create_params.rbi +0 -79
  196. data/rbi/sentdm/models/brands/campaign_delete_params.rbi +0 -84
  197. data/rbi/sentdm/models/brands/campaign_list_params.rbi +0 -37
  198. data/rbi/sentdm/models/brands/campaign_list_response.rbi +0 -82
  199. data/rbi/sentdm/models/brands/campaign_update_params.rbi +0 -85
  200. data/rbi/sentdm/models/lookup_retrieve_phone_info_params.rbi +0 -38
  201. data/rbi/sentdm/models/lookup_retrieve_phone_info_response.rbi +0 -183
  202. data/sig/sentdm/models/api_response_brand_with_kyc.rbs +0 -39
  203. data/sig/sentdm/models/brand_create_params.rbs +0 -36
  204. data/sig/sentdm/models/brand_delete_params.rbs +0 -36
  205. data/sig/sentdm/models/brand_list_params.rbs +0 -14
  206. data/sig/sentdm/models/brand_list_response.rbs +0 -39
  207. data/sig/sentdm/models/brand_update_params.rbs +0 -45
  208. data/sig/sentdm/models/brands/campaign_create_params.rbs +0 -47
  209. data/sig/sentdm/models/brands/campaign_delete_params.rbs +0 -46
  210. data/sig/sentdm/models/brands/campaign_list_params.rbs +0 -25
  211. data/sig/sentdm/models/brands/campaign_list_response.rbs +0 -41
  212. data/sig/sentdm/models/brands/campaign_update_params.rbs +0 -52
  213. data/sig/sentdm/models/lookup_retrieve_phone_info_params.rbs +0 -23
  214. data/sig/sentdm/models/lookup_retrieve_phone_info_response.rbs +0 -102
@@ -9,12 +9,16 @@ module Sentdm
9
9
  sig do
10
10
  params(
11
11
  id: String,
12
+ x_profile_id: String,
12
13
  request_options: Sentdm::RequestOptions::OrHash
13
14
  ).returns(Sentdm::Models::MessageRetrieveActivitiesResponse)
14
15
  end
15
16
  def retrieve_activities(
16
17
  # Message ID from route parameter
17
18
  id,
19
+ # Profile UUID to scope the request to a child profile. Only organization API keys
20
+ # can use this header. The profile must belong to the calling organization.
21
+ x_profile_id: nil,
18
22
  request_options: {}
19
23
  )
20
24
  end
@@ -24,12 +28,16 @@ module Sentdm
24
28
  sig do
25
29
  params(
26
30
  id: String,
31
+ x_profile_id: String,
27
32
  request_options: Sentdm::RequestOptions::OrHash
28
33
  ).returns(Sentdm::Models::MessageRetrieveStatusResponse)
29
34
  end
30
35
  def retrieve_status(
31
36
  # Message ID
32
37
  id,
38
+ # Profile UUID to scope the request to a child profile. Only organization API keys
39
+ # can use this header. The profile must belong to the calling organization.
40
+ x_profile_id: nil,
33
41
  request_options: {}
34
42
  )
35
43
  end
@@ -42,10 +50,11 @@ module Sentdm
42
50
  sig do
43
51
  params(
44
52
  channel: T.nilable(T::Array[String]),
53
+ sandbox: T::Boolean,
45
54
  template: Sentdm::MessageSendParams::Template::OrHash,
46
- test_mode: T::Boolean,
47
55
  to: T::Array[String],
48
56
  idempotency_key: String,
57
+ x_profile_id: String,
49
58
  request_options: Sentdm::RequestOptions::OrHash
50
59
  ).returns(Sentdm::Models::MessageSendResponse)
51
60
  end
@@ -54,11 +63,11 @@ module Sentdm
54
63
  # produces a separate message per recipient. "sent" = auto-detect, "rcs" =
55
64
  # reserved (skipped). Defaults to ["sent"] (auto-detect) if omitted.
56
65
  channel: nil,
66
+ # Body param: Sandbox flag - when true, the operation is simulated without side
67
+ # effects Useful for testing integrations without actual execution
68
+ sandbox: nil,
57
69
  # Body param: Template reference (by id or name, with optional parameters)
58
70
  template: nil,
59
- # Body param: Test mode flag - when true, the operation is simulated without side
60
- # effects Useful for testing integrations without actual execution
61
- test_mode: nil,
62
71
  # Body param: List of recipient phone numbers in E.164 format (multi-recipient
63
72
  # fan-out)
64
73
  to: nil,
@@ -66,6 +75,10 @@ module Sentdm
66
75
  # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
67
76
  # hours per key per customer.
68
77
  idempotency_key: nil,
78
+ # Header param: Profile UUID to scope the request to a child profile. Only
79
+ # organization API keys can use this header. The profile must belong to the
80
+ # calling organization.
81
+ x_profile_id: nil,
69
82
  request_options: {}
70
83
  )
71
84
  end
@@ -7,11 +7,47 @@ module Sentdm
7
7
  # Creates a new sender profile within an organization. Profiles represent
8
8
  # different brands, departments, or use cases, each with their own messaging
9
9
  # configuration and settings. Requires admin role in the organization.
10
+ #
11
+ # ## WhatsApp Business Account
12
+ #
13
+ # Every profile must be linked to a WhatsApp Business Account. There are two ways
14
+ # to do this:
15
+ #
16
+ # **1. Inherit from organization (default)** — Omit the
17
+ # `whatsapp_business_account` field. The profile will share the organization's
18
+ # WhatsApp Business Account, which must have been set up via WhatsApp Embedded
19
+ # Signup. This is the recommended path for most use cases.
20
+ #
21
+ # **2. Direct credentials** — Provide a `whatsapp_business_account` object with
22
+ # `waba_id`, `phone_number_id`, and `access_token`. Use this when the profile
23
+ # needs its own independent WhatsApp Business Account. Obtain these from Meta
24
+ # Business Manager by creating a System User with `whatsapp_business_messaging`
25
+ # and `whatsapp_business_management` permissions.
26
+ #
27
+ # If the `whatsapp_business_account` field is omitted and the organization has no
28
+ # WhatsApp Business Account configured, the request will be rejected with
29
+ # HTTP 422.
30
+ #
31
+ # ## Brand
32
+ #
33
+ # Include the optional `brand` field to create the brand for this profile at the
34
+ # same time. Cannot be used when `inherit_tcr_brand` is `true`.
35
+ #
36
+ # ## Payment Details
37
+ #
38
+ # When `billing_model` is `"profile"` or `"profile_and_organization"` you may
39
+ # include a `payment_details` object containing the card number, expiry (MM/YY),
40
+ # CVC, and billing ZIP code. Payment details are **never stored** on our servers
41
+ # and are forwarded directly to the payment processor. Providing `payment_details`
42
+ # when `billing_model` is `"organization"` is not allowed.
10
43
  sig do
11
44
  params(
12
45
  allow_contact_sharing: T::Boolean,
13
46
  allow_template_sharing: T::Boolean,
47
+ billing_contact:
48
+ T.nilable(Sentdm::ProfileCreateParams::BillingContact::OrHash),
14
49
  billing_model: T.nilable(String),
50
+ brand: T.nilable(Sentdm::BrandData::OrHash),
15
51
  description: T.nilable(String),
16
52
  icon: T.nilable(String),
17
53
  inherit_contacts: T.nilable(T::Boolean),
@@ -19,9 +55,16 @@ module Sentdm
19
55
  inherit_tcr_campaign: T.nilable(T::Boolean),
20
56
  inherit_templates: T.nilable(T::Boolean),
21
57
  name: String,
58
+ payment_details:
59
+ T.nilable(Sentdm::ProfileCreateParams::PaymentDetails::OrHash),
60
+ sandbox: T::Boolean,
22
61
  short_name: T.nilable(String),
23
- test_mode: T::Boolean,
62
+ whatsapp_business_account:
63
+ T.nilable(
64
+ Sentdm::ProfileCreateParams::WhatsappBusinessAccount::OrHash
65
+ ),
24
66
  idempotency_key: String,
67
+ x_profile_id: String,
25
68
  request_options: Sentdm::RequestOptions::OrHash
26
69
  ).returns(Sentdm::APIResponseOfProfileDetail)
27
70
  end
@@ -30,9 +73,23 @@ module Sentdm
30
73
  allow_contact_sharing: nil,
31
74
  # Body param: Whether templates are shared across profiles (default: false)
32
75
  allow_template_sharing: nil,
76
+ # Body param: Billing contact for this profile. Required when billing_model is
77
+ # "profile" or "profile_and_organization". Identifies who receives invoices and
78
+ # who is responsible for payment.
79
+ billing_contact: nil,
33
80
  # Body param: Billing model: profile, organization, or profile_and_organization
34
- # (default: profile)
81
+ # (default: profile).
82
+ #
83
+ # - "organization": the organization's billing details are used; no profile-level
84
+ # billing info needed.
85
+ # - "profile": the profile is billed independently; billing_contact is required.
86
+ # - "profile_and_organization": the profile is billed first with the organization
87
+ # as fallback; billing_contact is required.
35
88
  billing_model: nil,
89
+ # Body param: Brand and KYC information for this profile (optional). When
90
+ # provided, creates the brand associated with this profile. Cannot be set when
91
+ # inherit_tcr_brand is true.
92
+ brand: nil,
36
93
  # Body param: Profile description (optional)
37
94
  description: nil,
38
95
  # Body param: Profile icon URL (optional)
@@ -51,39 +108,82 @@ module Sentdm
51
108
  inherit_templates: nil,
52
109
  # Body param: Profile name (required)
53
110
  name: nil,
54
- # Body param: Profile short name/abbreviation (optional)
55
- short_name: nil,
56
- # Body param: Test mode flag - when true, the operation is simulated without side
111
+ # Body param: Payment card details for this profile (optional). Accepted when
112
+ # billing_model is "profile" or "profile_and_organization". Not persisted on our
113
+ # servers forwarded to the payment processor.
114
+ payment_details: nil,
115
+ # Body param: Sandbox flag - when true, the operation is simulated without side
57
116
  # effects Useful for testing integrations without actual execution
58
- test_mode: nil,
117
+ sandbox: nil,
118
+ # Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
119
+ # contain only letters, numbers, and spaces, and include at least one letter.
120
+ # Example: "SALES", "Mkt 2", "Support1".
121
+ short_name: nil,
122
+ # Body param: Direct WhatsApp Business Account credentials for this profile. When
123
+ # provided, the profile uses its own WhatsApp Business Account instead of
124
+ # inheriting from the organization. When omitted, the profile inherits the
125
+ # organization's WhatsApp Business Account (requires the organization to have
126
+ # completed WhatsApp Embedded Signup).
127
+ whatsapp_business_account: nil,
59
128
  # Header param: Unique key to ensure idempotent request processing. Must be 1-255
60
129
  # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
61
130
  # hours per key per customer.
62
131
  idempotency_key: nil,
132
+ # Header param: Profile UUID to scope the request to a child profile. Only
133
+ # organization API keys can use this header. The profile must belong to the
134
+ # calling organization.
135
+ x_profile_id: nil,
63
136
  request_options: {}
64
137
  )
65
138
  end
66
139
 
67
140
  # Retrieves detailed information about a specific sender profile within an
68
- # organization.
141
+ # organization, including brand and KYC information if a brand has been
142
+ # configured.
69
143
  sig do
70
144
  params(
71
145
  profile_id: String,
146
+ x_profile_id: String,
72
147
  request_options: Sentdm::RequestOptions::OrHash
73
148
  ).returns(Sentdm::APIResponseOfProfileDetail)
74
149
  end
75
- def retrieve(profile_id, request_options: {})
150
+ def retrieve(
151
+ profile_id,
152
+ # Profile UUID to scope the request to a child profile. Only organization API keys
153
+ # can use this header. The profile must belong to the calling organization.
154
+ x_profile_id: nil,
155
+ request_options: {}
156
+ )
76
157
  end
77
158
 
78
159
  # Updates a profile's configuration and settings. Requires admin role in the
79
160
  # organization. Only provided fields will be updated (partial update).
161
+ #
162
+ # ## Brand Management
163
+ #
164
+ # Include the optional `brand` field to create or update the brand associated with
165
+ # this profile. The brand holds KYC and TCR compliance data (legal business info,
166
+ # contact details, messaging vertical). Once a brand has been submitted to TCR it
167
+ # cannot be modified. Setting `inherit_tcr_brand: true` and providing `brand` in
168
+ # the same request is not allowed.
169
+ #
170
+ # ## Payment Details
171
+ #
172
+ # When `billing_model` is `"profile"` or `"profile_and_organization"` you may
173
+ # include a `payment_details` object containing the card number, expiry (MM/YY),
174
+ # CVC, and billing ZIP code. Payment details are **never stored** on our servers
175
+ # and are forwarded directly to the payment processor. Providing `payment_details`
176
+ # when `billing_model` is `"organization"` is not allowed.
80
177
  sig do
81
178
  params(
82
- path_profile_id: String,
179
+ profile_id: String,
83
180
  allow_contact_sharing: T.nilable(T::Boolean),
84
181
  allow_number_change_during_onboarding: T.nilable(T::Boolean),
85
182
  allow_template_sharing: T.nilable(T::Boolean),
183
+ billing_contact:
184
+ T.nilable(Sentdm::ProfileUpdateParams::BillingContact::OrHash),
86
185
  billing_model: T.nilable(String),
186
+ brand: T.nilable(Sentdm::BrandData::OrHash),
87
187
  description: T.nilable(String),
88
188
  icon: T.nilable(String),
89
189
  inherit_contacts: T.nilable(T::Boolean),
@@ -91,29 +191,47 @@ module Sentdm
91
191
  inherit_tcr_campaign: T.nilable(T::Boolean),
92
192
  inherit_templates: T.nilable(T::Boolean),
93
193
  name: T.nilable(String),
94
- body_profile_id: String,
194
+ payment_details:
195
+ T.nilable(Sentdm::ProfileUpdateParams::PaymentDetails::OrHash),
196
+ sandbox: T::Boolean,
95
197
  sending_phone_number: T.nilable(String),
96
198
  sending_phone_number_profile_id: T.nilable(String),
97
199
  sending_whatsapp_number_profile_id: T.nilable(String),
98
200
  short_name: T.nilable(String),
99
- test_mode: T::Boolean,
100
201
  whatsapp_phone_number: T.nilable(String),
101
202
  idempotency_key: String,
203
+ x_profile_id: String,
102
204
  request_options: Sentdm::RequestOptions::OrHash
103
205
  ).returns(Sentdm::APIResponseOfProfileDetail)
104
206
  end
105
207
  def update(
106
208
  # Path param
107
- path_profile_id,
209
+ profile_id,
108
210
  # Body param: Whether contacts are shared across profiles (optional)
109
211
  allow_contact_sharing: nil,
110
212
  # Body param: Whether number changes are allowed during onboarding (optional)
111
213
  allow_number_change_during_onboarding: nil,
112
214
  # Body param: Whether templates are shared across profiles (optional)
113
215
  allow_template_sharing: nil,
216
+ # Body param: Billing contact for this profile. Required when billing_model is
217
+ # "profile" or "profile_and_organization" and no billing contact has been
218
+ # configured yet. Identifies who receives invoices and who is responsible for
219
+ # payment.
220
+ billing_contact: nil,
114
221
  # Body param: Billing model: profile, organization, or profile_and_organization
115
- # (optional)
222
+ # (optional).
223
+ #
224
+ # - "organization": the organization's billing details are used; no profile-level
225
+ # billing info needed.
226
+ # - "profile": the profile is billed independently; billing_contact is required.
227
+ # - "profile_and_organization": the profile is billed first with the organization
228
+ # as fallback; billing_contact is required.
116
229
  billing_model: nil,
230
+ # Body param: Brand and KYC information for this profile (optional). When
231
+ # provided, creates or updates the brand associated with this profile. Cannot be
232
+ # set when inherit_tcr_brand is true. Once a brand has been submitted to TCR it
233
+ # cannot be modified.
234
+ brand: nil,
117
235
  # Body param: Profile description (optional)
118
236
  description: nil,
119
237
  # Body param: Profile icon URL (optional)
@@ -129,8 +247,13 @@ module Sentdm
129
247
  inherit_templates: nil,
130
248
  # Body param: Profile name (optional)
131
249
  name: nil,
132
- # Body param: Profile ID from route parameter
133
- body_profile_id: nil,
250
+ # Body param: Payment card details for this profile (optional). Accepted when
251
+ # billing_model is "profile" or "profile_and_organization". Not persisted on our
252
+ # servers — forwarded to the payment processor.
253
+ payment_details: nil,
254
+ # Body param: Sandbox flag - when true, the operation is simulated without side
255
+ # effects Useful for testing integrations without actual execution
256
+ sandbox: nil,
134
257
  # Body param: Direct phone number for SMS sending (optional)
135
258
  sending_phone_number: nil,
136
259
  # Body param: Reference to another profile to use for SMS/Telnyx configuration
@@ -139,49 +262,61 @@ module Sentdm
139
262
  # Body param: Reference to another profile to use for WhatsApp configuration
140
263
  # (optional)
141
264
  sending_whatsapp_number_profile_id: nil,
142
- # Body param: Profile short name/abbreviation (optional)
265
+ # Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
266
+ # contain only letters, numbers, and spaces, and include at least one letter.
267
+ # Example: "SALES", "Mkt 2", "Support1".
143
268
  short_name: nil,
144
- # Body param: Test mode flag - when true, the operation is simulated without side
145
- # effects Useful for testing integrations without actual execution
146
- test_mode: nil,
147
269
  # Body param: Direct phone number for WhatsApp sending (optional)
148
270
  whatsapp_phone_number: nil,
149
271
  # Header param: Unique key to ensure idempotent request processing. Must be 1-255
150
272
  # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
151
273
  # hours per key per customer.
152
274
  idempotency_key: nil,
275
+ # Header param: Profile UUID to scope the request to a child profile. Only
276
+ # organization API keys can use this header. The profile must belong to the
277
+ # calling organization.
278
+ x_profile_id: nil,
153
279
  request_options: {}
154
280
  )
155
281
  end
156
282
 
157
- # Retrieves all sender profiles within an organization. Profiles represent
158
- # different brands, departments, or use cases within an organization, each with
159
- # their own messaging configuration.
283
+ # Retrieves all sender profiles within an organization, including brand
284
+ # information for each profile. Profiles represent different brands, departments,
285
+ # or use cases within an organization, each with their own messaging
286
+ # configuration.
160
287
  sig do
161
- params(request_options: Sentdm::RequestOptions::OrHash).returns(
162
- Sentdm::Models::ProfileListResponse
163
- )
288
+ params(
289
+ x_profile_id: String,
290
+ request_options: Sentdm::RequestOptions::OrHash
291
+ ).returns(Sentdm::Models::ProfileListResponse)
164
292
  end
165
- def list(request_options: {})
293
+ def list(
294
+ # Profile UUID to scope the request to a child profile. Only organization API keys
295
+ # can use this header. The profile must belong to the calling organization.
296
+ x_profile_id: nil,
297
+ request_options: {}
298
+ )
166
299
  end
167
300
 
168
301
  # Soft deletes a sender profile. The profile will be marked as deleted but data is
169
302
  # retained. Requires admin role in the organization.
170
303
  sig do
171
304
  params(
172
- path_profile_id: String,
173
- body_profile_id: String,
174
- test_mode: T::Boolean,
305
+ profile_id: String,
306
+ body: Sentdm::ProfileDeleteParams::Body::OrHash,
307
+ x_profile_id: String,
175
308
  request_options: Sentdm::RequestOptions::OrHash
176
309
  ).void
177
310
  end
178
311
  def delete(
179
- path_profile_id,
180
- # Profile ID from route parameter
181
- body_profile_id: nil,
182
- # Test mode flag - when true, the operation is simulated without side effects
183
- # Useful for testing integrations without actual execution
184
- test_mode: nil,
312
+ # Path param
313
+ profile_id,
314
+ # Body param: Request to delete a profile
315
+ body:,
316
+ # Header param: Profile UUID to scope the request to a child profile. Only
317
+ # organization API keys can use this header. The profile must belong to the
318
+ # calling organization.
319
+ x_profile_id: nil,
185
320
  request_options: {}
186
321
  )
187
322
  end
@@ -208,8 +343,9 @@ module Sentdm
208
343
  params(
209
344
  profile_id: String,
210
345
  web_hook_url: String,
211
- test_mode: T::Boolean,
346
+ sandbox: T::Boolean,
212
347
  idempotency_key: String,
348
+ x_profile_id: String,
213
349
  request_options: Sentdm::RequestOptions::OrHash
214
350
  ).returns(T.anything)
215
351
  end
@@ -219,13 +355,17 @@ module Sentdm
219
355
  # Body param: Webhook URL to call when profile completion finishes (success or
220
356
  # failure)
221
357
  web_hook_url:,
222
- # Body param: Test mode flag - when true, the operation is simulated without side
358
+ # Body param: Sandbox flag - when true, the operation is simulated without side
223
359
  # effects Useful for testing integrations without actual execution
224
- test_mode: nil,
360
+ sandbox: nil,
225
361
  # Header param: Unique key to ensure idempotent request processing. Must be 1-255
226
362
  # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
227
363
  # hours per key per customer.
228
364
  idempotency_key: nil,
365
+ # Header param: Profile UUID to scope the request to a child profile. Only
366
+ # organization API keys can use this header. The profile must belong to the
367
+ # calling organization.
368
+ x_profile_id: nil,
229
369
  request_options: {}
230
370
  )
231
371
  end
@@ -13,9 +13,10 @@ module Sentdm
13
13
  creation_source: T.nilable(String),
14
14
  definition: Sentdm::TemplateDefinition::OrHash,
15
15
  language: T.nilable(String),
16
+ sandbox: T::Boolean,
16
17
  submit_for_review: T::Boolean,
17
- test_mode: T::Boolean,
18
18
  idempotency_key: String,
19
+ x_profile_id: String,
19
20
  request_options: Sentdm::RequestOptions::OrHash
20
21
  ).returns(Sentdm::APIResponseTemplate)
21
22
  end
@@ -30,16 +31,20 @@ module Sentdm
30
31
  # Body param: Template language code (e.g., en_US) (optional, auto-detected if not
31
32
  # provided)
32
33
  language: nil,
34
+ # Body param: Sandbox flag - when true, the operation is simulated without side
35
+ # effects Useful for testing integrations without actual execution
36
+ sandbox: nil,
33
37
  # Body param: Whether to submit the template for review after creation (default:
34
38
  # false)
35
39
  submit_for_review: nil,
36
- # Body param: Test mode flag - when true, the operation is simulated without side
37
- # effects Useful for testing integrations without actual execution
38
- test_mode: nil,
39
40
  # Header param: Unique key to ensure idempotent request processing. Must be 1-255
40
41
  # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
41
42
  # hours per key per customer.
42
43
  idempotency_key: nil,
44
+ # Header param: Profile UUID to scope the request to a child profile. Only
45
+ # organization API keys can use this header. The profile must belong to the
46
+ # calling organization.
47
+ x_profile_id: nil,
43
48
  request_options: {}
44
49
  )
45
50
  end
@@ -49,12 +54,16 @@ module Sentdm
49
54
  sig do
50
55
  params(
51
56
  id: String,
57
+ x_profile_id: String,
52
58
  request_options: Sentdm::RequestOptions::OrHash
53
59
  ).returns(Sentdm::APIResponseTemplate)
54
60
  end
55
61
  def retrieve(
56
62
  # Template ID from route parameter
57
63
  id,
64
+ # Profile UUID to scope the request to a child profile. Only organization API keys
65
+ # can use this header. The profile must belong to the calling organization.
66
+ x_profile_id: nil,
58
67
  request_options: {}
59
68
  )
60
69
  end
@@ -68,9 +77,10 @@ module Sentdm
68
77
  definition: T.nilable(Sentdm::TemplateDefinition::OrHash),
69
78
  language: T.nilable(String),
70
79
  name: T.nilable(String),
80
+ sandbox: T::Boolean,
71
81
  submit_for_review: T::Boolean,
72
- test_mode: T::Boolean,
73
82
  idempotency_key: String,
83
+ x_profile_id: String,
74
84
  request_options: Sentdm::RequestOptions::OrHash
75
85
  ).returns(Sentdm::APIResponseTemplate)
76
86
  end
@@ -85,16 +95,20 @@ module Sentdm
85
95
  language: nil,
86
96
  # Body param: Template display name
87
97
  name: nil,
98
+ # Body param: Sandbox flag - when true, the operation is simulated without side
99
+ # effects Useful for testing integrations without actual execution
100
+ sandbox: nil,
88
101
  # Body param: Whether to submit the template for review after updating (default:
89
102
  # false)
90
103
  submit_for_review: nil,
91
- # Body param: Test mode flag - when true, the operation is simulated without side
92
- # effects Useful for testing integrations without actual execution
93
- test_mode: nil,
94
104
  # Header param: Unique key to ensure idempotent request processing. Must be 1-255
95
105
  # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
96
106
  # hours per key per customer.
97
107
  idempotency_key: nil,
108
+ # Header param: Profile UUID to scope the request to a child profile. Only
109
+ # organization API keys can use this header. The profile must belong to the
110
+ # calling organization.
111
+ x_profile_id: nil,
98
112
  request_options: {}
99
113
  )
100
114
  end
@@ -106,21 +120,30 @@ module Sentdm
106
120
  page: Integer,
107
121
  page_size: Integer,
108
122
  category: T.nilable(String),
123
+ is_welcome_playground: T.nilable(T::Boolean),
109
124
  search: T.nilable(String),
110
125
  status: T.nilable(String),
126
+ x_profile_id: String,
111
127
  request_options: Sentdm::RequestOptions::OrHash
112
128
  ).returns(Sentdm::Models::TemplateListResponse)
113
129
  end
114
130
  def list(
115
- # Page number (1-indexed)
131
+ # Query param: Page number (1-indexed)
116
132
  page:,
133
+ # Query param: Number of items per page
117
134
  page_size:,
118
- # Optional category filter: MARKETING, UTILITY, AUTHENTICATION
135
+ # Query param: Optional category filter: MARKETING, UTILITY, AUTHENTICATION
119
136
  category: nil,
120
- # Optional search term for filtering templates
137
+ # Query param: Optional filter by welcome playground flag
138
+ is_welcome_playground: nil,
139
+ # Query param: Optional search term for filtering templates
121
140
  search: nil,
122
- # Optional status filter: APPROVED, PENDING, REJECTED
141
+ # Query param: Optional status filter: APPROVED, PENDING, REJECTED
123
142
  status: nil,
143
+ # Header param: Profile UUID to scope the request to a child profile. Only
144
+ # organization API keys can use this header. The profile must belong to the
145
+ # calling organization.
146
+ x_profile_id: nil,
124
147
  request_options: {}
125
148
  )
126
149
  end
@@ -131,19 +154,24 @@ module Sentdm
131
154
  params(
132
155
  id: String,
133
156
  delete_from_meta: T.nilable(T::Boolean),
134
- test_mode: T::Boolean,
157
+ sandbox: T::Boolean,
158
+ x_profile_id: String,
135
159
  request_options: Sentdm::RequestOptions::OrHash
136
160
  ).void
137
161
  end
138
162
  def delete(
139
- # Template ID from route parameter
163
+ # Path param: Template ID from route parameter
140
164
  id,
141
- # Whether to also delete the template from WhatsApp/Meta (optional, defaults to
142
- # false)
165
+ # Body param: Whether to also delete the template from WhatsApp/Meta (optional,
166
+ # defaults to false)
143
167
  delete_from_meta: nil,
144
- # Test mode flag - when true, the operation is simulated without side effects
145
- # Useful for testing integrations without actual execution
146
- test_mode: nil,
168
+ # Body param: Sandbox flag - when true, the operation is simulated without side
169
+ # effects Useful for testing integrations without actual execution
170
+ sandbox: nil,
171
+ # Header param: Profile UUID to scope the request to a child profile. Only
172
+ # organization API keys can use this header. The profile must belong to the
173
+ # calling organization.
174
+ x_profile_id: nil,
147
175
  request_options: {}
148
176
  )
149
177
  end