Skip to content

Commit 65b927e

Browse files
sybohyclaudeseambot
authored
feat: make Access Grants the front door for granting access (#1114)
* feat: make Access Grants the front door for granting access Access Grants are GA and are now the default, recommended way to grant access to any physical space, irrespective of locking hardware. The docs previously framed Access Grants as ACS-only (entrances/spaces), which led developers and AI assistants (including the Seam MCP) to wrongly steer standalone-smart-lock users to the legacy Access Codes API. - Add new top-level "Use Cases" nav section with a "Granting Access" decision page (which API to use, with the recommended ladder: one device -> multiple devices/spaces -> ACS entrances) - Move Access Grants guides under use-cases/granting-access/ with .gitbook.yaml redirects for all old URLs - Rewrite Access Grants overview: universal framing, device_ids first in the "Where" table, devices-first teaching order - Add "Creating an Access Grant Using Devices" guide (device_ids + code access method, capability checks) - Rewrite Quick Start step 3 around access_grants.create with a code access method instead of lock/unlock - Lead the access_grants/create API reference with a devices-only code sample (new sample in code-sample-definitions) - Add "Grant Access" card first on the docs landing page - Teach validate-links to accept URLs covered by .gitbook.yaml redirects (upstream @seamapi/types still links old URLs; resolved via redirects until the upstream descriptions are updated) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: Generate docs * feat: merge Granting Access and Access Grants pages, flatten nav Per review: the use-cases/granting-access decision page and the access-grants overview were repetitive. Merge them into a single Granting Access page (framing + ladder + characteristics + process + which-API table) and move the ten guide pages up one level to use-cases/granting-access/. Redirect targets updated; the access-grants/ URLs were never published, so no extra redirects are needed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat: multi-language tabs for the Granting Access lead example Per review: expand the opening JavaScript-only access_grants.create snippet into the full tab set (JavaScript, cURL, Python, Ruby, PHP, Seam CLI, C#), with syntax matching the generated API reference samples. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: Format code * fix: remove outdated spaces Alpha notices Spaces are no longer in Alpha. Remove the three Alpha/early-access notices from the Granting Access page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Seam Bot <seambot@getseam.com>
1 parent ae7748d commit 65b927e

24 files changed

Lines changed: 1776 additions & 355 deletions

File tree

.gitbook.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,13 @@ redirects:
2323
core-concepts/connect-webviews: core-concepts/connect-webviews/README.md
2424
capability-guides/access-systems/understanding-acs-differences: capability-guides/access-systems/README.md
2525
capability-guides/thermostats/creating-and-managing-climate-schedules: capability-guides/thermostats/creating-and-managing-thermostat-schedules.md
26+
capability-guides/access-grants: use-cases/granting-access/README.md
27+
capability-guides/access-grants/access-grant-quick-start: use-cases/granting-access/access-grant-quick-start.md
28+
capability-guides/access-grants/creating-an-access-grant-using-entrances: use-cases/granting-access/creating-an-access-grant-using-entrances.md
29+
capability-guides/access-grants/creating-an-access-grant-using-spaces: use-cases/granting-access/creating-an-access-grant-using-spaces.md
30+
capability-guides/access-grants/delivering-access-methods: use-cases/granting-access/delivering-access-methods.md
31+
capability-guides/access-grants/reservation-access-grants: use-cases/granting-access/reservation-access-grants.md
32+
capability-guides/access-grants/retrieving-access-grants-and-access-methods: use-cases/granting-access/retrieving-access-grants-and-access-methods.md
33+
capability-guides/access-grants/updating-an-access-grant: use-cases/granting-access/updating-an-access-grant.md
34+
capability-guides/access-grants/revoking-an-access-method: use-cases/granting-access/revoking-an-access-method.md
35+
capability-guides/access-grants/deleting-an-access-grant: use-cases/granting-access/deleting-an-access-grant.md

codegen/data/code-sample-definitions/access_grants.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,36 @@
11
---
2+
- title: Create an Access Grant for devices
3+
description:
4+
Creates a new Access Grant that gives a user identity a PIN code on one
5+
or more devices, such as standalone smart locks.
6+
request:
7+
path: /access_grants/create
8+
parameters:
9+
user_identity_id: e3d736c1-540d-4d10-83e5-9a4e135453b4
10+
device_ids:
11+
- 6ba7b811-9dad-11d1-80b4-00c04fd430c8
12+
requested_access_methods:
13+
- mode: code
14+
starts_at: '2025-06-16T16:54:17.946606Z'
15+
ends_at: '2025-06-18T16:54:17.946606Z'
16+
response:
17+
body:
18+
access_grant:
19+
access_grant_id: ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b
20+
access_method_ids:
21+
- a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d
22+
created_at: '2025-06-16T16:54:17.946606Z'
23+
display_name: My Access Grant
24+
ends_at: '2025-06-18T16:54:17.946606Z'
25+
requested_access_methods:
26+
- display_name: PIN Code Credential
27+
mode: code
28+
created_at: '2025-06-16T16:54:17.946606Z'
29+
created_access_method_ids:
30+
- a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d
31+
starts_at: '2025-06-16T16:54:17.946606Z'
32+
user_identity_id: e3d736c1-540d-4d10-83e5-9a4e135453b4
33+
workspace_id: 750fc0bc-4450-4356-8d9f-18c6a3a6b2c7
234
- title: Create an Access Grant using spaces
335
description: Creates a new Access Grant using space IDs and an existing user identity.
436
request:

codegen/validate-links.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { existsSync, readdirSync, readFileSync } from 'node:fs'
22
import { dirname, join, resolve } from 'node:path'
33

4+
import YAML from 'yaml'
5+
46
import {
57
baseUrl,
68
type SiteSection,
@@ -12,6 +14,36 @@ function findSiteSection(filePath: string): SiteSection | undefined {
1214
return siteSections.find(({ root }) => filePath.startsWith(root + '/'))
1315
}
1416

17+
// Each site section has its own .gitbook.yaml with a redirects map.
18+
// A URL covered by a redirect is not broken: GitBook resolves it.
19+
// (validate-redirects separately ensures every redirect target exists.)
20+
const sectionConfigPaths: Record<string, string> = {
21+
Guides: '.gitbook.yaml',
22+
'API Reference': join('docs', 'api-reference', '.gitbook.yaml'),
23+
'Brand Guides': join('docs', 'brand-guides', '.gitbook.yaml'),
24+
}
25+
26+
const sectionRedirects = new Map<string, Set<string>>()
27+
28+
function getSectionRedirects(sectionName: string): Set<string> {
29+
const cached = sectionRedirects.get(sectionName)
30+
if (cached != null) return cached
31+
32+
const redirectPaths = new Set<string>()
33+
const configPath = sectionConfigPaths[sectionName]
34+
if (configPath != null && existsSync(configPath)) {
35+
const config = YAML.parse(readFileSync(configPath, 'utf-8')) as {
36+
redirects?: Record<string, string>
37+
}
38+
for (const key of Object.keys(config.redirects ?? {})) {
39+
redirectPaths.add(key.replace(/^\//, ''))
40+
}
41+
}
42+
43+
sectionRedirects.set(sectionName, redirectPaths)
44+
return redirectPaths
45+
}
46+
1547
const absoluteUrlPattern = new RegExp(
1648
`${baseUrl.replaceAll('.', '\\.')}[^)"<>\\s]+`,
1749
'g',
@@ -83,6 +115,11 @@ function checkAbsoluteUrl(file: string, line: number, rawUrl: string): void {
83115
const targetMd = `${targetRoot}.md`
84116
const targetReadme = join(targetRoot, 'README.md')
85117

118+
// A URL covered by a .gitbook.yaml redirect resolves on the published site.
119+
if (getSectionRedirects(section.name).has(pagePath.replace(/^\//, ''))) {
120+
return
121+
}
122+
86123
if (!existsSync(targetMd) && !existsSync(targetReadme)) {
87124
brokenLinks.push({
88125
file,

docs/api-reference/_blueprint.json

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5064,6 +5064,126 @@
50645064
],
50655065
"workspaceScope": "required",
50665066
"codeSamples": [
5067+
{
5068+
"title": "Create an Access Grant for devices",
5069+
"description": "Creates a new Access Grant that gives a user identity a PIN code on one or more devices, such as standalone smart locks.",
5070+
"request": {
5071+
"path": "/access_grants/create",
5072+
"parameters": {
5073+
"user_identity_id": "e3d736c1-540d-4d10-83e5-9a4e135453b4",
5074+
"device_ids": [
5075+
"6ba7b811-9dad-11d1-80b4-00c04fd430c8"
5076+
],
5077+
"requested_access_methods": [
5078+
{
5079+
"mode": "code"
5080+
}
5081+
],
5082+
"starts_at": "2025-06-16T16:54:17.946606Z",
5083+
"ends_at": "2025-06-18T16:54:17.946606Z"
5084+
}
5085+
},
5086+
"response": {
5087+
"body": {
5088+
"access_grant": {
5089+
"access_grant_id": "ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b",
5090+
"access_method_ids": [
5091+
"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d"
5092+
],
5093+
"created_at": "2025-06-16T16:54:17.946606Z",
5094+
"display_name": "My Access Grant",
5095+
"ends_at": "2025-06-18T16:54:17.946606Z",
5096+
"requested_access_methods": [
5097+
{
5098+
"display_name": "PIN Code Credential",
5099+
"mode": "code",
5100+
"created_at": "2025-06-16T16:54:17.946606Z",
5101+
"created_access_method_ids": [
5102+
"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d"
5103+
]
5104+
}
5105+
],
5106+
"starts_at": "2025-06-16T16:54:17.946606Z",
5107+
"user_identity_id": "e3d736c1-540d-4d10-83e5-9a4e135453b4",
5108+
"workspace_id": "750fc0bc-4450-4356-8d9f-18c6a3a6b2c7"
5109+
}
5110+
}
5111+
},
5112+
"code": {
5113+
"javascript": {
5114+
"title": "JavaScript",
5115+
"sdkName": "javascript",
5116+
"request": "await seam.accessGrants.create({\n user_identity_id: \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n device_ids: [\"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"],\n requested_access_methods: [{ mode: \"code\" }],\n starts_at: \"2025-06-16T16:54:17.946606Z\",\n ends_at: \"2025-06-18T16:54:17.946606Z\",\n});",
5117+
"response": "{\n \"access_grant_id\": \"ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b\",\n \"access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"display_name\": \"My Access Grant\",\n \"ends_at\": \"2025-06-18T16:54:17.946606Z\",\n \"requested_access_methods\": [\n {\n \"display_name\": \"PIN Code Credential\",\n \"mode\": \"code\",\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"created_access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"]\n }\n ],\n \"starts_at\": \"2025-06-16T16:54:17.946606Z\",\n \"user_identity_id\": \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n \"workspace_id\": \"750fc0bc-4450-4356-8d9f-18c6a3a6b2c7\"\n}",
5118+
"request_syntax": "javascript",
5119+
"response_syntax": "json"
5120+
},
5121+
"python": {
5122+
"title": "Python",
5123+
"sdkName": "python",
5124+
"request": "seam.access_grants.create(\n user_identity_id=\"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n device_ids=[\"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"],\n requested_access_methods=[{\"mode\": \"code\"}],\n starts_at=\"2025-06-16T16:54:17.946606Z\",\n ends_at=\"2025-06-18T16:54:17.946606Z\",\n)",
5125+
"response": "AccessGrant(\n access_grant_id=\"ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b\",\n access_method_ids=[\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n created_at=\"2025-06-16T16:54:17.946606Z\",\n display_name=\"My Access Grant\",\n ends_at=\"2025-06-18T16:54:17.946606Z\",\n requested_access_methods=[\n {\n \"display_name\": \"PIN Code Credential\",\n \"mode\": \"code\",\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"created_access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n }\n ],\n starts_at=\"2025-06-16T16:54:17.946606Z\",\n user_identity_id=\"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n workspace_id=\"750fc0bc-4450-4356-8d9f-18c6a3a6b2c7\",\n)",
5126+
"request_syntax": "python",
5127+
"response_syntax": "python"
5128+
},
5129+
"ruby": {
5130+
"title": "Ruby",
5131+
"sdkName": "ruby",
5132+
"request": "seam.access_grants.create(\n user_identity_id: \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n device_ids: [\"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"],\n requested_access_methods: [{ mode: \"code\" }],\n starts_at: \"2025-06-16T16:54:17.946606Z\",\n ends_at: \"2025-06-18T16:54:17.946606Z\",\n)",
5133+
"response": "{\n \"access_grant_id\" => \"ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b\",\n \"access_method_ids\" => [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n \"created_at\" => \"2025-06-16T16:54:17.946606Z\",\n \"display_name\" => \"My Access Grant\",\n \"ends_at\" => \"2025-06-18T16:54:17.946606Z\",\n \"requested_access_methods\" => [\n {\n display_name: \"PIN Code Credential\",\n mode: \"code\",\n created_at: \"2025-06-16T16:54:17.946606Z\",\n created_access_method_ids: [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n },\n ],\n \"starts_at\" => \"2025-06-16T16:54:17.946606Z\",\n \"user_identity_id\" => \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n \"workspace_id\" => \"750fc0bc-4450-4356-8d9f-18c6a3a6b2c7\",\n}",
5134+
"request_syntax": "ruby",
5135+
"response_syntax": "ruby"
5136+
},
5137+
"php": {
5138+
"title": "PHP",
5139+
"sdkName": "php",
5140+
"request": "$seam->access_grants->create(\n user_identity_id: \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n device_ids: [\"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"],\n requested_access_methods: [[\"mode\" => \"code\"]],\n starts_at: \"2025-06-16T16:54:17.946606Z\",\n ends_at: \"2025-06-18T16:54:17.946606Z\",\n);",
5141+
"response": "[\n \"access_grant_id\" => \"ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b\",\n \"access_method_ids\" => [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n \"created_at\" => \"2025-06-16T16:54:17.946606Z\",\n \"display_name\" => \"My Access Grant\",\n \"ends_at\" => \"2025-06-18T16:54:17.946606Z\",\n \"requested_access_methods\" => [\n [\n \"display_name\" => \"PIN Code Credential\",\n \"mode\" => \"code\",\n \"created_at\" => \"2025-06-16T16:54:17.946606Z\",\n \"created_access_method_ids\" => [\n \"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\",\n ],\n ],\n ],\n \"starts_at\" => \"2025-06-16T16:54:17.946606Z\",\n \"user_identity_id\" => \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n \"workspace_id\" => \"750fc0bc-4450-4356-8d9f-18c6a3a6b2c7\",\n];",
5142+
"request_syntax": "php",
5143+
"response_syntax": "php"
5144+
},
5145+
"seam_cli": {
5146+
"title": "Seam CLI",
5147+
"sdkName": "seam_cli",
5148+
"request": "seam access-grants create --user_identity_id \"e3d736c1-540d-4d10-83e5-9a4e135453b4\" --device_ids [\"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"] --requested_access_methods [{\"mode\":\"code\"}] --starts_at \"2025-06-16T16:54:17.946606Z\" --ends_at \"2025-06-18T16:54:17.946606Z\"",
5149+
"response": "{\n \"access_grant_id\": \"ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b\",\n \"access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"display_name\": \"My Access Grant\",\n \"ends_at\": \"2025-06-18T16:54:17.946606Z\",\n \"requested_access_methods\": [\n {\n \"display_name\": \"PIN Code Credential\",\n \"mode\": \"code\",\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"created_access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"]\n }\n ],\n \"starts_at\": \"2025-06-16T16:54:17.946606Z\",\n \"user_identity_id\": \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n \"workspace_id\": \"750fc0bc-4450-4356-8d9f-18c6a3a6b2c7\"\n}",
5150+
"request_syntax": "bash",
5151+
"response_syntax": "json"
5152+
},
5153+
"go": {
5154+
"title": "Go",
5155+
"sdkName": "go",
5156+
"request": "package main\n\nimport api \"github.com/seamapi/go\"\n\nfunc main() {\n\tclient.AccessGrants.Create(\n\t\tcontext.Background(),\n\t\tapi.AccessGrantsCreateRequest{\n\t\t\tUserIdentityId: api.String(\"e3d736c1-540d-4d10-83e5-9a4e135453b4\"),\n\t\t\tDeviceIds: [1]string{api.String(\"6ba7b811-9dad-11d1-80b4-00c04fd430c8\")},\n\t\t\tRequestedAccessMethods: [1]api.AccessGrantsCreateRequestRequestedAccessMethodsItem{api.AccessGrantsCreateRequestRequestedAccessMethods{Mode: api.String(\"code\")}},\n\t\t\tStartsAt: api.String(\"2025-06-16T16:54:17.946606Z\"),\n\t\t\tEndsAt: api.String(\"2025-06-18T16:54:17.946606Z\"),\n\t\t},\n\t)\n}",
5157+
"response": "api.AccessGrant{AccessGrantId: \"ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b\", AccessMethodIds: []string{\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"}, CreatedAt: \"2025-06-16T16:54:17.946606Z\", DisplayName: \"My Access Grant\", EndsAt: \"2025-06-18T16:54:17.946606Z\", RequestedAccessMethods: []AccessGrantRequestedAccessMethods{api.AccessGrantRequestedAccessMethodsRequestedAccessMethods{DisplayName: \"PIN Code Credential\", Mode: \"code\", CreatedAt: \"2025-06-16T16:54:17.946606Z\", CreatedAccessMethodIds: []string{\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"}}}, StartsAt: \"2025-06-16T16:54:17.946606Z\", UserIdentityId: \"e3d736c1-540d-4d10-83e5-9a4e135453b4\", WorkspaceId: \"750fc0bc-4450-4356-8d9f-18c6a3a6b2c7\"}",
5158+
"request_syntax": "go",
5159+
"response_syntax": "go"
5160+
},
5161+
"java": {
5162+
"title": "Java",
5163+
"sdkName": "java",
5164+
"request": "seam.accessGrants().create(AccessGrantsCreateRequest.builder().userIdentityId(\"e3d736c1-540d-4d10-83e5-9a4e135453b4\")\n.deviceIds(List.of(\"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"))\n.requestedAccessMethods(List.of(Map.of(\"mode\", \"code\")))\n.startsAt(\"2025-06-16T16:54:17.946606Z\")\n.endsAt(\"2025-06-18T16:54:17.946606Z\").build());",
5165+
"response": "{\n \"access_grant_id\": \"ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b\",\n \"access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"display_name\": \"My Access Grant\",\n \"ends_at\": \"2025-06-18T16:54:17.946606Z\",\n \"requested_access_methods\": [\n {\n \"display_name\": \"PIN Code Credential\",\n \"mode\": \"code\",\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"created_access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"]\n }\n ],\n \"starts_at\": \"2025-06-16T16:54:17.946606Z\",\n \"user_identity_id\": \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n \"workspace_id\": \"750fc0bc-4450-4356-8d9f-18c6a3a6b2c7\"\n}",
5166+
"request_syntax": "java",
5167+
"response_syntax": "json"
5168+
},
5169+
"csharp": {
5170+
"title": "C#",
5171+
"sdkName": "csharp",
5172+
"request": "seam.AccessGrants.Create(userIdentityId: \"e3d736c1-540d-4d10-83e5-9a4e135453b4\", deviceIds: new string[] { \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"} , requestedAccessMethods: new object[] { new { mode = \"code\" }} , startsAt: \"2025-06-16T16:54:17.946606Z\", endsAt: \"2025-06-18T16:54:17.946606Z\")",
5173+
"response": "{\n \"access_grant_id\": \"ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b\",\n \"access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"display_name\": \"My Access Grant\",\n \"ends_at\": \"2025-06-18T16:54:17.946606Z\",\n \"requested_access_methods\": [\n {\n \"display_name\": \"PIN Code Credential\",\n \"mode\": \"code\",\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"created_access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"]\n }\n ],\n \"starts_at\": \"2025-06-16T16:54:17.946606Z\",\n \"user_identity_id\": \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n \"workspace_id\": \"750fc0bc-4450-4356-8d9f-18c6a3a6b2c7\"\n}",
5174+
"request_syntax": "csharp",
5175+
"response_syntax": "json"
5176+
},
5177+
"curl": {
5178+
"title": "cURL",
5179+
"sdkName": "curl",
5180+
"request": "curl --include --request POST \"https://connect.getseam.com/access_grants/create\" \\\n --header \"Authorization: Bearer $SEAM_API_KEY\" \\\n --json @- <<EOF\n{\n \"user_identity_id\": \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n \"device_ids\": [\n \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"\n ],\n \"requested_access_methods\": [\n {\n \"mode\": \"code\"\n }\n ],\n \"starts_at\": \"2025-06-16T16:54:17.946606Z\",\n \"ends_at\": \"2025-06-18T16:54:17.946606Z\"\n}\nEOF",
5181+
"response": "{\n \"access_grant\": {\n \"access_grant_id\": \"ef83cca9-5fdf-4ac2-93f3-c21c5a8be54b\",\n \"access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"],\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"display_name\": \"My Access Grant\",\n \"ends_at\": \"2025-06-18T16:54:17.946606Z\",\n \"requested_access_methods\": [\n {\n \"display_name\": \"PIN Code Credential\",\n \"mode\": \"code\",\n \"created_at\": \"2025-06-16T16:54:17.946606Z\",\n \"created_access_method_ids\": [\"a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d\"]\n }\n ],\n \"starts_at\": \"2025-06-16T16:54:17.946606Z\",\n \"user_identity_id\": \"e3d736c1-540d-4d10-83e5-9a4e135453b4\",\n \"workspace_id\": \"750fc0bc-4450-4356-8d9f-18c6a3a6b2c7\"\n }\n}",
5182+
"request_syntax": "bash",
5183+
"response_syntax": "json"
5184+
}
5185+
}
5186+
},
50675187
{
50685188
"title": "Create an Access Grant using spaces",
50695189
"description": "Creates a new Access Grant using space IDs and an existing user identity.",

0 commit comments

Comments
 (0)