Create Organization User

Changed on

As an Organization Admin, create a new user in your organization, with a buyer agent, wallet, and API key. Optionally enroll the user in an agent group, making the buyer agent their instance of it. A duplicate email is rejected with 409 before anything is provisioned.

post/api/v1/organizations/users

Request

  • Base URL
    https://api.skyfire.xyz
  • URL
    https://api.skyfire.xyz/api/v1/organizations/users
  • Auth
    API key in header skyfire-api-key

Request body

emailstring required

Email address of the new organization user. Must be unique within your organization. e.g. chloe@gmail.com

role'MEMBER' | 'ADMIN' required

Organization role for the new user. MEMBER creates a standard organization user. ADMIN creates an Organization Admin, which additionally returns userApiKey in the response.

agentGroupIdstring uuid

Enroll the new user in this agent group. The buyer agent is then the user's instance of the group, named after it, instead of an ungrouped Buyer 1. The group must belong to your organization and be active.

Response

Ok

userIdstring required

Unique identifier of the newly created organization user.

userApiKeystring

Organization Admin API key for the new user. Present only when role is ADMIN; for MEMBER the field is omitted from the body rather than returned as null. Returned only in this response and cannot be retrieved again, store it securely.

Example response

{
  "userId": "906fc259-ef0a-4736-bdcd-c1d5a78db483",
  "buyerAgent": {
    "id": "5d084831-4a11-4970-bf62-bb6fc0b9f3a2",
    "apiKey": "aff074ee-ea8b-4643-bad1-913a534a5d7a"
  }
}

Changes

    • breaking

      request body became required

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status