Open Context Protocol is live! 🚀 Read the launch post
usergroupsUpdate

usergroupsUpdate

Update an existing User Group

Details

  • Method: POST
  • Path: /usergroups.update
  • Operation ID: usergroups_update

Parameters

{
  "handle": {
    "description": "A mention handle. Must be unique among channels, users and User Groups.",
    "required": false,
    "location": "formData",
    "type": "string"
  },
  "description": {
    "description": "A short description of the User Group.",
    "required": false,
    "location": "formData",
    "type": "string"
  },
  "channels": {
    "description": "A comma separated string of encoded channel IDs for which the User Group uses as a default.",
    "required": false,
    "location": "formData",
    "type": "string"
  },
  "token": {
    "description": "Authentication token. Requires scope: `usergroups:write`",
    "required": true,
    "location": "header",
    "type": "string"
  },
  "include_count": {
    "description": "Include the number of users in the User Group.",
    "required": false,
    "location": "formData",
    "type": "string"
  },
  "usergroup": {
    "description": "The encoded ID of the User Group to update.",
    "required": true,
    "location": "formData",
    "type": "string"
  },
  "name": {
    "description": "A name for the User Group. Must be unique among User Groups.",
    "required": false,
    "location": "formData",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "Schema for successful response from usergroups.update method",
  "properties": {
    "ok": {
      "enum": [
        true
      ],
      "title": "default success response",
      "type": "boolean"
    },
    "usergroup": {
      "additionalProperties": false,
      "properties": {
        "auto_provision": {
          "type": "boolean"
        },
        "auto_type": {
          "items": [
            {
              "type": "null"
            },
            {
              "enum": [
                "owner",
                "admin"
              ],
              "type": "string"
            }
          ]
        },
        "channel_count": {
          "type": "integer"
        },
        "created_by": {
          "pattern": "^[UW][A-Z0-9]{2,}$",
          "title": "User ID",
          "type": "string"
        },
        "date_create": {
          "type": "integer"
        },
        "date_delete": {
          "type": "integer"
        },
        "date_update": {
          "type": "integer"
        },
        "deleted_by": {
          "items": [
            {
              "type": "null"
            },
            {
              "pattern": "^[UW][A-Z0-9]{2,}$",
              "title": "User ID",
              "type": "string"
            }
          ]
        },
        "description": {
          "type": "string"
        },
        "enterprise_subteam_id": {
          "type": "string"
        },
        "handle": {
          "type": "string"
        },
        "id": {
          "pattern": "^S[A-Z0-9]{2,}$",
          "title": "Subteam ID",
          "type": "string"
        },
        "is_external": {
          "type": "boolean"
        },
        "is_subteam": {
          "type": "boolean"
        },
        "is_usergroup": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "prefs": {
          "additionalProperties": false,
          "properties": {
            "channels": {
              "items": {
                "pattern": "^[C][A-Z0-9]{2,}$",
                "title": "Channel ID",
                "type": "string"
              },
              "type": "array"
            },
            "groups": {
              "items": {
                "pattern": "^[G][A-Z0-9]{8,}$",
                "title": "Private Channel ID",
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "channels",
            "groups"
          ],
          "type": "object"
        },
        "team_id": {
          "pattern": "^[T][A-Z0-9]{2,}$",
          "title": "Team ID",
          "type": "string"
        },
        "updated_by": {
          "pattern": "^[UW][A-Z0-9]{2,}$",
          "title": "User ID",
          "type": "string"
        },
        "user_count": {
          "type": "integer"
        },
        "users": {
          "items": {
            "pattern": "^[UW][A-Z0-9]{2,}$",
            "title": "User ID",
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "id",
        "team_id",
        "is_usergroup",
        "is_subteam",
        "name",
        "description",
        "handle",
        "is_external",
        "date_create",
        "date_update",
        "date_delete",
        "auto_type",
        "auto_provision",
        "enterprise_subteam_id",
        "created_by",
        "updated_by",
        "deleted_by",
        "prefs"
      ],
      "title": "Subteam/Usergroup Object",
      "type": "object"
    }
  },
  "required": [
    "ok",
    "usergroup"
  ],
  "title": "usergroups.update schema",
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('slack')

# Call this tool
result = await agent.call_tool('usergroupsUpdate', {
    # Add required parameters here
})