---
title: "Enroll User in Agent Group"
method: PUT
path: "/api/v1/agent-groups/{agentGroupId}/enrollments/{userId}"
---

# Enroll User in Agent Group

`PUT /api/v1/agent-groups/{agentGroupId}/enrollments/{userId}`

## Request

- Base URL: `https://api.skyfire.xyz`
- URL: `https://api.skyfire.xyz/api/v1/agent-groups/{agentGroupId}/enrollments/{userId}`
- Auth: API key in header `skyfire-api-key`

As an Organization Admin, enroll an organization user in an agent group.

## Path parameters

- `agentGroupId` string, uuid, required
- `userId` string, uuid, required

## Response `200`

Ok. The user was already enrolled; the existing enrollment is returned without `apiKey`.

- object
  - `userId` string, required: The enrolled organization user.
  - `agentId` string, required: The user's existing instance of the group.
  - `agentGroupId` string, required: The agent group.
  - `displayName` string, required: The instance's display name, which is the group's name.

## Other responses

- `201`: Created. The user's instance was minted; `apiKey` is included.
- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found
- `422`: Unprocessable Entity

## Changes

- **2026-11-03** `22cbec9d7630`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/skyfire/apis/skyfire-agent-and-token-apis/changes/api/v1/agent-groups/:agentGroupId/enrollments/:userId/put.md)

---

[API](https://skmtc.dev/skyfire/apis/skyfire-agent-and-token-apis.md) - [All operations](https://skmtc.dev/skyfire/apis/skyfire-agent-and-token-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/skyfire/apis/skyfire-agent-and-token-apis/revisions/22cbec9d7630?raw)
