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