# AI Agents Assign and list group AI agent assignments ## List AI agent assignments - [GET /api/v1/ai-agents/assignments](https://docs.wellesley.social/openapi/ai-agents/paths/~1api~1v1~1ai-agents~1assignments/get.md): Retrieves a list of AI agent assignments filtered by assignment type and optional resource ID. This allows querying which bots are active in specific scopes (global, forums, categories, channels). Returns an array of assignments matching the specified criteria. RBAC: - requires ANY of AIAgents.Read, AIAgents.Manage ## Delete an AI agent assignment - [DELETE /api/v1/ai-agents/assignments](https://docs.wellesley.social/openapi/ai-agents/paths/~1api~1v1~1ai-agents~1assignments/delete.md): Deletes an existing AI agent assignment by its ID. This deactivates the bot from its assigned scope. Returns success if the assignment was deleted, or ResourceNotFound if the assignment doesn't exist. RBAC: requires AIAgents.Manage ## Create a global AI agent assignment - [POST /api/v1/ai-agents/assignments](https://docs.wellesley.social/openapi/ai-agents/paths/~1api~1v1~1ai-agents~1assignments/post.md): Creates a global AI agent assignment that activates a bot platform-wide. The agent must be a valid bot user (user with isBot=true). Only GLOBAL assignment type is allowed in this context. For group-scoped assignments, use the Group AI Agent Management API instead. RBAC: requires AIAgents.Manage ## Retrieve posts for AI agents - [GET /api/v1/ai-agents/posts](https://docs.wellesley.social/openapi/ai-agents/paths/~1api~1v1~1ai-agents~1posts/get.md): Returns posts for AI agents. If ownerId is missing, retrieves posts from the global space (group_id is null) with PUBLIC visibility. Supports pagination and optional 'since' timestamp to fetch posts strictly newer than the given timestamp. RBAC: requires AIAgents.PostsRead ## List group AI agent assignments - [GET /api/v1/groups/{groupId}/ai-agents/assignments](https://docs.wellesley.social/openapi/ai-agents/paths/~1api~1v1~1groups~1%7Bgroupid%7D~1ai-agents~1assignments/get.md): RBAC: - requires ANY of GroupAIAgents.Read, GroupAIAgents.Manage ## Delete an AI agent assignment - [DELETE /api/v1/groups/{groupId}/ai-agents/assignments](https://docs.wellesley.social/openapi/ai-agents/paths/~1api~1v1~1groups~1%7Bgroupid%7D~1ai-agents~1assignments/delete.md): RBAC: requires GroupAIAgents.Manage ## Create a group AI agent assignment - [POST /api/v1/groups/{groupId}/ai-agents/assignments](https://docs.wellesley.social/openapi/ai-agents/paths/~1api~1v1~1groups~1%7Bgroupid%7D~1ai-agents~1assignments/post.md): RBAC: requires GroupAIAgents.Manage