Update a service account
const url = 'https://api.adversarial.com/api/v1/oauth/clients/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {cookie: 'arm-session=<arm-session>', 'Content-Type': 'application/json'}, body: '{"allowed_ips":["example"],"client_name":"example","expires_at":"2026-04-15T12:00:00Z","revoked":true,"roles":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.adversarial.com/api/v1/oauth/clients/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --cookie arm-session=<arm-session> \ --data '{ "allowed_ips": [ "example" ], "client_name": "example", "expires_at": "2026-04-15T12:00:00Z", "revoked": true, "roles": [ "example" ] }'Changes a service account’s name, assigned roles, or revoked status. Revoking one stops its tokens from being accepted without deleting it, so it can be restored later.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”OAuth client ID
Request Bodyrequired
Section titled “Request Bodyrequired”object
Toggle the revoked state. Some(true) stamps revoked_at = now();
Some(false) clears it. None leaves the field unchanged.
Replaces the SA user’s role assignments by role name. Roles must be
within the permissions of the member who owns the service account.
admin is never allowed.
Examplegenerated
{ "allowed_ips": [ "example" ], "client_name": "example", "expires_at": "2026-04-15T12:00:00Z", "revoked": true, "roles": [ "example" ]}Responses
Section titled “Responses”OAuth client updated
object
Omitted, along with allowed_ips and expires_at, unless the caller
owns the service account or is an administrator.
The service-account user this key authenticates as — one user per key.
object
Relative path to the user’s avatar endpoint, e.g.
"users/{id}/avatar?v={hash}". None when the user has no avatar.
Examplegenerated
{ "allowed_ips": [ "example" ], "client_id": "example", "client_name": "example", "client_secret": "example", "created_by": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "created_date": "2026-04-15T12:00:00Z", "expires_at": "2026-04-15T12:00:00Z", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "last_used": "2026-04-15T12:00:00Z", "org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "revoked_at": "2026-04-15T12:00:00Z", "roles": [ "example" ], "user": { "email": "example", "first_name": "example", "icon": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "last_name": "example" }, "user_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Invalid request
Unauthorized
Forbidden
Not found
Owner’s active service account quota reached