Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceAccount and accessService Accounts

Update, disable or enable a service account

Changes a service account's name, description, role or disabled state and returns it. A new role, or enabling the account again, must be within your own access. Requires a signed-in session. Disabling denies every request its keys make until it is enabled again.

Required permission

Requires the serviceaccount.manage permission. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

orl service-accounts update <service-account-id>
PATCH
/v1/service-accounts/{serviceAccountId}

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

serviceAccountId*string

Request Body

application/json
  1. body
name?string
Lengthlength <= 64
description?string
Lengthlength <= 256
roleId?string
disabled?boolean

Response Body

Updated

application/json
  1. response
id*string
name*string
description?string
roleId*string
roleName?string
disabled*boolean

A disabled account's keys are denied every request.

keyCount*integer

Live keys the account holds.

createdBy*string
createdAt*string
Example Request
curl -X PATCH 'https://api.openrelay.inc/v1/service-accounts/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "name": "string",  "description": "string",  "roleId": "string",  "roleName": "string",  "disabled": true,  "keyCount": 0,  "createdBy": "string",  "createdAt": "string"}