Skip to main content
POST
/
v3beta1
/
enterprise
/
service-users
Provision enterprise service user
curl --request POST \
  --url https://api.devin.ai/v3beta1/enterprise/service-users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "role_id": "<string>",
  "ttl_seconds": 123
}
'
{
  "service_user": {
    "expires_at": 123,
    "name": "<string>",
    "role_assignments": [
      {
        "role": {
          "role_id": "<string>",
          "role_name": "<string>",
          "role_type": "enterprise"
        },
        "org_id": "<string>"
      }
    ],
    "service_user_id": "<string>"
  },
  "token": "<string>"
}

Permissions

Requires a service user with the ManageAccountServiceUsers permission at the enterprise level.

Security constraints

The specified role_id must reference an account-level role.

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Body

application/json
name
string
required
Required string length: 1 - 256
role_id
string
required
Minimum string length: 1
ttl_seconds
integer
required
Required range: x <= 31536000

Response

Successful Response

service_user
ServiceUser · object
required
token
string
required

The API token for the service user. This is only shown once at creation time.