As an Organization Admin, enroll an organization user in an agent group.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
As an Organization Admin, enroll an existing organization user in an agent group. This mints the user's instance of the group: a buyer agent named after the group, with a wallet and one API key.
Authenticate with an Organization Admin User API key, sent in the skyfire-api-key header. Keys belonging to Organization Admins are accepted; a MEMBER key, or any Agent API key, is rejected with 401.
Both the group and the user must belong to your organization. An unknown group returns 404, an unknown user returns 404, and a deactivated user returns 400.
What this call creates
On a first enrollment, a single request creates:
- A buyer agent for the user, with
displayNameequal to the group's name. - A wallet for that agent.
- An API key for that agent, returned as
apiKey.
The response is 201 Created. Tokens minted with this key carry the group's name as aid.name and the agent's id as aid.id.
apiKeyis returned only in this response and cannot be retrieved again. Store it securely before discarding the response. Further keys for the instance can be created with Create Agent API Key.
To create a brand-new user directly into a group, pass agentGroupId to Create Organization User instead.
Repeating the call
PUT is safe to retry. If the user is already enrolled, the response is 200 OK with the existing enrollment and no apiKey. This holds even when the group has since been deactivated.
Deactivated groups
New enrollment into a deactivated group returns 400. Reactivate the group with Update Agent Group first.
Re-enrolling after unenrollment
A user who was unenrolled and is enrolled again receives a fresh instance: a new agent, wallet, and key. The old instance stays deactivated, and its wallet remains reachable through Get Agent Group Agents with includeUnenrolled=true.
Failed provisioning
If wallet provisioning fails, nothing is created and the error is returned. A retry is safe. In the rare case that two enrollments of the same user race, one wins and the other returns 200 with that enrollment, so a user never ends up with two instances of the same group.

