Groups

Groups of people. Groups synced from the identity provider are read-only here; manual groups are managed through the API.

The group model

A group of people. Most groups are synced from the identity provider and read-only here; manual groups are managed by hand, through the console, Terraform or an access request tool.

Properties

  • Name
    id
    Type
    string
    Description

    Group ID.

  • Name
    etag
    Type
    string
    Description

    Current version.

  • Name
    name
    Type
    string
    Description

    Display name. Synced groups keep the identity provider's name.

  • Name
    description
    Type
    string
    Description

    Free text.

  • Name
    source
    Type
    object
    Description

    Where the group comes from.

  • Name
    source.type
    Type
    string
    Description

    The writing system. One of manual, scim, connector.

  • Name
    source.connector_id
    Type
    string
    Description

    The connector, when type is connector. Can be null.

  • Name
    external_id
    Type
    string
    Description

    The group's ID in the source system. Can be null.

  • Name
    member_count
    Type
    integer
    Description

    How many people are in the group.

  • Name
    break_glass
    Type
    boolean
    Description

    The organization's break-glass group: always admin, for when its identity provider is down or misconfigured. At most one group has it; it must be manual, its members must sign in with passkeys and be managed by hand, and its last member can't be removed. Setting or clearing it needs every scope.

  • Name
    membership_rule
    Type
    object
    Description

    Who is in the group by their details, for manual groups. Members it matches come and go as people change; null for none. Can be null.

  • Name
    membership_rule.match
    Type
    string
    Description

    Whether every condition must hold (all, the default) or any one. One of all, any.

  • Name
    membership_rule.conditions
    Type
    array of objects
    Description

    The conditions, one to 20.

  • Name
    manual_members
    Type
    string
    Description

    Whether people may also be added by hand: directly, only with someone else's approval, or never. One of allowed, approval, never.

  • Name
    max_manual_days
    Type
    integer
    Description

    The longest anyone added by hand stays, in days: each addition must end (valid_to) within this. null for no limit. Can be null.

  • Name
    approver_group_id
    Type
    string
    Description

    Only members of this group may approve requests to join, besides holding membership-requests:write. null for anyone who holds it. Can be null.

  • Name
    labels
    Type
    object
    Description

    Labels.

  • Name
    managed_by
    Type
    string
    Description

    The tool that manages this resource, such as terraform. Can be null.

  • Name
    created_at
    Type
    timestamp
    Description

    When the group was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    When the group last changed.


GET/v1/groups

List groups

Needs the groups:read scope.

Query parameters

  • Name
    page_size
    Type
    integer
    Description

    Results per page, 1 to 200. 0 or absent means 50; more than 200 means 200 (AIP-158).

  • Name
    page_token
    Type
    string
    Description

    next_page_token from the previous page.

  • Name
    updated_since
    Type
    timestamp
    Description

    Only resources changed at or after this time.

  • Name
    name
    Type
    string
    Description

    Only the group with this exact name. This is how Terraform looks up a synced group.

  • Name
    source
    Type
    string
    Description

    Only groups from this source. One of manual, scim, connector.

  • Name
    person_id
    Type
    string
    Description

    Only groups this person belongs to.

Request

GET
/v1/groups
curl https://acme.ext.passway.com/v1/groups \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "data": [
    {
      "id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "etag": "3f9a",
      "name": "engineering",
      "description": "…",
      "source": {
        "type": "manual",
        "connector_id": "con_01jd8k3m2v9x4q7r5t6w8y0z1a"
      },
      "external_id": null,
      "member_count": 0,
      "break_glass": true,
      "membership_rule": null,
      "manual_members": "allowed",
      "max_manual_days": null,
      "approver_group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "labels": {
        "passway.example/cost-center": "4410",
        "team": "facilities"
      },
      "managed_by": "terraform",
      "created_at": "2026-11-30T14:02:11Z",
      "updated_at": "2026-11-30T14:02:11Z"
    }
  ],
  "next_page_token": null
}

POST/v1/groups

Create a group

Creates a manual group. With a membership_rule, everyone active whose details match joins at once, and people come and go as their details change. Setting or changing the rule of a group that has a role needs the role's scopes.

Needs the groups:write scope.

Headers

  • Name
    Idempotency-Key
    Type
    string
    Description

    A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns 422; repeating it while the first is still running returns 409 with Retry-After.

Required attributes

  • Name
    name
    Type
    string
    Description

    Display name, unique within the organization.

Optional attributes

  • Name
    description
    Type
    string
    Description

    Free text.

  • Name
    break_glass
    Type
    boolean
    Description

    The organization's break-glass group: always admin, for when its identity provider is down or misconfigured. At most one group has it; it must be manual, its members must sign in with passkeys and be managed by hand, and its last member can't be removed. Setting or clearing it needs every scope.

  • Name
    membership_rule
    Type
    object
    Description

    Who is in the group by their details. Members it matches come and go as people change. Can be null.

  • Name
    membership_rule.match
    Type
    string
    Description

    Whether every condition must hold (all, the default) or any one. One of all, any.

  • Name
    membership_rule.conditions
    Type
    array of objects
    Description

    The conditions, one to 20.

  • Name
    manual_members
    Type
    string
    Description

    Whether people may also be added by hand: directly (the default), only with someone else's approval, or never. One of allowed, approval, never.

  • Name
    max_manual_days
    Type
    integer
    Description

    The longest anyone added by hand stays, in days. Can be null.

  • Name
    approver_group_id
    Type
    string
    Description

    Only members of this group may approve requests to join. Can be null.

  • Name
    labels
    Type
    object
    Description

    Labels.

  • Name
    managed_by
    Type
    string
    Description

    The tool that manages this resource. Terraform sets terraform.

Request

POST
/v1/groups
curl -X POST https://acme.ext.passway.com/v1/groups \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "contractors-q1",
    "manual_members": "allowed",
    "approver_group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
    "labels": {
      "passway.example/cost-center": "4410",
      "team": "facilities"
    },
    "managed_by": "terraform"
  }'

Response

{
  "id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "name": "engineering",
  "description": "…",
  "source": {
    "type": "manual",
    "connector_id": "con_01jd8k3m2v9x4q7r5t6w8y0z1a"
  },
  "external_id": null,
  "member_count": 0,
  "break_glass": true,
  "membership_rule": null,
  "manual_members": "allowed",
  "max_manual_days": null,
  "approver_group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": "terraform",
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

GET/v1/groups/{group_id}

Get a group

Needs the groups:read scope.

Path parameters

  • Name
    group_id
    Type
    string
    Description

    Group ID: grp_ followed by 1 to 64 lowercase letters and digits.

Request

GET
/v1/groups/{group_id}
curl https://acme.ext.passway.com/v1/groups/grp_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "name": "engineering",
  "description": "…",
  "source": {
    "type": "manual",
    "connector_id": "con_01jd8k3m2v9x4q7r5t6w8y0z1a"
  },
  "external_id": null,
  "member_count": 0,
  "break_glass": true,
  "membership_rule": null,
  "manual_members": "allowed",
  "max_manual_days": null,
  "approver_group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": "terraform",
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

PATCH/v1/groups/{group_id}

Update a group

A JSON merge patch (RFC 7396): fields in the body replace the current ones, null removes a field where the schema allows null, and objects such as labels are merged. Requires If-Match with the current etag.

Needs the groups:write scope.

Path parameters

  • Name
    group_id
    Type
    string
    Description

    Group ID: grp_ followed by 1 to 64 lowercase letters and digits.

Headers

  • Name
    If-Match
    Type
    string
    Description

    The resource's current etag, in double quotes. Required.

Optional attributes

  • Name
    name
    Type
    string
    Description

    New name.

  • Name
    description
    Type
    string
    Description

    New description.

  • Name
    break_glass
    Type
    boolean
    Description

    Make this the break-glass group, or stop it being one. Needs every scope.

  • Name
    membership_rule
    Type
    object
    Description

    A new rule, or null to remove it: the people it alone kept in leave. Can be null.

  • Name
    membership_rule.match
    Type
    string
    Description

    all or any. One of all, any.

  • Name
    membership_rule.conditions
    Type
    array of objects
    Description

    The conditions, one to 20.

  • Name
    manual_members
    Type
    string
    Description

    Whether people may be added by hand. Changing it leaves those already added in. One of allowed, approval, never.

  • Name
    max_manual_days
    Type
    integer
    Description

    A new limit in days, or null for none. It applies to additions from now on. Can be null.

  • Name
    approver_group_id
    Type
    string
    Description

    A new approvers' group, or null for anyone who may approve. Can be null.

  • Name
    labels
    Type
    object
    Description

    Labels to set or remove, or null to remove every label. Can be null.

  • Name
    managed_by
    Type
    string
    Description

    New managing tool, or null to clear it. Can be null.

Request

PATCH
/v1/groups/{group_id}
curl -X PATCH https://acme.ext.passway.com/v1/groups/grp_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"' \
  -H "Content-Type: application/merge-patch+json" \
  -d '{
    "manual_members": "allowed",
    "approver_group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
    "labels": {
      "old-label": null,
      "team": "security"
    }
  }'

Response

{
  "id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "name": "engineering",
  "description": "…",
  "source": {
    "type": "manual",
    "connector_id": "con_01jd8k3m2v9x4q7r5t6w8y0z1a"
  },
  "external_id": null,
  "member_count": 0,
  "break_glass": true,
  "membership_rule": null,
  "manual_members": "allowed",
  "max_manual_days": null,
  "approver_group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": "terraform",
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

DELETE/v1/groups/{group_id}

Delete a group

Only manual groups can be deleted. Groups that access or role assignments name, or that another group names as its approvers, return 409 with /problems/has-dependents, and so does the break-glass group. Deleting a group that has a role needs that role's scopes. Requests to join it go with it.

Needs the groups:write scope.

Path parameters

  • Name
    group_id
    Type
    string
    Description

    Group ID: grp_ followed by 1 to 64 lowercase letters and digits.

Headers

  • Name
    If-Match
    Type
    string
    Description

    The resource's current etag, in double quotes. Required.

Request

DELETE
/v1/groups/{group_id}
curl -X DELETE https://acme.ext.passway.com/v1/groups/grp_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"'

Response

204 Deleted

GET/v1/groups/{group_id}/members

List a group's members

Needs the groups:read scope.

Path parameters

  • Name
    group_id
    Type
    string
    Description

    Group ID: grp_ followed by 1 to 64 lowercase letters and digits.

Query parameters

  • Name
    page_size
    Type
    integer
    Description

    Results per page, 1 to 200. 0 or absent means 50; more than 200 means 200 (AIP-158).

  • Name
    page_token
    Type
    string
    Description

    next_page_token from the previous page.

Request

GET
/v1/groups/{group_id}/members
curl https://acme.ext.passway.com/v1/groups/grp_01jd8k3m2v9x4q7r5t6w8y0z1a/members \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "data": [
    {
      "group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "person_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "valid_to": "2026-11-30T14:02:11Z",
      "via": [
        "rule"
      ],
      "membership_request_id": "mreq_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "created_at": "2026-11-30T14:02:11Z"
    }
  ],
  "next_page_token": null
}

POST/v1/groups/{group_id}/members

Add a member to a manual group

Returns 201 for a new member. Adding an existing member sets valid_to to the one sent and returns 200; someone the group's rule already matches stays while either holds. Synced groups return 409 with /problems/wrong-writer, and so do groups whose manual_members is approval (ask at /v1/membership-requests) or never. With max_manual_days, valid_to is needed and must be within it (409). A group that has a role needs the role's scopes (403); the break-glass group takes only manual people, without valid_to (409).

Needs the groups:write scope.

Path parameters

  • Name
    group_id
    Type
    string
    Description

    Group ID: grp_ followed by 1 to 64 lowercase letters and digits.

Required attributes

  • Name
    person_id
    Type
    string
    Description

    The person to add.

Optional attributes

  • Name
    valid_to
    Type
    timestamp
    Description

    End the membership at this time.

Request

POST
/v1/groups/{group_id}/members
curl -X POST https://acme.ext.passway.com/v1/groups/grp_01jd8k3m2v9x4q7r5t6w8y0z1a/members \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "person_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
    "valid_to": "2026-11-30T14:02:11Z"
  }'

Response

{
  "group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "person_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "valid_to": "2026-11-30T14:02:11Z",
  "via": [
    "rule"
  ],
  "membership_request_id": "mreq_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "created_at": "2026-11-30T14:02:11Z"
}

DELETE/v1/groups/{group_id}/members/{person_id}

Remove a member from a manual group

Takes away an addition by hand. Removing someone who is not a member returns 404; someone only the group's rule matches returns 409 (change the rule or their details), and someone it also matches stays a member. A group that has a role needs the role's scopes (403). The break-glass group's last member can't be removed (409).

Needs the groups:write scope.

Path parameters

  • Name
    group_id
    Type
    string
    Description

    Group ID: grp_ followed by 1 to 64 lowercase letters and digits.

  • Name
    person_id
    Type
    string
    Description

    Person ID: per_ followed by 1 to 64 lowercase letters and digits.

Request

DELETE
/v1/groups/{group_id}/members/{person_id}
curl -X DELETE https://acme.ext.passway.com/v1/groups/grp_01jd8k3m2v9x4q7r5t6w8y0z1a/members/per_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

204 Success