Skip to content

Commit 4fdd9b3

Browse files
louis-preclaudeseambot
authored
Update @seamapi/types to 1.805.0 and rename magic_link to customer_portal (#1082)
* Update @seamapi/types from 1.803.0 to 1.805.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update @seamapi/blueprint from 0.53.2 to 0.55.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Rename magic_link to customer_portal in resource samples and guides Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ci: Generate docs --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Seam Bot <seambot@getseam.com>
1 parent 9b45fb0 commit 4fdd9b3

9 files changed

Lines changed: 209 additions & 53 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/api-reference/_blueprint.json

Lines changed: 103 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27848,8 +27848,8 @@
2784827848
"draftMessage": "",
2784927849
"response": {
2785027850
"responseType": "resource",
27851-
"responseKey": "magic_link",
27852-
"resourceType": "magic_link",
27851+
"responseKey": "customer_portal",
27852+
"resourceType": "customer_portal",
2785327853
"description": "OK",
2785427854
"actionAttemptType": null,
2785527855
"batchResourceTypes": null
@@ -103334,6 +103334,106 @@
103334103334
"propertyGroups": [],
103335103335
"resourceSamples": []
103336103336
},
103337+
{
103338+
"resourceType": "customer_portal",
103339+
"properties": [
103340+
{
103341+
"name": "created_at",
103342+
"description": "Date and time at which the customer portal link was created.",
103343+
"isDeprecated": false,
103344+
"deprecationMessage": "",
103345+
"isUndocumented": false,
103346+
"undocumentedMessage": "",
103347+
"isDraft": false,
103348+
"draftMessage": "",
103349+
"propertyGroupKey": null,
103350+
"format": "datetime",
103351+
"jsonType": "string"
103352+
},
103353+
{
103354+
"name": "customer_key",
103355+
"description": "Customer key for the customer portal.",
103356+
"isDeprecated": false,
103357+
"deprecationMessage": "",
103358+
"isUndocumented": false,
103359+
"undocumentedMessage": "",
103360+
"isDraft": false,
103361+
"draftMessage": "",
103362+
"propertyGroupKey": null,
103363+
"format": "string",
103364+
"jsonType": "string"
103365+
},
103366+
{
103367+
"name": "expires_at",
103368+
"description": "Date and time at which the customer portal link expires.",
103369+
"isDeprecated": false,
103370+
"deprecationMessage": "",
103371+
"isUndocumented": false,
103372+
"undocumentedMessage": "",
103373+
"isDraft": false,
103374+
"draftMessage": "",
103375+
"propertyGroupKey": null,
103376+
"format": "datetime",
103377+
"jsonType": "string"
103378+
},
103379+
{
103380+
"name": "url",
103381+
"description": "URL for the customer portal.",
103382+
"isDeprecated": false,
103383+
"deprecationMessage": "",
103384+
"isUndocumented": false,
103385+
"undocumentedMessage": "",
103386+
"isDraft": false,
103387+
"draftMessage": "",
103388+
"propertyGroupKey": null,
103389+
"format": "string",
103390+
"jsonType": "string"
103391+
},
103392+
{
103393+
"name": "workspace_id",
103394+
"description": "ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the customer portal.",
103395+
"isDeprecated": false,
103396+
"deprecationMessage": "",
103397+
"isUndocumented": false,
103398+
"undocumentedMessage": "",
103399+
"isDraft": false,
103400+
"draftMessage": "",
103401+
"propertyGroupKey": null,
103402+
"format": "id",
103403+
"jsonType": "string"
103404+
}
103405+
],
103406+
"description": "Represents a Customer Portal. Customer Portal is a hosted, customizable interface for managing device access. It enables you to embed secure, pre-authenticated access flows into your product—either by sharing a link with users or embedding a view in an iframe.\n\nWith Customer Portal, you no longer need to build out frontend experiences for physical access, thermostats, and sensors. Instead, you can ship enterprise-grade access control experiences in a fraction of the time, while maintaining your product's branding and user experience.\n\nSeam hosts these flows, handling everything from account connection and device mapping to full-featured device control.",
103407+
"isDeprecated": false,
103408+
"routePath": "/customers",
103409+
"deprecationMessage": "",
103410+
"isUndocumented": false,
103411+
"undocumentedMessage": "",
103412+
"isDraft": false,
103413+
"draftMessage": "",
103414+
"propertyGroups": [],
103415+
"resourceSamples": [
103416+
{
103417+
"title": "Customer Portal",
103418+
"description": "A customer portal resource.",
103419+
"resource_type": "customer_portal",
103420+
"properties": {
103421+
"created_at": "2025-06-16T16:54:17.946594Z",
103422+
"customer_key": "My Company",
103423+
"expires_at": "2025-06-17T16:54:17.946594Z",
103424+
"url": "https://se.am/1234",
103425+
"workspace_id": "67c58f1f-f148-4415-a63c-dc6c145c6b91"
103426+
},
103427+
"resource": {
103428+
"seam_cli": {
103429+
"title": "Seam CLI",
103430+
"resource_data": "{\n \"created_at\": \"2025-06-16T16:54:17.946594Z\",\n \"customer_key\": \"My Company\",\n \"expires_at\": \"2025-06-17T16:54:17.946594Z\",\n \"url\": \"https://se.am/1234\",\n \"workspace_id\": \"67c58f1f-f148-4415-a63c-dc6c145c6b91\"\n}",
103431+
"resource_data_syntax": "json"
103432+
}
103433+
}
103434+
}
103435+
]
103436+
},
103337103437
{
103338103438
"resourceType": "customization_profile",
103339103439
"properties": [
@@ -116376,28 +116476,7 @@
116376116476
"isDraft": false,
116377116477
"draftMessage": "",
116378116478
"propertyGroups": [],
116379-
"resourceSamples": [
116380-
{
116381-
"title": "Magic Link",
116382-
"description": "A magic link resource.",
116383-
"resource_type": "magic_link",
116384-
"properties": {
116385-
"building_block_type": "connect_accounts",
116386-
"created_at": "2025-06-16T16:54:17.946594Z",
116387-
"customer_key": "My Company",
116388-
"expires_at": "2025-06-17T16:54:17.946594Z",
116389-
"url": "https://se.am/1234",
116390-
"workspace_id": "67c58f1f-f148-4415-a63c-dc6c145c6b91"
116391-
},
116392-
"resource": {
116393-
"seam_cli": {
116394-
"title": "Seam CLI",
116395-
"resource_data": "{\n \"building_block_type\": \"connect_accounts\",\n \"created_at\": \"2025-06-16T16:54:17.946594Z\",\n \"customer_key\": \"My Company\",\n \"expires_at\": \"2025-06-17T16:54:17.946594Z\",\n \"url\": \"https://se.am/1234\",\n \"workspace_id\": \"67c58f1f-f148-4415-a63c-dc6c145c6b91\"\n}",
116396-
"resource_data_syntax": "json"
116397-
}
116398-
}
116399-
}
116400-
]
116479+
"resourceSamples": []
116401116480
},
116402116481
{
116403116482
"resourceType": "noise_threshold",

docs/api-reference/_report.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,8 @@ These items are deprecated.
670670
- `action_attempt`
671671
- `/access_codes/pull_backup_access_code`
672672
- `backup_access_code`
673+
- `/customers/create_portal`
674+
- `magic_link`
673675
- `/events/get`
674676
- `message`
675677
- `/locks/get`

docs/api-reference/customers/README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,83 @@
33
**Early Access Preview.** The customers API is currently in Alpha. We're actively developing it and seeking early feedback at [support@seam.co](mailto:support@seam.co). Expect breaking changes as we refine the design.
44
{% endhint %}
55

6+
## The customer_portal Object
7+
8+
- [Properties](./#properties)
9+
- [Endpoints](./#endpoints)
10+
11+
12+
Represents a Customer Portal. Customer Portal is a hosted, customizable interface for managing device access. It enables you to embed secure, pre-authenticated access flows into your product—either by sharing a link with users or embedding a view in an iframe.
13+
14+
With Customer Portal, you no longer need to build out frontend experiences for physical access, thermostats, and sensors. Instead, you can ship enterprise-grade access control experiences in a fraction of the time, while maintaining your product's branding and user experience.
15+
16+
Seam hosts these flows, handling everything from account connection and device mapping to full-featured device control.
17+
18+
{% tabs %}
19+
{% tab title="Customer Portal" %}
20+
21+
A customer portal resource.
22+
23+
```json
24+
{
25+
"created_at": "2025-06-16T16:54:17.946594Z",
26+
"customer_key": "My Company",
27+
"expires_at": "2025-06-17T16:54:17.946594Z",
28+
"url": "https://se.am/1234",
29+
"workspace_id": "67c58f1f-f148-4415-a63c-dc6c145c6b91"
30+
}
31+
```
32+
{% endtab %}
33+
{% endtabs %}
34+
35+
---
36+
## Properties
37+
38+
**`created_at`** *Datetime*
39+
40+
Date and time at which the customer portal link was created.
41+
42+
43+
44+
45+
---
46+
47+
**`customer_key`** *String*
48+
49+
Customer key for the customer portal.
50+
51+
52+
53+
54+
---
55+
56+
**`expires_at`** *Datetime*
57+
58+
Date and time at which the customer portal link expires.
59+
60+
61+
62+
63+
---
64+
65+
**`url`** *String*
66+
67+
URL for the customer portal.
68+
69+
70+
71+
72+
---
73+
74+
**`workspace_id`** *UUID*
75+
76+
ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the customer portal.
77+
78+
79+
80+
81+
---
82+
683
## Endpoints
784

885

docs/api-reference/customers/create_portal.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Navigation mode for the portal. 'restricted' tells frontend to hide navigation U
418418

419419
{% hint style="success" %}
420420
Returns:
421-
**[magic\_link](./../unstable_partner/building_blocks)**
421+
**[customer\_portal](.)**
422422

423423
{% endhint %}
424424

@@ -430,7 +430,6 @@ Returns:
430430

431431
```json
432432
{
433-
"building_block_type": "connect_accounts",
434433
"created_at": "2025-06-16T16:54:17.946594Z",
435434
"customer_key": "My Company",
436435
"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)