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

Grant device functions

Only an owner can grant. Grants are per principal and device, limited to 16 capabilities, default to one hour and may be made persistent with null expiry.

POST/v1/grants
Authorization
AuthorizationBearer token (Clerk owner session) · headerrequired

Owner identity required.

Request body
requiredapplication/json
principalstringrequired
min length 1 · max length 128
deviceIdstring<uuid>required
matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
capabilitiesstring[]required
min items 1 · max items 16
ttlSecondsinteger | null
default: 3600
Show properties
Any of:
integer
integer
null
null
Responses
200

Successful response

dataOkrequired
Show properties
okbooleanrequired
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
Bodyapplication/json
Request
curl -X POST 'https://www.openlaunch.dev/v1/grants' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "principal": "string",
  "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
  "capabilities": [
    "string"
  ],
  "ttlSeconds": 3600
}'
Response
{
  "data": {
    "ok": true
  }
}