@sentdm/sentdm 0.34.0 → 0.36.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 (120) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/client.d.mts +53 -22
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +53 -22
  5. package/client.d.ts.map +1 -1
  6. package/client.js +39 -8
  7. package/client.js.map +1 -1
  8. package/client.mjs +39 -8
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/contacts.d.mts +606 -89
  12. package/resources/contacts.d.mts.map +1 -1
  13. package/resources/contacts.d.ts +606 -89
  14. package/resources/contacts.d.ts.map +1 -1
  15. package/resources/contacts.js +21 -15
  16. package/resources/contacts.js.map +1 -1
  17. package/resources/contacts.mjs +21 -15
  18. package/resources/contacts.mjs.map +1 -1
  19. package/resources/conversations.d.mts +335 -69
  20. package/resources/conversations.d.mts.map +1 -1
  21. package/resources/conversations.d.ts +335 -69
  22. package/resources/conversations.d.ts.map +1 -1
  23. package/resources/conversations.js +15 -10
  24. package/resources/conversations.js.map +1 -1
  25. package/resources/conversations.mjs +15 -10
  26. package/resources/conversations.mjs.map +1 -1
  27. package/resources/index.d.mts +7 -7
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +7 -7
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js.map +1 -1
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/me.d.mts +165 -41
  34. package/resources/me.d.mts.map +1 -1
  35. package/resources/me.d.ts +165 -41
  36. package/resources/me.d.ts.map +1 -1
  37. package/resources/me.js +14 -1
  38. package/resources/me.js.map +1 -1
  39. package/resources/me.mjs +14 -1
  40. package/resources/me.mjs.map +1 -1
  41. package/resources/messages.d.mts +206 -27
  42. package/resources/messages.d.mts.map +1 -1
  43. package/resources/messages.d.ts +206 -27
  44. package/resources/messages.d.ts.map +1 -1
  45. package/resources/messages.js +5 -1
  46. package/resources/messages.js.map +1 -1
  47. package/resources/messages.mjs +5 -1
  48. package/resources/messages.mjs.map +1 -1
  49. package/resources/numbers.d.mts +45 -4
  50. package/resources/numbers.d.mts.map +1 -1
  51. package/resources/numbers.d.ts +45 -4
  52. package/resources/numbers.d.ts.map +1 -1
  53. package/resources/numbers.js +3 -1
  54. package/resources/numbers.js.map +1 -1
  55. package/resources/numbers.mjs +3 -1
  56. package/resources/numbers.mjs.map +1 -1
  57. package/resources/profiles/campaigns.d.mts +579 -209
  58. package/resources/profiles/campaigns.d.mts.map +1 -1
  59. package/resources/profiles/campaigns.d.ts +579 -209
  60. package/resources/profiles/campaigns.d.ts.map +1 -1
  61. package/resources/profiles/campaigns.js +33 -64
  62. package/resources/profiles/campaigns.js.map +1 -1
  63. package/resources/profiles/campaigns.mjs +33 -64
  64. package/resources/profiles/campaigns.mjs.map +1 -1
  65. package/resources/profiles/index.d.mts +2 -2
  66. package/resources/profiles/index.d.mts.map +1 -1
  67. package/resources/profiles/index.d.ts +2 -2
  68. package/resources/profiles/index.d.ts.map +1 -1
  69. package/resources/profiles/index.js.map +1 -1
  70. package/resources/profiles/index.mjs.map +1 -1
  71. package/resources/profiles/profiles.d.mts +2006 -508
  72. package/resources/profiles/profiles.d.mts.map +1 -1
  73. package/resources/profiles/profiles.d.ts +2006 -508
  74. package/resources/profiles/profiles.d.ts.map +1 -1
  75. package/resources/profiles/profiles.js +98 -75
  76. package/resources/profiles/profiles.js.map +1 -1
  77. package/resources/profiles/profiles.mjs +98 -75
  78. package/resources/profiles/profiles.mjs.map +1 -1
  79. package/resources/templates.d.mts +497 -84
  80. package/resources/templates.d.mts.map +1 -1
  81. package/resources/templates.d.ts +497 -84
  82. package/resources/templates.d.ts.map +1 -1
  83. package/resources/templates.js +6 -4
  84. package/resources/templates.js.map +1 -1
  85. package/resources/templates.mjs +6 -4
  86. package/resources/templates.mjs.map +1 -1
  87. package/resources/users.d.mts +444 -43
  88. package/resources/users.d.mts.map +1 -1
  89. package/resources/users.d.ts +444 -43
  90. package/resources/users.d.ts.map +1 -1
  91. package/resources/users.js +6 -4
  92. package/resources/users.js.map +1 -1
  93. package/resources/users.mjs +6 -4
  94. package/resources/users.mjs.map +1 -1
  95. package/resources/webhooks.d.mts +791 -190
  96. package/resources/webhooks.d.mts.map +1 -1
  97. package/resources/webhooks.d.ts +791 -190
  98. package/resources/webhooks.d.ts.map +1 -1
  99. package/resources/webhooks.js +11 -8
  100. package/resources/webhooks.js.map +1 -1
  101. package/resources/webhooks.mjs +11 -8
  102. package/resources/webhooks.mjs.map +1 -1
  103. package/src/client.ts +78 -60
  104. package/src/resources/contacts.ts +696 -92
  105. package/src/resources/conversations.ts +400 -77
  106. package/src/resources/index.ts +20 -26
  107. package/src/resources/me.ts +186 -52
  108. package/src/resources/messages.ts +230 -27
  109. package/src/resources/numbers.ts +50 -4
  110. package/src/resources/profiles/campaigns.ts +706 -232
  111. package/src/resources/profiles/index.ts +6 -14
  112. package/src/resources/profiles/profiles.ts +2421 -646
  113. package/src/resources/templates.ts +583 -99
  114. package/src/resources/users.ts +514 -44
  115. package/src/resources/webhooks.ts +964 -241
  116. package/src/version.ts +1 -1
  117. package/version.d.mts +1 -1
  118. package/version.d.ts +1 -1
  119. package/version.js +1 -1
  120. package/version.mjs +1 -1
@@ -1,39 +1,40 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as ProfilesAPI from "./profiles.js";
3
- import * as WebhooksAPI from "../webhooks.js";
4
3
  import * as CampaignsAPI from "./campaigns.js";
5
- import { APIResponseOfBrandCampaign, APIResponseOfListOfBrandCampaign, BrandCampaign, CampaignCreateParams, CampaignData, CampaignDeleteParams, CampaignListParams, CampaignUpdateParams, CampaignUseCase, CampaignUseCaseData, Campaigns, MessagingUseCaseUs } from "./campaigns.js";
4
+ import { CampaignCreateParams, CampaignCreateResponse, CampaignDeleteParams, CampaignListParams, CampaignListResponse, CampaignUpdateParams, CampaignUpdateResponse, Campaigns, MessagingUseCaseUs } from "./campaigns.js";
6
5
  import { APIPromise } from "../../core/api-promise.js";
7
6
  import { RequestOptions } from "../../internal/request-options.js";
8
7
  /**
9
- * Manage organization profiles
8
+ * **Deprecated — use Sender Profiles.**
9
+ *
10
+ * The original profile resource, kept because it has live callers. It still works, and its replacement is `/v3/sender-profiles`, which takes the identity and the campaign in one call instead of across three.
11
+ *
12
+ * New integrations should not start here.
10
13
  */
11
14
  export declare class Profiles extends APIResource {
12
15
  campaigns: CampaignsAPI.Campaigns;
13
16
  /**
17
+ * **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
18
+ * removed in a future release. It still behaves exactly as before, so nothing
19
+ * needs to change today — but new integrations should use `/v3/sender-profiles`,
20
+ * which models a profile's markets, compliance, brand, campaigns and billing
21
+ * explicitly.
22
+ *
14
23
  * Creates a new sender profile within an organization. Profiles represent
15
24
  * different brands, departments, or use cases, each with their own messaging
16
25
  * configuration and settings. Requires admin role in the organization.
17
26
  *
18
27
  * ## WhatsApp Business Account
19
28
  *
20
- * Every profile must be linked to a WhatsApp Business Account. There are two ways
21
- * to do this:
22
- *
23
- * **1. Inherit from organization (default)** — Omit the
24
- * `whatsapp_business_account` field. The profile will share the organization's
25
- * WhatsApp Business Account, which must have been set up via WhatsApp Embedded
26
- * Signup. This is the recommended path for most use cases.
29
+ * Every profile owns its own WhatsApp Business Account — accounts are never shared
30
+ * between profiles or inherited from the organization. Provide a
31
+ * `whatsapp_business_account` object with `waba_id`, `phone_number_id`, and
32
+ * `access_token`. Obtain these from Meta Business Manager by creating a System
33
+ * User with `whatsapp_business_messaging` and `whatsapp_business_management`
34
+ * permissions.
27
35
  *
28
- * **2. Direct credentials** — Provide a `whatsapp_business_account` object with
29
- * `waba_id`, `phone_number_id`, and `access_token`. Use this when the profile
30
- * needs its own independent WhatsApp Business Account. Obtain these from Meta
31
- * Business Manager by creating a System User with `whatsapp_business_messaging`
32
- * and `whatsapp_business_management` permissions.
33
- *
34
- * If the `whatsapp_business_account` field is omitted and the organization has no
35
- * WhatsApp Business Account configured, the request will be rejected with
36
- * HTTP 422.
36
+ * Omit the field and the profile is created without WhatsApp, staying incomplete
37
+ * until it has an account of its own.
37
38
  *
38
39
  * ## Brand
39
40
  *
@@ -48,28 +49,30 @@ export declare class Profiles extends APIResource {
48
49
  * and are forwarded directly to the payment processor. Providing `payment_details`
49
50
  * when `billing_model` is `"organization"` is not allowed.
50
51
  *
51
- * @example
52
- * ```ts
53
- * const apiResponseOfProfileDetail =
54
- * await client.profiles.create();
55
- * ```
52
+ * @deprecated
56
53
  */
57
- create(params: ProfileCreateParams, options?: RequestOptions): APIPromise<APIResponseOfProfileDetail>;
54
+ create(params: ProfileCreateParams, options?: RequestOptions): APIPromise<ProfileCreateResponse>;
58
55
  /**
56
+ * **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
57
+ * removed in a future release. It still behaves exactly as before, so nothing
58
+ * needs to change today — but new integrations should use `/v3/sender-profiles`,
59
+ * which models a profile's markets, compliance, brand, campaigns and billing
60
+ * explicitly.
61
+ *
59
62
  * Retrieves detailed information about a specific sender profile within an
60
63
  * organization, including brand and KYC information if a brand has been
61
64
  * configured.
62
65
  *
63
- * @example
64
- * ```ts
65
- * const apiResponseOfProfileDetail =
66
- * await client.profiles.retrieve(
67
- * '770e8400-e29b-41d4-a716-446655440002',
68
- * );
69
- * ```
66
+ * @deprecated
70
67
  */
71
- retrieve(profileID: string, params?: ProfileRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseOfProfileDetail>;
68
+ retrieve(profileID: string, params?: ProfileRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ProfileRetrieveResponse>;
72
69
  /**
70
+ * **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
71
+ * removed in a future release. It still behaves exactly as before, so nothing
72
+ * needs to change today — but new integrations should use `/v3/sender-profiles`,
73
+ * which models a profile's markets, compliance, brand, campaigns and billing
74
+ * explicitly.
75
+ *
73
76
  * Updates a profile's configuration and settings. Requires admin role in the
74
77
  * organization. Only provided fields will be updated (partial update).
75
78
  *
@@ -89,49 +92,76 @@ export declare class Profiles extends APIResource {
89
92
  * and are forwarded directly to the payment processor. Providing `payment_details`
90
93
  * when `billing_model` is `"organization"` is not allowed.
91
94
  *
92
- * @example
93
- * ```ts
94
- * const apiResponseOfProfileDetail =
95
- * await client.profiles.update(
96
- * '770e8400-e29b-41d4-a716-446655440002',
97
- * );
98
- * ```
95
+ * ## Deprecated fields
96
+ *
97
+ * `sending_phone_number_profile_id` and `sending_whatsapp_number_profile_id` are
98
+ * **accepted and ignored**. Sender borrowing is gone: a profile cannot send from
99
+ * another profile's number, because two profiles behind one sender makes an
100
+ * inbound reply and a delivery receipt ambiguous about whose they are.
101
+ *
102
+ * Sending either **changes nothing and still returns `200`** — they are kept on
103
+ * the contract so an existing integration keeps working. Reads carry both keys too
104
+ * and always answer `null`, which is how you can confirm the value did not take.
105
+ *
106
+ * Give the profile a sender of its own instead — `POST /v3/channels/sms` or
107
+ * `POST /v3/channels/whatsapp`, sent with the `x-profile-id` header naming it.
108
+ *
109
+ * @deprecated
99
110
  */
100
- update(profileID: string, params: ProfileUpdateParams, options?: RequestOptions): APIPromise<APIResponseOfProfileDetail>;
111
+ update(profileID: string, params: ProfileUpdateParams, options?: RequestOptions): APIPromise<ProfileUpdateResponse>;
101
112
  /**
113
+ * **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
114
+ * removed in a future release. It still behaves exactly as before, so nothing
115
+ * needs to change today — but new integrations should use `/v3/sender-profiles`,
116
+ * which models a profile's markets, compliance, brand, campaigns and billing
117
+ * explicitly.
118
+ *
102
119
  * Retrieves all sender profiles within an organization, including brand
103
120
  * information for each profile. Profiles represent different brands, departments,
104
121
  * or use cases within an organization, each with their own messaging
105
122
  * configuration.
106
123
  *
107
- * @example
108
- * ```ts
109
- * const profiles = await client.profiles.list();
110
- * ```
124
+ * @deprecated
111
125
  */
112
126
  list(params?: ProfileListParams | null | undefined, options?: RequestOptions): APIPromise<ProfileListResponse>;
113
127
  /**
128
+ * **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
129
+ * removed in a future release. It still behaves exactly as before, so nothing
130
+ * needs to change today — but new integrations should use `/v3/sender-profiles`,
131
+ * which models a profile's markets, compliance, brand, campaigns and billing
132
+ * explicitly.
133
+ *
114
134
  * Soft deletes a sender profile. The profile will be marked as deleted but data is
115
- * retained. Requires admin role in the organization.
135
+ * retained. Anything it still held is released first: phone numbers return to our
136
+ * inventory and can go to whoever asks next, its own WhatsApp account is
137
+ * deregistered, and its routing rules stop being used. Requires admin role in the
138
+ * organization.
116
139
  *
117
- * @example
118
- * ```ts
119
- * await client.profiles.delete(
120
- * '770e8400-e29b-41d4-a716-446655440002',
121
- * );
122
- * ```
140
+ * @deprecated
123
141
  */
124
142
  delete(profileID: string, params: ProfileDeleteParams, options?: RequestOptions): APIPromise<void>;
125
143
  /**
144
+ * **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
145
+ * removed in a future release. It still behaves exactly as before, so nothing
146
+ * needs to change today — but new integrations should use `/v3/sender-profiles`,
147
+ * which models a profile's markets, compliance, brand, campaigns and billing
148
+ * explicitly.
149
+ *
126
150
  * Final step in the profile compliance workflow. Validates all prerequisites (KYC,
127
151
  * brand, campaigns, required documents), connects the profile to the SMS and
128
- * WhatsApp channels, and sets its status based on configuration. Prerequisites are
129
- * always validated first: if any fail the call returns 400. If they pass and the
130
- * profile is already completed, the call returns 200 and does nothing. Otherwise
131
- * it returns 202 and calls the provided webhook URL when background processing
132
- * finishes.
152
+ * WhatsApp channels, and marks it onboarded. Prerequisites are always validated
153
+ * first: if any fail the call returns 400 naming every unmet one, and nothing is
154
+ * started. If they pass and the profile is already onboarded, the call returns 200
155
+ * and does nothing. Otherwise it returns 202 and calls the provided webhook URL
156
+ * when background processing finishes.
133
157
  *
134
- * Prerequisites:
158
+ * Callable with the organization's API key or the profile's own key. The key's
159
+ * user must be an admin or owner of the profile, or of the organization it belongs
160
+ * to.
161
+ *
162
+ * Prerequisites (all but the last are checked before the already-onboarded
163
+ * short-circuit, matching the previous contract; the last is checked after it, so
164
+ * a profile that is already onboarded is never rejected by it):
135
165
  *
136
166
  * - Profile must have a name, short name, and description (short name max 50
137
167
  * characters, description max 5000)
@@ -142,524 +172,1179 @@ export declare class Profiles extends APIResource {
142
172
  * - TCR applications must have at least one campaign, own or inherited
143
173
  * - Destination countries marked as main must have their required compliance
144
174
  * documents uploaded
175
+ * - TCR applications must state whether they inherit the organization's TCR brand
176
+ * and campaign
177
+ *
178
+ * Outcome:
145
179
  *
146
- * Resulting status:
147
- *
148
- * - If either the SMS or WhatsApp channel is unconfigured, the profile is
149
- * SUBMITTED
150
- * - For a TCR application that inherits both its brand and its campaigns, the
151
- * profile is COMPLETED
152
- * - For a TCR application that owns either its brand or its campaigns, the profile
153
- * is COMPLETED once both have been submitted to TCR, and SUBMITTED until then
154
- * - For a non-TCR application, the profile is SUBMITTED when a main destination
155
- * country is set, and COMPLETED otherwise
156
- *
157
- * @example
158
- * ```ts
159
- * const response = await client.profiles.complete(
160
- * '660e8400-e29b-41d4-a716-446655440000',
161
- * {
162
- * webHookUrl:
163
- * 'https://your-app.com/webhook/profile-complete',
164
- * },
165
- * );
166
- * ```
180
+ * - Once the prerequisites pass and background processing succeeds, the profile's
181
+ * conversionFlowStatus becomes ONBOARDED and its public status reads `approved`
182
+ * - A profile with no WhatsApp channel, or one still awaiting TCR registration or
183
+ * country documents, is onboarded like any other. Those are answered by the
184
+ * brand and campaign records, not by a status on the profile
185
+ * - If background processing fails, the profile keeps the status it already had
186
+ * and the webhook reports the reason
187
+ *
188
+ * @deprecated
167
189
  */
168
190
  complete(profileID: string, params: ProfileCompleteParams, options?: RequestOptions): APIPromise<ProfileCompleteResponse>;
169
191
  }
192
+ export interface DestinationCountry {
193
+ id?: string;
194
+ isMain?: boolean;
195
+ }
196
+ export type TcrBrandRelationship = 'BASIC_ACCOUNT' | 'MEDIUM_ACCOUNT' | 'LARGE_ACCOUNT' | 'SMALL_ACCOUNT' | 'KEY_ACCOUNT';
197
+ export type TcrVertical = 'PROFESSIONAL' | 'REAL_ESTATE' | 'HEALTHCARE' | 'HUMAN_RESOURCES' | 'ENERGY' | 'ENTERTAINMENT' | 'RETAIL' | 'TRANSPORTATION' | 'AGRICULTURE' | 'INSURANCE' | 'POSTAL' | 'EDUCATION' | 'HOSPITALITY' | 'FINANCIAL' | 'POLITICAL' | 'GAMBLING' | 'LEGAL' | 'CONSTRUCTION' | 'NGO' | 'MANUFACTURING' | 'GOVERNMENT' | 'TECHNOLOGY' | 'COMMUNICATION';
170
198
  /**
171
199
  * Standard API response envelope for all v3 endpoints
172
200
  */
173
- export interface APIResponseOfProfileDetail {
201
+ export interface ProfileCreateResponse {
174
202
  /**
175
203
  * Detailed profile response for v3 API
176
204
  */
177
- data?: ProfileDetail | null;
205
+ data?: ProfileCreateResponse.Data | null;
178
206
  /**
179
207
  * Error information
180
208
  */
181
- error?: WebhooksAPI.ErrorDetail | null;
209
+ error?: ProfileCreateResponse.Error | null;
182
210
  /**
183
211
  * Request and response metadata
184
212
  */
185
- meta?: WebhooksAPI.APIMeta;
213
+ meta?: ProfileCreateResponse.Meta;
186
214
  /**
187
215
  * Indicates whether the request was successful
188
216
  */
189
217
  success?: boolean;
190
218
  }
191
- /**
192
- * Billing contact information for a profile. Required when billing_model is
193
- * "profile" or "profile_and_organization".
194
- */
195
- export interface BillingContactInfo {
196
- /**
197
- * Email address where invoices will be sent (required)
198
- */
199
- email: string;
200
- /**
201
- * Full name of the billing contact or company (required)
202
- */
203
- name: string;
204
- /**
205
- * Billing address (optional). Free-form text including street, city, state, postal
206
- * code, and country.
207
- */
208
- address?: string | null;
209
- /**
210
- * Phone number for the billing contact (optional)
211
- */
212
- phone?: string | null;
213
- }
214
- /**
215
- * Business details and address for brand KYC
216
- */
217
- export interface BrandBusinessInfo {
218
- /**
219
- * City
220
- */
221
- city?: string | null;
222
- /**
223
- * Country code (e.g., US, CA)
224
- */
225
- country?: string | null;
226
- /**
227
- * Country where the business is registered
228
- */
229
- countryOfRegistration?: string | null;
230
- entityType?: 'PRIVATE_PROFIT' | 'PUBLIC_PROFIT' | 'NON_PROFIT' | 'SOLE_PROPRIETOR' | 'GOVERNMENT' | null;
231
- /**
232
- * Legal business name
233
- */
234
- legalName?: string | null;
235
- /**
236
- * Postal/ZIP code
237
- */
238
- postalCode?: string | null;
239
- /**
240
- * State/province code
241
- */
242
- state?: string | null;
243
- /**
244
- * Street address
245
- */
246
- street?: string | null;
247
- /**
248
- * Tax ID/EIN number
249
- */
250
- taxId?: string | null;
251
- /**
252
- * Type of tax ID (e.g., us_ein, ca_bn)
253
- */
254
- taxIdType?: string | null;
255
- /**
256
- * Business website URL
257
- */
258
- url?: string | null;
259
- }
260
- /**
261
- * Compliance and TCR information for brand registration
262
- */
263
- export interface BrandComplianceInfo {
264
- brandRelationship: TcrBrandRelationship;
265
- vertical: TcrVertical;
266
- /**
267
- * List of destination countries for messaging
268
- */
269
- destinationCountries?: Array<DestinationCountry> | null;
270
- /**
271
- * Whether this is a TCR (Campaign Registry) application
272
- */
273
- isTcrApplication?: boolean | null;
274
- /**
275
- * Additional notes about the business or use case
276
- */
277
- notes?: string | null;
278
- /**
279
- * Phone number prefix for messaging (e.g., "+1")
280
- */
281
- phoneNumberPrefix?: string | null;
282
- /**
283
- * Primary messaging use case description
284
- */
285
- primaryUseCase?: string | null;
286
- }
287
- /**
288
- * Contact information for brand KYC
289
- */
290
- export interface BrandContactInfo {
291
- /**
292
- * Primary contact name (required)
293
- */
294
- name: string;
295
- /**
296
- * Business/brand name
297
- */
298
- businessName?: string | null;
299
- /**
300
- * Contact email address
301
- */
302
- email?: string | null;
303
- /**
304
- * Contact phone number in E.164 format
305
- */
306
- phone?: string | null;
307
- /**
308
- * Contact phone country code (e.g., "1" for US)
309
- */
310
- phoneCountryCode?: string | null;
311
- /**
312
- * Contact's role in the business
313
- */
314
- role?: string | null;
315
- }
316
- /**
317
- * Brand and KYC data grouped into contact, business, and compliance sections
318
- */
319
- export interface BrandsBrandData {
320
- /**
321
- * Compliance and TCR information for brand registration
322
- */
323
- compliance: BrandComplianceInfo;
324
- /**
325
- * Contact information for brand KYC
326
- */
327
- contact: BrandContactInfo;
328
- /**
329
- * Business details and address for brand KYC
330
- */
331
- business?: BrandBusinessInfo | null;
332
- }
333
- export interface DestinationCountry {
334
- id?: string;
335
- isMain?: boolean;
336
- }
337
- /**
338
- * Payment card details for a profile. Accepted when billing_model is "profile" or
339
- * "profile_and_organization". These details are not stored on our servers and will
340
- * be forwarded to the payment processor.
341
- */
342
- export interface PaymentDetails {
343
- /**
344
- * Card number (digits only, 13–19 characters)
345
- */
346
- card_number: string;
347
- /**
348
- * Card security code (3–4 digits)
349
- */
350
- cvc: string;
351
- /**
352
- * Card expiry date in MM/YY format (e.g. "09/27")
353
- */
354
- expiry: string;
355
- /**
356
- * Billing ZIP / postal code associated with the card
357
- */
358
- zip_code: string;
359
- }
360
- /**
361
- * Detailed profile response for v3 API
362
- */
363
- export interface ProfileDetail {
364
- /**
365
- * Profile unique identifier
366
- */
367
- id?: string;
368
- /**
369
- * Whether contacts are shared across profiles in the organization
370
- */
371
- allow_contact_sharing?: boolean;
372
- /**
373
- * Whether number changes are allowed during onboarding
374
- */
375
- allow_number_change_during_onboarding?: boolean | null;
376
- /**
377
- * Whether templates are shared across profiles in the organization
378
- */
379
- allow_template_sharing?: boolean;
380
- /**
381
- * Billing contact info returned in profile responses
382
- */
383
- billing_contact?: ProfileDetail.BillingContact | null;
384
- /**
385
- * Billing model: profile, organization, or profile_and_organization
386
- */
387
- billing_model?: string;
388
- /**
389
- * Brand response with nested contact, business, and compliance sections — mirrors
390
- * the request structure.
391
- */
392
- brand?: ProfileDetail.Brand | null;
393
- /**
394
- * When the profile was created
395
- */
396
- created_at?: string;
397
- /**
398
- * Profile description
399
- */
400
- description?: string | null;
401
- /**
402
- * Profile email (inherited from organization)
403
- */
404
- email?: string | null;
405
- /**
406
- * Profile icon URL
407
- */
408
- icon?: string | null;
409
- /**
410
- * Whether this profile inherits contacts from the organization
411
- */
412
- inherit_contacts?: boolean;
413
- /**
414
- * Whether this profile inherits TCR brand from the organization
415
- */
416
- inherit_tcr_brand?: boolean;
417
- /**
418
- * Whether this profile inherits TCR campaign from the organization
419
- */
420
- inherit_tcr_campaign?: boolean;
421
- /**
422
- * Whether this profile inherits templates from the organization
423
- */
424
- inherit_templates?: boolean;
425
- /**
426
- * Profile name
427
- */
428
- name?: string;
429
- /**
430
- * Parent organization ID
431
- */
432
- organization_id?: string | null;
433
- /**
434
- * Direct SMS phone number
435
- */
436
- sending_phone_number?: string | null;
437
- /**
438
- * Reference to another profile whose SMS configuration this profile uses
439
- */
440
- sending_phone_number_profile_id?: string | null;
441
- /**
442
- * Reference to another profile for WhatsApp configuration
443
- */
444
- sending_whatsapp_number_profile_id?: string | null;
445
- /**
446
- * Profile short name/abbreviation. 3–11 characters: letters, numbers, and spaces
447
- * only, with at least one letter.
448
- */
449
- short_name?: string | null;
450
- /**
451
- * Profile setup status: incomplete, pending_review, approved, rejected
452
- */
453
- status?: string;
454
- /**
455
- * When the profile was last updated
456
- */
457
- updated_at?: string | null;
458
- /**
459
- * WhatsApp Business Account ID associated with this profile. Present whether the
460
- * WABA is inherited from the organization or configured directly.
461
- */
462
- waba_id?: string | null;
463
- /**
464
- * Direct WhatsApp phone number
465
- */
466
- whatsapp_phone_number?: string | null;
467
- }
468
- export declare namespace ProfileDetail {
469
- /**
470
- * Billing contact info returned in profile responses
471
- */
472
- interface BillingContact {
473
- address?: string | null;
474
- email?: string | null;
475
- name?: string | null;
476
- phone?: string | null;
477
- }
219
+ export declare namespace ProfileCreateResponse {
478
220
  /**
479
- * Brand response with nested contact, business, and compliance sections — mirrors
480
- * the request structure.
221
+ * Detailed profile response for v3 API
481
222
  */
482
- interface Brand {
223
+ interface Data {
483
224
  /**
484
- * Unique identifier for the brand
225
+ * Profile unique identifier
485
226
  */
486
227
  id?: string;
487
228
  /**
488
- * Business details and address information
229
+ * @deprecated Always false. A profile no longer shares contacts with sibling
230
+ * profiles — it sees only what it owns. Retained so existing v3 clients reading
231
+ * allow_contact_sharing keep deserializing; it carries no information.
489
232
  */
490
- business?: Brand.Business | null;
233
+ allow_contact_sharing?: boolean | null;
234
+ /**
235
+ * Whether number changes are allowed during onboarding
236
+ */
237
+ allow_number_change_during_onboarding?: boolean | null;
238
+ /**
239
+ * @deprecated Always false. A profile no longer shares templates with sibling
240
+ * profiles. Retained so existing v3 clients reading allow_template_sharing keep
241
+ * deserializing; it carries no information.
242
+ */
243
+ allow_template_sharing?: boolean | null;
244
+ /**
245
+ * Billing contact info returned in profile responses
246
+ */
247
+ billing_contact?: Data.BillingContact | null;
491
248
  /**
492
- * Compliance and TCR-related information
249
+ * Billing model: profile, organization, or profile_and_organization
493
250
  */
494
- compliance?: Brand.Compliance | null;
251
+ billing_model?: string;
495
252
  /**
496
- * Contact information for the brand
253
+ * Brand response with nested contact, business, and compliance sections — mirrors
254
+ * the request structure.
497
255
  */
498
- contact?: Brand.Contact | null;
256
+ brand?: Data.Brand | null;
499
257
  /**
500
- * When the brand was created
258
+ * When the profile was created
501
259
  */
502
260
  created_at?: string;
503
261
  /**
504
- * @deprecated Deprecated and scheduled for removal. Identifies the Campaign
505
- * Service Provider that registered the brand, which is Sent, so the value is the
506
- * same for every brand and every account. Nothing on your side can act on it and
507
- * there is no replacement. Stop reading it.
262
+ * Profile description
263
+ */
264
+ description?: string | null;
265
+ /**
266
+ * Profile email (inherited from organization)
267
+ */
268
+ email?: string | null;
269
+ /**
270
+ * Profile icon URL
508
271
  */
509
- csp_id?: string | null;
510
- identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
272
+ icon?: string | null;
511
273
  /**
512
- * Whether this brand is inherited from the parent organization
274
+ * @deprecated Always false. A profile no longer inherits its organization's
275
+ * contacts. Retained so existing v3 clients reading inherit_contacts keep
276
+ * deserializing; it carries no information.
513
277
  */
514
- is_inherited?: boolean;
515
- status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
278
+ inherit_contacts?: boolean | null;
516
279
  /**
517
- * When the brand was submitted to TCR
280
+ * Whether this profile inherits TCR brand from the organization
518
281
  */
519
- submitted_at?: string | null;
282
+ inherit_tcr_brand?: boolean;
520
283
  /**
521
- * Whether this brand has been submitted to TCR
284
+ * Whether this profile inherits TCR campaign from the organization
522
285
  */
523
- submitted_to_tcr?: boolean;
286
+ inherit_tcr_campaign?: boolean;
524
287
  /**
525
- * TCR brand ID (populated after TCR submission)
288
+ * @deprecated Always false. A profile no longer inherits its organization's
289
+ * templates. Retained so existing v3 clients reading inherit_templates keep
290
+ * deserializing; it carries no information.
526
291
  */
527
- tcr_brand_id?: string | null;
292
+ inherit_templates?: boolean | null;
528
293
  /**
529
- * Universal EIN from TCR
294
+ * Profile name
530
295
  */
531
- universal_ein?: string | null;
296
+ name?: string;
532
297
  /**
533
- * When the brand was last updated
298
+ * Parent organization ID
299
+ */
300
+ organization_id?: string | null;
301
+ /**
302
+ * Direct SMS phone number
303
+ */
304
+ sending_phone_number?: string | null;
305
+ /**
306
+ * @deprecated Deprecated. Always null. Sender borrowing is gone: a profile no
307
+ * longer points at another profile for its SMS sender, and every profile owns the
308
+ * sender it sends from.
309
+ *
310
+ * Kept on the wire, and never populated, because those are two different promises.
311
+ * Removing the key changes the response's shape — a generated client loses the
312
+ * property and stops compiling on the next regenerate, for a value that is now
313
+ * null for every profile in existence. Keeping it null costs a key and breaks
314
+ * nobody, and null is the honest answer rather than a placeholder: there is no
315
+ * borrowing left to report.
316
+ *
317
+ * Nothing could populate it. Migration 260813161500 dropped the column and copied
318
+ * each borrower its own channel-provider row; its Down() says outright that the
319
+ * borrower-to-lender pairing is not recoverable. The only surviving trace is a
320
+ * notes string on the copied row.
321
+ */
322
+ sending_phone_number_profile_id?: string | null;
323
+ /**
324
+ * @deprecated
325
+ */
326
+ sending_whatsapp_number_profile_id?: string | null;
327
+ /**
328
+ * Profile short name/abbreviation. 3–11 characters: letters, numbers, and spaces
329
+ * only, with at least one letter.
330
+ */
331
+ short_name?: string | null;
332
+ /**
333
+ * Profile setup status: incomplete, pending_review, approved, rejected
334
+ */
335
+ status?: string;
336
+ /**
337
+ * When the profile was last updated
534
338
  */
535
339
  updated_at?: string | null;
340
+ /**
341
+ * WhatsApp Business Account ID associated with this profile. Present whether the
342
+ * WABA is inherited from the organization or configured directly.
343
+ */
344
+ waba_id?: string | null;
345
+ /**
346
+ * Direct WhatsApp phone number
347
+ */
348
+ whatsapp_phone_number?: string | null;
536
349
  }
537
- namespace Brand {
350
+ namespace Data {
538
351
  /**
539
- * Business details and address information
352
+ * Billing contact info returned in profile responses
540
353
  */
541
- interface Business {
542
- /**
543
- * City
544
- */
545
- city?: string | null;
354
+ interface BillingContact {
355
+ address?: string | null;
356
+ email?: string | null;
357
+ name?: string | null;
358
+ phone?: string | null;
359
+ }
360
+ /**
361
+ * Brand response with nested contact, business, and compliance sections — mirrors
362
+ * the request structure.
363
+ */
364
+ interface Brand {
546
365
  /**
547
- * Country code (e.g., US, CA)
366
+ * Unique identifier for the brand
548
367
  */
549
- country?: string | null;
368
+ id?: string;
550
369
  /**
551
- * Country where the business is registered
370
+ * Business details and address information
552
371
  */
553
- country_of_registration?: string | null;
372
+ business?: Brand.Business | null;
554
373
  /**
555
- * Business entity type
374
+ * Compliance and TCR-related information
556
375
  */
557
- entity_type?: string | null;
376
+ compliance?: Brand.Compliance | null;
558
377
  /**
559
- * Legal business name
378
+ * Contact information for the brand
560
379
  */
561
- legal_name?: string | null;
380
+ contact?: Brand.Contact | null;
562
381
  /**
563
- * Postal/ZIP code
382
+ * When the brand was created
564
383
  */
565
- postal_code?: string | null;
384
+ created_at?: string;
566
385
  /**
567
- * State/province code
386
+ * @deprecated Deprecated and scheduled for removal. Identifies the Campaign
387
+ * Service Provider that registered the brand, which is Sent, so the value is the
388
+ * same for every brand and every account. Nothing on your side can act on it and
389
+ * there is no replacement. Stop reading it.
568
390
  */
569
- state?: string | null;
391
+ csp_id?: string | null;
392
+ identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
570
393
  /**
571
- * Street address
394
+ * Whether this brand is inherited from the parent organization
572
395
  */
573
- street?: string | null;
396
+ is_inherited?: boolean;
397
+ status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
574
398
  /**
575
- * Tax ID/EIN number
399
+ * When the brand was submitted to TCR
576
400
  */
577
- tax_id?: string | null;
401
+ submitted_at?: string | null;
578
402
  /**
579
- * Type of tax ID (e.g., us_ein, ca_bn)
403
+ * Whether this brand has been submitted to TCR
580
404
  */
581
- tax_id_type?: string | null;
405
+ submitted_to_tcr?: boolean;
582
406
  /**
583
- * Business website URL
407
+ * TCR brand ID (populated after TCR submission)
584
408
  */
585
- url?: string | null;
586
- }
587
- /**
588
- * Compliance and TCR-related information
589
- */
590
- interface Compliance {
591
- brand_relationship?: ProfilesAPI.TcrBrandRelationship | null;
409
+ tcr_brand_id?: string | null;
592
410
  /**
593
- * List of destination countries for messaging
411
+ * Universal EIN from TCR
594
412
  */
595
- destination_countries?: Array<ProfilesAPI.DestinationCountry>;
413
+ universal_ein?: string | null;
596
414
  /**
597
- * Whether this is a TCR (Campaign Registry) application
415
+ * When the brand was last updated
598
416
  */
599
- is_tcr_application?: boolean;
417
+ updated_at?: string | null;
418
+ }
419
+ namespace Brand {
600
420
  /**
601
- * Additional notes about the business or use case
421
+ * Business details and address information
602
422
  */
603
- notes?: string | null;
423
+ interface Business {
424
+ /**
425
+ * City
426
+ */
427
+ city?: string | null;
428
+ /**
429
+ * Country code (e.g., US, CA)
430
+ */
431
+ country?: string | null;
432
+ /**
433
+ * Country where the business is registered
434
+ */
435
+ country_of_registration?: string | null;
436
+ /**
437
+ * Business entity type
438
+ */
439
+ entity_type?: string | null;
440
+ /**
441
+ * Legal business name
442
+ */
443
+ legal_name?: string | null;
444
+ /**
445
+ * Postal/ZIP code
446
+ */
447
+ postal_code?: string | null;
448
+ /**
449
+ * State/province code
450
+ */
451
+ state?: string | null;
452
+ /**
453
+ * Street address
454
+ */
455
+ street?: string | null;
456
+ /**
457
+ * Tax ID/EIN number
458
+ */
459
+ tax_id?: string | null;
460
+ /**
461
+ * Type of tax ID (e.g., us_ein, ca_bn)
462
+ */
463
+ tax_id_type?: string | null;
464
+ /**
465
+ * Business website URL
466
+ */
467
+ url?: string | null;
468
+ }
604
469
  /**
605
- * Phone number prefix for messaging (e.g., "+1")
470
+ * Compliance and TCR-related information
606
471
  */
607
- phone_number_prefix?: string | null;
472
+ interface Compliance {
473
+ brand_relationship?: ProfilesAPI.TcrBrandRelationship | null;
474
+ /**
475
+ * List of destination countries for messaging
476
+ */
477
+ destination_countries?: Array<ProfilesAPI.DestinationCountry>;
478
+ /**
479
+ * Whether this is a TCR (Campaign Registry) application
480
+ */
481
+ is_tcr_application?: boolean;
482
+ /**
483
+ * Additional notes about the business or use case
484
+ */
485
+ notes?: string | null;
486
+ /**
487
+ * Phone number prefix for messaging (e.g., "+1")
488
+ */
489
+ phone_number_prefix?: string | null;
490
+ /**
491
+ * @deprecated Always null. The brand's free-text primary use case is no longer
492
+ * stored: it reached neither TCR nor any decision, and its column is dropped with
493
+ * no backfill, because the values were prose and the typed equivalent is the
494
+ * campaign's MessagingUseCaseUS.
495
+ *
496
+ * Retained so existing v3 clients reading primary_use_case keep deserializing.
497
+ * Unlike the profile sharing flags, which can answer false truthfully, there is no
498
+ * value to report here — the field is present and empty rather than present and
499
+ * wrong.
500
+ */
501
+ primary_use_case?: string | null;
502
+ vertical?: ProfilesAPI.TcrVertical | null;
503
+ }
608
504
  /**
609
- * Primary messaging use case description
505
+ * Contact information for the brand
610
506
  */
611
- primary_use_case?: string | null;
612
- vertical?: ProfilesAPI.TcrVertical | null;
507
+ interface Contact {
508
+ /**
509
+ * Business/brand name
510
+ */
511
+ business_name?: string | null;
512
+ /**
513
+ * Contact email address
514
+ */
515
+ email?: string | null;
516
+ /**
517
+ * Primary contact name
518
+ */
519
+ name?: string;
520
+ /**
521
+ * Contact phone number in E.164 format
522
+ */
523
+ phone?: string | null;
524
+ /**
525
+ * Contact phone country code (e.g., "1" for US)
526
+ */
527
+ phone_country_code?: string | null;
528
+ /**
529
+ * Contact's role in the business
530
+ */
531
+ role?: string | null;
532
+ }
613
533
  }
534
+ }
535
+ /**
536
+ * Error information
537
+ */
538
+ interface Error {
614
539
  /**
615
- * Contact information for the brand
540
+ * Machine-readable error code (e.g., "RESOURCE_001")
616
541
  */
617
- interface Contact {
618
- /**
619
- * Business/brand name
620
- */
621
- business_name?: string | null;
622
- /**
623
- * Contact email address
624
- */
625
- email?: string | null;
626
- /**
627
- * Primary contact name
542
+ code?: string;
543
+ /**
544
+ * Additional validation error details (field-level errors)
545
+ */
546
+ details?: {
547
+ [key: string]: Array<string>;
548
+ } | null;
549
+ /**
550
+ * URL to documentation about this error
551
+ */
552
+ doc_url?: string | null;
553
+ /**
554
+ * Human-readable error message
555
+ */
556
+ message?: string;
557
+ }
558
+ /**
559
+ * Request and response metadata
560
+ */
561
+ interface Meta {
562
+ /**
563
+ * Unique identifier for this request (for tracing and support)
564
+ */
565
+ request_id?: string;
566
+ /**
567
+ * Server timestamp when the response was generated
568
+ */
569
+ timestamp?: string;
570
+ /**
571
+ * API version used for this request
572
+ */
573
+ version?: string;
574
+ }
575
+ }
576
+ /**
577
+ * Standard API response envelope for all v3 endpoints
578
+ */
579
+ export interface ProfileRetrieveResponse {
580
+ /**
581
+ * Detailed profile response for v3 API
582
+ */
583
+ data?: ProfileRetrieveResponse.Data | null;
584
+ /**
585
+ * Error information
586
+ */
587
+ error?: ProfileRetrieveResponse.Error | null;
588
+ /**
589
+ * Request and response metadata
590
+ */
591
+ meta?: ProfileRetrieveResponse.Meta;
592
+ /**
593
+ * Indicates whether the request was successful
594
+ */
595
+ success?: boolean;
596
+ }
597
+ export declare namespace ProfileRetrieveResponse {
598
+ /**
599
+ * Detailed profile response for v3 API
600
+ */
601
+ interface Data {
602
+ /**
603
+ * Profile unique identifier
604
+ */
605
+ id?: string;
606
+ /**
607
+ * @deprecated Always false. A profile no longer shares contacts with sibling
608
+ * profiles — it sees only what it owns. Retained so existing v3 clients reading
609
+ * allow_contact_sharing keep deserializing; it carries no information.
610
+ */
611
+ allow_contact_sharing?: boolean | null;
612
+ /**
613
+ * Whether number changes are allowed during onboarding
614
+ */
615
+ allow_number_change_during_onboarding?: boolean | null;
616
+ /**
617
+ * @deprecated Always false. A profile no longer shares templates with sibling
618
+ * profiles. Retained so existing v3 clients reading allow_template_sharing keep
619
+ * deserializing; it carries no information.
620
+ */
621
+ allow_template_sharing?: boolean | null;
622
+ /**
623
+ * Billing contact info returned in profile responses
624
+ */
625
+ billing_contact?: Data.BillingContact | null;
626
+ /**
627
+ * Billing model: profile, organization, or profile_and_organization
628
+ */
629
+ billing_model?: string;
630
+ /**
631
+ * Brand response with nested contact, business, and compliance sections — mirrors
632
+ * the request structure.
633
+ */
634
+ brand?: Data.Brand | null;
635
+ /**
636
+ * When the profile was created
637
+ */
638
+ created_at?: string;
639
+ /**
640
+ * Profile description
641
+ */
642
+ description?: string | null;
643
+ /**
644
+ * Profile email (inherited from organization)
645
+ */
646
+ email?: string | null;
647
+ /**
648
+ * Profile icon URL
649
+ */
650
+ icon?: string | null;
651
+ /**
652
+ * @deprecated Always false. A profile no longer inherits its organization's
653
+ * contacts. Retained so existing v3 clients reading inherit_contacts keep
654
+ * deserializing; it carries no information.
655
+ */
656
+ inherit_contacts?: boolean | null;
657
+ /**
658
+ * Whether this profile inherits TCR brand from the organization
659
+ */
660
+ inherit_tcr_brand?: boolean;
661
+ /**
662
+ * Whether this profile inherits TCR campaign from the organization
663
+ */
664
+ inherit_tcr_campaign?: boolean;
665
+ /**
666
+ * @deprecated Always false. A profile no longer inherits its organization's
667
+ * templates. Retained so existing v3 clients reading inherit_templates keep
668
+ * deserializing; it carries no information.
669
+ */
670
+ inherit_templates?: boolean | null;
671
+ /**
672
+ * Profile name
673
+ */
674
+ name?: string;
675
+ /**
676
+ * Parent organization ID
677
+ */
678
+ organization_id?: string | null;
679
+ /**
680
+ * Direct SMS phone number
681
+ */
682
+ sending_phone_number?: string | null;
683
+ /**
684
+ * @deprecated Deprecated. Always null. Sender borrowing is gone: a profile no
685
+ * longer points at another profile for its SMS sender, and every profile owns the
686
+ * sender it sends from.
687
+ *
688
+ * Kept on the wire, and never populated, because those are two different promises.
689
+ * Removing the key changes the response's shape — a generated client loses the
690
+ * property and stops compiling on the next regenerate, for a value that is now
691
+ * null for every profile in existence. Keeping it null costs a key and breaks
692
+ * nobody, and null is the honest answer rather than a placeholder: there is no
693
+ * borrowing left to report.
694
+ *
695
+ * Nothing could populate it. Migration 260813161500 dropped the column and copied
696
+ * each borrower its own channel-provider row; its Down() says outright that the
697
+ * borrower-to-lender pairing is not recoverable. The only surviving trace is a
698
+ * notes string on the copied row.
699
+ */
700
+ sending_phone_number_profile_id?: string | null;
701
+ /**
702
+ * @deprecated
703
+ */
704
+ sending_whatsapp_number_profile_id?: string | null;
705
+ /**
706
+ * Profile short name/abbreviation. 3–11 characters: letters, numbers, and spaces
707
+ * only, with at least one letter.
708
+ */
709
+ short_name?: string | null;
710
+ /**
711
+ * Profile setup status: incomplete, pending_review, approved, rejected
712
+ */
713
+ status?: string;
714
+ /**
715
+ * When the profile was last updated
716
+ */
717
+ updated_at?: string | null;
718
+ /**
719
+ * WhatsApp Business Account ID associated with this profile. Present whether the
720
+ * WABA is inherited from the organization or configured directly.
721
+ */
722
+ waba_id?: string | null;
723
+ /**
724
+ * Direct WhatsApp phone number
725
+ */
726
+ whatsapp_phone_number?: string | null;
727
+ }
728
+ namespace Data {
729
+ /**
730
+ * Billing contact info returned in profile responses
731
+ */
732
+ interface BillingContact {
733
+ address?: string | null;
734
+ email?: string | null;
735
+ name?: string | null;
736
+ phone?: string | null;
737
+ }
738
+ /**
739
+ * Brand response with nested contact, business, and compliance sections — mirrors
740
+ * the request structure.
741
+ */
742
+ interface Brand {
743
+ /**
744
+ * Unique identifier for the brand
628
745
  */
629
- name?: string;
746
+ id?: string;
630
747
  /**
631
- * Contact phone number in E.164 format
748
+ * Business details and address information
632
749
  */
750
+ business?: Brand.Business | null;
751
+ /**
752
+ * Compliance and TCR-related information
753
+ */
754
+ compliance?: Brand.Compliance | null;
755
+ /**
756
+ * Contact information for the brand
757
+ */
758
+ contact?: Brand.Contact | null;
759
+ /**
760
+ * When the brand was created
761
+ */
762
+ created_at?: string;
763
+ /**
764
+ * @deprecated Deprecated and scheduled for removal. Identifies the Campaign
765
+ * Service Provider that registered the brand, which is Sent, so the value is the
766
+ * same for every brand and every account. Nothing on your side can act on it and
767
+ * there is no replacement. Stop reading it.
768
+ */
769
+ csp_id?: string | null;
770
+ identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
771
+ /**
772
+ * Whether this brand is inherited from the parent organization
773
+ */
774
+ is_inherited?: boolean;
775
+ status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
776
+ /**
777
+ * When the brand was submitted to TCR
778
+ */
779
+ submitted_at?: string | null;
780
+ /**
781
+ * Whether this brand has been submitted to TCR
782
+ */
783
+ submitted_to_tcr?: boolean;
784
+ /**
785
+ * TCR brand ID (populated after TCR submission)
786
+ */
787
+ tcr_brand_id?: string | null;
788
+ /**
789
+ * Universal EIN from TCR
790
+ */
791
+ universal_ein?: string | null;
792
+ /**
793
+ * When the brand was last updated
794
+ */
795
+ updated_at?: string | null;
796
+ }
797
+ namespace Brand {
798
+ /**
799
+ * Business details and address information
800
+ */
801
+ interface Business {
802
+ /**
803
+ * City
804
+ */
805
+ city?: string | null;
806
+ /**
807
+ * Country code (e.g., US, CA)
808
+ */
809
+ country?: string | null;
810
+ /**
811
+ * Country where the business is registered
812
+ */
813
+ country_of_registration?: string | null;
814
+ /**
815
+ * Business entity type
816
+ */
817
+ entity_type?: string | null;
818
+ /**
819
+ * Legal business name
820
+ */
821
+ legal_name?: string | null;
822
+ /**
823
+ * Postal/ZIP code
824
+ */
825
+ postal_code?: string | null;
826
+ /**
827
+ * State/province code
828
+ */
829
+ state?: string | null;
830
+ /**
831
+ * Street address
832
+ */
833
+ street?: string | null;
834
+ /**
835
+ * Tax ID/EIN number
836
+ */
837
+ tax_id?: string | null;
838
+ /**
839
+ * Type of tax ID (e.g., us_ein, ca_bn)
840
+ */
841
+ tax_id_type?: string | null;
842
+ /**
843
+ * Business website URL
844
+ */
845
+ url?: string | null;
846
+ }
847
+ /**
848
+ * Compliance and TCR-related information
849
+ */
850
+ interface Compliance {
851
+ brand_relationship?: ProfilesAPI.TcrBrandRelationship | null;
852
+ /**
853
+ * List of destination countries for messaging
854
+ */
855
+ destination_countries?: Array<ProfilesAPI.DestinationCountry>;
856
+ /**
857
+ * Whether this is a TCR (Campaign Registry) application
858
+ */
859
+ is_tcr_application?: boolean;
860
+ /**
861
+ * Additional notes about the business or use case
862
+ */
863
+ notes?: string | null;
864
+ /**
865
+ * Phone number prefix for messaging (e.g., "+1")
866
+ */
867
+ phone_number_prefix?: string | null;
868
+ /**
869
+ * @deprecated Always null. The brand's free-text primary use case is no longer
870
+ * stored: it reached neither TCR nor any decision, and its column is dropped with
871
+ * no backfill, because the values were prose and the typed equivalent is the
872
+ * campaign's MessagingUseCaseUS.
873
+ *
874
+ * Retained so existing v3 clients reading primary_use_case keep deserializing.
875
+ * Unlike the profile sharing flags, which can answer false truthfully, there is no
876
+ * value to report here — the field is present and empty rather than present and
877
+ * wrong.
878
+ */
879
+ primary_use_case?: string | null;
880
+ vertical?: ProfilesAPI.TcrVertical | null;
881
+ }
882
+ /**
883
+ * Contact information for the brand
884
+ */
885
+ interface Contact {
886
+ /**
887
+ * Business/brand name
888
+ */
889
+ business_name?: string | null;
890
+ /**
891
+ * Contact email address
892
+ */
893
+ email?: string | null;
894
+ /**
895
+ * Primary contact name
896
+ */
897
+ name?: string;
898
+ /**
899
+ * Contact phone number in E.164 format
900
+ */
901
+ phone?: string | null;
902
+ /**
903
+ * Contact phone country code (e.g., "1" for US)
904
+ */
905
+ phone_country_code?: string | null;
906
+ /**
907
+ * Contact's role in the business
908
+ */
909
+ role?: string | null;
910
+ }
911
+ }
912
+ }
913
+ /**
914
+ * Error information
915
+ */
916
+ interface Error {
917
+ /**
918
+ * Machine-readable error code (e.g., "RESOURCE_001")
919
+ */
920
+ code?: string;
921
+ /**
922
+ * Additional validation error details (field-level errors)
923
+ */
924
+ details?: {
925
+ [key: string]: Array<string>;
926
+ } | null;
927
+ /**
928
+ * URL to documentation about this error
929
+ */
930
+ doc_url?: string | null;
931
+ /**
932
+ * Human-readable error message
933
+ */
934
+ message?: string;
935
+ }
936
+ /**
937
+ * Request and response metadata
938
+ */
939
+ interface Meta {
940
+ /**
941
+ * Unique identifier for this request (for tracing and support)
942
+ */
943
+ request_id?: string;
944
+ /**
945
+ * Server timestamp when the response was generated
946
+ */
947
+ timestamp?: string;
948
+ /**
949
+ * API version used for this request
950
+ */
951
+ version?: string;
952
+ }
953
+ }
954
+ /**
955
+ * Standard API response envelope for all v3 endpoints
956
+ */
957
+ export interface ProfileUpdateResponse {
958
+ /**
959
+ * Detailed profile response for v3 API
960
+ */
961
+ data?: ProfileUpdateResponse.Data | null;
962
+ /**
963
+ * Error information
964
+ */
965
+ error?: ProfileUpdateResponse.Error | null;
966
+ /**
967
+ * Request and response metadata
968
+ */
969
+ meta?: ProfileUpdateResponse.Meta;
970
+ /**
971
+ * Indicates whether the request was successful
972
+ */
973
+ success?: boolean;
974
+ }
975
+ export declare namespace ProfileUpdateResponse {
976
+ /**
977
+ * Detailed profile response for v3 API
978
+ */
979
+ interface Data {
980
+ /**
981
+ * Profile unique identifier
982
+ */
983
+ id?: string;
984
+ /**
985
+ * @deprecated Always false. A profile no longer shares contacts with sibling
986
+ * profiles — it sees only what it owns. Retained so existing v3 clients reading
987
+ * allow_contact_sharing keep deserializing; it carries no information.
988
+ */
989
+ allow_contact_sharing?: boolean | null;
990
+ /**
991
+ * Whether number changes are allowed during onboarding
992
+ */
993
+ allow_number_change_during_onboarding?: boolean | null;
994
+ /**
995
+ * @deprecated Always false. A profile no longer shares templates with sibling
996
+ * profiles. Retained so existing v3 clients reading allow_template_sharing keep
997
+ * deserializing; it carries no information.
998
+ */
999
+ allow_template_sharing?: boolean | null;
1000
+ /**
1001
+ * Billing contact info returned in profile responses
1002
+ */
1003
+ billing_contact?: Data.BillingContact | null;
1004
+ /**
1005
+ * Billing model: profile, organization, or profile_and_organization
1006
+ */
1007
+ billing_model?: string;
1008
+ /**
1009
+ * Brand response with nested contact, business, and compliance sections — mirrors
1010
+ * the request structure.
1011
+ */
1012
+ brand?: Data.Brand | null;
1013
+ /**
1014
+ * When the profile was created
1015
+ */
1016
+ created_at?: string;
1017
+ /**
1018
+ * Profile description
1019
+ */
1020
+ description?: string | null;
1021
+ /**
1022
+ * Profile email (inherited from organization)
1023
+ */
1024
+ email?: string | null;
1025
+ /**
1026
+ * Profile icon URL
1027
+ */
1028
+ icon?: string | null;
1029
+ /**
1030
+ * @deprecated Always false. A profile no longer inherits its organization's
1031
+ * contacts. Retained so existing v3 clients reading inherit_contacts keep
1032
+ * deserializing; it carries no information.
1033
+ */
1034
+ inherit_contacts?: boolean | null;
1035
+ /**
1036
+ * Whether this profile inherits TCR brand from the organization
1037
+ */
1038
+ inherit_tcr_brand?: boolean;
1039
+ /**
1040
+ * Whether this profile inherits TCR campaign from the organization
1041
+ */
1042
+ inherit_tcr_campaign?: boolean;
1043
+ /**
1044
+ * @deprecated Always false. A profile no longer inherits its organization's
1045
+ * templates. Retained so existing v3 clients reading inherit_templates keep
1046
+ * deserializing; it carries no information.
1047
+ */
1048
+ inherit_templates?: boolean | null;
1049
+ /**
1050
+ * Profile name
1051
+ */
1052
+ name?: string;
1053
+ /**
1054
+ * Parent organization ID
1055
+ */
1056
+ organization_id?: string | null;
1057
+ /**
1058
+ * Direct SMS phone number
1059
+ */
1060
+ sending_phone_number?: string | null;
1061
+ /**
1062
+ * @deprecated Deprecated. Always null. Sender borrowing is gone: a profile no
1063
+ * longer points at another profile for its SMS sender, and every profile owns the
1064
+ * sender it sends from.
1065
+ *
1066
+ * Kept on the wire, and never populated, because those are two different promises.
1067
+ * Removing the key changes the response's shape — a generated client loses the
1068
+ * property and stops compiling on the next regenerate, for a value that is now
1069
+ * null for every profile in existence. Keeping it null costs a key and breaks
1070
+ * nobody, and null is the honest answer rather than a placeholder: there is no
1071
+ * borrowing left to report.
1072
+ *
1073
+ * Nothing could populate it. Migration 260813161500 dropped the column and copied
1074
+ * each borrower its own channel-provider row; its Down() says outright that the
1075
+ * borrower-to-lender pairing is not recoverable. The only surviving trace is a
1076
+ * notes string on the copied row.
1077
+ */
1078
+ sending_phone_number_profile_id?: string | null;
1079
+ /**
1080
+ * @deprecated
1081
+ */
1082
+ sending_whatsapp_number_profile_id?: string | null;
1083
+ /**
1084
+ * Profile short name/abbreviation. 3–11 characters: letters, numbers, and spaces
1085
+ * only, with at least one letter.
1086
+ */
1087
+ short_name?: string | null;
1088
+ /**
1089
+ * Profile setup status: incomplete, pending_review, approved, rejected
1090
+ */
1091
+ status?: string;
1092
+ /**
1093
+ * When the profile was last updated
1094
+ */
1095
+ updated_at?: string | null;
1096
+ /**
1097
+ * WhatsApp Business Account ID associated with this profile. Present whether the
1098
+ * WABA is inherited from the organization or configured directly.
1099
+ */
1100
+ waba_id?: string | null;
1101
+ /**
1102
+ * Direct WhatsApp phone number
1103
+ */
1104
+ whatsapp_phone_number?: string | null;
1105
+ }
1106
+ namespace Data {
1107
+ /**
1108
+ * Billing contact info returned in profile responses
1109
+ */
1110
+ interface BillingContact {
1111
+ address?: string | null;
1112
+ email?: string | null;
1113
+ name?: string | null;
633
1114
  phone?: string | null;
1115
+ }
1116
+ /**
1117
+ * Brand response with nested contact, business, and compliance sections — mirrors
1118
+ * the request structure.
1119
+ */
1120
+ interface Brand {
634
1121
  /**
635
- * Contact phone country code (e.g., "1" for US)
1122
+ * Unique identifier for the brand
636
1123
  */
637
- phone_country_code?: string | null;
1124
+ id?: string;
638
1125
  /**
639
- * Contact's role in the business
1126
+ * Business details and address information
640
1127
  */
641
- role?: string | null;
1128
+ business?: Brand.Business | null;
1129
+ /**
1130
+ * Compliance and TCR-related information
1131
+ */
1132
+ compliance?: Brand.Compliance | null;
1133
+ /**
1134
+ * Contact information for the brand
1135
+ */
1136
+ contact?: Brand.Contact | null;
1137
+ /**
1138
+ * When the brand was created
1139
+ */
1140
+ created_at?: string;
1141
+ /**
1142
+ * @deprecated Deprecated and scheduled for removal. Identifies the Campaign
1143
+ * Service Provider that registered the brand, which is Sent, so the value is the
1144
+ * same for every brand and every account. Nothing on your side can act on it and
1145
+ * there is no replacement. Stop reading it.
1146
+ */
1147
+ csp_id?: string | null;
1148
+ identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
1149
+ /**
1150
+ * Whether this brand is inherited from the parent organization
1151
+ */
1152
+ is_inherited?: boolean;
1153
+ status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
1154
+ /**
1155
+ * When the brand was submitted to TCR
1156
+ */
1157
+ submitted_at?: string | null;
1158
+ /**
1159
+ * Whether this brand has been submitted to TCR
1160
+ */
1161
+ submitted_to_tcr?: boolean;
1162
+ /**
1163
+ * TCR brand ID (populated after TCR submission)
1164
+ */
1165
+ tcr_brand_id?: string | null;
1166
+ /**
1167
+ * Universal EIN from TCR
1168
+ */
1169
+ universal_ein?: string | null;
1170
+ /**
1171
+ * When the brand was last updated
1172
+ */
1173
+ updated_at?: string | null;
1174
+ }
1175
+ namespace Brand {
1176
+ /**
1177
+ * Business details and address information
1178
+ */
1179
+ interface Business {
1180
+ /**
1181
+ * City
1182
+ */
1183
+ city?: string | null;
1184
+ /**
1185
+ * Country code (e.g., US, CA)
1186
+ */
1187
+ country?: string | null;
1188
+ /**
1189
+ * Country where the business is registered
1190
+ */
1191
+ country_of_registration?: string | null;
1192
+ /**
1193
+ * Business entity type
1194
+ */
1195
+ entity_type?: string | null;
1196
+ /**
1197
+ * Legal business name
1198
+ */
1199
+ legal_name?: string | null;
1200
+ /**
1201
+ * Postal/ZIP code
1202
+ */
1203
+ postal_code?: string | null;
1204
+ /**
1205
+ * State/province code
1206
+ */
1207
+ state?: string | null;
1208
+ /**
1209
+ * Street address
1210
+ */
1211
+ street?: string | null;
1212
+ /**
1213
+ * Tax ID/EIN number
1214
+ */
1215
+ tax_id?: string | null;
1216
+ /**
1217
+ * Type of tax ID (e.g., us_ein, ca_bn)
1218
+ */
1219
+ tax_id_type?: string | null;
1220
+ /**
1221
+ * Business website URL
1222
+ */
1223
+ url?: string | null;
1224
+ }
1225
+ /**
1226
+ * Compliance and TCR-related information
1227
+ */
1228
+ interface Compliance {
1229
+ brand_relationship?: ProfilesAPI.TcrBrandRelationship | null;
1230
+ /**
1231
+ * List of destination countries for messaging
1232
+ */
1233
+ destination_countries?: Array<ProfilesAPI.DestinationCountry>;
1234
+ /**
1235
+ * Whether this is a TCR (Campaign Registry) application
1236
+ */
1237
+ is_tcr_application?: boolean;
1238
+ /**
1239
+ * Additional notes about the business or use case
1240
+ */
1241
+ notes?: string | null;
1242
+ /**
1243
+ * Phone number prefix for messaging (e.g., "+1")
1244
+ */
1245
+ phone_number_prefix?: string | null;
1246
+ /**
1247
+ * @deprecated Always null. The brand's free-text primary use case is no longer
1248
+ * stored: it reached neither TCR nor any decision, and its column is dropped with
1249
+ * no backfill, because the values were prose and the typed equivalent is the
1250
+ * campaign's MessagingUseCaseUS.
1251
+ *
1252
+ * Retained so existing v3 clients reading primary_use_case keep deserializing.
1253
+ * Unlike the profile sharing flags, which can answer false truthfully, there is no
1254
+ * value to report here — the field is present and empty rather than present and
1255
+ * wrong.
1256
+ */
1257
+ primary_use_case?: string | null;
1258
+ vertical?: ProfilesAPI.TcrVertical | null;
1259
+ }
1260
+ /**
1261
+ * Contact information for the brand
1262
+ */
1263
+ interface Contact {
1264
+ /**
1265
+ * Business/brand name
1266
+ */
1267
+ business_name?: string | null;
1268
+ /**
1269
+ * Contact email address
1270
+ */
1271
+ email?: string | null;
1272
+ /**
1273
+ * Primary contact name
1274
+ */
1275
+ name?: string;
1276
+ /**
1277
+ * Contact phone number in E.164 format
1278
+ */
1279
+ phone?: string | null;
1280
+ /**
1281
+ * Contact phone country code (e.g., "1" for US)
1282
+ */
1283
+ phone_country_code?: string | null;
1284
+ /**
1285
+ * Contact's role in the business
1286
+ */
1287
+ role?: string | null;
1288
+ }
642
1289
  }
643
1290
  }
1291
+ /**
1292
+ * Error information
1293
+ */
1294
+ interface Error {
1295
+ /**
1296
+ * Machine-readable error code (e.g., "RESOURCE_001")
1297
+ */
1298
+ code?: string;
1299
+ /**
1300
+ * Additional validation error details (field-level errors)
1301
+ */
1302
+ details?: {
1303
+ [key: string]: Array<string>;
1304
+ } | null;
1305
+ /**
1306
+ * URL to documentation about this error
1307
+ */
1308
+ doc_url?: string | null;
1309
+ /**
1310
+ * Human-readable error message
1311
+ */
1312
+ message?: string;
1313
+ }
1314
+ /**
1315
+ * Request and response metadata
1316
+ */
1317
+ interface Meta {
1318
+ /**
1319
+ * Unique identifier for this request (for tracing and support)
1320
+ */
1321
+ request_id?: string;
1322
+ /**
1323
+ * Server timestamp when the response was generated
1324
+ */
1325
+ timestamp?: string;
1326
+ /**
1327
+ * API version used for this request
1328
+ */
1329
+ version?: string;
1330
+ }
644
1331
  }
645
- export type TcrBrandRelationship = 'BASIC_ACCOUNT' | 'MEDIUM_ACCOUNT' | 'LARGE_ACCOUNT' | 'SMALL_ACCOUNT' | 'KEY_ACCOUNT';
646
- export type TcrVertical = 'PROFESSIONAL' | 'REAL_ESTATE' | 'HEALTHCARE' | 'HUMAN_RESOURCES' | 'ENERGY' | 'ENTERTAINMENT' | 'RETAIL' | 'TRANSPORTATION' | 'AGRICULTURE' | 'INSURANCE' | 'POSTAL' | 'EDUCATION' | 'HOSPITALITY' | 'FINANCIAL' | 'POLITICAL' | 'GAMBLING' | 'LEGAL' | 'CONSTRUCTION' | 'NGO' | 'MANUFACTURING' | 'GOVERNMENT' | 'TECHNOLOGY' | 'COMMUNICATION';
647
1332
  /**
648
1333
  * Standard API response envelope for all v3 endpoints
649
1334
  */
650
1335
  export interface ProfileListResponse {
651
1336
  /**
652
- * List of profiles response
1337
+ * The profiles in the organization.
653
1338
  */
654
1339
  data?: ProfileListResponse.Data | null;
655
1340
  /**
656
1341
  * Error information
657
1342
  */
658
- error?: WebhooksAPI.ErrorDetail | null;
1343
+ error?: ProfileListResponse.Error | null;
659
1344
  /**
660
1345
  * Request and response metadata
661
1346
  */
662
- meta?: WebhooksAPI.APIMeta;
1347
+ meta?: ProfileListResponse.Meta;
663
1348
  /**
664
1349
  * Indicates whether the request was successful
665
1350
  */
@@ -667,13 +1352,418 @@ export interface ProfileListResponse {
667
1352
  }
668
1353
  export declare namespace ProfileListResponse {
669
1354
  /**
670
- * List of profiles response
1355
+ * The profiles in the organization.
671
1356
  */
672
1357
  interface Data {
673
1358
  /**
674
- * List of profiles in the organization
1359
+ * Pagination metadata for list responses
675
1360
  */
676
- profiles?: Array<ProfilesAPI.ProfileDetail>;
1361
+ pagination?: Data.Pagination;
1362
+ /**
1363
+ * The profiles on this page.
1364
+ */
1365
+ profiles?: Array<Data.Profile>;
1366
+ }
1367
+ namespace Data {
1368
+ /**
1369
+ * Pagination metadata for list responses
1370
+ */
1371
+ interface Pagination {
1372
+ /**
1373
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
1374
+ */
1375
+ cursors?: Pagination.Cursors | null;
1376
+ /**
1377
+ * Whether there are more pages after this one
1378
+ */
1379
+ has_more?: boolean;
1380
+ /**
1381
+ * Current page number (1-indexed)
1382
+ */
1383
+ page?: number;
1384
+ /**
1385
+ * Number of items per page
1386
+ */
1387
+ page_size?: number;
1388
+ /**
1389
+ * Total number of items across all pages
1390
+ */
1391
+ total_count?: number;
1392
+ /**
1393
+ * Total number of pages
1394
+ */
1395
+ total_pages?: number;
1396
+ }
1397
+ namespace Pagination {
1398
+ /**
1399
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
1400
+ */
1401
+ interface Cursors {
1402
+ /**
1403
+ * Cursor to fetch the next page.
1404
+ */
1405
+ after?: string | null;
1406
+ /**
1407
+ * Cursor to fetch the previous page.
1408
+ */
1409
+ before?: string | null;
1410
+ }
1411
+ }
1412
+ /**
1413
+ * Detailed profile response for v3 API
1414
+ */
1415
+ interface Profile {
1416
+ /**
1417
+ * Profile unique identifier
1418
+ */
1419
+ id?: string;
1420
+ /**
1421
+ * @deprecated Always false. A profile no longer shares contacts with sibling
1422
+ * profiles — it sees only what it owns. Retained so existing v3 clients reading
1423
+ * allow_contact_sharing keep deserializing; it carries no information.
1424
+ */
1425
+ allow_contact_sharing?: boolean | null;
1426
+ /**
1427
+ * Whether number changes are allowed during onboarding
1428
+ */
1429
+ allow_number_change_during_onboarding?: boolean | null;
1430
+ /**
1431
+ * @deprecated Always false. A profile no longer shares templates with sibling
1432
+ * profiles. Retained so existing v3 clients reading allow_template_sharing keep
1433
+ * deserializing; it carries no information.
1434
+ */
1435
+ allow_template_sharing?: boolean | null;
1436
+ /**
1437
+ * Billing contact info returned in profile responses
1438
+ */
1439
+ billing_contact?: Profile.BillingContact | null;
1440
+ /**
1441
+ * Billing model: profile, organization, or profile_and_organization
1442
+ */
1443
+ billing_model?: string;
1444
+ /**
1445
+ * Brand response with nested contact, business, and compliance sections — mirrors
1446
+ * the request structure.
1447
+ */
1448
+ brand?: Profile.Brand | null;
1449
+ /**
1450
+ * When the profile was created
1451
+ */
1452
+ created_at?: string;
1453
+ /**
1454
+ * Profile description
1455
+ */
1456
+ description?: string | null;
1457
+ /**
1458
+ * Profile email (inherited from organization)
1459
+ */
1460
+ email?: string | null;
1461
+ /**
1462
+ * Profile icon URL
1463
+ */
1464
+ icon?: string | null;
1465
+ /**
1466
+ * @deprecated Always false. A profile no longer inherits its organization's
1467
+ * contacts. Retained so existing v3 clients reading inherit_contacts keep
1468
+ * deserializing; it carries no information.
1469
+ */
1470
+ inherit_contacts?: boolean | null;
1471
+ /**
1472
+ * Whether this profile inherits TCR brand from the organization
1473
+ */
1474
+ inherit_tcr_brand?: boolean;
1475
+ /**
1476
+ * Whether this profile inherits TCR campaign from the organization
1477
+ */
1478
+ inherit_tcr_campaign?: boolean;
1479
+ /**
1480
+ * @deprecated Always false. A profile no longer inherits its organization's
1481
+ * templates. Retained so existing v3 clients reading inherit_templates keep
1482
+ * deserializing; it carries no information.
1483
+ */
1484
+ inherit_templates?: boolean | null;
1485
+ /**
1486
+ * Profile name
1487
+ */
1488
+ name?: string;
1489
+ /**
1490
+ * Parent organization ID
1491
+ */
1492
+ organization_id?: string | null;
1493
+ /**
1494
+ * Direct SMS phone number
1495
+ */
1496
+ sending_phone_number?: string | null;
1497
+ /**
1498
+ * @deprecated Deprecated. Always null. Sender borrowing is gone: a profile no
1499
+ * longer points at another profile for its SMS sender, and every profile owns the
1500
+ * sender it sends from.
1501
+ *
1502
+ * Kept on the wire, and never populated, because those are two different promises.
1503
+ * Removing the key changes the response's shape — a generated client loses the
1504
+ * property and stops compiling on the next regenerate, for a value that is now
1505
+ * null for every profile in existence. Keeping it null costs a key and breaks
1506
+ * nobody, and null is the honest answer rather than a placeholder: there is no
1507
+ * borrowing left to report.
1508
+ *
1509
+ * Nothing could populate it. Migration 260813161500 dropped the column and copied
1510
+ * each borrower its own channel-provider row; its Down() says outright that the
1511
+ * borrower-to-lender pairing is not recoverable. The only surviving trace is a
1512
+ * notes string on the copied row.
1513
+ */
1514
+ sending_phone_number_profile_id?: string | null;
1515
+ /**
1516
+ * @deprecated
1517
+ */
1518
+ sending_whatsapp_number_profile_id?: string | null;
1519
+ /**
1520
+ * Profile short name/abbreviation. 3–11 characters: letters, numbers, and spaces
1521
+ * only, with at least one letter.
1522
+ */
1523
+ short_name?: string | null;
1524
+ /**
1525
+ * Profile setup status: incomplete, pending_review, approved, rejected
1526
+ */
1527
+ status?: string;
1528
+ /**
1529
+ * When the profile was last updated
1530
+ */
1531
+ updated_at?: string | null;
1532
+ /**
1533
+ * WhatsApp Business Account ID associated with this profile. Present whether the
1534
+ * WABA is inherited from the organization or configured directly.
1535
+ */
1536
+ waba_id?: string | null;
1537
+ /**
1538
+ * Direct WhatsApp phone number
1539
+ */
1540
+ whatsapp_phone_number?: string | null;
1541
+ }
1542
+ namespace Profile {
1543
+ /**
1544
+ * Billing contact info returned in profile responses
1545
+ */
1546
+ interface BillingContact {
1547
+ address?: string | null;
1548
+ email?: string | null;
1549
+ name?: string | null;
1550
+ phone?: string | null;
1551
+ }
1552
+ /**
1553
+ * Brand response with nested contact, business, and compliance sections — mirrors
1554
+ * the request structure.
1555
+ */
1556
+ interface Brand {
1557
+ /**
1558
+ * Unique identifier for the brand
1559
+ */
1560
+ id?: string;
1561
+ /**
1562
+ * Business details and address information
1563
+ */
1564
+ business?: Brand.Business | null;
1565
+ /**
1566
+ * Compliance and TCR-related information
1567
+ */
1568
+ compliance?: Brand.Compliance | null;
1569
+ /**
1570
+ * Contact information for the brand
1571
+ */
1572
+ contact?: Brand.Contact | null;
1573
+ /**
1574
+ * When the brand was created
1575
+ */
1576
+ created_at?: string;
1577
+ /**
1578
+ * @deprecated Deprecated and scheduled for removal. Identifies the Campaign
1579
+ * Service Provider that registered the brand, which is Sent, so the value is the
1580
+ * same for every brand and every account. Nothing on your side can act on it and
1581
+ * there is no replacement. Stop reading it.
1582
+ */
1583
+ csp_id?: string | null;
1584
+ identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
1585
+ /**
1586
+ * Whether this brand is inherited from the parent organization
1587
+ */
1588
+ is_inherited?: boolean;
1589
+ status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
1590
+ /**
1591
+ * When the brand was submitted to TCR
1592
+ */
1593
+ submitted_at?: string | null;
1594
+ /**
1595
+ * Whether this brand has been submitted to TCR
1596
+ */
1597
+ submitted_to_tcr?: boolean;
1598
+ /**
1599
+ * TCR brand ID (populated after TCR submission)
1600
+ */
1601
+ tcr_brand_id?: string | null;
1602
+ /**
1603
+ * Universal EIN from TCR
1604
+ */
1605
+ universal_ein?: string | null;
1606
+ /**
1607
+ * When the brand was last updated
1608
+ */
1609
+ updated_at?: string | null;
1610
+ }
1611
+ namespace Brand {
1612
+ /**
1613
+ * Business details and address information
1614
+ */
1615
+ interface Business {
1616
+ /**
1617
+ * City
1618
+ */
1619
+ city?: string | null;
1620
+ /**
1621
+ * Country code (e.g., US, CA)
1622
+ */
1623
+ country?: string | null;
1624
+ /**
1625
+ * Country where the business is registered
1626
+ */
1627
+ country_of_registration?: string | null;
1628
+ /**
1629
+ * Business entity type
1630
+ */
1631
+ entity_type?: string | null;
1632
+ /**
1633
+ * Legal business name
1634
+ */
1635
+ legal_name?: string | null;
1636
+ /**
1637
+ * Postal/ZIP code
1638
+ */
1639
+ postal_code?: string | null;
1640
+ /**
1641
+ * State/province code
1642
+ */
1643
+ state?: string | null;
1644
+ /**
1645
+ * Street address
1646
+ */
1647
+ street?: string | null;
1648
+ /**
1649
+ * Tax ID/EIN number
1650
+ */
1651
+ tax_id?: string | null;
1652
+ /**
1653
+ * Type of tax ID (e.g., us_ein, ca_bn)
1654
+ */
1655
+ tax_id_type?: string | null;
1656
+ /**
1657
+ * Business website URL
1658
+ */
1659
+ url?: string | null;
1660
+ }
1661
+ /**
1662
+ * Compliance and TCR-related information
1663
+ */
1664
+ interface Compliance {
1665
+ brand_relationship?: ProfilesAPI.TcrBrandRelationship | null;
1666
+ /**
1667
+ * List of destination countries for messaging
1668
+ */
1669
+ destination_countries?: Array<ProfilesAPI.DestinationCountry>;
1670
+ /**
1671
+ * Whether this is a TCR (Campaign Registry) application
1672
+ */
1673
+ is_tcr_application?: boolean;
1674
+ /**
1675
+ * Additional notes about the business or use case
1676
+ */
1677
+ notes?: string | null;
1678
+ /**
1679
+ * Phone number prefix for messaging (e.g., "+1")
1680
+ */
1681
+ phone_number_prefix?: string | null;
1682
+ /**
1683
+ * @deprecated Always null. The brand's free-text primary use case is no longer
1684
+ * stored: it reached neither TCR nor any decision, and its column is dropped with
1685
+ * no backfill, because the values were prose and the typed equivalent is the
1686
+ * campaign's MessagingUseCaseUS.
1687
+ *
1688
+ * Retained so existing v3 clients reading primary_use_case keep deserializing.
1689
+ * Unlike the profile sharing flags, which can answer false truthfully, there is no
1690
+ * value to report here — the field is present and empty rather than present and
1691
+ * wrong.
1692
+ */
1693
+ primary_use_case?: string | null;
1694
+ vertical?: ProfilesAPI.TcrVertical | null;
1695
+ }
1696
+ /**
1697
+ * Contact information for the brand
1698
+ */
1699
+ interface Contact {
1700
+ /**
1701
+ * Business/brand name
1702
+ */
1703
+ business_name?: string | null;
1704
+ /**
1705
+ * Contact email address
1706
+ */
1707
+ email?: string | null;
1708
+ /**
1709
+ * Primary contact name
1710
+ */
1711
+ name?: string;
1712
+ /**
1713
+ * Contact phone number in E.164 format
1714
+ */
1715
+ phone?: string | null;
1716
+ /**
1717
+ * Contact phone country code (e.g., "1" for US)
1718
+ */
1719
+ phone_country_code?: string | null;
1720
+ /**
1721
+ * Contact's role in the business
1722
+ */
1723
+ role?: string | null;
1724
+ }
1725
+ }
1726
+ }
1727
+ }
1728
+ /**
1729
+ * Error information
1730
+ */
1731
+ interface Error {
1732
+ /**
1733
+ * Machine-readable error code (e.g., "RESOURCE_001")
1734
+ */
1735
+ code?: string;
1736
+ /**
1737
+ * Additional validation error details (field-level errors)
1738
+ */
1739
+ details?: {
1740
+ [key: string]: Array<string>;
1741
+ } | null;
1742
+ /**
1743
+ * URL to documentation about this error
1744
+ */
1745
+ doc_url?: string | null;
1746
+ /**
1747
+ * Human-readable error message
1748
+ */
1749
+ message?: string;
1750
+ }
1751
+ /**
1752
+ * Request and response metadata
1753
+ */
1754
+ interface Meta {
1755
+ /**
1756
+ * Unique identifier for this request (for tracing and support)
1757
+ */
1758
+ request_id?: string;
1759
+ /**
1760
+ * Server timestamp when the response was generated
1761
+ */
1762
+ timestamp?: string;
1763
+ /**
1764
+ * API version used for this request
1765
+ */
1766
+ version?: string;
677
1767
  }
678
1768
  }
679
1769
  /**
@@ -688,11 +1778,11 @@ export interface ProfileCompleteResponse {
688
1778
  /**
689
1779
  * Error information
690
1780
  */
691
- error?: WebhooksAPI.ErrorDetail | null;
1781
+ error?: ProfileCompleteResponse.Error | null;
692
1782
  /**
693
1783
  * Request and response metadata
694
1784
  */
695
- meta?: WebhooksAPI.APIMeta;
1785
+ meta?: ProfileCompleteResponse.Meta;
696
1786
  /**
697
1787
  * Indicates whether the request was successful
698
1788
  */
@@ -703,32 +1793,87 @@ export declare namespace ProfileCompleteResponse {
703
1793
  * Response when a profile is already in the completed state and no further action
704
1794
  * is taken.
705
1795
  */
706
- interface Data {
1796
+ interface Data {
1797
+ /**
1798
+ * Human-readable message describing the result.
1799
+ */
1800
+ message?: string;
1801
+ /**
1802
+ * Current process status of the profile (e.g., "completed", "submitted",
1803
+ * "in_progress").
1804
+ */
1805
+ status?: string;
1806
+ }
1807
+ /**
1808
+ * Error information
1809
+ */
1810
+ interface Error {
1811
+ /**
1812
+ * Machine-readable error code (e.g., "RESOURCE_001")
1813
+ */
1814
+ code?: string;
1815
+ /**
1816
+ * Additional validation error details (field-level errors)
1817
+ */
1818
+ details?: {
1819
+ [key: string]: Array<string>;
1820
+ } | null;
1821
+ /**
1822
+ * URL to documentation about this error
1823
+ */
1824
+ doc_url?: string | null;
1825
+ /**
1826
+ * Human-readable error message
1827
+ */
1828
+ message?: string;
1829
+ }
1830
+ /**
1831
+ * Request and response metadata
1832
+ */
1833
+ interface Meta {
707
1834
  /**
708
- * Human-readable message describing the result.
1835
+ * Unique identifier for this request (for tracing and support)
709
1836
  */
710
- message?: string;
1837
+ request_id?: string;
711
1838
  /**
712
- * Current process status of the profile (e.g., "completed", "submitted",
713
- * "in_progress").
1839
+ * Server timestamp when the response was generated
714
1840
  */
715
- status?: string;
1841
+ timestamp?: string;
1842
+ /**
1843
+ * API version used for this request
1844
+ */
1845
+ version?: string;
716
1846
  }
717
1847
  }
718
1848
  export interface ProfileCreateParams {
719
1849
  /**
720
- * Body param: Whether contacts are shared across profiles (default: false)
1850
+ * @deprecated Body param: Deprecated. Accepted and ignored. Contact and template
1851
+ * sharing between sender profiles is gone — a profile sees only what it owns, and
1852
+ * the organization still sees all of its profiles' contacts and templates through
1853
+ * read-time widening. The four columns behind these flags were dropped by
1854
+ * M260720120000.
1855
+ *
1856
+ * Bound rather than dropped so the properties survive on the wire and in a
1857
+ * generated client: an SDK that assigns them keeps compiling, which is the
1858
+ * compatibility this exists for. Deliberately not refused either — a 400 would
1859
+ * break an integration that is otherwise working, and the capability they ask for
1860
+ * is gone either way. Same rule as SendingPhoneNumberProfileId.
1861
+ *
1862
+ * The read is what makes this survivable: every profile reports all four as false,
1863
+ * so a caller that checks its own write can see it did not take. Requests carrying
1864
+ * one are logged, so we can tell when nobody sends them any more and the fields
1865
+ * can go for real.
721
1866
  */
722
- allow_contact_sharing?: boolean;
1867
+ allow_contact_sharing?: boolean | null;
723
1868
  /**
724
- * Body param: Whether templates are shared across profiles (default: false)
1869
+ * @deprecated Body param
725
1870
  */
726
- allow_template_sharing?: boolean;
1871
+ allow_template_sharing?: boolean | null;
727
1872
  /**
728
1873
  * Body param: Billing contact information for a profile. Required when
729
1874
  * billing_model is "profile" or "profile_and_organization".
730
1875
  */
731
- billing_contact?: BillingContactInfo | null;
1876
+ billing_contact?: ProfileCreateParams.BillingContact | null;
732
1877
  /**
733
1878
  * Body param: Billing model: profile, organization, or profile_and_organization
734
1879
  * (default: profile).
@@ -744,7 +1889,7 @@ export interface ProfileCreateParams {
744
1889
  * Body param: Brand and KYC data grouped into contact, business, and compliance
745
1890
  * sections
746
1891
  */
747
- brand?: BrandsBrandData | null;
1892
+ brand?: ProfileCreateParams.Brand | null;
748
1893
  /**
749
1894
  * Body param: Profile description (optional)
750
1895
  */
@@ -754,23 +1899,21 @@ export interface ProfileCreateParams {
754
1899
  */
755
1900
  icon?: string | null;
756
1901
  /**
757
- * Body param: Whether this profile inherits contacts from organization (default:
758
- * true)
1902
+ * @deprecated Body param
759
1903
  */
760
1904
  inherit_contacts?: boolean | null;
761
1905
  /**
762
1906
  * Body param: Whether this profile inherits TCR brand from organization (default:
763
- * true)
1907
+ * false)
764
1908
  */
765
1909
  inherit_tcr_brand?: boolean | null;
766
1910
  /**
767
1911
  * Body param: Whether this profile inherits TCR campaign from organization
768
- * (default: true)
1912
+ * (default: false)
769
1913
  */
770
1914
  inherit_tcr_campaign?: boolean | null;
771
1915
  /**
772
- * Body param: Whether this profile inherits templates from organization (default:
773
- * true)
1916
+ * @deprecated Body param
774
1917
  */
775
1918
  inherit_templates?: boolean | null;
776
1919
  /**
@@ -778,11 +1921,11 @@ export interface ProfileCreateParams {
778
1921
  */
779
1922
  name?: string;
780
1923
  /**
781
- * Body param: Payment card details for a profile. Accepted when billing_model is
782
- * "profile" or "profile_and_organization". These details are not stored on our
783
- * servers and will be forwarded to the payment processor.
1924
+ * Body param: Payment card details for this profile (optional). Accepted when
1925
+ * billing_model is "profile" or "profile_and_organization". Not persisted on our
1926
+ * servers — forwarded to the payment processor.
784
1927
  */
785
- payment_details?: PaymentDetails | null;
1928
+ payment_details?: ProfileCreateParams.PaymentDetails | null;
786
1929
  /**
787
1930
  * Body param: Sandbox flag - when true, the operation is simulated without side
788
1931
  * effects Useful for testing integrations without actual execution
@@ -816,6 +1959,169 @@ export interface ProfileCreateParams {
816
1959
  'x-profile-id'?: string;
817
1960
  }
818
1961
  export declare namespace ProfileCreateParams {
1962
+ /**
1963
+ * Billing contact information for a profile. Required when billing_model is
1964
+ * "profile" or "profile_and_organization".
1965
+ */
1966
+ interface BillingContact {
1967
+ /**
1968
+ * Email address where invoices will be sent (required)
1969
+ */
1970
+ email: string;
1971
+ /**
1972
+ * Full name of the billing contact or company (required)
1973
+ */
1974
+ name: string;
1975
+ /**
1976
+ * Billing address (optional). Free-form text including street, city, state, postal
1977
+ * code, and country.
1978
+ */
1979
+ address?: string | null;
1980
+ /**
1981
+ * Phone number for the billing contact (optional)
1982
+ */
1983
+ phone?: string | null;
1984
+ }
1985
+ /**
1986
+ * Brand and KYC data grouped into contact, business, and compliance sections
1987
+ */
1988
+ interface Brand {
1989
+ /**
1990
+ * Compliance and TCR information for brand registration
1991
+ */
1992
+ compliance: Brand.Compliance;
1993
+ /**
1994
+ * Contact information for brand KYC
1995
+ */
1996
+ contact: Brand.Contact;
1997
+ /**
1998
+ * Business details and address for brand KYC
1999
+ */
2000
+ business?: Brand.Business | null;
2001
+ }
2002
+ namespace Brand {
2003
+ /**
2004
+ * Compliance and TCR information for brand registration
2005
+ */
2006
+ interface Compliance {
2007
+ brandRelationship: ProfilesAPI.TcrBrandRelationship;
2008
+ vertical: ProfilesAPI.TcrVertical;
2009
+ /**
2010
+ * List of destination countries for messaging
2011
+ */
2012
+ destinationCountries?: Array<ProfilesAPI.DestinationCountry> | null;
2013
+ /**
2014
+ * Whether this is a TCR (Campaign Registry) application
2015
+ */
2016
+ isTcrApplication?: boolean | null;
2017
+ /**
2018
+ * Additional notes about the business or use case
2019
+ */
2020
+ notes?: string | null;
2021
+ /**
2022
+ * Phone number prefix for messaging (e.g., "+1")
2023
+ */
2024
+ phoneNumberPrefix?: string | null;
2025
+ }
2026
+ /**
2027
+ * Contact information for brand KYC
2028
+ */
2029
+ interface Contact {
2030
+ /**
2031
+ * Primary contact name (required)
2032
+ */
2033
+ name: string;
2034
+ /**
2035
+ * Business/brand name
2036
+ */
2037
+ businessName?: string | null;
2038
+ /**
2039
+ * Contact email address
2040
+ */
2041
+ email?: string | null;
2042
+ /**
2043
+ * Contact phone number in E.164 format
2044
+ */
2045
+ phone?: string | null;
2046
+ /**
2047
+ * Contact phone country code (e.g., "1" for US)
2048
+ */
2049
+ phoneCountryCode?: string | null;
2050
+ /**
2051
+ * Contact's role in the business
2052
+ */
2053
+ role?: string | null;
2054
+ }
2055
+ /**
2056
+ * Business details and address for brand KYC
2057
+ */
2058
+ interface Business {
2059
+ /**
2060
+ * City
2061
+ */
2062
+ city?: string | null;
2063
+ /**
2064
+ * Country code (e.g., US, CA)
2065
+ */
2066
+ country?: string | null;
2067
+ /**
2068
+ * Country where the business is registered
2069
+ */
2070
+ countryOfRegistration?: string | null;
2071
+ entityType?: 'PRIVATE_PROFIT' | 'PUBLIC_PROFIT' | 'NON_PROFIT' | 'SOLE_PROPRIETOR' | 'GOVERNMENT' | null;
2072
+ /**
2073
+ * Legal business name
2074
+ */
2075
+ legalName?: string | null;
2076
+ /**
2077
+ * Postal/ZIP code
2078
+ */
2079
+ postalCode?: string | null;
2080
+ /**
2081
+ * State/province code
2082
+ */
2083
+ state?: string | null;
2084
+ /**
2085
+ * Street address
2086
+ */
2087
+ street?: string | null;
2088
+ /**
2089
+ * Tax ID/EIN number
2090
+ */
2091
+ taxId?: string | null;
2092
+ /**
2093
+ * Type of tax ID (e.g., us_ein, ca_bn)
2094
+ */
2095
+ taxIdType?: string | null;
2096
+ /**
2097
+ * Business website URL
2098
+ */
2099
+ url?: string | null;
2100
+ }
2101
+ }
2102
+ /**
2103
+ * Payment card details for this profile (optional). Accepted when billing_model is
2104
+ * "profile" or "profile_and_organization". Not persisted on our servers —
2105
+ * forwarded to the payment processor.
2106
+ */
2107
+ interface PaymentDetails {
2108
+ /**
2109
+ * Card number (digits only, 13–19 characters)
2110
+ */
2111
+ card_number: string;
2112
+ /**
2113
+ * Card security code (3–4 digits)
2114
+ */
2115
+ cvc: string;
2116
+ /**
2117
+ * Card expiry date in MM/YY format (e.g. "09/27")
2118
+ */
2119
+ expiry: string;
2120
+ /**
2121
+ * Billing ZIP / postal code associated with the card
2122
+ */
2123
+ zip_code: string;
2124
+ }
819
2125
  /**
820
2126
  * Direct WhatsApp Business Account credentials for a profile. Use this when the
821
2127
  * profile should have its own WhatsApp Business Account instead of inheriting from
@@ -852,7 +2158,17 @@ export interface ProfileRetrieveParams {
852
2158
  }
853
2159
  export interface ProfileUpdateParams {
854
2160
  /**
855
- * Body param: Whether contacts are shared across profiles (optional)
2161
+ * @deprecated Body param: Deprecated. Accepted and ignored. Contact and template
2162
+ * sharing between sender profiles is gone — a profile sees only what it owns, and
2163
+ * the organization still sees all of its profiles' contacts and templates through
2164
+ * read-time widening. The four columns behind these flags were dropped by
2165
+ * M260720120000.
2166
+ *
2167
+ * Retired the same way as SendingPhoneNumberProfileId, and for the same reason:
2168
+ * the properties stay bound so an SDK that assigns them keeps compiling, and a 400
2169
+ * would break a working integration over a capability that is gone regardless.
2170
+ * Every profile reports all four as false, so a caller that checks its own write
2171
+ * can see it did not take.
856
2172
  */
857
2173
  allow_contact_sharing?: boolean | null;
858
2174
  /**
@@ -860,14 +2176,14 @@ export interface ProfileUpdateParams {
860
2176
  */
861
2177
  allow_number_change_during_onboarding?: boolean | null;
862
2178
  /**
863
- * Body param: Whether templates are shared across profiles (optional)
2179
+ * @deprecated Body param
864
2180
  */
865
2181
  allow_template_sharing?: boolean | null;
866
2182
  /**
867
2183
  * Body param: Billing contact information for a profile. Required when
868
2184
  * billing_model is "profile" or "profile_and_organization".
869
2185
  */
870
- billing_contact?: BillingContactInfo | null;
2186
+ billing_contact?: ProfileUpdateParams.BillingContact | null;
871
2187
  /**
872
2188
  * Body param: Billing model: profile, organization, or profile_and_organization
873
2189
  * (optional).
@@ -883,7 +2199,7 @@ export interface ProfileUpdateParams {
883
2199
  * Body param: Brand and KYC data grouped into contact, business, and compliance
884
2200
  * sections
885
2201
  */
886
- brand?: BrandsBrandData | null;
2202
+ brand?: ProfileUpdateParams.Brand | null;
887
2203
  /**
888
2204
  * Body param: Profile description (optional)
889
2205
  */
@@ -893,7 +2209,7 @@ export interface ProfileUpdateParams {
893
2209
  */
894
2210
  icon?: string | null;
895
2211
  /**
896
- * Body param: Whether this profile inherits contacts from organization (optional)
2212
+ * @deprecated Body param
897
2213
  */
898
2214
  inherit_contacts?: boolean | null;
899
2215
  /**
@@ -906,7 +2222,7 @@ export interface ProfileUpdateParams {
906
2222
  */
907
2223
  inherit_tcr_campaign?: boolean | null;
908
2224
  /**
909
- * Body param: Whether this profile inherits templates from organization (optional)
2225
+ * @deprecated Body param
910
2226
  */
911
2227
  inherit_templates?: boolean | null;
912
2228
  /**
@@ -914,11 +2230,11 @@ export interface ProfileUpdateParams {
914
2230
  */
915
2231
  name?: string | null;
916
2232
  /**
917
- * Body param: Payment card details for a profile. Accepted when billing_model is
918
- * "profile" or "profile_and_organization". These details are not stored on our
919
- * servers and will be forwarded to the payment processor.
2233
+ * Body param: Payment card details for this profile (optional). Accepted when
2234
+ * billing_model is "profile" or "profile_and_organization". Not persisted on our
2235
+ * servers — forwarded to the payment processor.
920
2236
  */
921
- payment_details?: PaymentDetails | null;
2237
+ payment_details?: ProfileUpdateParams.PaymentDetails | null;
922
2238
  /**
923
2239
  * Body param: Sandbox flag - when true, the operation is simulated without side
924
2240
  * effects Useful for testing integrations without actual execution
@@ -929,12 +2245,29 @@ export interface ProfileUpdateParams {
929
2245
  */
930
2246
  sending_phone_number?: string | null;
931
2247
  /**
932
- * Body param: Reference to another profile to use for SMS configuration (optional)
2248
+ * @deprecated Body param: Deprecated. Accepted and ignored. Sender borrowing is
2249
+ * gone: a profile cannot send from another profile's SMS number. Supplying this
2250
+ * changes nothing and the request still succeeds.
2251
+ *
2252
+ * Bound rather than dropped so the property survives on the wire and in a
2253
+ * generated client — an SDK that assigns it keeps compiling, which is the
2254
+ * compatibility this exists for. It is deliberately not refused: a 400 here would
2255
+ * break an integration that is otherwise working, and the capability it asks for
2256
+ * is gone either way.
2257
+ *
2258
+ * The trade-off, stated plainly. A caller asking for borrowing is told it
2259
+ * succeeded when nothing happened. What makes that survivable is the read:
2260
+ * sending_phone_number_profile_id comes back null on every profile, so a caller
2261
+ * that checks its own write can see it did not take. Every request that carries
2262
+ * one is logged, so we can tell when nobody is sending it any more and the field
2263
+ * can go for real.
2264
+ *
2265
+ * Give the profile a sender of its own instead: POST /v3/channels/sms with the
2266
+ * x-profile-id header naming it.
933
2267
  */
934
2268
  sending_phone_number_profile_id?: string | null;
935
2269
  /**
936
- * Body param: Reference to another profile to use for WhatsApp configuration
937
- * (optional)
2270
+ * @deprecated Body param
938
2271
  */
939
2272
  sending_whatsapp_number_profile_id?: string | null;
940
2273
  /**
@@ -960,6 +2293,171 @@ export interface ProfileUpdateParams {
960
2293
  */
961
2294
  'x-profile-id'?: string;
962
2295
  }
2296
+ export declare namespace ProfileUpdateParams {
2297
+ /**
2298
+ * Billing contact information for a profile. Required when billing_model is
2299
+ * "profile" or "profile_and_organization".
2300
+ */
2301
+ interface BillingContact {
2302
+ /**
2303
+ * Email address where invoices will be sent (required)
2304
+ */
2305
+ email: string;
2306
+ /**
2307
+ * Full name of the billing contact or company (required)
2308
+ */
2309
+ name: string;
2310
+ /**
2311
+ * Billing address (optional). Free-form text including street, city, state, postal
2312
+ * code, and country.
2313
+ */
2314
+ address?: string | null;
2315
+ /**
2316
+ * Phone number for the billing contact (optional)
2317
+ */
2318
+ phone?: string | null;
2319
+ }
2320
+ /**
2321
+ * Brand and KYC data grouped into contact, business, and compliance sections
2322
+ */
2323
+ interface Brand {
2324
+ /**
2325
+ * Compliance and TCR information for brand registration
2326
+ */
2327
+ compliance: Brand.Compliance;
2328
+ /**
2329
+ * Contact information for brand KYC
2330
+ */
2331
+ contact: Brand.Contact;
2332
+ /**
2333
+ * Business details and address for brand KYC
2334
+ */
2335
+ business?: Brand.Business | null;
2336
+ }
2337
+ namespace Brand {
2338
+ /**
2339
+ * Compliance and TCR information for brand registration
2340
+ */
2341
+ interface Compliance {
2342
+ brandRelationship: ProfilesAPI.TcrBrandRelationship;
2343
+ vertical: ProfilesAPI.TcrVertical;
2344
+ /**
2345
+ * List of destination countries for messaging
2346
+ */
2347
+ destinationCountries?: Array<ProfilesAPI.DestinationCountry> | null;
2348
+ /**
2349
+ * Whether this is a TCR (Campaign Registry) application
2350
+ */
2351
+ isTcrApplication?: boolean | null;
2352
+ /**
2353
+ * Additional notes about the business or use case
2354
+ */
2355
+ notes?: string | null;
2356
+ /**
2357
+ * Phone number prefix for messaging (e.g., "+1")
2358
+ */
2359
+ phoneNumberPrefix?: string | null;
2360
+ }
2361
+ /**
2362
+ * Contact information for brand KYC
2363
+ */
2364
+ interface Contact {
2365
+ /**
2366
+ * Primary contact name (required)
2367
+ */
2368
+ name: string;
2369
+ /**
2370
+ * Business/brand name
2371
+ */
2372
+ businessName?: string | null;
2373
+ /**
2374
+ * Contact email address
2375
+ */
2376
+ email?: string | null;
2377
+ /**
2378
+ * Contact phone number in E.164 format
2379
+ */
2380
+ phone?: string | null;
2381
+ /**
2382
+ * Contact phone country code (e.g., "1" for US)
2383
+ */
2384
+ phoneCountryCode?: string | null;
2385
+ /**
2386
+ * Contact's role in the business
2387
+ */
2388
+ role?: string | null;
2389
+ }
2390
+ /**
2391
+ * Business details and address for brand KYC
2392
+ */
2393
+ interface Business {
2394
+ /**
2395
+ * City
2396
+ */
2397
+ city?: string | null;
2398
+ /**
2399
+ * Country code (e.g., US, CA)
2400
+ */
2401
+ country?: string | null;
2402
+ /**
2403
+ * Country where the business is registered
2404
+ */
2405
+ countryOfRegistration?: string | null;
2406
+ entityType?: 'PRIVATE_PROFIT' | 'PUBLIC_PROFIT' | 'NON_PROFIT' | 'SOLE_PROPRIETOR' | 'GOVERNMENT' | null;
2407
+ /**
2408
+ * Legal business name
2409
+ */
2410
+ legalName?: string | null;
2411
+ /**
2412
+ * Postal/ZIP code
2413
+ */
2414
+ postalCode?: string | null;
2415
+ /**
2416
+ * State/province code
2417
+ */
2418
+ state?: string | null;
2419
+ /**
2420
+ * Street address
2421
+ */
2422
+ street?: string | null;
2423
+ /**
2424
+ * Tax ID/EIN number
2425
+ */
2426
+ taxId?: string | null;
2427
+ /**
2428
+ * Type of tax ID (e.g., us_ein, ca_bn)
2429
+ */
2430
+ taxIdType?: string | null;
2431
+ /**
2432
+ * Business website URL
2433
+ */
2434
+ url?: string | null;
2435
+ }
2436
+ }
2437
+ /**
2438
+ * Payment card details for this profile (optional). Accepted when billing_model is
2439
+ * "profile" or "profile_and_organization". Not persisted on our servers —
2440
+ * forwarded to the payment processor.
2441
+ */
2442
+ interface PaymentDetails {
2443
+ /**
2444
+ * Card number (digits only, 13–19 characters)
2445
+ */
2446
+ card_number: string;
2447
+ /**
2448
+ * Card security code (3–4 digits)
2449
+ */
2450
+ cvc: string;
2451
+ /**
2452
+ * Card expiry date in MM/YY format (e.g. "09/27")
2453
+ */
2454
+ expiry: string;
2455
+ /**
2456
+ * Billing ZIP / postal code associated with the card
2457
+ */
2458
+ zip_code: string;
2459
+ }
2460
+ }
963
2461
  export interface ProfileListParams {
964
2462
  /**
965
2463
  * Profile UUID to scope the request to a child profile. Only organization API keys
@@ -1005,7 +2503,7 @@ export interface ProfileCompleteParams {
1005
2503
  'x-profile-id'?: string;
1006
2504
  }
1007
2505
  export declare namespace Profiles {
1008
- export { type APIResponseOfProfileDetail as APIResponseOfProfileDetail, type BillingContactInfo as BillingContactInfo, type BrandBusinessInfo as BrandBusinessInfo, type BrandComplianceInfo as BrandComplianceInfo, type BrandContactInfo as BrandContactInfo, type BrandsBrandData as BrandsBrandData, type DestinationCountry as DestinationCountry, type PaymentDetails as PaymentDetails, type ProfileDetail as ProfileDetail, type TcrBrandRelationship as TcrBrandRelationship, type TcrVertical as TcrVertical, type ProfileListResponse as ProfileListResponse, type ProfileCompleteResponse as ProfileCompleteResponse, type ProfileCreateParams as ProfileCreateParams, type ProfileRetrieveParams as ProfileRetrieveParams, type ProfileUpdateParams as ProfileUpdateParams, type ProfileListParams as ProfileListParams, type ProfileDeleteParams as ProfileDeleteParams, type ProfileCompleteParams as ProfileCompleteParams, };
1009
- export { Campaigns as Campaigns, type APIResponseOfBrandCampaign as APIResponseOfBrandCampaign, type APIResponseOfListOfBrandCampaign as APIResponseOfListOfBrandCampaign, type BrandCampaign as BrandCampaign, type CampaignData as CampaignData, type CampaignUseCase as CampaignUseCase, type CampaignUseCaseData as CampaignUseCaseData, type MessagingUseCaseUs as MessagingUseCaseUs, type CampaignCreateParams as CampaignCreateParams, type CampaignUpdateParams as CampaignUpdateParams, type CampaignListParams as CampaignListParams, type CampaignDeleteParams as CampaignDeleteParams, };
2506
+ export { type DestinationCountry as DestinationCountry, type TcrBrandRelationship as TcrBrandRelationship, type TcrVertical as TcrVertical, type ProfileCreateResponse as ProfileCreateResponse, type ProfileRetrieveResponse as ProfileRetrieveResponse, type ProfileUpdateResponse as ProfileUpdateResponse, type ProfileListResponse as ProfileListResponse, type ProfileCompleteResponse as ProfileCompleteResponse, type ProfileCreateParams as ProfileCreateParams, type ProfileRetrieveParams as ProfileRetrieveParams, type ProfileUpdateParams as ProfileUpdateParams, type ProfileListParams as ProfileListParams, type ProfileDeleteParams as ProfileDeleteParams, type ProfileCompleteParams as ProfileCompleteParams, };
2507
+ export { Campaigns as Campaigns, type MessagingUseCaseUs as MessagingUseCaseUs, type CampaignCreateResponse as CampaignCreateResponse, type CampaignUpdateResponse as CampaignUpdateResponse, type CampaignListResponse as CampaignListResponse, type CampaignCreateParams as CampaignCreateParams, type CampaignUpdateParams as CampaignUpdateParams, type CampaignListParams as CampaignListParams, type CampaignDeleteParams as CampaignDeleteParams, };
1010
2508
  }
1011
2509
  //# sourceMappingURL=profiles.d.ts.map