@sentdm/sentdm 0.33.0 → 0.35.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 +35 -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 +132 -41
  34. package/resources/me.d.mts.map +1 -1
  35. package/resources/me.d.ts +132 -41
  36. package/resources/me.d.ts.map +1 -1
  37. package/resources/me.js +3 -1
  38. package/resources/me.js.map +1 -1
  39. package/resources/me.mjs +3 -1
  40. package/resources/me.mjs.map +1 -1
  41. package/resources/messages.d.mts +212 -31
  42. package/resources/messages.d.mts.map +1 -1
  43. package/resources/messages.d.ts +212 -31
  44. package/resources/messages.d.ts.map +1 -1
  45. package/resources/messages.js +11 -5
  46. package/resources/messages.js.map +1 -1
  47. package/resources/messages.mjs +11 -5
  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 -499
  72. package/resources/profiles/profiles.d.mts.map +1 -1
  73. package/resources/profiles/profiles.d.ts +2006 -499
  74. package/resources/profiles/profiles.d.ts.map +1 -1
  75. package/resources/profiles/profiles.js +97 -68
  76. package/resources/profiles/profiles.js.map +1 -1
  77. package/resources/profiles/profiles.mjs +97 -68
  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 +449 -46
  88. package/resources/users.d.mts.map +1 -1
  89. package/resources/users.d.ts +449 -46
  90. package/resources/users.d.ts.map +1 -1
  91. package/resources/users.js +11 -7
  92. package/resources/users.js.map +1 -1
  93. package/resources/users.mjs +11 -7
  94. package/resources/users.mjs.map +1 -1
  95. package/resources/webhooks.d.mts +934 -109
  96. package/resources/webhooks.d.mts.map +1 -1
  97. package/resources/webhooks.d.ts +934 -109
  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 +90 -60
  104. package/src/resources/contacts.ts +696 -92
  105. package/src/resources/conversations.ts +400 -77
  106. package/src/resources/index.ts +26 -26
  107. package/src/resources/me.ts +151 -52
  108. package/src/resources/messages.ts +236 -31
  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 -637
  113. package/src/resources/templates.ts +583 -99
  114. package/src/resources/users.ts +519 -47
  115. package/src/resources/webhooks.ts +1170 -179
  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,26 +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('profileId');
67
- * ```
66
+ * @deprecated
68
67
  */
69
- retrieve(profileID: string, params?: ProfileRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseOfProfileDetail>;
68
+ retrieve(profileID: string, params?: ProfileRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ProfileRetrieveResponse>;
70
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
+ *
71
76
  * Updates a profile's configuration and settings. Requires admin role in the
72
77
  * organization. Only provided fields will be updated (partial update).
73
78
  *
@@ -87,45 +92,76 @@ export declare class Profiles extends APIResource {
87
92
  * and are forwarded directly to the payment processor. Providing `payment_details`
88
93
  * when `billing_model` is `"organization"` is not allowed.
89
94
  *
90
- * @example
91
- * ```ts
92
- * const apiResponseOfProfileDetail =
93
- * await client.profiles.update('profileId');
94
- * ```
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
95
110
  */
96
- update(profileID: string, params: ProfileUpdateParams, options?: RequestOptions): APIPromise<APIResponseOfProfileDetail>;
111
+ update(profileID: string, params: ProfileUpdateParams, options?: RequestOptions): APIPromise<ProfileUpdateResponse>;
97
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
+ *
98
119
  * Retrieves all sender profiles within an organization, including brand
99
120
  * information for each profile. Profiles represent different brands, departments,
100
121
  * or use cases within an organization, each with their own messaging
101
122
  * configuration.
102
123
  *
103
- * @example
104
- * ```ts
105
- * const profiles = await client.profiles.list();
106
- * ```
124
+ * @deprecated
107
125
  */
108
126
  list(params?: ProfileListParams | null | undefined, options?: RequestOptions): APIPromise<ProfileListResponse>;
109
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
+ *
110
134
  * Soft deletes a sender profile. The profile will be marked as deleted but data is
111
- * 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.
112
139
  *
113
- * @example
114
- * ```ts
115
- * await client.profiles.delete('profileId');
116
- * ```
140
+ * @deprecated
117
141
  */
118
142
  delete(profileID: string, params: ProfileDeleteParams, options?: RequestOptions): APIPromise<void>;
119
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
+ *
120
150
  * Final step in the profile compliance workflow. Validates all prerequisites (KYC,
121
151
  * brand, campaigns, required documents), connects the profile to the SMS and
122
- * WhatsApp channels, and sets its status based on configuration. Prerequisites are
123
- * always validated first: if any fail the call returns 400. If they pass and the
124
- * profile is already completed, the call returns 200 and does nothing. Otherwise
125
- * it returns 202 and calls the provided webhook URL when background processing
126
- * 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.
127
157
  *
128
- * 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):
129
165
  *
130
166
  * - Profile must have a name, short name, and description (short name max 50
131
167
  * characters, description max 5000)
@@ -136,521 +172,1179 @@ export declare class Profiles extends APIResource {
136
172
  * - TCR applications must have at least one campaign, own or inherited
137
173
  * - Destination countries marked as main must have their required compliance
138
174
  * documents uploaded
175
+ * - TCR applications must state whether they inherit the organization's TCR brand
176
+ * and campaign
177
+ *
178
+ * Outcome:
139
179
  *
140
- * Resulting status:
141
- *
142
- * - If either the SMS or WhatsApp channel is unconfigured, the profile is
143
- * SUBMITTED
144
- * - For a TCR application that inherits both its brand and its campaigns, the
145
- * profile is COMPLETED
146
- * - For a TCR application that owns either its brand or its campaigns, the profile
147
- * is COMPLETED once both have been submitted to TCR, and SUBMITTED until then
148
- * - For a non-TCR application, the profile is SUBMITTED when a main destination
149
- * country is set, and COMPLETED otherwise
150
- *
151
- * @example
152
- * ```ts
153
- * const response = await client.profiles.complete(
154
- * '660e8400-e29b-41d4-a716-446655440000',
155
- * {
156
- * webHookUrl:
157
- * 'https://your-app.com/webhook/profile-complete',
158
- * },
159
- * );
160
- * ```
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
161
189
  */
162
190
  complete(profileID: string, params: ProfileCompleteParams, options?: RequestOptions): APIPromise<ProfileCompleteResponse>;
163
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';
164
198
  /**
165
199
  * Standard API response envelope for all v3 endpoints
166
200
  */
167
- export interface APIResponseOfProfileDetail {
201
+ export interface ProfileCreateResponse {
168
202
  /**
169
203
  * Detailed profile response for v3 API
170
204
  */
171
- data?: ProfileDetail | null;
205
+ data?: ProfileCreateResponse.Data | null;
172
206
  /**
173
207
  * Error information
174
208
  */
175
- error?: WebhooksAPI.ErrorDetail | null;
209
+ error?: ProfileCreateResponse.Error | null;
176
210
  /**
177
211
  * Request and response metadata
178
212
  */
179
- meta?: WebhooksAPI.APIMeta;
213
+ meta?: ProfileCreateResponse.Meta;
180
214
  /**
181
215
  * Indicates whether the request was successful
182
216
  */
183
217
  success?: boolean;
184
218
  }
185
- /**
186
- * Billing contact information for a profile. Required when billing_model is
187
- * "profile" or "profile_and_organization".
188
- */
189
- export interface BillingContactInfo {
190
- /**
191
- * Email address where invoices will be sent (required)
192
- */
193
- email: string;
194
- /**
195
- * Full name of the billing contact or company (required)
196
- */
197
- name: string;
198
- /**
199
- * Billing address (optional). Free-form text including street, city, state, postal
200
- * code, and country.
201
- */
202
- address?: string | null;
203
- /**
204
- * Phone number for the billing contact (optional)
205
- */
206
- phone?: string | null;
207
- }
208
- /**
209
- * Business details and address for brand KYC
210
- */
211
- export interface BrandBusinessInfo {
212
- /**
213
- * City
214
- */
215
- city?: string | null;
216
- /**
217
- * Country code (e.g., US, CA)
218
- */
219
- country?: string | null;
220
- /**
221
- * Country where the business is registered
222
- */
223
- countryOfRegistration?: string | null;
224
- entityType?: 'PRIVATE_PROFIT' | 'PUBLIC_PROFIT' | 'NON_PROFIT' | 'SOLE_PROPRIETOR' | 'GOVERNMENT' | null;
225
- /**
226
- * Legal business name
227
- */
228
- legalName?: string | null;
229
- /**
230
- * Postal/ZIP code
231
- */
232
- postalCode?: string | null;
233
- /**
234
- * State/province code
235
- */
236
- state?: string | null;
237
- /**
238
- * Street address
239
- */
240
- street?: string | null;
241
- /**
242
- * Tax ID/EIN number
243
- */
244
- taxId?: string | null;
245
- /**
246
- * Type of tax ID (e.g., us_ein, ca_bn)
247
- */
248
- taxIdType?: string | null;
249
- /**
250
- * Business website URL
251
- */
252
- url?: string | null;
253
- }
254
- /**
255
- * Compliance and TCR information for brand registration
256
- */
257
- export interface BrandComplianceInfo {
258
- brandRelationship: TcrBrandRelationship;
259
- vertical: TcrVertical;
260
- /**
261
- * List of destination countries for messaging
262
- */
263
- destinationCountries?: Array<DestinationCountry> | null;
264
- /**
265
- * Whether this is a TCR (Campaign Registry) application
266
- */
267
- isTcrApplication?: boolean | null;
268
- /**
269
- * Additional notes about the business or use case
270
- */
271
- notes?: string | null;
272
- /**
273
- * Phone number prefix for messaging (e.g., "+1")
274
- */
275
- phoneNumberPrefix?: string | null;
276
- /**
277
- * Primary messaging use case description
278
- */
279
- primaryUseCase?: string | null;
280
- }
281
- /**
282
- * Contact information for brand KYC
283
- */
284
- export interface BrandContactInfo {
285
- /**
286
- * Primary contact name (required)
287
- */
288
- name: string;
289
- /**
290
- * Business/brand name
291
- */
292
- businessName?: string | null;
293
- /**
294
- * Contact email address
295
- */
296
- email?: string | null;
297
- /**
298
- * Contact phone number in E.164 format
299
- */
300
- phone?: string | null;
301
- /**
302
- * Contact phone country code (e.g., "1" for US)
303
- */
304
- phoneCountryCode?: string | null;
305
- /**
306
- * Contact's role in the business
307
- */
308
- role?: string | null;
309
- }
310
- /**
311
- * Brand and KYC data grouped into contact, business, and compliance sections
312
- */
313
- export interface BrandsBrandData {
314
- /**
315
- * Compliance and TCR information for brand registration
316
- */
317
- compliance: BrandComplianceInfo;
318
- /**
319
- * Contact information for brand KYC
320
- */
321
- contact: BrandContactInfo;
322
- /**
323
- * Business details and address for brand KYC
324
- */
325
- business?: BrandBusinessInfo | null;
326
- }
327
- export interface DestinationCountry {
328
- id?: string;
329
- isMain?: boolean;
330
- }
331
- /**
332
- * Payment card details for a profile. Accepted when billing_model is "profile" or
333
- * "profile_and_organization". These details are not stored on our servers and will
334
- * be forwarded to the payment processor.
335
- */
336
- export interface PaymentDetails {
337
- /**
338
- * Card number (digits only, 13–19 characters)
339
- */
340
- card_number: string;
341
- /**
342
- * Card security code (3–4 digits)
343
- */
344
- cvc: string;
345
- /**
346
- * Card expiry date in MM/YY format (e.g. "09/27")
347
- */
348
- expiry: string;
349
- /**
350
- * Billing ZIP / postal code associated with the card
351
- */
352
- zip_code: string;
353
- }
354
- /**
355
- * Detailed profile response for v3 API
356
- */
357
- export interface ProfileDetail {
358
- /**
359
- * Profile unique identifier
360
- */
361
- id?: string;
362
- /**
363
- * Whether contacts are shared across profiles in the organization
364
- */
365
- allow_contact_sharing?: boolean;
366
- /**
367
- * Whether number changes are allowed during onboarding
368
- */
369
- allow_number_change_during_onboarding?: boolean | null;
370
- /**
371
- * Whether templates are shared across profiles in the organization
372
- */
373
- allow_template_sharing?: boolean;
374
- /**
375
- * Billing contact info returned in profile responses
376
- */
377
- billing_contact?: ProfileDetail.BillingContact | null;
378
- /**
379
- * Billing model: profile, organization, or profile_and_organization
380
- */
381
- billing_model?: string;
382
- /**
383
- * Brand response with nested contact, business, and compliance sections — mirrors
384
- * the request structure.
385
- */
386
- brand?: ProfileDetail.Brand | null;
387
- /**
388
- * When the profile was created
389
- */
390
- created_at?: string;
391
- /**
392
- * Profile description
393
- */
394
- description?: string | null;
395
- /**
396
- * Profile email (inherited from organization)
397
- */
398
- email?: string | null;
399
- /**
400
- * Profile icon URL
401
- */
402
- icon?: string | null;
403
- /**
404
- * Whether this profile inherits contacts from the organization
405
- */
406
- inherit_contacts?: boolean;
407
- /**
408
- * Whether this profile inherits TCR brand from the organization
409
- */
410
- inherit_tcr_brand?: boolean;
411
- /**
412
- * Whether this profile inherits TCR campaign from the organization
413
- */
414
- inherit_tcr_campaign?: boolean;
415
- /**
416
- * Whether this profile inherits templates from the organization
417
- */
418
- inherit_templates?: boolean;
419
- /**
420
- * Profile name
421
- */
422
- name?: string;
423
- /**
424
- * Parent organization ID
425
- */
426
- organization_id?: string | null;
427
- /**
428
- * Direct SMS phone number
429
- */
430
- sending_phone_number?: string | null;
431
- /**
432
- * Reference to another profile whose SMS configuration this profile uses
433
- */
434
- sending_phone_number_profile_id?: string | null;
435
- /**
436
- * Reference to another profile for WhatsApp configuration
437
- */
438
- sending_whatsapp_number_profile_id?: string | null;
439
- /**
440
- * Profile short name/abbreviation. 3–11 characters: letters, numbers, and spaces
441
- * only, with at least one letter.
442
- */
443
- short_name?: string | null;
444
- /**
445
- * Profile setup status: incomplete, pending_review, approved, rejected
446
- */
447
- status?: string;
448
- /**
449
- * When the profile was last updated
450
- */
451
- updated_at?: string | null;
452
- /**
453
- * WhatsApp Business Account ID associated with this profile. Present whether the
454
- * WABA is inherited from the organization or configured directly.
455
- */
456
- waba_id?: string | null;
457
- /**
458
- * Direct WhatsApp phone number
459
- */
460
- whatsapp_phone_number?: string | null;
461
- }
462
- export declare namespace ProfileDetail {
463
- /**
464
- * Billing contact info returned in profile responses
465
- */
466
- interface BillingContact {
467
- address?: string | null;
468
- email?: string | null;
469
- name?: string | null;
470
- phone?: string | null;
471
- }
219
+ export declare namespace ProfileCreateResponse {
472
220
  /**
473
- * Brand response with nested contact, business, and compliance sections — mirrors
474
- * the request structure.
221
+ * Detailed profile response for v3 API
475
222
  */
476
- interface Brand {
223
+ interface Data {
477
224
  /**
478
- * Unique identifier for the brand
225
+ * Profile unique identifier
479
226
  */
480
227
  id?: string;
481
228
  /**
482
- * 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.
483
232
  */
484
- 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;
485
248
  /**
486
- * Compliance and TCR-related information
249
+ * Billing model: profile, organization, or profile_and_organization
487
250
  */
488
- compliance?: Brand.Compliance | null;
251
+ billing_model?: string;
489
252
  /**
490
- * Contact information for the brand
253
+ * Brand response with nested contact, business, and compliance sections — mirrors
254
+ * the request structure.
491
255
  */
492
- contact?: Brand.Contact | null;
256
+ brand?: Data.Brand | null;
493
257
  /**
494
- * When the brand was created
258
+ * When the profile was created
495
259
  */
496
260
  created_at?: string;
497
261
  /**
498
- * CSP (Campaign Service Provider) ID
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
499
271
  */
500
- csp_id?: string | null;
501
- identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
272
+ icon?: string | null;
502
273
  /**
503
- * 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.
504
277
  */
505
- is_inherited?: boolean;
506
- status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
278
+ inherit_contacts?: boolean | null;
507
279
  /**
508
- * When the brand was submitted to TCR
280
+ * Whether this profile inherits TCR brand from the organization
509
281
  */
510
- submitted_at?: string | null;
282
+ inherit_tcr_brand?: boolean;
511
283
  /**
512
- * Whether this brand has been submitted to TCR
284
+ * Whether this profile inherits TCR campaign from the organization
513
285
  */
514
- submitted_to_tcr?: boolean;
286
+ inherit_tcr_campaign?: boolean;
515
287
  /**
516
- * 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.
517
291
  */
518
- tcr_brand_id?: string | null;
292
+ inherit_templates?: boolean | null;
519
293
  /**
520
- * Universal EIN from TCR
294
+ * Profile name
521
295
  */
522
- universal_ein?: string | null;
296
+ name?: string;
523
297
  /**
524
- * 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
525
338
  */
526
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;
527
349
  }
528
- namespace Brand {
350
+ namespace Data {
529
351
  /**
530
- * Business details and address information
352
+ * Billing contact info returned in profile responses
531
353
  */
532
- interface Business {
533
- /**
534
- * City
535
- */
536
- 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 {
537
365
  /**
538
- * Country code (e.g., US, CA)
366
+ * Unique identifier for the brand
539
367
  */
540
- country?: string | null;
368
+ id?: string;
541
369
  /**
542
- * Country where the business is registered
370
+ * Business details and address information
543
371
  */
544
- country_of_registration?: string | null;
372
+ business?: Brand.Business | null;
545
373
  /**
546
- * Business entity type
374
+ * Compliance and TCR-related information
547
375
  */
548
- entity_type?: string | null;
376
+ compliance?: Brand.Compliance | null;
549
377
  /**
550
- * Legal business name
378
+ * Contact information for the brand
551
379
  */
552
- legal_name?: string | null;
380
+ contact?: Brand.Contact | null;
553
381
  /**
554
- * Postal/ZIP code
382
+ * When the brand was created
555
383
  */
556
- postal_code?: string | null;
384
+ created_at?: string;
557
385
  /**
558
- * 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.
559
390
  */
560
- state?: string | null;
391
+ csp_id?: string | null;
392
+ identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
561
393
  /**
562
- * Street address
394
+ * Whether this brand is inherited from the parent organization
563
395
  */
564
- street?: string | null;
396
+ is_inherited?: boolean;
397
+ status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
565
398
  /**
566
- * Tax ID/EIN number
399
+ * When the brand was submitted to TCR
567
400
  */
568
- tax_id?: string | null;
401
+ submitted_at?: string | null;
569
402
  /**
570
- * Type of tax ID (e.g., us_ein, ca_bn)
403
+ * Whether this brand has been submitted to TCR
571
404
  */
572
- tax_id_type?: string | null;
405
+ submitted_to_tcr?: boolean;
573
406
  /**
574
- * Business website URL
407
+ * TCR brand ID (populated after TCR submission)
575
408
  */
576
- url?: string | null;
577
- }
578
- /**
579
- * Compliance and TCR-related information
580
- */
581
- interface Compliance {
582
- brand_relationship?: ProfilesAPI.TcrBrandRelationship | null;
409
+ tcr_brand_id?: string | null;
583
410
  /**
584
- * List of destination countries for messaging
411
+ * Universal EIN from TCR
585
412
  */
586
- destination_countries?: Array<ProfilesAPI.DestinationCountry>;
413
+ universal_ein?: string | null;
587
414
  /**
588
- * Whether this is a TCR (Campaign Registry) application
415
+ * When the brand was last updated
589
416
  */
590
- is_tcr_application?: boolean;
417
+ updated_at?: string | null;
418
+ }
419
+ namespace Brand {
591
420
  /**
592
- * Additional notes about the business or use case
421
+ * Business details and address information
593
422
  */
594
- 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
+ }
595
469
  /**
596
- * Phone number prefix for messaging (e.g., "+1")
470
+ * Compliance and TCR-related information
597
471
  */
598
- 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
+ }
599
504
  /**
600
- * Primary messaging use case description
505
+ * Contact information for the brand
601
506
  */
602
- primary_use_case?: string | null;
603
- 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
+ }
604
533
  }
534
+ }
535
+ /**
536
+ * Error information
537
+ */
538
+ interface Error {
605
539
  /**
606
- * Contact information for the brand
540
+ * Machine-readable error code (e.g., "RESOURCE_001")
607
541
  */
608
- interface Contact {
609
- /**
610
- * Business/brand name
611
- */
612
- business_name?: string | null;
613
- /**
614
- * Contact email address
615
- */
616
- email?: string | null;
617
- /**
618
- * 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
619
745
  */
620
- name?: string;
746
+ id?: string;
621
747
  /**
622
- * Contact phone number in E.164 format
748
+ * Business details and address information
623
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;
624
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 {
625
1121
  /**
626
- * Contact phone country code (e.g., "1" for US)
1122
+ * Unique identifier for the brand
627
1123
  */
628
- phone_country_code?: string | null;
1124
+ id?: string;
629
1125
  /**
630
- * Contact's role in the business
1126
+ * Business details and address information
631
1127
  */
632
- 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
+ }
633
1289
  }
634
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
+ }
635
1331
  }
636
- export type TcrBrandRelationship = 'BASIC_ACCOUNT' | 'MEDIUM_ACCOUNT' | 'LARGE_ACCOUNT' | 'SMALL_ACCOUNT' | 'KEY_ACCOUNT';
637
- 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';
638
1332
  /**
639
1333
  * Standard API response envelope for all v3 endpoints
640
1334
  */
641
1335
  export interface ProfileListResponse {
642
1336
  /**
643
- * List of profiles response
1337
+ * The profiles in the organization.
644
1338
  */
645
1339
  data?: ProfileListResponse.Data | null;
646
1340
  /**
647
1341
  * Error information
648
1342
  */
649
- error?: WebhooksAPI.ErrorDetail | null;
1343
+ error?: ProfileListResponse.Error | null;
650
1344
  /**
651
1345
  * Request and response metadata
652
1346
  */
653
- meta?: WebhooksAPI.APIMeta;
1347
+ meta?: ProfileListResponse.Meta;
654
1348
  /**
655
1349
  * Indicates whether the request was successful
656
1350
  */
@@ -658,13 +1352,418 @@ export interface ProfileListResponse {
658
1352
  }
659
1353
  export declare namespace ProfileListResponse {
660
1354
  /**
661
- * List of profiles response
1355
+ * The profiles in the organization.
662
1356
  */
663
1357
  interface Data {
664
1358
  /**
665
- * List of profiles in the organization
1359
+ * Pagination metadata for list responses
666
1360
  */
667
- 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;
668
1767
  }
669
1768
  }
670
1769
  /**
@@ -679,11 +1778,11 @@ export interface ProfileCompleteResponse {
679
1778
  /**
680
1779
  * Error information
681
1780
  */
682
- error?: WebhooksAPI.ErrorDetail | null;
1781
+ error?: ProfileCompleteResponse.Error | null;
683
1782
  /**
684
1783
  * Request and response metadata
685
1784
  */
686
- meta?: WebhooksAPI.APIMeta;
1785
+ meta?: ProfileCompleteResponse.Meta;
687
1786
  /**
688
1787
  * Indicates whether the request was successful
689
1788
  */
@@ -694,32 +1793,87 @@ export declare namespace ProfileCompleteResponse {
694
1793
  * Response when a profile is already in the completed state and no further action
695
1794
  * is taken.
696
1795
  */
697
- 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 {
698
1834
  /**
699
- * Human-readable message describing the result.
1835
+ * Unique identifier for this request (for tracing and support)
700
1836
  */
701
- message?: string;
1837
+ request_id?: string;
702
1838
  /**
703
- * Current process status of the profile (e.g., "completed", "submitted",
704
- * "in_progress").
1839
+ * Server timestamp when the response was generated
705
1840
  */
706
- status?: string;
1841
+ timestamp?: string;
1842
+ /**
1843
+ * API version used for this request
1844
+ */
1845
+ version?: string;
707
1846
  }
708
1847
  }
709
1848
  export interface ProfileCreateParams {
710
1849
  /**
711
- * 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.
712
1866
  */
713
- allow_contact_sharing?: boolean;
1867
+ allow_contact_sharing?: boolean | null;
714
1868
  /**
715
- * Body param: Whether templates are shared across profiles (default: false)
1869
+ * @deprecated Body param
716
1870
  */
717
- allow_template_sharing?: boolean;
1871
+ allow_template_sharing?: boolean | null;
718
1872
  /**
719
1873
  * Body param: Billing contact information for a profile. Required when
720
1874
  * billing_model is "profile" or "profile_and_organization".
721
1875
  */
722
- billing_contact?: BillingContactInfo | null;
1876
+ billing_contact?: ProfileCreateParams.BillingContact | null;
723
1877
  /**
724
1878
  * Body param: Billing model: profile, organization, or profile_and_organization
725
1879
  * (default: profile).
@@ -735,7 +1889,7 @@ export interface ProfileCreateParams {
735
1889
  * Body param: Brand and KYC data grouped into contact, business, and compliance
736
1890
  * sections
737
1891
  */
738
- brand?: BrandsBrandData | null;
1892
+ brand?: ProfileCreateParams.Brand | null;
739
1893
  /**
740
1894
  * Body param: Profile description (optional)
741
1895
  */
@@ -745,23 +1899,21 @@ export interface ProfileCreateParams {
745
1899
  */
746
1900
  icon?: string | null;
747
1901
  /**
748
- * Body param: Whether this profile inherits contacts from organization (default:
749
- * true)
1902
+ * @deprecated Body param
750
1903
  */
751
1904
  inherit_contacts?: boolean | null;
752
1905
  /**
753
1906
  * Body param: Whether this profile inherits TCR brand from organization (default:
754
- * true)
1907
+ * false)
755
1908
  */
756
1909
  inherit_tcr_brand?: boolean | null;
757
1910
  /**
758
1911
  * Body param: Whether this profile inherits TCR campaign from organization
759
- * (default: true)
1912
+ * (default: false)
760
1913
  */
761
1914
  inherit_tcr_campaign?: boolean | null;
762
1915
  /**
763
- * Body param: Whether this profile inherits templates from organization (default:
764
- * true)
1916
+ * @deprecated Body param
765
1917
  */
766
1918
  inherit_templates?: boolean | null;
767
1919
  /**
@@ -769,11 +1921,11 @@ export interface ProfileCreateParams {
769
1921
  */
770
1922
  name?: string;
771
1923
  /**
772
- * Body param: Payment card details for a profile. Accepted when billing_model is
773
- * "profile" or "profile_and_organization". These details are not stored on our
774
- * 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.
775
1927
  */
776
- payment_details?: PaymentDetails | null;
1928
+ payment_details?: ProfileCreateParams.PaymentDetails | null;
777
1929
  /**
778
1930
  * Body param: Sandbox flag - when true, the operation is simulated without side
779
1931
  * effects Useful for testing integrations without actual execution
@@ -807,6 +1959,169 @@ export interface ProfileCreateParams {
807
1959
  'x-profile-id'?: string;
808
1960
  }
809
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
+ }
810
2125
  /**
811
2126
  * Direct WhatsApp Business Account credentials for a profile. Use this when the
812
2127
  * profile should have its own WhatsApp Business Account instead of inheriting from
@@ -843,7 +2158,17 @@ export interface ProfileRetrieveParams {
843
2158
  }
844
2159
  export interface ProfileUpdateParams {
845
2160
  /**
846
- * 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.
847
2172
  */
848
2173
  allow_contact_sharing?: boolean | null;
849
2174
  /**
@@ -851,14 +2176,14 @@ export interface ProfileUpdateParams {
851
2176
  */
852
2177
  allow_number_change_during_onboarding?: boolean | null;
853
2178
  /**
854
- * Body param: Whether templates are shared across profiles (optional)
2179
+ * @deprecated Body param
855
2180
  */
856
2181
  allow_template_sharing?: boolean | null;
857
2182
  /**
858
2183
  * Body param: Billing contact information for a profile. Required when
859
2184
  * billing_model is "profile" or "profile_and_organization".
860
2185
  */
861
- billing_contact?: BillingContactInfo | null;
2186
+ billing_contact?: ProfileUpdateParams.BillingContact | null;
862
2187
  /**
863
2188
  * Body param: Billing model: profile, organization, or profile_and_organization
864
2189
  * (optional).
@@ -874,7 +2199,7 @@ export interface ProfileUpdateParams {
874
2199
  * Body param: Brand and KYC data grouped into contact, business, and compliance
875
2200
  * sections
876
2201
  */
877
- brand?: BrandsBrandData | null;
2202
+ brand?: ProfileUpdateParams.Brand | null;
878
2203
  /**
879
2204
  * Body param: Profile description (optional)
880
2205
  */
@@ -884,7 +2209,7 @@ export interface ProfileUpdateParams {
884
2209
  */
885
2210
  icon?: string | null;
886
2211
  /**
887
- * Body param: Whether this profile inherits contacts from organization (optional)
2212
+ * @deprecated Body param
888
2213
  */
889
2214
  inherit_contacts?: boolean | null;
890
2215
  /**
@@ -897,7 +2222,7 @@ export interface ProfileUpdateParams {
897
2222
  */
898
2223
  inherit_tcr_campaign?: boolean | null;
899
2224
  /**
900
- * Body param: Whether this profile inherits templates from organization (optional)
2225
+ * @deprecated Body param
901
2226
  */
902
2227
  inherit_templates?: boolean | null;
903
2228
  /**
@@ -905,11 +2230,11 @@ export interface ProfileUpdateParams {
905
2230
  */
906
2231
  name?: string | null;
907
2232
  /**
908
- * Body param: Payment card details for a profile. Accepted when billing_model is
909
- * "profile" or "profile_and_organization". These details are not stored on our
910
- * 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.
911
2236
  */
912
- payment_details?: PaymentDetails | null;
2237
+ payment_details?: ProfileUpdateParams.PaymentDetails | null;
913
2238
  /**
914
2239
  * Body param: Sandbox flag - when true, the operation is simulated without side
915
2240
  * effects Useful for testing integrations without actual execution
@@ -920,12 +2245,29 @@ export interface ProfileUpdateParams {
920
2245
  */
921
2246
  sending_phone_number?: string | null;
922
2247
  /**
923
- * 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.
924
2267
  */
925
2268
  sending_phone_number_profile_id?: string | null;
926
2269
  /**
927
- * Body param: Reference to another profile to use for WhatsApp configuration
928
- * (optional)
2270
+ * @deprecated Body param
929
2271
  */
930
2272
  sending_whatsapp_number_profile_id?: string | null;
931
2273
  /**
@@ -951,6 +2293,171 @@ export interface ProfileUpdateParams {
951
2293
  */
952
2294
  'x-profile-id'?: string;
953
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
+ }
954
2461
  export interface ProfileListParams {
955
2462
  /**
956
2463
  * Profile UUID to scope the request to a child profile. Only organization API keys
@@ -996,7 +2503,7 @@ export interface ProfileCompleteParams {
996
2503
  'x-profile-id'?: string;
997
2504
  }
998
2505
  export declare namespace Profiles {
999
- 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, };
1000
- 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, };
1001
2508
  }
1002
2509
  //# sourceMappingURL=profiles.d.ts.map