Pi Durable Platformdocs
ReferenceService accounts

Create a service account (team owners and admins)

POST
/v1/teams/{team}/service-accounts

409 name_taken (names are unique within the team); 409 team_archived. At most 100 per team.

Path Parameters

team*string

Team slug or ID

Request Body

application/json
  1. body
name*string

Lower-case letters, digits and dashes; unique within the team

Match^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$
description?string
Lengthlength <= 2000
role?string

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

Default"member"
Value in"member""editor"
enabled?boolean
Defaulttrue

Response Body

Created

application/json
  1. response
data*
curl -X POST 'https://agents.example.com/v1/teams/string/service-accounts' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
{  "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"  }}