Skip to content

Commit 65738f6

Browse files
louis-preclaude
andcommitted
Rename magic_link to customer_portal in resource samples and guides
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7952eda commit 65738f6

3 files changed

Lines changed: 16 additions & 17 deletions

File tree

codegen/data/resource-sample-definitions/all-resources.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,10 @@
598598
supports_offline_access_codes: false
599599
warnings: []
600600
workspace_id: 5d7f2e1a-9c8b-4f3e-8d2c-1a0b9e8f7c6d
601-
- title: Magic Link
602-
description: A magic link resource.
603-
resource_type: magic_link
601+
- title: Customer Portal
602+
description: A customer portal resource.
603+
resource_type: customer_portal
604604
properties:
605-
building_block_type: connect_accounts
606605
created_at: '2025-06-16T16:54:17.946594Z'
607606
customer_key: My Company
608607
expires_at: '2025-06-17T16:54:17.946594Z'

docs/guides/capability-guides/customer-portals/filtering-portal-resources-by-custom-metadata.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Create property listings with a `region` field in `custom_metadata`, then filter
4949
{% tabs %}
5050
{% tab title="JavaScript" %}
5151
```javascript
52-
const { magic_link } = await seam.customers.createPortal({
52+
const { customer_portal } = await seam.customers.createPortal({
5353
customer_data: {
5454
customer_key: "customer_123",
5555
property_listings: [
@@ -71,7 +71,7 @@ const { magic_link } = await seam.customers.createPortal({
7171
});
7272

7373
// The portal will only show "Lisbon Apartment"
74-
console.log(magic_link.url);
74+
console.log(customer_portal.url);
7575
```
7676
{% endtab %}
7777

@@ -112,7 +112,7 @@ When you provide multiple filters, a resource must match all of them. Here, only
112112
{% tabs %}
113113
{% tab title="JavaScript" %}
114114
```javascript
115-
const { magic_link } = await seam.customers.createPortal({
115+
const { customer_portal } = await seam.customers.createPortal({
116116
customer_data: {
117117
customer_key: "customer_123",
118118
property_listings: [
@@ -140,7 +140,7 @@ const { magic_link } = await seam.customers.createPortal({
140140
});
141141

142142
// Only "Premium Villa" is visible in the portal
143-
console.log(magic_link.url);
143+
console.log(customer_portal.url);
144144
```
145145
{% endtab %}
146146

@@ -187,7 +187,7 @@ Filter by a boolean `custom_metadata` value, such as showing only premium listin
187187
{% tabs %}
188188
{% tab title="JavaScript" %}
189189
```javascript
190-
const { magic_link } = await seam.customers.createPortal({
190+
const { customer_portal } = await seam.customers.createPortal({
191191
customer_data: {
192192
customer_key: "customer_123",
193193
property_listings: [
@@ -209,7 +209,7 @@ const { magic_link } = await seam.customers.createPortal({
209209
});
210210

211211
// Only "Premium Villa" is visible
212-
console.log(magic_link.url);
212+
console.log(customer_portal.url);
213213
```
214214
{% endtab %}
215215

@@ -250,7 +250,7 @@ Filters also apply to reservations. Here, only reservations that are both premiu
250250
{% tabs %}
251251
{% tab title="JavaScript" %}
252252
```javascript
253-
const { magic_link } = await seam.customers.createPortal({
253+
const { customer_portal } = await seam.customers.createPortal({
254254
customer_data: {
255255
customer_key: "customer_123",
256256
property_listings: [
@@ -287,7 +287,7 @@ const { magic_link } = await seam.customers.createPortal({
287287
});
288288

289289
// Only "Premium EU Reservation" is visible in the portal
290-
console.log(magic_link.url);
290+
console.log(customer_portal.url);
291291
```
292292
{% endtab %}
293293

docs/guides/capability-guides/customer-portals/integrate-customer-portal-into-your-application.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The Seam Customer Portal is a hosted, pre-authenticated interface for managing d
5656

5757
### How it works
5858

59-
When you create a customer portal via the API, Seam returns a `magic_link` URL. This URL can be loaded in a standard HTML `<iframe>`. The portal is fully authenticated through a token embedded in the URL — no additional login is required from the end-user.
59+
When you create a customer portal via the API, Seam returns a `customer_portal` URL. This URL can be loaded in a standard HTML `<iframe>`. The portal is fully authenticated through a token embedded in the URL — no additional login is required from the end-user.
6060

6161
Portal links expire after **7 days**. Your backend should generate a fresh link when rendering the page, or when the current link is close to expiring.
6262

@@ -92,11 +92,11 @@ curl -X POST https://connect.getseam.com/customers/create_portal \
9292
}'
9393
```
9494
95-
The response includes a `magic_link` object:
95+
The response includes a `customer_portal` object:
9696
9797
```json
9898
{
99-
"magic_link": {
99+
"customer_portal": {
100100
"url": "https://partner-ui.seam.vc/portals/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee?token=seam_cst_...",
101101
"customer_key": "my-customer-123",
102102
"expires_at": "2026-03-25T12:00:00.000Z",
@@ -108,7 +108,7 @@ The response includes a `magic_link` object:
108108
109109
### Step 2: Embed the URL in an iFrame
110110
111-
Use the `magic_link.url` as the `src` attribute of an iFrame in your frontend. The portal handles authentication automatically via the token in the URL.
111+
Use the `customer_portal.url` as the `src` attribute of an iFrame in your frontend. The portal handles authentication automatically via the token in the URL.
112112
113113
```html
114114
<iframe
@@ -121,7 +121,7 @@ Use the `magic_link.url` as the `src` attribute of an iFrame in your frontend. T
121121
></iframe>
122122
```
123123
124-
In practice, your backend generates the `magic_link.url` and passes it to your frontend, which sets it as the iFrame `src`. Don't hardcode the URL — it contains a session token that expires.
124+
In practice, your backend generates the `customer_portal.url` and passes it to your frontend, which sets it as the iFrame `src`. Don't hardcode the URL — it contains a session token that expires.
125125

126126
### Step 3: Refresh the link before it expires
127127

0 commit comments

Comments
 (0)