Skip to content

Edit a person

PUT
/api/users/{id}
curl --request PUT \
--url https://app.dycrypt.com/o/acme/api/users/1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "username": "example", "displayName": "example", "email": "hello@example.com", "password": "example", "role": "ORG_ADMIN", "active": true }'

Refused if the change would leave the organisation with no active administrator.

id
required
integer format: int64
Media typeapplication/json
object
username
string
/^[a-zA-Z0-9._-]{2,60}$/
displayName
string
email
string format: email
password
string format: password
>= 8 characters
role

What a person may do. A token is measured against its scopes instead, and never inherits the role of whoever created it.

string
Allowed values: ORG_ADMIN ISSUER VIEWER
active
boolean

The updated member.

Media typeapplication/json

A member of your DYCRYPT organisation.

object
id
required
integer format: int64
username
required
string
displayName
string | null
email
string | null format: email
role
required

What a person may do. A token is measured against its scopes instead, and never inherits the role of whoever created it.

string
Allowed values: ORG_ADMIN ISSUER VIEWER
active
required
boolean
createdAt
string format: date-time
lastLoginAt
string | null format: date-time
Example
{
"role": "ORG_ADMIN"
}

The request is wrong — a bad date, a missing field, a value the product does not declare.

Media typeapplication/json

Every failure in this API has this shape and no other.

object
error
required
string
Example
{
"error": "this token does not have licenses:write"
}

No credential, or one that no longer resolves — revoked, expired, deleted. Replace it.

Media typeapplication/json

Every failure in this API has this shape and no other.

object
error
required
string
Example
{
"error": "this token does not have licenses:write"
}

Authenticated, but not allowed: a missing scope, a read-only role, a plan limit reached, or a credential used under another organisation’s slug. The right credential doing something it may not do.

Media typeapplication/json

Every failure in this API has this shape and no other.

object
error
required
string
Example
{
"error": "this token does not have licenses:write"
}

No such record, or no such endpoint.

Media typeapplication/json

Every failure in this API has this shape and no other.

object
error
required
string
Example
{
"error": "this token does not have licenses:write"
}