Skip to content
Hayonix

API reference · Members

Remove a member

DELETE/v1/orgs/{org_id}/members/{member_id}
Console sessionmember:removeOrganization

Takes the user out of the organization; their access ends at once. You can remove only a member who ranks no higher than you, and the last owner cannot be removed (409 last_owner).

Console session only: no API key can be granted the member:remove permission it needs. Requires the member:remove permission (a key's scope, or a role that includes it).

Request

Path parameters

  • org_idstring

    Your organization. The SDKs and the CLI fill it in from the API key.

    ID with prefix org_

  • member_idstringrequired

    ID of the member

    ID with prefix mem_

Response

200 JSON — The member was removed

  • idstringrequired

    ID of the deleted resource

  • objectstringrequired

    Always `member`

    One ofmember

  • deletedbooleanrequired

    Always true: the member was removed

    One oftrue

Example response
Example response
{
  "id": "string",
  "object": "member",
  "deleted": true
}

Errors

Errors use the standard envelope. What this operation can answer:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
404not_found_errorNo such resource in this project (an ID from another project is answered the same way).
409conflict_errorThe resource's current state does not allow this.
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.