Members and invitations

List, add and remove the people of your organization, change their roles and manage invitations.

On this page

Members are the people with access to the organization, each with a role. Admins add members directly or invite them by email; an invitation is valid for 7 days.

OperationEndpoint
List membersGET /v1/orgs/{org}/members
Add memberPOST /v1/orgs/{org}/members
Change member rolePATCH /v1/orgs/{org}/members/{user}
Remove memberDELETE /v1/orgs/{org}/members/{user}
List invitationsGET /v1/orgs/{org}/invitations
Create invitationPOST /v1/orgs/{org}/invitations
Delete invitationDELETE /v1/orgs/{org}/invitations/{id}

List members

GET /v1/orgs/{org}/members

Lists the members of the organization with their role and, when they are limited to one client, its client_id.

Required role: readonly or higher. Organization-wide.

Parameters

NameInTypeRequiredDescription
orgpathstring (uuid)YesOrganization id. Every route checks that it is the token's organization (otherwise 404).

Response

FieldTypeDescription
items[].idstring (uuid)Id.
items[].emailstringEmail address.
items[].namestringName.
items[].created_atstring (date-time)Creation time.
items[].rolestringRole. One of owner, admin, tech, readonly.
items[].joined_atstring (date-time)When the member joined.
items[].client_idstring (uuid) or nullClient the member is limited to (roles tech and readonly only); null = the whole organization.

Errors

StatusDescription
403The token's role or limits do not allow it (forbidden).

Example

curl "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG/members" \
  -H "Authorization: Bearer $OPENWAF_TOKEN"
200
{
  "items": [
    {
      "id": "5b8e2a1c-7d3f-4a9e-b6c2-1e4d7f0a3b9c",
      "email": "[email protected]",
      "name": "Dev team",
      "created_at": "2026-04-10T12:00:00Z",
      "role": "tech",
      "joined_at": "2026-04-10T12:00:00Z",
      "client_id": null
    }
  ]
}

Add member

POST /v1/orgs/{org}/members

Adds a person to the organization directly by email, without an invitation. client_id limits the member to the zones of one client (roles tech and readonly only).

Required role: admin or higher. Only an owner can grant the owner role.

Parameters

NameInTypeRequiredDescription
orgpathstring (uuid)YesOrganization id. Every route checks that it is the token's organization (otherwise 404).

Request body

Content type application/json.

FieldTypeRequiredDescription
emailstring (email)YesEmail address.
namestringNoName.
rolestringYesRole. One of owner, admin, tech, readonly.
client_idstring (uuid)NoLimits the member to the zones of one client (roles tech and readonly only).

Response

FieldTypeDescription
idstring (uuid)Id.
emailstringEmail address.
namestringName.
created_atstring (date-time)Creation time.
rolestringRole. One of owner, admin, tech, readonly.
joined_atstring (date-time)When the member joined.
client_idstring (uuid) or nullClient the member is limited to (roles tech and readonly only); null = the whole organization.

Errors

StatusDescription
403The token's role or limits do not allow it (forbidden).
409already_member: the person is already a member.

Example

curl -X POST "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG/members" \
  -H "Authorization: Bearer $OPENWAF_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
    "email": "[email protected]",
    "role": "tech"
  }'
201
{
  "id": "5b8e2a1c-7d3f-4a9e-b6c2-1e4d7f0a3b9c",
  "email": "[email protected]",
  "name": "Dev team",
  "created_at": "2026-04-10T12:00:00Z",
  "role": "tech",
  "joined_at": "2026-04-10T12:00:00Z",
  "client_id": null
}

Change member role

PATCH /v1/orgs/{org}/members/{user}

Changes the role of a member. The organization always keeps at least one owner. The member's tokens follow the new role at once, since a token never acts above its member.

Required role: admin or higher. Changing an owner or granting owner needs the owner role.

Parameters

NameInTypeRequiredDescription
orgpathstring (uuid)YesOrganization id. Every route checks that it is the token's organization (otherwise 404).
userpathstring (uuid)YesUser id of the member.

Request body

Content type application/json.

FieldTypeRequiredDescription
rolestringYesRole. One of owner, admin, tech, readonly.

Response

FieldTypeDescription
idstring (uuid)Id.
emailstringEmail address.
namestringName.
created_atstring (date-time)Creation time.
rolestringRole. One of owner, admin, tech, readonly.
joined_atstring (date-time)When the member joined.
client_idstring (uuid) or nullClient the member is limited to (roles tech and readonly only); null = the whole organization.

Errors

StatusDescription
403The token's role or limits do not allow it (forbidden).
409conflict: the change would leave the organization without an owner.

Example

curl -X PATCH "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG/members/5b8e2a1c-7d3f-4a9e-b6c2-1e4d7f0a3b9c" \
  -H "Authorization: Bearer $OPENWAF_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
    "role": "admin"
  }'
200
{
  "id": "5b8e2a1c-7d3f-4a9e-b6c2-1e4d7f0a3b9c",
  "email": "[email protected]",
  "name": "Dev team",
  "created_at": "2026-04-10T12:00:00Z",
  "role": "tech",
  "joined_at": "2026-04-10T12:00:00Z",
  "client_id": null
}

Remove member

DELETE /v1/orgs/{org}/members/{user}

Removes a member from the organization. Their API tokens stop working at once. The last owner cannot be removed.

Required role: admin or higher. Removing an owner needs the owner role.

Parameters

NameInTypeRequiredDescription
orgpathstring (uuid)YesOrganization id. Every route checks that it is the token's organization (otherwise 404).
userpathstring (uuid)YesUser id of the member.

Response

  • 204: Removed. No body.

Errors

StatusDescription
403The token's role or limits do not allow it (forbidden).
409conflict: the member is the last owner.

Example

curl -X DELETE "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG/members/5b8e2a1c-7d3f-4a9e-b6c2-1e4d7f0a3b9c" \
  -H "Authorization: Bearer $OPENWAF_TOKEN"

List invitations

GET /v1/orgs/{org}/invitations

Lists the open invitations of the organization.

Required role: admin or higher. Organization-wide.

Parameters

NameInTypeRequiredDescription
orgpathstring (uuid)YesOrganization id. Every route checks that it is the token's organization (otherwise 404).

Response

FieldTypeDescription
items[].idstring (uuid)Id.
items[].org_idstring (uuid)Organization id.
items[].emailstringEmail address.
items[].rolestringRole. One of owner, admin, tech, readonly.
items[].invited_bystringWho sent the invitation.
items[].created_atstring (date-time)Creation time.
items[].expires_atstring (date-time)Expiry time.
items[].client_idstring (uuid) or nullClient the invited member will be limited to; null = the whole organization.

Example

curl "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG/invitations" \
  -H "Authorization: Bearer $OPENWAF_TOKEN"
200
{
  "items": [
    {
      "id": "a5614527-0ce6-43be-ad1d-d012b7394867",
      "org_id": "1e7c9a3b-5d2f-4b8a-9c6e-0f2a4b6c8d1e",
      "email": "[email protected]",
      "role": "owner",
      "invited_by": "user:5b8e2a1c-7d3f-4a9e-b6c2-1e4d7f0a3b9c",
      "created_at": "2026-10-27T09:30:00Z",
      "expires_at": "2026-10-27T09:30:00Z",
      "client_id": "65904271-c7f4-4ee6-a8a6-84f55f76a92a"
    }
  ]
}

Create invitation

POST /v1/orgs/{org}/invitations

Invites a person by email with a role. The invitation is valid for 7 days. The answer includes its secret, shown only once; the invited person accepts it from the link of the email.

Required role: admin or higher. Only an owner can invite with the owner role.

Parameters

NameInTypeRequiredDescription
orgpathstring (uuid)YesOrganization id. Every route checks that it is the token's organization (otherwise 404).

Request body

Content type application/json.

FieldTypeRequiredDescription
emailstring (email)YesEmail address.
rolestringYesRole. One of owner, admin, tech, readonly.
client_idstring (uuid)NoLimits the invited member to the zones of one client (roles tech and readonly only).

Response

  • 201: Created. Returns an object with the fields below.
FieldTypeDescription
idstring (uuid)Id.
org_idstring (uuid)Organization id.
emailstringEmail address.
rolestringRole. One of owner, admin, tech, readonly.
invited_bystringWho sent the invitation.
created_atstring (date-time)Creation time.
expires_atstring (date-time)Expiry time.
client_idstring (uuid) or nullClient the invited member will be limited to; null = the whole organization.
secretstring

Errors

StatusDescription
409already_member or an open invitation for the same email.

Example

curl -X POST "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG/invitations" \
  -H "Authorization: Bearer $OPENWAF_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
    "email": "[email protected]",
    "role": "readonly"
  }'
201
{
  "id": "a5614527-0ce6-43be-ad1d-d012b7394867",
  "org_id": "1e7c9a3b-5d2f-4b8a-9c6e-0f2a4b6c8d1e",
  "email": "[email protected]",
  "role": "owner",
  "invited_by": "user:5b8e2a1c-7d3f-4a9e-b6c2-1e4d7f0a3b9c",
  "created_at": "2026-10-27T09:30:00Z",
  "expires_at": "2026-10-27T09:30:00Z",
  "client_id": "65904271-c7f4-4ee6-a8a6-84f55f76a92a",
  "secret": "owf_8Jx2…"
}

Delete invitation

DELETE /v1/orgs/{org}/invitations/{id}

Withdraws an open invitation; its link stops working.

Required role: admin or higher. Organization-wide.

Parameters

NameInTypeRequiredDescription
orgpathstring (uuid)YesOrganization id. Every route checks that it is the token's organization (otherwise 404).
idpathstring (uuid)YesId of the resource.

Response

  • 204: Withdrawn. No body.

Errors

StatusDescription
404Not found, or not visible to the token (not_found).

Example

curl -X DELETE "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG/invitations/11111111-2222-4333-8444-555555555555" \
  -H "Authorization: Bearer $OPENWAF_TOKEN"

Last updated:

↑↓ to navigate↵ to openesc to close