Skip to content
openlaunch
Esc
↑↓navigate↵open⌘Jpreview

Grant current gateway inventory

Owner-only convenience for current gateway and linked devices. Mode read grants read functions; control grants all. Integration-wide HA service devices require includeServices. Future devices remain ungranted. Replaces this principal’s grants for this gateway and its children; omitted service devices lose previous grants and their queued commands are cancelled. Other gateways are unaffected. Per-device grants remain independently revocable.

POST/v1/devices/{deviceId}/gateway-grants
Authorization
AuthorizationBearer token (Clerk owner session) · headerrequired

Owner identity required.

Path parameters
deviceIdstring<uuid>required
Request body
requiredapplication/json
principalstringrequired
min length 1 · max length 128
modestringrequired
Allowed:readcontrol
includeServicesboolean
default: false
ttlSecondsinteger | null
default: 3600
Show properties
Any of:
integer
integer
null
null
Responses
200

Successful response

dataobjectrequired
Show properties
okbooleanrequired
devicesintegerrequired
400

Invalid request or validation failure

errorobjectrequired
Show properties
codestringrequired
messagestring
issuesobject[]
Show properties
Array of object
pathstring
messagestring
401

Missing or invalid credential

errorobjectrequired
Show properties
codestringrequired
messagestring
issuesobject[]
Show properties
Array of object
pathstring
messagestring
403

Insufficient access or grant

errorobjectrequired
Show properties
codestringrequired
messagestring
issuesobject[]
Show properties
Array of object
pathstring
messagestring
404

Resource not found

errorobjectrequired
Show properties
codestringrequired
messagestring
issuesobject[]
Show properties
Array of object
pathstring
messagestring
413

Request body exceeds the 16 KiB limit

errorobjectrequired
Show properties
codestringrequired
messagestring
issuesobject[]
Show properties
Array of object
pathstring
messagestring
429

Rate limit or workspace capacity limit

errorobjectrequired
Show properties
codestringrequired
messagestring
issuesobject[]
Show properties
Array of object
pathstring
messagestring
500

Internal error

errorobjectrequired
Show properties
codestringrequired
messagestring
issuesobject[]
Show properties
Array of object
pathstring
messagestring
503

Service or required integration is not configured

errorobjectrequired
Show properties
codestringrequired
messagestring
issuesobject[]
Show properties
Array of object
pathstring
messagestring
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://www.openlaunch.dev/v1/devices/497f6eca-6276-4993-bfeb-53cbbbba6f08/gateway-grants' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "principal": "string",
  "mode": "read",
  "includeServices": false,
  "ttlSeconds": 3600
}'
Response
{
  "data": {
    "ok": true,
    "devices": 0
  }
}