@sentdm/sentdm 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -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 +132 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +132 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +3 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +3 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +212 -31
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +212 -31
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +11 -5
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +11 -5
- 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 -499
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +2006 -499
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +97 -68
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +97 -68
- 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 +449 -46
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +449 -46
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +11 -7
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +11 -7
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +934 -109
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +934 -109
- 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 +90 -60
- package/src/resources/contacts.ts +696 -92
- package/src/resources/conversations.ts +400 -77
- package/src/resources/index.ts +26 -26
- package/src/resources/me.ts +151 -52
- package/src/resources/messages.ts +236 -31
- 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 -637
- package/src/resources/templates.ts +583 -99
- package/src/resources/users.ts +519 -47
- package/src/resources/webhooks.ts +1170 -179
- 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,21 +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('profileId');
|
|
100
|
-
* ```
|
|
96
|
+
* @deprecated
|
|
101
97
|
*/
|
|
102
98
|
retrieve(
|
|
103
99
|
profileID: string,
|
|
104
100
|
params: ProfileRetrieveParams | null | undefined = {},
|
|
105
101
|
options?: RequestOptions,
|
|
106
|
-
): APIPromise<
|
|
102
|
+
): APIPromise<ProfileRetrieveResponse> {
|
|
107
103
|
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
108
104
|
return this._client.get(path`/v3/profiles/${profileID}`, {
|
|
109
105
|
...options,
|
|
@@ -115,6 +111,12 @@ export class Profiles extends APIResource {
|
|
|
115
111
|
}
|
|
116
112
|
|
|
117
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
|
+
*
|
|
118
120
|
* Updates a profile's configuration and settings. Requires admin role in the
|
|
119
121
|
* organization. Only provided fields will be updated (partial update).
|
|
120
122
|
*
|
|
@@ -134,17 +136,27 @@ export class Profiles extends APIResource {
|
|
|
134
136
|
* and are forwarded directly to the payment processor. Providing `payment_details`
|
|
135
137
|
* when `billing_model` is `"organization"` is not allowed.
|
|
136
138
|
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
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
|
|
142
154
|
*/
|
|
143
155
|
update(
|
|
144
156
|
profileID: string,
|
|
145
157
|
params: ProfileUpdateParams,
|
|
146
158
|
options?: RequestOptions,
|
|
147
|
-
): APIPromise<
|
|
159
|
+
): APIPromise<ProfileUpdateResponse> {
|
|
148
160
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
149
161
|
return this._client.patch(path`/v3/profiles/${profileID}`, {
|
|
150
162
|
body,
|
|
@@ -160,15 +172,18 @@ export class Profiles extends APIResource {
|
|
|
160
172
|
}
|
|
161
173
|
|
|
162
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
|
+
*
|
|
163
181
|
* Retrieves all sender profiles within an organization, including brand
|
|
164
182
|
* information for each profile. Profiles represent different brands, departments,
|
|
165
183
|
* or use cases within an organization, each with their own messaging
|
|
166
184
|
* configuration.
|
|
167
185
|
*
|
|
168
|
-
* @
|
|
169
|
-
* ```ts
|
|
170
|
-
* const profiles = await client.profiles.list();
|
|
171
|
-
* ```
|
|
186
|
+
* @deprecated
|
|
172
187
|
*/
|
|
173
188
|
list(
|
|
174
189
|
params: ProfileListParams | null | undefined = {},
|
|
@@ -185,13 +200,19 @@ export class Profiles extends APIResource {
|
|
|
185
200
|
}
|
|
186
201
|
|
|
187
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
|
+
*
|
|
188
209
|
* Soft deletes a sender profile. The profile will be marked as deleted but data is
|
|
189
|
-
* 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.
|
|
190
214
|
*
|
|
191
|
-
* @
|
|
192
|
-
* ```ts
|
|
193
|
-
* await client.profiles.delete('profileId');
|
|
194
|
-
* ```
|
|
215
|
+
* @deprecated
|
|
195
216
|
*/
|
|
196
217
|
delete(profileID: string, params: ProfileDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
197
218
|
const { 'x-profile-id': xProfileID, ...body } = params;
|
|
@@ -206,15 +227,27 @@ export class Profiles extends APIResource {
|
|
|
206
227
|
}
|
|
207
228
|
|
|
208
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
|
+
*
|
|
209
236
|
* Final step in the profile compliance workflow. Validates all prerequisites (KYC,
|
|
210
237
|
* brand, campaigns, required documents), connects the profile to the SMS and
|
|
211
|
-
* WhatsApp channels, and
|
|
212
|
-
*
|
|
213
|
-
* profile is already
|
|
214
|
-
* it returns 202 and calls the provided webhook URL
|
|
215
|
-
* 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.
|
|
216
243
|
*
|
|
217
|
-
*
|
|
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):
|
|
218
251
|
*
|
|
219
252
|
* - Profile must have a name, short name, and description (short name max 50
|
|
220
253
|
* characters, description max 5000)
|
|
@@ -225,28 +258,20 @@ export class Profiles extends APIResource {
|
|
|
225
258
|
* - TCR applications must have at least one campaign, own or inherited
|
|
226
259
|
* - Destination countries marked as main must have their required compliance
|
|
227
260
|
* documents uploaded
|
|
261
|
+
* - TCR applications must state whether they inherit the organization's TCR brand
|
|
262
|
+
* and campaign
|
|
228
263
|
*
|
|
229
|
-
*
|
|
264
|
+
* Outcome:
|
|
230
265
|
*
|
|
231
|
-
* -
|
|
232
|
-
*
|
|
233
|
-
* -
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
* 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
|
|
239
273
|
*
|
|
240
|
-
* @
|
|
241
|
-
* ```ts
|
|
242
|
-
* const response = await client.profiles.complete(
|
|
243
|
-
* '660e8400-e29b-41d4-a716-446655440000',
|
|
244
|
-
* {
|
|
245
|
-
* webHookUrl:
|
|
246
|
-
* 'https://your-app.com/webhook/profile-complete',
|
|
247
|
-
* },
|
|
248
|
-
* );
|
|
249
|
-
* ```
|
|
274
|
+
* @deprecated
|
|
250
275
|
*/
|
|
251
276
|
complete(
|
|
252
277
|
profileID: string,
|
|
@@ -268,24 +293,62 @@ export class Profiles extends APIResource {
|
|
|
268
293
|
}
|
|
269
294
|
}
|
|
270
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
|
+
|
|
271
334
|
/**
|
|
272
335
|
* Standard API response envelope for all v3 endpoints
|
|
273
336
|
*/
|
|
274
|
-
export interface
|
|
337
|
+
export interface ProfileCreateResponse {
|
|
275
338
|
/**
|
|
276
339
|
* Detailed profile response for v3 API
|
|
277
340
|
*/
|
|
278
|
-
data?:
|
|
341
|
+
data?: ProfileCreateResponse.Data | null;
|
|
279
342
|
|
|
280
343
|
/**
|
|
281
344
|
* Error information
|
|
282
345
|
*/
|
|
283
|
-
error?:
|
|
346
|
+
error?: ProfileCreateResponse.Error | null;
|
|
284
347
|
|
|
285
348
|
/**
|
|
286
349
|
* Request and response metadata
|
|
287
350
|
*/
|
|
288
|
-
meta?:
|
|
351
|
+
meta?: ProfileCreateResponse.Meta;
|
|
289
352
|
|
|
290
353
|
/**
|
|
291
354
|
* Indicates whether the request was successful
|
|
@@ -293,649 +356,907 @@ export interface APIResponseOfProfileDetail {
|
|
|
293
356
|
success?: boolean;
|
|
294
357
|
}
|
|
295
358
|
|
|
296
|
-
|
|
297
|
-
* Billing contact information for a profile. Required when billing_model is
|
|
298
|
-
* "profile" or "profile_and_organization".
|
|
299
|
-
*/
|
|
300
|
-
export interface BillingContactInfo {
|
|
359
|
+
export namespace ProfileCreateResponse {
|
|
301
360
|
/**
|
|
302
|
-
*
|
|
361
|
+
* Detailed profile response for v3 API
|
|
303
362
|
*/
|
|
304
|
-
|
|
363
|
+
export interface Data {
|
|
364
|
+
/**
|
|
365
|
+
* Profile unique identifier
|
|
366
|
+
*/
|
|
367
|
+
id?: string;
|
|
305
368
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
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;
|
|
310
375
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
address?: string | null;
|
|
376
|
+
/**
|
|
377
|
+
* Whether number changes are allowed during onboarding
|
|
378
|
+
*/
|
|
379
|
+
allow_number_change_during_onboarding?: boolean | null;
|
|
316
380
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
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;
|
|
322
387
|
|
|
323
|
-
/**
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* City
|
|
329
|
-
*/
|
|
330
|
-
city?: string | null;
|
|
388
|
+
/**
|
|
389
|
+
* Billing contact info returned in profile responses
|
|
390
|
+
*/
|
|
391
|
+
billing_contact?: Data.BillingContact | null;
|
|
331
392
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
393
|
+
/**
|
|
394
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
395
|
+
*/
|
|
396
|
+
billing_model?: string;
|
|
336
397
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
398
|
+
/**
|
|
399
|
+
* Brand response with nested contact, business, and compliance sections — mirrors
|
|
400
|
+
* the request structure.
|
|
401
|
+
*/
|
|
402
|
+
brand?: Data.Brand | null;
|
|
341
403
|
|
|
342
|
-
|
|
404
|
+
/**
|
|
405
|
+
* When the profile was created
|
|
406
|
+
*/
|
|
407
|
+
created_at?: string;
|
|
343
408
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
409
|
+
/**
|
|
410
|
+
* Profile description
|
|
411
|
+
*/
|
|
412
|
+
description?: string | null;
|
|
348
413
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
414
|
+
/**
|
|
415
|
+
* Profile email (inherited from organization)
|
|
416
|
+
*/
|
|
417
|
+
email?: string | null;
|
|
353
418
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
419
|
+
/**
|
|
420
|
+
* Profile icon URL
|
|
421
|
+
*/
|
|
422
|
+
icon?: string | null;
|
|
358
423
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
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;
|
|
363
430
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
431
|
+
/**
|
|
432
|
+
* Whether this profile inherits TCR brand from the organization
|
|
433
|
+
*/
|
|
434
|
+
inherit_tcr_brand?: boolean;
|
|
368
435
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
436
|
+
/**
|
|
437
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
438
|
+
*/
|
|
439
|
+
inherit_tcr_campaign?: boolean;
|
|
373
440
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
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;
|
|
379
447
|
|
|
380
|
-
/**
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
brandRelationship: TcrBrandRelationship;
|
|
448
|
+
/**
|
|
449
|
+
* Profile name
|
|
450
|
+
*/
|
|
451
|
+
name?: string;
|
|
385
452
|
|
|
386
|
-
|
|
453
|
+
/**
|
|
454
|
+
* Parent organization ID
|
|
455
|
+
*/
|
|
456
|
+
organization_id?: string | null;
|
|
387
457
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
458
|
+
/**
|
|
459
|
+
* Direct SMS phone number
|
|
460
|
+
*/
|
|
461
|
+
sending_phone_number?: string | null;
|
|
392
462
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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;
|
|
397
481
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
482
|
+
/**
|
|
483
|
+
* @deprecated
|
|
484
|
+
*/
|
|
485
|
+
sending_whatsapp_number_profile_id?: string | null;
|
|
402
486
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
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;
|
|
407
492
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}
|
|
493
|
+
/**
|
|
494
|
+
* Profile setup status: incomplete, pending_review, approved, rejected
|
|
495
|
+
*/
|
|
496
|
+
status?: string;
|
|
413
497
|
|
|
414
|
-
/**
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* Primary contact name (required)
|
|
420
|
-
*/
|
|
421
|
-
name: string;
|
|
498
|
+
/**
|
|
499
|
+
* When the profile was last updated
|
|
500
|
+
*/
|
|
501
|
+
updated_at?: string | null;
|
|
422
502
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
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;
|
|
427
508
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
509
|
+
/**
|
|
510
|
+
* Direct WhatsApp phone number
|
|
511
|
+
*/
|
|
512
|
+
whatsapp_phone_number?: string | null;
|
|
513
|
+
}
|
|
432
514
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
515
|
+
export namespace Data {
|
|
516
|
+
/**
|
|
517
|
+
* Billing contact info returned in profile responses
|
|
518
|
+
*/
|
|
519
|
+
export interface BillingContact {
|
|
520
|
+
address?: string | null;
|
|
437
521
|
|
|
438
|
-
|
|
439
|
-
* Contact phone country code (e.g., "1" for US)
|
|
440
|
-
*/
|
|
441
|
-
phoneCountryCode?: string | null;
|
|
522
|
+
email?: string | null;
|
|
442
523
|
|
|
443
|
-
|
|
444
|
-
* Contact's role in the business
|
|
445
|
-
*/
|
|
446
|
-
role?: string | null;
|
|
447
|
-
}
|
|
524
|
+
name?: string | null;
|
|
448
525
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
*/
|
|
452
|
-
export interface BrandsBrandData {
|
|
453
|
-
/**
|
|
454
|
-
* Compliance and TCR information for brand registration
|
|
455
|
-
*/
|
|
456
|
-
compliance: BrandComplianceInfo;
|
|
526
|
+
phone?: string | null;
|
|
527
|
+
}
|
|
457
528
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
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;
|
|
462
538
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
}
|
|
539
|
+
/**
|
|
540
|
+
* Business details and address information
|
|
541
|
+
*/
|
|
542
|
+
business?: Brand.Business | null;
|
|
468
543
|
|
|
469
|
-
|
|
470
|
-
|
|
544
|
+
/**
|
|
545
|
+
* Compliance and TCR-related information
|
|
546
|
+
*/
|
|
547
|
+
compliance?: Brand.Compliance | null;
|
|
471
548
|
|
|
472
|
-
|
|
473
|
-
|
|
549
|
+
/**
|
|
550
|
+
* Contact information for the brand
|
|
551
|
+
*/
|
|
552
|
+
contact?: Brand.Contact | null;
|
|
474
553
|
|
|
475
|
-
/**
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
*/
|
|
480
|
-
export interface PaymentDetails {
|
|
481
|
-
/**
|
|
482
|
-
* Card number (digits only, 13–19 characters)
|
|
483
|
-
*/
|
|
484
|
-
card_number: string;
|
|
554
|
+
/**
|
|
555
|
+
* When the brand was created
|
|
556
|
+
*/
|
|
557
|
+
created_at?: string;
|
|
485
558
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
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;
|
|
490
566
|
|
|
491
|
-
|
|
492
|
-
* Card expiry date in MM/YY format (e.g. "09/27")
|
|
493
|
-
*/
|
|
494
|
-
expiry: string;
|
|
567
|
+
identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
|
|
495
568
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}
|
|
569
|
+
/**
|
|
570
|
+
* Whether this brand is inherited from the parent organization
|
|
571
|
+
*/
|
|
572
|
+
is_inherited?: boolean;
|
|
501
573
|
|
|
502
|
-
|
|
503
|
-
* Detailed profile response for v3 API
|
|
504
|
-
*/
|
|
505
|
-
export interface ProfileDetail {
|
|
506
|
-
/**
|
|
507
|
-
* Profile unique identifier
|
|
508
|
-
*/
|
|
509
|
-
id?: string;
|
|
574
|
+
status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
|
|
510
575
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
576
|
+
/**
|
|
577
|
+
* When the brand was submitted to TCR
|
|
578
|
+
*/
|
|
579
|
+
submitted_at?: string | null;
|
|
515
580
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
581
|
+
/**
|
|
582
|
+
* Whether this brand has been submitted to TCR
|
|
583
|
+
*/
|
|
584
|
+
submitted_to_tcr?: boolean;
|
|
520
585
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
586
|
+
/**
|
|
587
|
+
* TCR brand ID (populated after TCR submission)
|
|
588
|
+
*/
|
|
589
|
+
tcr_brand_id?: string | null;
|
|
525
590
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
591
|
+
/**
|
|
592
|
+
* Universal EIN from TCR
|
|
593
|
+
*/
|
|
594
|
+
universal_ein?: string | null;
|
|
530
595
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
596
|
+
/**
|
|
597
|
+
* When the brand was last updated
|
|
598
|
+
*/
|
|
599
|
+
updated_at?: string | null;
|
|
600
|
+
}
|
|
535
601
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
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
|
+
}
|
|
541
662
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
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
|
+
}
|
|
546
704
|
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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
|
+
}
|
|
551
741
|
|
|
552
742
|
/**
|
|
553
|
-
*
|
|
743
|
+
* Error information
|
|
554
744
|
*/
|
|
555
|
-
|
|
745
|
+
export interface Error {
|
|
746
|
+
/**
|
|
747
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
748
|
+
*/
|
|
749
|
+
code?: string;
|
|
556
750
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
751
|
+
/**
|
|
752
|
+
* Additional validation error details (field-level errors)
|
|
753
|
+
*/
|
|
754
|
+
details?: { [key: string]: Array<string> } | null;
|
|
561
755
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
756
|
+
/**
|
|
757
|
+
* URL to documentation about this error
|
|
758
|
+
*/
|
|
759
|
+
doc_url?: string | null;
|
|
566
760
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
761
|
+
/**
|
|
762
|
+
* Human-readable error message
|
|
763
|
+
*/
|
|
764
|
+
message?: string;
|
|
765
|
+
}
|
|
571
766
|
|
|
572
767
|
/**
|
|
573
|
-
*
|
|
768
|
+
* Request and response metadata
|
|
574
769
|
*/
|
|
575
|
-
|
|
770
|
+
export interface Meta {
|
|
771
|
+
/**
|
|
772
|
+
* Unique identifier for this request (for tracing and support)
|
|
773
|
+
*/
|
|
774
|
+
request_id?: string;
|
|
576
775
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
776
|
+
/**
|
|
777
|
+
* Server timestamp when the response was generated
|
|
778
|
+
*/
|
|
779
|
+
timestamp?: string;
|
|
581
780
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
781
|
+
/**
|
|
782
|
+
* API version used for this request
|
|
783
|
+
*/
|
|
784
|
+
version?: string;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
586
787
|
|
|
788
|
+
/**
|
|
789
|
+
* Standard API response envelope for all v3 endpoints
|
|
790
|
+
*/
|
|
791
|
+
export interface ProfileRetrieveResponse {
|
|
587
792
|
/**
|
|
588
|
-
*
|
|
793
|
+
* Detailed profile response for v3 API
|
|
589
794
|
*/
|
|
590
|
-
|
|
795
|
+
data?: ProfileRetrieveResponse.Data | null;
|
|
591
796
|
|
|
592
797
|
/**
|
|
593
|
-
*
|
|
798
|
+
* Error information
|
|
594
799
|
*/
|
|
595
|
-
|
|
800
|
+
error?: ProfileRetrieveResponse.Error | null;
|
|
596
801
|
|
|
597
802
|
/**
|
|
598
|
-
*
|
|
803
|
+
* Request and response metadata
|
|
599
804
|
*/
|
|
600
|
-
|
|
805
|
+
meta?: ProfileRetrieveResponse.Meta;
|
|
601
806
|
|
|
602
807
|
/**
|
|
603
|
-
*
|
|
808
|
+
* Indicates whether the request was successful
|
|
604
809
|
*/
|
|
605
|
-
|
|
810
|
+
success?: boolean;
|
|
811
|
+
}
|
|
606
812
|
|
|
813
|
+
export namespace ProfileRetrieveResponse {
|
|
607
814
|
/**
|
|
608
|
-
*
|
|
609
|
-
* only, with at least one letter.
|
|
815
|
+
* Detailed profile response for v3 API
|
|
610
816
|
*/
|
|
611
|
-
|
|
817
|
+
export interface Data {
|
|
818
|
+
/**
|
|
819
|
+
* Profile unique identifier
|
|
820
|
+
*/
|
|
821
|
+
id?: string;
|
|
612
822
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
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;
|
|
617
829
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
830
|
+
/**
|
|
831
|
+
* Whether number changes are allowed during onboarding
|
|
832
|
+
*/
|
|
833
|
+
allow_number_change_during_onboarding?: boolean | null;
|
|
622
834
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
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;
|
|
628
841
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
}
|
|
842
|
+
/**
|
|
843
|
+
* Billing contact info returned in profile responses
|
|
844
|
+
*/
|
|
845
|
+
billing_contact?: Data.BillingContact | null;
|
|
634
846
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
export interface BillingContact {
|
|
640
|
-
address?: string | null;
|
|
847
|
+
/**
|
|
848
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
849
|
+
*/
|
|
850
|
+
billing_model?: string;
|
|
641
851
|
|
|
642
|
-
|
|
852
|
+
/**
|
|
853
|
+
* Brand response with nested contact, business, and compliance sections — mirrors
|
|
854
|
+
* the request structure.
|
|
855
|
+
*/
|
|
856
|
+
brand?: Data.Brand | null;
|
|
643
857
|
|
|
644
|
-
|
|
858
|
+
/**
|
|
859
|
+
* When the profile was created
|
|
860
|
+
*/
|
|
861
|
+
created_at?: string;
|
|
645
862
|
|
|
646
|
-
|
|
647
|
-
|
|
863
|
+
/**
|
|
864
|
+
* Profile description
|
|
865
|
+
*/
|
|
866
|
+
description?: string | null;
|
|
648
867
|
|
|
649
|
-
/**
|
|
650
|
-
* Brand response with nested contact, business, and compliance sections — mirrors
|
|
651
|
-
* the request structure.
|
|
652
|
-
*/
|
|
653
|
-
export interface Brand {
|
|
654
868
|
/**
|
|
655
|
-
*
|
|
869
|
+
* Profile email (inherited from organization)
|
|
656
870
|
*/
|
|
657
|
-
|
|
871
|
+
email?: string | null;
|
|
658
872
|
|
|
659
873
|
/**
|
|
660
|
-
*
|
|
874
|
+
* Profile icon URL
|
|
661
875
|
*/
|
|
662
|
-
|
|
876
|
+
icon?: string | null;
|
|
663
877
|
|
|
664
878
|
/**
|
|
665
|
-
*
|
|
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.
|
|
666
882
|
*/
|
|
667
|
-
|
|
883
|
+
inherit_contacts?: boolean | null;
|
|
668
884
|
|
|
669
885
|
/**
|
|
670
|
-
*
|
|
886
|
+
* Whether this profile inherits TCR brand from the organization
|
|
671
887
|
*/
|
|
672
|
-
|
|
888
|
+
inherit_tcr_brand?: boolean;
|
|
673
889
|
|
|
674
890
|
/**
|
|
675
|
-
*
|
|
891
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
676
892
|
*/
|
|
677
|
-
|
|
893
|
+
inherit_tcr_campaign?: boolean;
|
|
678
894
|
|
|
679
895
|
/**
|
|
680
|
-
*
|
|
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.
|
|
681
899
|
*/
|
|
682
|
-
|
|
900
|
+
inherit_templates?: boolean | null;
|
|
683
901
|
|
|
684
|
-
|
|
902
|
+
/**
|
|
903
|
+
* Profile name
|
|
904
|
+
*/
|
|
905
|
+
name?: string;
|
|
685
906
|
|
|
686
907
|
/**
|
|
687
|
-
*
|
|
908
|
+
* Parent organization ID
|
|
688
909
|
*/
|
|
689
|
-
|
|
910
|
+
organization_id?: string | null;
|
|
690
911
|
|
|
691
|
-
|
|
912
|
+
/**
|
|
913
|
+
* Direct SMS phone number
|
|
914
|
+
*/
|
|
915
|
+
sending_phone_number?: string | null;
|
|
692
916
|
|
|
693
917
|
/**
|
|
694
|
-
*
|
|
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.
|
|
695
933
|
*/
|
|
696
|
-
|
|
934
|
+
sending_phone_number_profile_id?: string | null;
|
|
697
935
|
|
|
698
936
|
/**
|
|
699
|
-
*
|
|
937
|
+
* @deprecated
|
|
700
938
|
*/
|
|
701
|
-
|
|
939
|
+
sending_whatsapp_number_profile_id?: string | null;
|
|
702
940
|
|
|
703
941
|
/**
|
|
704
|
-
*
|
|
942
|
+
* Profile short name/abbreviation. 3–11 characters: letters, numbers, and spaces
|
|
943
|
+
* only, with at least one letter.
|
|
705
944
|
*/
|
|
706
|
-
|
|
945
|
+
short_name?: string | null;
|
|
707
946
|
|
|
708
947
|
/**
|
|
709
|
-
*
|
|
948
|
+
* Profile setup status: incomplete, pending_review, approved, rejected
|
|
710
949
|
*/
|
|
711
|
-
|
|
950
|
+
status?: string;
|
|
712
951
|
|
|
713
952
|
/**
|
|
714
|
-
* When the
|
|
953
|
+
* When the profile was last updated
|
|
715
954
|
*/
|
|
716
955
|
updated_at?: string | null;
|
|
717
|
-
}
|
|
718
956
|
|
|
719
|
-
export namespace Brand {
|
|
720
957
|
/**
|
|
721
|
-
* Business
|
|
958
|
+
* WhatsApp Business Account ID associated with this profile. Present whether the
|
|
959
|
+
* WABA is inherited from the organization or configured directly.
|
|
722
960
|
*/
|
|
723
|
-
|
|
724
|
-
/**
|
|
725
|
-
* City
|
|
726
|
-
*/
|
|
727
|
-
city?: string | null;
|
|
961
|
+
waba_id?: string | null;
|
|
728
962
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
963
|
+
/**
|
|
964
|
+
* Direct WhatsApp phone number
|
|
965
|
+
*/
|
|
966
|
+
whatsapp_phone_number?: string | null;
|
|
967
|
+
}
|
|
733
968
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
969
|
+
export namespace Data {
|
|
970
|
+
/**
|
|
971
|
+
* Billing contact info returned in profile responses
|
|
972
|
+
*/
|
|
973
|
+
export interface BillingContact {
|
|
974
|
+
address?: string | null;
|
|
738
975
|
|
|
739
|
-
|
|
740
|
-
* Business entity type
|
|
741
|
-
*/
|
|
742
|
-
entity_type?: string | null;
|
|
976
|
+
email?: string | null;
|
|
743
977
|
|
|
744
|
-
|
|
745
|
-
* Legal business name
|
|
746
|
-
*/
|
|
747
|
-
legal_name?: string | null;
|
|
978
|
+
name?: string | null;
|
|
748
979
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
*/
|
|
752
|
-
postal_code?: string | null;
|
|
980
|
+
phone?: string | null;
|
|
981
|
+
}
|
|
753
982
|
|
|
983
|
+
/**
|
|
984
|
+
* Brand response with nested contact, business, and compliance sections — mirrors
|
|
985
|
+
* the request structure.
|
|
986
|
+
*/
|
|
987
|
+
export interface Brand {
|
|
754
988
|
/**
|
|
755
|
-
*
|
|
989
|
+
* Unique identifier for the brand
|
|
756
990
|
*/
|
|
757
|
-
|
|
991
|
+
id?: string;
|
|
758
992
|
|
|
759
993
|
/**
|
|
760
|
-
*
|
|
994
|
+
* Business details and address information
|
|
761
995
|
*/
|
|
762
|
-
|
|
996
|
+
business?: Brand.Business | null;
|
|
763
997
|
|
|
764
998
|
/**
|
|
765
|
-
*
|
|
999
|
+
* Compliance and TCR-related information
|
|
766
1000
|
*/
|
|
767
|
-
|
|
1001
|
+
compliance?: Brand.Compliance | null;
|
|
768
1002
|
|
|
769
1003
|
/**
|
|
770
|
-
*
|
|
1004
|
+
* Contact information for the brand
|
|
771
1005
|
*/
|
|
772
|
-
|
|
1006
|
+
contact?: Brand.Contact | null;
|
|
773
1007
|
|
|
774
1008
|
/**
|
|
775
|
-
*
|
|
1009
|
+
* When the brand was created
|
|
776
1010
|
*/
|
|
777
|
-
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Compliance and TCR-related information
|
|
782
|
-
*/
|
|
783
|
-
export interface Compliance {
|
|
784
|
-
brand_relationship?: ProfilesAPI.TcrBrandRelationship | null;
|
|
1011
|
+
created_at?: string;
|
|
785
1012
|
|
|
786
1013
|
/**
|
|
787
|
-
*
|
|
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.
|
|
788
1018
|
*/
|
|
789
|
-
|
|
1019
|
+
csp_id?: string | null;
|
|
790
1020
|
|
|
791
|
-
|
|
792
|
-
* Whether this is a TCR (Campaign Registry) application
|
|
793
|
-
*/
|
|
794
|
-
is_tcr_application?: boolean;
|
|
1021
|
+
identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
|
|
795
1022
|
|
|
796
1023
|
/**
|
|
797
|
-
*
|
|
1024
|
+
* Whether this brand is inherited from the parent organization
|
|
798
1025
|
*/
|
|
799
|
-
|
|
1026
|
+
is_inherited?: boolean;
|
|
1027
|
+
|
|
1028
|
+
status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
|
|
800
1029
|
|
|
801
1030
|
/**
|
|
802
|
-
*
|
|
1031
|
+
* When the brand was submitted to TCR
|
|
803
1032
|
*/
|
|
804
|
-
|
|
1033
|
+
submitted_at?: string | null;
|
|
805
1034
|
|
|
806
1035
|
/**
|
|
807
|
-
*
|
|
1036
|
+
* Whether this brand has been submitted to TCR
|
|
808
1037
|
*/
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
vertical?: ProfilesAPI.TcrVertical | null;
|
|
812
|
-
}
|
|
1038
|
+
submitted_to_tcr?: boolean;
|
|
813
1039
|
|
|
814
|
-
/**
|
|
815
|
-
* Contact information for the brand
|
|
816
|
-
*/
|
|
817
|
-
export interface Contact {
|
|
818
1040
|
/**
|
|
819
|
-
*
|
|
1041
|
+
* TCR brand ID (populated after TCR submission)
|
|
820
1042
|
*/
|
|
821
|
-
|
|
1043
|
+
tcr_brand_id?: string | null;
|
|
822
1044
|
|
|
823
1045
|
/**
|
|
824
|
-
*
|
|
1046
|
+
* Universal EIN from TCR
|
|
825
1047
|
*/
|
|
826
|
-
|
|
1048
|
+
universal_ein?: string | null;
|
|
827
1049
|
|
|
828
1050
|
/**
|
|
829
|
-
*
|
|
1051
|
+
* When the brand was last updated
|
|
830
1052
|
*/
|
|
831
|
-
|
|
1053
|
+
updated_at?: string | null;
|
|
1054
|
+
}
|
|
832
1055
|
|
|
1056
|
+
export namespace Brand {
|
|
833
1057
|
/**
|
|
834
|
-
*
|
|
1058
|
+
* Business details and address information
|
|
835
1059
|
*/
|
|
836
|
-
|
|
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
|
+
}
|
|
837
1116
|
|
|
838
1117
|
/**
|
|
839
|
-
*
|
|
1118
|
+
* Compliance and TCR-related information
|
|
840
1119
|
*/
|
|
841
|
-
|
|
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
|
+
}
|
|
842
1158
|
|
|
843
1159
|
/**
|
|
844
|
-
* Contact
|
|
1160
|
+
* Contact information for the brand
|
|
845
1161
|
*/
|
|
846
|
-
|
|
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
|
+
}
|
|
847
1193
|
}
|
|
848
1194
|
}
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
export type TcrBrandRelationship =
|
|
852
|
-
| 'BASIC_ACCOUNT'
|
|
853
|
-
| 'MEDIUM_ACCOUNT'
|
|
854
|
-
| 'LARGE_ACCOUNT'
|
|
855
|
-
| 'SMALL_ACCOUNT'
|
|
856
|
-
| 'KEY_ACCOUNT';
|
|
857
|
-
|
|
858
|
-
export type TcrVertical =
|
|
859
|
-
| 'PROFESSIONAL'
|
|
860
|
-
| 'REAL_ESTATE'
|
|
861
|
-
| 'HEALTHCARE'
|
|
862
|
-
| 'HUMAN_RESOURCES'
|
|
863
|
-
| 'ENERGY'
|
|
864
|
-
| 'ENTERTAINMENT'
|
|
865
|
-
| 'RETAIL'
|
|
866
|
-
| 'TRANSPORTATION'
|
|
867
|
-
| 'AGRICULTURE'
|
|
868
|
-
| 'INSURANCE'
|
|
869
|
-
| 'POSTAL'
|
|
870
|
-
| 'EDUCATION'
|
|
871
|
-
| 'HOSPITALITY'
|
|
872
|
-
| 'FINANCIAL'
|
|
873
|
-
| 'POLITICAL'
|
|
874
|
-
| 'GAMBLING'
|
|
875
|
-
| 'LEGAL'
|
|
876
|
-
| 'CONSTRUCTION'
|
|
877
|
-
| 'NGO'
|
|
878
|
-
| 'MANUFACTURING'
|
|
879
|
-
| 'GOVERNMENT'
|
|
880
|
-
| 'TECHNOLOGY'
|
|
881
|
-
| 'COMMUNICATION';
|
|
882
|
-
|
|
883
|
-
/**
|
|
884
|
-
* Standard API response envelope for all v3 endpoints
|
|
885
|
-
*/
|
|
886
|
-
export interface ProfileListResponse {
|
|
887
|
-
/**
|
|
888
|
-
* List of profiles response
|
|
889
|
-
*/
|
|
890
|
-
data?: ProfileListResponse.Data | null;
|
|
891
1195
|
|
|
892
1196
|
/**
|
|
893
1197
|
* Error information
|
|
894
1198
|
*/
|
|
895
|
-
|
|
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
|
+
}
|
|
896
1220
|
|
|
897
1221
|
/**
|
|
898
1222
|
* Request and response metadata
|
|
899
1223
|
*/
|
|
900
|
-
|
|
1224
|
+
export interface Meta {
|
|
1225
|
+
/**
|
|
1226
|
+
* Unique identifier for this request (for tracing and support)
|
|
1227
|
+
*/
|
|
1228
|
+
request_id?: string;
|
|
901
1229
|
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
}
|
|
1230
|
+
/**
|
|
1231
|
+
* Server timestamp when the response was generated
|
|
1232
|
+
*/
|
|
1233
|
+
timestamp?: string;
|
|
907
1234
|
|
|
908
|
-
export namespace ProfileListResponse {
|
|
909
|
-
/**
|
|
910
|
-
* List of profiles response
|
|
911
|
-
*/
|
|
912
|
-
export interface Data {
|
|
913
1235
|
/**
|
|
914
|
-
*
|
|
1236
|
+
* API version used for this request
|
|
915
1237
|
*/
|
|
916
|
-
|
|
1238
|
+
version?: string;
|
|
917
1239
|
}
|
|
918
1240
|
}
|
|
919
1241
|
|
|
920
1242
|
/**
|
|
921
1243
|
* Standard API response envelope for all v3 endpoints
|
|
922
1244
|
*/
|
|
923
|
-
export interface
|
|
1245
|
+
export interface ProfileUpdateResponse {
|
|
924
1246
|
/**
|
|
925
|
-
*
|
|
926
|
-
* is taken.
|
|
1247
|
+
* Detailed profile response for v3 API
|
|
927
1248
|
*/
|
|
928
|
-
data?:
|
|
1249
|
+
data?: ProfileUpdateResponse.Data | null;
|
|
929
1250
|
|
|
930
1251
|
/**
|
|
931
1252
|
* Error information
|
|
932
1253
|
*/
|
|
933
|
-
error?:
|
|
1254
|
+
error?: ProfileUpdateResponse.Error | null;
|
|
934
1255
|
|
|
935
1256
|
/**
|
|
936
1257
|
* Request and response metadata
|
|
937
1258
|
*/
|
|
938
|
-
meta?:
|
|
1259
|
+
meta?: ProfileUpdateResponse.Meta;
|
|
939
1260
|
|
|
940
1261
|
/**
|
|
941
1262
|
* Indicates whether the request was successful
|
|
@@ -943,41 +1264,1079 @@ export interface ProfileCompleteResponse {
|
|
|
943
1264
|
success?: boolean;
|
|
944
1265
|
}
|
|
945
1266
|
|
|
946
|
-
export namespace
|
|
1267
|
+
export namespace ProfileUpdateResponse {
|
|
947
1268
|
/**
|
|
948
|
-
*
|
|
949
|
-
* is taken.
|
|
1269
|
+
* Detailed profile response for v3 API
|
|
950
1270
|
*/
|
|
951
1271
|
export interface Data {
|
|
952
1272
|
/**
|
|
953
|
-
*
|
|
1273
|
+
* Profile unique identifier
|
|
954
1274
|
*/
|
|
955
|
-
|
|
1275
|
+
id?: string;
|
|
956
1276
|
|
|
957
1277
|
/**
|
|
958
|
-
*
|
|
959
|
-
*
|
|
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.
|
|
960
1281
|
*/
|
|
961
|
-
|
|
962
|
-
}
|
|
963
|
-
}
|
|
1282
|
+
allow_contact_sharing?: boolean | null;
|
|
964
1283
|
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
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;
|
|
975
2334
|
|
|
976
2335
|
/**
|
|
977
2336
|
* Body param: Billing contact information for a profile. Required when
|
|
978
2337
|
* billing_model is "profile" or "profile_and_organization".
|
|
979
2338
|
*/
|
|
980
|
-
billing_contact?:
|
|
2339
|
+
billing_contact?: ProfileCreateParams.BillingContact | null;
|
|
981
2340
|
|
|
982
2341
|
/**
|
|
983
2342
|
* Body param: Billing model: profile, organization, or profile_and_organization
|
|
@@ -995,92 +2354,293 @@ export interface ProfileCreateParams {
|
|
|
995
2354
|
* Body param: Brand and KYC data grouped into contact, business, and compliance
|
|
996
2355
|
* sections
|
|
997
2356
|
*/
|
|
998
|
-
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;
|
|
999
2566
|
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
2567
|
+
/**
|
|
2568
|
+
* Country where the business is registered
|
|
2569
|
+
*/
|
|
2570
|
+
countryOfRegistration?: string | null;
|
|
1004
2571
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
2572
|
+
entityType?:
|
|
2573
|
+
| 'PRIVATE_PROFIT'
|
|
2574
|
+
| 'PUBLIC_PROFIT'
|
|
2575
|
+
| 'NON_PROFIT'
|
|
2576
|
+
| 'SOLE_PROPRIETOR'
|
|
2577
|
+
| 'GOVERNMENT'
|
|
2578
|
+
| null;
|
|
1009
2579
|
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
inherit_contacts?: boolean | null;
|
|
2580
|
+
/**
|
|
2581
|
+
* Legal business name
|
|
2582
|
+
*/
|
|
2583
|
+
legalName?: string | null;
|
|
1015
2584
|
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
inherit_tcr_brand?: boolean | null;
|
|
2585
|
+
/**
|
|
2586
|
+
* Postal/ZIP code
|
|
2587
|
+
*/
|
|
2588
|
+
postalCode?: string | null;
|
|
1021
2589
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
inherit_tcr_campaign?: boolean | null;
|
|
2590
|
+
/**
|
|
2591
|
+
* State/province code
|
|
2592
|
+
*/
|
|
2593
|
+
state?: string | null;
|
|
1027
2594
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
inherit_templates?: boolean | null;
|
|
2595
|
+
/**
|
|
2596
|
+
* Street address
|
|
2597
|
+
*/
|
|
2598
|
+
street?: string | null;
|
|
1033
2599
|
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
2600
|
+
/**
|
|
2601
|
+
* Tax ID/EIN number
|
|
2602
|
+
*/
|
|
2603
|
+
taxId?: string | null;
|
|
1038
2604
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
*/
|
|
1044
|
-
payment_details?: PaymentDetails | null;
|
|
2605
|
+
/**
|
|
2606
|
+
* Type of tax ID (e.g., us_ein, ca_bn)
|
|
2607
|
+
*/
|
|
2608
|
+
taxIdType?: string | null;
|
|
1045
2609
|
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
2610
|
+
/**
|
|
2611
|
+
* Business website URL
|
|
2612
|
+
*/
|
|
2613
|
+
url?: string | null;
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
1051
2616
|
|
|
1052
2617
|
/**
|
|
1053
|
-
*
|
|
1054
|
-
*
|
|
1055
|
-
*
|
|
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.
|
|
1056
2621
|
*/
|
|
1057
|
-
|
|
2622
|
+
export interface PaymentDetails {
|
|
2623
|
+
/**
|
|
2624
|
+
* Card number (digits only, 13–19 characters)
|
|
2625
|
+
*/
|
|
2626
|
+
card_number: string;
|
|
1058
2627
|
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
* Business Manager by creating a System User with whatsapp_business_messaging and
|
|
1064
|
-
* whatsapp_business_management scopes.
|
|
1065
|
-
*/
|
|
1066
|
-
whatsapp_business_account?: ProfileCreateParams.WhatsappBusinessAccount | null;
|
|
2628
|
+
/**
|
|
2629
|
+
* Card security code (3–4 digits)
|
|
2630
|
+
*/
|
|
2631
|
+
cvc: string;
|
|
1067
2632
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
*/
|
|
1073
|
-
'Idempotency-Key'?: string;
|
|
2633
|
+
/**
|
|
2634
|
+
* Card expiry date in MM/YY format (e.g. "09/27")
|
|
2635
|
+
*/
|
|
2636
|
+
expiry: string;
|
|
1074
2637
|
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
'x-profile-id'?: string;
|
|
1081
|
-
}
|
|
2638
|
+
/**
|
|
2639
|
+
* Billing ZIP / postal code associated with the card
|
|
2640
|
+
*/
|
|
2641
|
+
zip_code: string;
|
|
2642
|
+
}
|
|
1082
2643
|
|
|
1083
|
-
export namespace ProfileCreateParams {
|
|
1084
2644
|
/**
|
|
1085
2645
|
* Direct WhatsApp Business Account credentials for a profile. Use this when the
|
|
1086
2646
|
* profile should have its own WhatsApp Business Account instead of inheriting from
|
|
@@ -1121,7 +2681,17 @@ export interface ProfileRetrieveParams {
|
|
|
1121
2681
|
|
|
1122
2682
|
export interface ProfileUpdateParams {
|
|
1123
2683
|
/**
|
|
1124
|
-
* 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.
|
|
1125
2695
|
*/
|
|
1126
2696
|
allow_contact_sharing?: boolean | null;
|
|
1127
2697
|
|
|
@@ -1131,7 +2701,7 @@ export interface ProfileUpdateParams {
|
|
|
1131
2701
|
allow_number_change_during_onboarding?: boolean | null;
|
|
1132
2702
|
|
|
1133
2703
|
/**
|
|
1134
|
-
* Body param
|
|
2704
|
+
* @deprecated Body param
|
|
1135
2705
|
*/
|
|
1136
2706
|
allow_template_sharing?: boolean | null;
|
|
1137
2707
|
|
|
@@ -1139,7 +2709,7 @@ export interface ProfileUpdateParams {
|
|
|
1139
2709
|
* Body param: Billing contact information for a profile. Required when
|
|
1140
2710
|
* billing_model is "profile" or "profile_and_organization".
|
|
1141
2711
|
*/
|
|
1142
|
-
billing_contact?:
|
|
2712
|
+
billing_contact?: ProfileUpdateParams.BillingContact | null;
|
|
1143
2713
|
|
|
1144
2714
|
/**
|
|
1145
2715
|
* Body param: Billing model: profile, organization, or profile_and_organization
|
|
@@ -1157,7 +2727,7 @@ export interface ProfileUpdateParams {
|
|
|
1157
2727
|
* Body param: Brand and KYC data grouped into contact, business, and compliance
|
|
1158
2728
|
* sections
|
|
1159
2729
|
*/
|
|
1160
|
-
brand?:
|
|
2730
|
+
brand?: ProfileUpdateParams.Brand | null;
|
|
1161
2731
|
|
|
1162
2732
|
/**
|
|
1163
2733
|
* Body param: Profile description (optional)
|
|
@@ -1170,7 +2740,7 @@ export interface ProfileUpdateParams {
|
|
|
1170
2740
|
icon?: string | null;
|
|
1171
2741
|
|
|
1172
2742
|
/**
|
|
1173
|
-
* Body param
|
|
2743
|
+
* @deprecated Body param
|
|
1174
2744
|
*/
|
|
1175
2745
|
inherit_contacts?: boolean | null;
|
|
1176
2746
|
|
|
@@ -1186,7 +2756,7 @@ export interface ProfileUpdateParams {
|
|
|
1186
2756
|
inherit_tcr_campaign?: boolean | null;
|
|
1187
2757
|
|
|
1188
2758
|
/**
|
|
1189
|
-
* Body param
|
|
2759
|
+
* @deprecated Body param
|
|
1190
2760
|
*/
|
|
1191
2761
|
inherit_templates?: boolean | null;
|
|
1192
2762
|
|
|
@@ -1196,11 +2766,11 @@ export interface ProfileUpdateParams {
|
|
|
1196
2766
|
name?: string | null;
|
|
1197
2767
|
|
|
1198
2768
|
/**
|
|
1199
|
-
* Body param: Payment card details for
|
|
1200
|
-
* "profile" or "profile_and_organization".
|
|
1201
|
-
* 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.
|
|
1202
2772
|
*/
|
|
1203
|
-
payment_details?: PaymentDetails | null;
|
|
2773
|
+
payment_details?: ProfileUpdateParams.PaymentDetails | null;
|
|
1204
2774
|
|
|
1205
2775
|
/**
|
|
1206
2776
|
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
@@ -1214,13 +2784,30 @@ export interface ProfileUpdateParams {
|
|
|
1214
2784
|
sending_phone_number?: string | null;
|
|
1215
2785
|
|
|
1216
2786
|
/**
|
|
1217
|
-
* 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.
|
|
1218
2806
|
*/
|
|
1219
2807
|
sending_phone_number_profile_id?: string | null;
|
|
1220
2808
|
|
|
1221
2809
|
/**
|
|
1222
|
-
* Body param
|
|
1223
|
-
* (optional)
|
|
2810
|
+
* @deprecated Body param
|
|
1224
2811
|
*/
|
|
1225
2812
|
sending_whatsapp_number_profile_id?: string | null;
|
|
1226
2813
|
|
|
@@ -1251,6 +2838,211 @@ export interface ProfileUpdateParams {
|
|
|
1251
2838
|
'x-profile-id'?: string;
|
|
1252
2839
|
}
|
|
1253
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
|
+
|
|
1254
3046
|
export interface ProfileListParams {
|
|
1255
3047
|
/**
|
|
1256
3048
|
* Profile UUID to scope the request to a child profile. Only organization API keys
|
|
@@ -1306,17 +3098,12 @@ Profiles.Campaigns = Campaigns;
|
|
|
1306
3098
|
|
|
1307
3099
|
export declare namespace Profiles {
|
|
1308
3100
|
export {
|
|
1309
|
-
type APIResponseOfProfileDetail as APIResponseOfProfileDetail,
|
|
1310
|
-
type BillingContactInfo as BillingContactInfo,
|
|
1311
|
-
type BrandBusinessInfo as BrandBusinessInfo,
|
|
1312
|
-
type BrandComplianceInfo as BrandComplianceInfo,
|
|
1313
|
-
type BrandContactInfo as BrandContactInfo,
|
|
1314
|
-
type BrandsBrandData as BrandsBrandData,
|
|
1315
3101
|
type DestinationCountry as DestinationCountry,
|
|
1316
|
-
type PaymentDetails as PaymentDetails,
|
|
1317
|
-
type ProfileDetail as ProfileDetail,
|
|
1318
3102
|
type TcrBrandRelationship as TcrBrandRelationship,
|
|
1319
3103
|
type TcrVertical as TcrVertical,
|
|
3104
|
+
type ProfileCreateResponse as ProfileCreateResponse,
|
|
3105
|
+
type ProfileRetrieveResponse as ProfileRetrieveResponse,
|
|
3106
|
+
type ProfileUpdateResponse as ProfileUpdateResponse,
|
|
1320
3107
|
type ProfileListResponse as ProfileListResponse,
|
|
1321
3108
|
type ProfileCompleteResponse as ProfileCompleteResponse,
|
|
1322
3109
|
type ProfileCreateParams as ProfileCreateParams,
|
|
@@ -1329,13 +3116,10 @@ export declare namespace Profiles {
|
|
|
1329
3116
|
|
|
1330
3117
|
export {
|
|
1331
3118
|
Campaigns as Campaigns,
|
|
1332
|
-
type APIResponseOfBrandCampaign as APIResponseOfBrandCampaign,
|
|
1333
|
-
type APIResponseOfListOfBrandCampaign as APIResponseOfListOfBrandCampaign,
|
|
1334
|
-
type BrandCampaign as BrandCampaign,
|
|
1335
|
-
type CampaignData as CampaignData,
|
|
1336
|
-
type CampaignUseCase as CampaignUseCase,
|
|
1337
|
-
type CampaignUseCaseData as CampaignUseCaseData,
|
|
1338
3119
|
type MessagingUseCaseUs as MessagingUseCaseUs,
|
|
3120
|
+
type CampaignCreateResponse as CampaignCreateResponse,
|
|
3121
|
+
type CampaignUpdateResponse as CampaignUpdateResponse,
|
|
3122
|
+
type CampaignListResponse as CampaignListResponse,
|
|
1339
3123
|
type CampaignCreateParams as CampaignCreateParams,
|
|
1340
3124
|
type CampaignUpdateParams as CampaignUpdateParams,
|
|
1341
3125
|
type CampaignListParams as CampaignListParams,
|