Edit a person
const url = 'https://app.dycrypt.com/o/acme/api/users/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"username":"example","displayName":"example","email":"hello@example.com","password":"example","role":"ORG_ADMIN","active":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
What a person may do. A token is measured against its scopes instead, and never inherits the role of whoever created it.
Responses
Section titled “Responses”The updated member.
A member of your DYCRYPT organisation.
object
What a person may do. A token is measured against its scopes instead, and never inherits the role of whoever created it.
Example
{ "role": "ORG_ADMIN"}The request is wrong — a bad date, a missing field, a value the product does not declare.
Every failure in this API has this shape and no other.
object
Example
{ "error": "this token does not have licenses:write"}No credential, or one that no longer resolves — revoked, expired, deleted. Replace it.
Every failure in this API has this shape and no other.
object
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.
Every failure in this API has this shape and no other.
object
Example
{ "error": "this token does not have licenses:write"}No such record, or no such endpoint.
Every failure in this API has this shape and no other.
object
Example
{ "error": "this token does not have licenses:write"}