{
  "opencollection": "1.0.0",
  "info": {
    "name": "WorkOS admin-portal groups API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "groups",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Groups",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.workos.com/organizations/:organizationId/groups",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              },
              {
                "name": "before",
                "value": "",
                "type": "query",
                "description": "An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `\"obj_123\"`, your subsequent call can include `before=\"obj_123\"` to fetch a new batch of objects before `\"obj_123\"`."
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `\"obj_123\"`, your subsequent call can include `after=\"obj_123\"` to fetch a new batch of objects after `\"obj_123\"`."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Upper limit on the number of objects to return, between `1` and `100`."
              },
              {
                "name": "order",
                "value": "",
                "type": "query",
                "description": "Order the results by the creation time. Supported values are `\"asc\"` (ascending), `\"desc\"` (descending), and `\"normal\"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending."
              }
            ]
          },
          "docs": "Get a paginated list of groups within an organization."
        },
        {
          "info": {
            "name": "Create a Group",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.workos.com/organizations/:organizationId/groups",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a new group within an organization."
        },
        {
          "info": {
            "name": "Get a Group",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.workos.com/organizations/:organizationId/groups/:groupId",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              },
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "The ID of the group."
              }
            ]
          },
          "docs": "Retrieve a group by its ID within an organization."
        },
        {
          "info": {
            "name": "Update a Group",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.workos.com/organizations/:organizationId/groups/:groupId",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              },
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "The ID of the group."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update an existing group. Only the fields provided in the request body will be updated."
        },
        {
          "info": {
            "name": "Delete a Group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.workos.com/organizations/:organizationId/groups/:groupId",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              },
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "The ID of the group."
              }
            ]
          },
          "docs": "Delete a group from an organization."
        },
        {
          "info": {
            "name": "List Group Members",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.workos.com/organizations/:organizationId/groups/:groupId/organization-memberships",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the Organization."
              },
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the Group."
              },
              {
                "name": "before",
                "value": "",
                "type": "query",
                "description": "An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `\"obj_123\"`, your subsequent call can include `before=\"obj_123\"` to fetch a new batch of objects before `\"obj_123\"`."
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `\"obj_123\"`, your subsequent call can include `after=\"obj_123\"` to fetch a new batch of objects after `\"obj_123\"`."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Upper limit on the number of objects to return, between `1` and `100`."
              },
              {
                "name": "order",
                "value": "",
                "type": "query",
                "description": "Order the results by the creation time. Supported values are `\"asc\"` (ascending), `\"desc\"` (descending), and `\"normal\"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending."
              }
            ]
          },
          "docs": "Get a list of organization memberships in a group."
        },
        {
          "info": {
            "name": "Add a Member to a Group",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.workos.com/organizations/:organizationId/groups/:groupId/organization-memberships",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the Organization."
              },
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the Group."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Add an organization membership to a group."
        },
        {
          "info": {
            "name": "Remove a Member from a Group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.workos.com/organizations/:organizationId/groups/:groupId/organization-memberships/:omId",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the Organization."
              },
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the Group."
              },
              {
                "name": "omId",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the Organization Membership."
              }
            ]
          },
          "docs": "Remove an organization membership from a group."
        }
      ]
    }
  ],
  "bundled": true
}