agentphone 1.0.11 → 1.0.12
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/README.md +10 -10
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -6
- package/dist/cjs/Client.js +25 -30
- package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +69 -0
- package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.js +66 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +69 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +66 -0
- package/dist/cjs/api/resources/index.d.ts +2 -4
- package/dist/cjs/api/resources/index.js +3 -5
- package/dist/cjs/api/resources/registration/client/Client.d.ts +61 -0
- package/dist/cjs/api/resources/{agentSignup → registration}/client/Client.js +44 -69
- package/dist/cjs/api/resources/registration/client/requests/RegistrationRequest.d.ts +61 -0
- package/dist/cjs/api/resources/registration/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/AgentResponse.d.ts +2 -0
- package/dist/cjs/api/{resources/agentSignup/client/requests → types}/AgentSignUpRequest.d.ts +0 -6
- package/dist/cjs/api/types/AgentVerifyRequest.d.ts +4 -0
- package/dist/cjs/api/types/FieldWarning.d.ts +6 -0
- package/dist/cjs/api/types/FieldWarning.js +3 -0
- package/dist/cjs/api/types/RegistrationResponse.d.ts +8 -0
- package/dist/cjs/api/types/RegistrationResponse.js +3 -0
- package/dist/cjs/api/types/index.d.ts +4 -0
- package/dist/cjs/api/types/index.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -6
- package/dist/esm/Client.mjs +5 -10
- package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +69 -0
- package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.mjs +66 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +69 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +66 -0
- package/dist/esm/api/resources/index.d.mts +2 -4
- package/dist/esm/api/resources/index.mjs +2 -4
- package/dist/esm/api/resources/registration/client/Client.d.mts +61 -0
- package/dist/esm/api/resources/registration/client/Client.mjs +108 -0
- package/dist/esm/api/resources/registration/client/requests/RegistrationRequest.d.mts +61 -0
- package/dist/esm/api/resources/registration/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/AgentResponse.d.mts +2 -0
- package/dist/esm/api/{resources/agentSignup/client/requests → types}/AgentSignUpRequest.d.mts +0 -6
- package/dist/esm/api/types/AgentVerifyRequest.d.mts +4 -0
- package/dist/esm/api/types/FieldWarning.d.mts +6 -0
- package/dist/esm/api/types/FieldWarning.mjs +2 -0
- package/dist/esm/api/types/RegistrationResponse.d.mts +8 -0
- package/dist/esm/api/types/RegistrationResponse.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +4 -0
- package/dist/esm/api/types/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +83 -380
- package/dist/cjs/api/resources/agentSignup/client/Client.d.ts +0 -50
- package/dist/cjs/api/resources/agentSignup/client/requests/AgentVerifyRequest.d.ts +0 -11
- package/dist/cjs/api/resources/agentSignup/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/integrations/client/Client.d.ts +0 -64
- package/dist/cjs/api/resources/integrations/client/Client.js +0 -268
- package/dist/cjs/api/resources/integrations/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/integrations/client/index.js +0 -17
- package/dist/cjs/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.d.ts +0 -9
- package/dist/cjs/api/resources/integrations/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/integrations/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/integrations/index.d.ts +0 -1
- package/dist/cjs/api/resources/integrations/index.js +0 -17
- package/dist/esm/api/resources/agentSignup/client/Client.d.mts +0 -50
- package/dist/esm/api/resources/agentSignup/client/Client.mjs +0 -133
- package/dist/esm/api/resources/agentSignup/client/requests/AgentVerifyRequest.d.mts +0 -11
- package/dist/esm/api/resources/agentSignup/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/integrations/client/Client.d.mts +0 -64
- package/dist/esm/api/resources/integrations/client/Client.mjs +0 -231
- package/dist/esm/api/resources/integrations/client/index.d.mts +0 -1
- package/dist/esm/api/resources/integrations/client/index.mjs +0 -1
- package/dist/esm/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.d.mts +0 -9
- package/dist/esm/api/resources/integrations/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/integrations/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/integrations/index.d.mts +0 -1
- package/dist/esm/api/resources/integrations/index.mjs +0 -1
- /package/dist/cjs/api/resources/{agentSignup → registration}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{agentSignup → registration}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{agentSignup/client/requests/AgentSignUpRequest.js → registration/client/requests/RegistrationRequest.js} +0 -0
- /package/dist/cjs/api/resources/{agentSignup → registration}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{agentSignup → registration}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{agentSignup → registration}/index.js +0 -0
- /package/dist/cjs/api/{resources/agentSignup/client/requests/AgentVerifyRequest.js → types/AgentSignUpRequest.js} +0 -0
- /package/dist/cjs/api/{resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.js → types/AgentVerifyRequest.js} +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{agentSignup/client/requests/AgentSignUpRequest.mjs → registration/client/requests/RegistrationRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/index.mjs +0 -0
- /package/dist/esm/api/{resources/agentSignup/client/requests/AgentVerifyRequest.mjs → types/AgentSignUpRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.mjs → types/AgentVerifyRequest.mjs} +0 -0
package/reference.md
CHANGED
|
@@ -1,142 +1,4 @@
|
|
|
1
1
|
# Reference
|
|
2
|
-
## AgentSignup
|
|
3
|
-
<details><summary><code>client.agentSignup.<a href="/src/api/resources/agentSignup/client/Client.ts">agentSignUp</a>({ ...params }) -> unknown</code></summary>
|
|
4
|
-
<dl>
|
|
5
|
-
<dd>
|
|
6
|
-
|
|
7
|
-
#### 📝 Description
|
|
8
|
-
|
|
9
|
-
<dl>
|
|
10
|
-
<dd>
|
|
11
|
-
|
|
12
|
-
<dl>
|
|
13
|
-
<dd>
|
|
14
|
-
|
|
15
|
-
Kick off agent self-signup.
|
|
16
|
-
|
|
17
|
-
Sends a 6-digit OTP to the human's email. Nothing is provisioned server-side
|
|
18
|
-
until /v0/agent/verify is called with the code.
|
|
19
|
-
</dd>
|
|
20
|
-
</dl>
|
|
21
|
-
</dd>
|
|
22
|
-
</dl>
|
|
23
|
-
|
|
24
|
-
#### 🔌 Usage
|
|
25
|
-
|
|
26
|
-
<dl>
|
|
27
|
-
<dd>
|
|
28
|
-
|
|
29
|
-
<dl>
|
|
30
|
-
<dd>
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
await client.agentSignup.agentSignUp({
|
|
34
|
-
human_email: "human_email"
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
</dd>
|
|
39
|
-
</dl>
|
|
40
|
-
</dd>
|
|
41
|
-
</dl>
|
|
42
|
-
|
|
43
|
-
#### ⚙️ Parameters
|
|
44
|
-
|
|
45
|
-
<dl>
|
|
46
|
-
<dd>
|
|
47
|
-
|
|
48
|
-
<dl>
|
|
49
|
-
<dd>
|
|
50
|
-
|
|
51
|
-
**request:** `AgentPhone.AgentSignUpRequest`
|
|
52
|
-
|
|
53
|
-
</dd>
|
|
54
|
-
</dl>
|
|
55
|
-
|
|
56
|
-
<dl>
|
|
57
|
-
<dd>
|
|
58
|
-
|
|
59
|
-
**requestOptions:** `AgentSignupClient.RequestOptions`
|
|
60
|
-
|
|
61
|
-
</dd>
|
|
62
|
-
</dl>
|
|
63
|
-
</dd>
|
|
64
|
-
</dl>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
</dd>
|
|
68
|
-
</dl>
|
|
69
|
-
</details>
|
|
70
|
-
|
|
71
|
-
<details><summary><code>client.agentSignup.<a href="/src/api/resources/agentSignup/client/Client.ts">agentVerify</a>({ ...params }) -> unknown</code></summary>
|
|
72
|
-
<dl>
|
|
73
|
-
<dd>
|
|
74
|
-
|
|
75
|
-
#### 📝 Description
|
|
76
|
-
|
|
77
|
-
<dl>
|
|
78
|
-
<dd>
|
|
79
|
-
|
|
80
|
-
<dl>
|
|
81
|
-
<dd>
|
|
82
|
-
|
|
83
|
-
Verify the OTP and atomically provision everything.
|
|
84
|
-
|
|
85
|
-
Creates: User + Project (+ mirrored Account) + starter hosted Agent + phone number
|
|
86
|
-
+ first-month charge + API key. Returns the key once — agents must save it.
|
|
87
|
-
</dd>
|
|
88
|
-
</dl>
|
|
89
|
-
</dd>
|
|
90
|
-
</dl>
|
|
91
|
-
|
|
92
|
-
#### 🔌 Usage
|
|
93
|
-
|
|
94
|
-
<dl>
|
|
95
|
-
<dd>
|
|
96
|
-
|
|
97
|
-
<dl>
|
|
98
|
-
<dd>
|
|
99
|
-
|
|
100
|
-
```typescript
|
|
101
|
-
await client.agentSignup.agentVerify({
|
|
102
|
-
verification_id: "verification_id",
|
|
103
|
-
otp_code: "otp_code"
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
</dd>
|
|
108
|
-
</dl>
|
|
109
|
-
</dd>
|
|
110
|
-
</dl>
|
|
111
|
-
|
|
112
|
-
#### ⚙️ Parameters
|
|
113
|
-
|
|
114
|
-
<dl>
|
|
115
|
-
<dd>
|
|
116
|
-
|
|
117
|
-
<dl>
|
|
118
|
-
<dd>
|
|
119
|
-
|
|
120
|
-
**request:** `AgentPhone.AgentVerifyRequest`
|
|
121
|
-
|
|
122
|
-
</dd>
|
|
123
|
-
</dl>
|
|
124
|
-
|
|
125
|
-
<dl>
|
|
126
|
-
<dd>
|
|
127
|
-
|
|
128
|
-
**requestOptions:** `AgentSignupClient.RequestOptions`
|
|
129
|
-
|
|
130
|
-
</dd>
|
|
131
|
-
</dl>
|
|
132
|
-
</dd>
|
|
133
|
-
</dl>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
</dd>
|
|
137
|
-
</dl>
|
|
138
|
-
</details>
|
|
139
|
-
|
|
140
2
|
## Agents
|
|
141
3
|
<details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">listVoices</a>() -> unknown</code></summary>
|
|
142
4
|
<dl>
|
|
@@ -3584,8 +3446,8 @@ await client.usage.getUsageByAgent({
|
|
|
3584
3446
|
</dl>
|
|
3585
3447
|
</details>
|
|
3586
3448
|
|
|
3587
|
-
##
|
|
3588
|
-
<details><summary><code>client.
|
|
3449
|
+
## Messages
|
|
3450
|
+
<details><summary><code>client.messages.<a href="/src/api/resources/messages/client/Client.ts">sendMessage</a>({ ...params }) -> AgentPhone.SendMessageResponse</code></summary>
|
|
3589
3451
|
<dl>
|
|
3590
3452
|
<dd>
|
|
3591
3453
|
|
|
@@ -3597,72 +3459,23 @@ await client.usage.getUsageByAgent({
|
|
|
3597
3459
|
<dl>
|
|
3598
3460
|
<dd>
|
|
3599
3461
|
|
|
3600
|
-
|
|
3601
|
-
</dd>
|
|
3602
|
-
</dl>
|
|
3603
|
-
</dd>
|
|
3604
|
-
</dl>
|
|
3605
|
-
|
|
3606
|
-
#### 🔌 Usage
|
|
3607
|
-
|
|
3608
|
-
<dl>
|
|
3609
|
-
<dd>
|
|
3610
|
-
|
|
3611
|
-
<dl>
|
|
3612
|
-
<dd>
|
|
3613
|
-
|
|
3614
|
-
```typescript
|
|
3615
|
-
await client.integrations.supabaseConnect({
|
|
3616
|
-
code: "code"
|
|
3617
|
-
});
|
|
3618
|
-
|
|
3619
|
-
```
|
|
3620
|
-
</dd>
|
|
3621
|
-
</dl>
|
|
3622
|
-
</dd>
|
|
3623
|
-
</dl>
|
|
3624
|
-
|
|
3625
|
-
#### ⚙️ Parameters
|
|
3626
|
-
|
|
3627
|
-
<dl>
|
|
3628
|
-
<dd>
|
|
3629
|
-
|
|
3630
|
-
<dl>
|
|
3631
|
-
<dd>
|
|
3632
|
-
|
|
3633
|
-
**request:** `AgentPhone.SupabaseConnectIntegrationsSupabaseConnectGetRequest`
|
|
3634
|
-
|
|
3635
|
-
</dd>
|
|
3636
|
-
</dl>
|
|
3637
|
-
|
|
3638
|
-
<dl>
|
|
3639
|
-
<dd>
|
|
3640
|
-
|
|
3641
|
-
**requestOptions:** `IntegrationsClient.RequestOptions`
|
|
3642
|
-
|
|
3643
|
-
</dd>
|
|
3644
|
-
</dl>
|
|
3645
|
-
</dd>
|
|
3646
|
-
</dl>
|
|
3647
|
-
|
|
3462
|
+
Send an outbound message (SMS or iMessage) via the provider assigned to the number.
|
|
3648
3463
|
|
|
3649
|
-
|
|
3650
|
-
</dl>
|
|
3651
|
-
</details>
|
|
3464
|
+
Attach media by passing public HTTPS URLs in `media_urls`.
|
|
3652
3465
|
|
|
3653
|
-
|
|
3654
|
-
<dl>
|
|
3655
|
-
<dd>
|
|
3466
|
+
### Single attachment
|
|
3656
3467
|
|
|
3657
|
-
|
|
3468
|
+
Pass a single-item array in `media_urls`. The URL must be publicly accessible.
|
|
3658
3469
|
|
|
3659
|
-
|
|
3660
|
-
<dd>
|
|
3470
|
+
### Carousel / multi-image (iMessage)
|
|
3661
3471
|
|
|
3662
|
-
|
|
3663
|
-
|
|
3472
|
+
To send a carousel of images on iMessage, pass 2-20 URLs in `media_urls`. Requirements:
|
|
3473
|
+
- Each URL must be a **publicly accessible HTTPS link** to an image (JPEG, PNG, GIF, etc.)
|
|
3474
|
+
- Minimum 2 URLs, maximum 20
|
|
3475
|
+
- `body` must be omitted or empty (text cannot be sent alongside a carousel)
|
|
3476
|
+
- Only supported on iMessage-capable lines
|
|
3664
3477
|
|
|
3665
|
-
|
|
3478
|
+
> **Deprecation notice:** The `media_url` field (singular) is deprecated and will be removed in a future version. Use `media_urls` (array) instead — even for a single attachment, pass it as `media_urls: ["https://..."]`.
|
|
3666
3479
|
</dd>
|
|
3667
3480
|
</dl>
|
|
3668
3481
|
</dd>
|
|
@@ -3677,7 +3490,11 @@ Create a short-lived one-time code for initiating the Supabase OAuth flow.
|
|
|
3677
3490
|
<dd>
|
|
3678
3491
|
|
|
3679
3492
|
```typescript
|
|
3680
|
-
await client.
|
|
3493
|
+
await client.messages.sendMessage({
|
|
3494
|
+
agent_id: "agent_id",
|
|
3495
|
+
to_number: "to_number",
|
|
3496
|
+
body: "body"
|
|
3497
|
+
});
|
|
3681
3498
|
|
|
3682
3499
|
```
|
|
3683
3500
|
</dd>
|
|
@@ -3693,48 +3510,15 @@ await client.integrations.supabaseConnectCode();
|
|
|
3693
3510
|
<dl>
|
|
3694
3511
|
<dd>
|
|
3695
3512
|
|
|
3696
|
-
**
|
|
3513
|
+
**request:** `AgentPhone.SendMessageRequest`
|
|
3697
3514
|
|
|
3698
3515
|
</dd>
|
|
3699
3516
|
</dl>
|
|
3700
|
-
</dd>
|
|
3701
|
-
</dl>
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
</dd>
|
|
3705
|
-
</dl>
|
|
3706
|
-
</details>
|
|
3707
|
-
|
|
3708
|
-
<details><summary><code>client.integrations.<a href="/src/api/resources/integrations/client/Client.ts">supabaseStatus</a>() -> unknown</code></summary>
|
|
3709
|
-
<dl>
|
|
3710
|
-
<dd>
|
|
3711
|
-
|
|
3712
|
-
#### 🔌 Usage
|
|
3713
3517
|
|
|
3714
3518
|
<dl>
|
|
3715
3519
|
<dd>
|
|
3716
3520
|
|
|
3717
|
-
|
|
3718
|
-
<dd>
|
|
3719
|
-
|
|
3720
|
-
```typescript
|
|
3721
|
-
await client.integrations.supabaseStatus();
|
|
3722
|
-
|
|
3723
|
-
```
|
|
3724
|
-
</dd>
|
|
3725
|
-
</dl>
|
|
3726
|
-
</dd>
|
|
3727
|
-
</dl>
|
|
3728
|
-
|
|
3729
|
-
#### ⚙️ Parameters
|
|
3730
|
-
|
|
3731
|
-
<dl>
|
|
3732
|
-
<dd>
|
|
3733
|
-
|
|
3734
|
-
<dl>
|
|
3735
|
-
<dd>
|
|
3736
|
-
|
|
3737
|
-
**requestOptions:** `IntegrationsClient.RequestOptions`
|
|
3521
|
+
**requestOptions:** `MessagesClient.RequestOptions`
|
|
3738
3522
|
|
|
3739
3523
|
</dd>
|
|
3740
3524
|
</dl>
|
|
@@ -3746,7 +3530,7 @@ await client.integrations.supabaseStatus();
|
|
|
3746
3530
|
</dl>
|
|
3747
3531
|
</details>
|
|
3748
3532
|
|
|
3749
|
-
<details><summary><code>client.
|
|
3533
|
+
<details><summary><code>client.messages.<a href="/src/api/resources/messages/client/Client.ts">sendReaction</a>({ ...params }) -> AgentPhone.SendReactionResponse</code></summary>
|
|
3750
3534
|
<dl>
|
|
3751
3535
|
<dd>
|
|
3752
3536
|
|
|
@@ -3758,7 +3542,11 @@ await client.integrations.supabaseStatus();
|
|
|
3758
3542
|
<dl>
|
|
3759
3543
|
<dd>
|
|
3760
3544
|
|
|
3761
|
-
|
|
3545
|
+
Send a tapback reaction to a message (iMessage only).
|
|
3546
|
+
|
|
3547
|
+
Reactions are available only for iMessage messages. Attempting to react
|
|
3548
|
+
to an SMS message or another channel that does not support tapbacks
|
|
3549
|
+
returns a clear error.
|
|
3762
3550
|
</dd>
|
|
3763
3551
|
</dl>
|
|
3764
3552
|
</dd>
|
|
@@ -3773,7 +3561,10 @@ Get a valid Supabase access token, auto-refreshing if expired.
|
|
|
3773
3561
|
<dd>
|
|
3774
3562
|
|
|
3775
3563
|
```typescript
|
|
3776
|
-
await client.
|
|
3564
|
+
await client.messages.sendReaction({
|
|
3565
|
+
message_id: "message_id",
|
|
3566
|
+
reaction: "love"
|
|
3567
|
+
});
|
|
3777
3568
|
|
|
3778
3569
|
```
|
|
3779
3570
|
</dd>
|
|
@@ -3789,48 +3580,15 @@ await client.integrations.supabaseToken();
|
|
|
3789
3580
|
<dl>
|
|
3790
3581
|
<dd>
|
|
3791
3582
|
|
|
3792
|
-
**
|
|
3583
|
+
**request:** `AgentPhone.SendReactionRequest`
|
|
3793
3584
|
|
|
3794
3585
|
</dd>
|
|
3795
3586
|
</dl>
|
|
3796
|
-
</dd>
|
|
3797
|
-
</dl>
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
</dd>
|
|
3801
|
-
</dl>
|
|
3802
|
-
</details>
|
|
3803
|
-
|
|
3804
|
-
<details><summary><code>client.integrations.<a href="/src/api/resources/integrations/client/Client.ts">supabaseDisconnect</a>() -> unknown</code></summary>
|
|
3805
|
-
<dl>
|
|
3806
|
-
<dd>
|
|
3807
|
-
|
|
3808
|
-
#### 🔌 Usage
|
|
3809
|
-
|
|
3810
|
-
<dl>
|
|
3811
|
-
<dd>
|
|
3812
|
-
|
|
3813
|
-
<dl>
|
|
3814
|
-
<dd>
|
|
3815
|
-
|
|
3816
|
-
```typescript
|
|
3817
|
-
await client.integrations.supabaseDisconnect();
|
|
3818
|
-
|
|
3819
|
-
```
|
|
3820
|
-
</dd>
|
|
3821
|
-
</dl>
|
|
3822
|
-
</dd>
|
|
3823
|
-
</dl>
|
|
3824
|
-
|
|
3825
|
-
#### ⚙️ Parameters
|
|
3826
|
-
|
|
3827
|
-
<dl>
|
|
3828
|
-
<dd>
|
|
3829
3587
|
|
|
3830
3588
|
<dl>
|
|
3831
3589
|
<dd>
|
|
3832
3590
|
|
|
3833
|
-
**requestOptions:** `
|
|
3591
|
+
**requestOptions:** `MessagesClient.RequestOptions`
|
|
3834
3592
|
|
|
3835
3593
|
</dd>
|
|
3836
3594
|
</dl>
|
|
@@ -3842,8 +3600,8 @@ await client.integrations.supabaseDisconnect();
|
|
|
3842
3600
|
</dl>
|
|
3843
3601
|
</details>
|
|
3844
3602
|
|
|
3845
|
-
##
|
|
3846
|
-
<details><summary><code>client.
|
|
3603
|
+
## ContactCards
|
|
3604
|
+
<details><summary><code>client.contactCards.<a href="/src/api/resources/contactCards/client/Client.ts">getContactCard</a>({ ...params }) -> AgentPhone.ContactCardResponse</code></summary>
|
|
3847
3605
|
<dl>
|
|
3848
3606
|
<dd>
|
|
3849
3607
|
|
|
@@ -3855,23 +3613,7 @@ await client.integrations.supabaseDisconnect();
|
|
|
3855
3613
|
<dl>
|
|
3856
3614
|
<dd>
|
|
3857
3615
|
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
Attach media by passing public HTTPS URLs in `media_urls`.
|
|
3861
|
-
|
|
3862
|
-
### Single attachment
|
|
3863
|
-
|
|
3864
|
-
Pass a single-item array in `media_urls`. The URL must be publicly accessible.
|
|
3865
|
-
|
|
3866
|
-
### Carousel / multi-image (iMessage)
|
|
3867
|
-
|
|
3868
|
-
To send a carousel of images on iMessage, pass 2-20 URLs in `media_urls`. Requirements:
|
|
3869
|
-
- Each URL must be a **publicly accessible HTTPS link** to an image (JPEG, PNG, GIF, etc.)
|
|
3870
|
-
- Minimum 2 URLs, maximum 20
|
|
3871
|
-
- `body` must be omitted or empty (text cannot be sent alongside a carousel)
|
|
3872
|
-
- Only supported on iMessage-capable lines
|
|
3873
|
-
|
|
3874
|
-
> **Deprecation notice:** The `media_url` field (singular) is deprecated and will be removed in a future version. Use `media_urls` (array) instead — even for a single attachment, pass it as `media_urls: ["https://..."]`.
|
|
3616
|
+
Fetch the iMessage contact card set on this number.
|
|
3875
3617
|
</dd>
|
|
3876
3618
|
</dl>
|
|
3877
3619
|
</dd>
|
|
@@ -3886,10 +3628,8 @@ To send a carousel of images on iMessage, pass 2-20 URLs in `media_urls`. Requir
|
|
|
3886
3628
|
<dd>
|
|
3887
3629
|
|
|
3888
3630
|
```typescript
|
|
3889
|
-
await client.
|
|
3890
|
-
|
|
3891
|
-
to_number: "to_number",
|
|
3892
|
-
body: "body"
|
|
3631
|
+
await client.contactCards.getContactCard({
|
|
3632
|
+
number_id: "number_id"
|
|
3893
3633
|
});
|
|
3894
3634
|
|
|
3895
3635
|
```
|
|
@@ -3906,7 +3646,7 @@ await client.messages.sendMessage({
|
|
|
3906
3646
|
<dl>
|
|
3907
3647
|
<dd>
|
|
3908
3648
|
|
|
3909
|
-
**request:** `AgentPhone.
|
|
3649
|
+
**request:** `AgentPhone.GetContactCardV1NumbersNumberIdContactCardGetRequest`
|
|
3910
3650
|
|
|
3911
3651
|
</dd>
|
|
3912
3652
|
</dl>
|
|
@@ -3914,7 +3654,7 @@ await client.messages.sendMessage({
|
|
|
3914
3654
|
<dl>
|
|
3915
3655
|
<dd>
|
|
3916
3656
|
|
|
3917
|
-
**requestOptions:** `
|
|
3657
|
+
**requestOptions:** `ContactCardsClient.RequestOptions`
|
|
3918
3658
|
|
|
3919
3659
|
</dd>
|
|
3920
3660
|
</dl>
|
|
@@ -3926,7 +3666,7 @@ await client.messages.sendMessage({
|
|
|
3926
3666
|
</dl>
|
|
3927
3667
|
</details>
|
|
3928
3668
|
|
|
3929
|
-
<details><summary><code>client.
|
|
3669
|
+
<details><summary><code>client.contactCards.<a href="/src/api/resources/contactCards/client/Client.ts">putContactCard</a>({ ...params }) -> AgentPhone.ContactCardResponse</code></summary>
|
|
3930
3670
|
<dl>
|
|
3931
3671
|
<dd>
|
|
3932
3672
|
|
|
@@ -3938,11 +3678,7 @@ await client.messages.sendMessage({
|
|
|
3938
3678
|
<dl>
|
|
3939
3679
|
<dd>
|
|
3940
3680
|
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
Reactions are available only for iMessage messages. Attempting to react
|
|
3944
|
-
to an SMS message or another channel that does not support tapbacks
|
|
3945
|
-
returns a clear error.
|
|
3681
|
+
Create or replace the iMessage contact card on this number.
|
|
3946
3682
|
</dd>
|
|
3947
3683
|
</dl>
|
|
3948
3684
|
</dd>
|
|
@@ -3957,9 +3693,11 @@ returns a clear error.
|
|
|
3957
3693
|
<dd>
|
|
3958
3694
|
|
|
3959
3695
|
```typescript
|
|
3960
|
-
await client.
|
|
3961
|
-
|
|
3962
|
-
|
|
3696
|
+
await client.contactCards.putContactCard({
|
|
3697
|
+
number_id: "number_id",
|
|
3698
|
+
firstName: "firstName",
|
|
3699
|
+
lastName: "lastName",
|
|
3700
|
+
avatarUrl: "avatarUrl"
|
|
3963
3701
|
});
|
|
3964
3702
|
|
|
3965
3703
|
```
|
|
@@ -3976,7 +3714,7 @@ await client.messages.sendReaction({
|
|
|
3976
3714
|
<dl>
|
|
3977
3715
|
<dd>
|
|
3978
3716
|
|
|
3979
|
-
**request:** `AgentPhone.
|
|
3717
|
+
**request:** `AgentPhone.ContactCardWriteRequest`
|
|
3980
3718
|
|
|
3981
3719
|
</dd>
|
|
3982
3720
|
</dl>
|
|
@@ -3984,7 +3722,7 @@ await client.messages.sendReaction({
|
|
|
3984
3722
|
<dl>
|
|
3985
3723
|
<dd>
|
|
3986
3724
|
|
|
3987
|
-
**requestOptions:** `
|
|
3725
|
+
**requestOptions:** `ContactCardsClient.RequestOptions`
|
|
3988
3726
|
|
|
3989
3727
|
</dd>
|
|
3990
3728
|
</dl>
|
|
@@ -3996,8 +3734,7 @@ await client.messages.sendReaction({
|
|
|
3996
3734
|
</dl>
|
|
3997
3735
|
</details>
|
|
3998
3736
|
|
|
3999
|
-
|
|
4000
|
-
<details><summary><code>client.contactCards.<a href="/src/api/resources/contactCards/client/Client.ts">getContactCard</a>({ ...params }) -> AgentPhone.ContactCardResponse</code></summary>
|
|
3737
|
+
<details><summary><code>client.contactCards.<a href="/src/api/resources/contactCards/client/Client.ts">deleteContactCard</a>({ ...params }) -> void</code></summary>
|
|
4001
3738
|
<dl>
|
|
4002
3739
|
<dd>
|
|
4003
3740
|
|
|
@@ -4009,7 +3746,7 @@ await client.messages.sendReaction({
|
|
|
4009
3746
|
<dl>
|
|
4010
3747
|
<dd>
|
|
4011
3748
|
|
|
4012
|
-
|
|
3749
|
+
Remove the iMessage contact card from this number.
|
|
4013
3750
|
</dd>
|
|
4014
3751
|
</dl>
|
|
4015
3752
|
</dd>
|
|
@@ -4024,7 +3761,7 @@ Fetch the iMessage contact card set on this number.
|
|
|
4024
3761
|
<dd>
|
|
4025
3762
|
|
|
4026
3763
|
```typescript
|
|
4027
|
-
await client.contactCards.
|
|
3764
|
+
await client.contactCards.deleteContactCard({
|
|
4028
3765
|
number_id: "number_id"
|
|
4029
3766
|
});
|
|
4030
3767
|
|
|
@@ -4042,7 +3779,7 @@ await client.contactCards.getContactCard({
|
|
|
4042
3779
|
<dl>
|
|
4043
3780
|
<dd>
|
|
4044
3781
|
|
|
4045
|
-
**request:** `AgentPhone.
|
|
3782
|
+
**request:** `AgentPhone.DeleteContactCardV1NumbersNumberIdContactCardDeleteRequest`
|
|
4046
3783
|
|
|
4047
3784
|
</dd>
|
|
4048
3785
|
</dl>
|
|
@@ -4062,7 +3799,8 @@ await client.contactCards.getContactCard({
|
|
|
4062
3799
|
</dl>
|
|
4063
3800
|
</details>
|
|
4064
3801
|
|
|
4065
|
-
|
|
3802
|
+
## Registration
|
|
3803
|
+
<details><summary><code>client.registration.<a href="/src/api/resources/registration/client/Client.ts">registerA2P</a>({ ...params }) -> AgentPhone.RegistrationResponse</code></summary>
|
|
4066
3804
|
<dl>
|
|
4067
3805
|
<dd>
|
|
4068
3806
|
|
|
@@ -4074,75 +3812,30 @@ await client.contactCards.getContactCard({
|
|
|
4074
3812
|
<dl>
|
|
4075
3813
|
<dd>
|
|
4076
3814
|
|
|
4077
|
-
|
|
4078
|
-
</dd>
|
|
4079
|
-
</dl>
|
|
4080
|
-
</dd>
|
|
4081
|
-
</dl>
|
|
4082
|
-
|
|
4083
|
-
#### 🔌 Usage
|
|
4084
|
-
|
|
4085
|
-
<dl>
|
|
4086
|
-
<dd>
|
|
4087
|
-
|
|
4088
|
-
<dl>
|
|
4089
|
-
<dd>
|
|
4090
|
-
|
|
4091
|
-
```typescript
|
|
4092
|
-
await client.contactCards.putContactCard({
|
|
4093
|
-
number_id: "number_id",
|
|
4094
|
-
firstName: "firstName",
|
|
4095
|
-
lastName: "lastName",
|
|
4096
|
-
avatarUrl: "avatarUrl"
|
|
4097
|
-
});
|
|
4098
|
-
|
|
4099
|
-
```
|
|
4100
|
-
</dd>
|
|
4101
|
-
</dl>
|
|
4102
|
-
</dd>
|
|
4103
|
-
</dl>
|
|
4104
|
-
|
|
4105
|
-
#### ⚙️ Parameters
|
|
4106
|
-
|
|
4107
|
-
<dl>
|
|
4108
|
-
<dd>
|
|
4109
|
-
|
|
4110
|
-
<dl>
|
|
4111
|
-
<dd>
|
|
3815
|
+
Submit an A2P 10DLC registration to enable outbound SMS on your account.
|
|
4112
3816
|
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
</dd>
|
|
4116
|
-
</dl>
|
|
3817
|
+
US carriers require 10DLC registration before your AI agent can send text messages. This endpoint accepts both `sole_proprietor` and `standard_brand` registration types.
|
|
4117
3818
|
|
|
4118
|
-
|
|
4119
|
-
<dd>
|
|
4120
|
-
|
|
4121
|
-
**requestOptions:** `ContactCardsClient.RequestOptions`
|
|
4122
|
-
|
|
4123
|
-
</dd>
|
|
4124
|
-
</dl>
|
|
4125
|
-
</dd>
|
|
4126
|
-
</dl>
|
|
3819
|
+
### How it works
|
|
4127
3820
|
|
|
3821
|
+
1. Submit your registration details via this endpoint
|
|
3822
|
+
2. We validate your submission and flag any issues (RED = blocked, YELLOW = warning)
|
|
3823
|
+
3. On success, you receive a Stripe payment URL to pay the one-time registration fee
|
|
3824
|
+
4. After payment, we submit your registration to the carriers on your behalf
|
|
3825
|
+
5. Carrier approval typically takes 7-10 business days
|
|
4128
3826
|
|
|
4129
|
-
|
|
4130
|
-
</dl>
|
|
4131
|
-
</details>
|
|
3827
|
+
### Registration types
|
|
4132
3828
|
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
<dd>
|
|
3829
|
+
- **`sole_proprietor`** — For individuals or small businesses. Simpler requirements, fewer fields.
|
|
3830
|
+
- **`standard_brand`** — For established businesses. Requires `business_name`, `privacy_policy_url`, `terms_of_service_url`, `sample_message_1`, and `sample_message_2`.
|
|
4136
3831
|
|
|
4137
|
-
|
|
3832
|
+
### Opt-in image
|
|
4138
3833
|
|
|
4139
|
-
|
|
4140
|
-
<dd>
|
|
3834
|
+
`opt_in_image_url` must be a publicly accessible HTTPS URL to a screenshot showing how users opt in to receive messages from you (e.g. a consent checkbox on your signup form). Supports PNG, JPG, WEBP, and GIF up to 2MB. Google Drive links (`drive.google.com/file/d/.../view`) are automatically converted if the file is shared publicly.
|
|
4141
3835
|
|
|
4142
|
-
|
|
4143
|
-
<dd>
|
|
3836
|
+
### Re-submitting
|
|
4144
3837
|
|
|
4145
|
-
|
|
3838
|
+
If you've already submitted but haven't completed payment, calling this endpoint again returns the payment URL without re-sending the registration email.
|
|
4146
3839
|
</dd>
|
|
4147
3840
|
</dl>
|
|
4148
3841
|
</dd>
|
|
@@ -4157,8 +3850,18 @@ Remove the iMessage contact card from this number.
|
|
|
4157
3850
|
<dd>
|
|
4158
3851
|
|
|
4159
3852
|
```typescript
|
|
4160
|
-
await client.
|
|
4161
|
-
|
|
3853
|
+
await client.registration.registerA2P({
|
|
3854
|
+
registration_type: "registration_type",
|
|
3855
|
+
first_name: "first_name",
|
|
3856
|
+
last_name: "last_name",
|
|
3857
|
+
email: "email",
|
|
3858
|
+
phone_number: "phone_number",
|
|
3859
|
+
street_address: "street_address",
|
|
3860
|
+
city: "city",
|
|
3861
|
+
state: "state",
|
|
3862
|
+
zip_code: "zip_code",
|
|
3863
|
+
use_case_description: "use_case_description",
|
|
3864
|
+
opt_in_image_url: "opt_in_image_url"
|
|
4162
3865
|
});
|
|
4163
3866
|
|
|
4164
3867
|
```
|
|
@@ -4175,7 +3878,7 @@ await client.contactCards.deleteContactCard({
|
|
|
4175
3878
|
<dl>
|
|
4176
3879
|
<dd>
|
|
4177
3880
|
|
|
4178
|
-
**request:** `AgentPhone.
|
|
3881
|
+
**request:** `AgentPhone.RegistrationRequest`
|
|
4179
3882
|
|
|
4180
3883
|
</dd>
|
|
4181
3884
|
</dl>
|
|
@@ -4183,7 +3886,7 @@ await client.contactCards.deleteContactCard({
|
|
|
4183
3886
|
<dl>
|
|
4184
3887
|
<dd>
|
|
4185
3888
|
|
|
4186
|
-
**requestOptions:** `
|
|
3889
|
+
**requestOptions:** `RegistrationClient.RequestOptions`
|
|
4187
3890
|
|
|
4188
3891
|
</dd>
|
|
4189
3892
|
</dl>
|