Pi Durable Platformdocs
ReferenceService accounts

Change a service account (team owners and admins); turning it off stops its keys at the next request

PATCH
/v1/teams/{team}/service-accounts/{serviceAccountId}

Path Parameters

team*string

Team slug or ID

serviceAccountId*string
Formatuuid

Header Parameters

If-Match*string

The resource's revision, as returned in ETag (for example "3"). Missing returns 428; stale returns 412.

Request Body

application/json
  1. body
name?string
Match^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$
description?string
Lengthlength <= 2000
role?ServiceAccountRole

The service account's team role (never owner or admin)

Value in"member""editor"
enabled?boolean

Response Body

Updated

application/json
  1. response
data*
curl -X PATCH 'https://agents.example.com/v1/teams/string/service-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'If-Match: string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec",    "teamSlug": "string",    "name": "ci-release-bot",    "description": "string",    "role": "member",    "enabled": true,    "activeKeyCount": 0,    "lastUsedAt": "2019-08-24T14:15:22Z",    "createdByName": "string",    "revision": 0,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}