---
updatedAt: 2026-09-08T20:12:48.000Z
agentTools:
  projectIndex: https://docs.skyfire.xyz/llms.txt
---

# Create Organization User Seller Agent

As an Organization Admin, create a seller agent for a user in your organization.

Authenticate with an **Organization Admin User API key**, sent in the `skyfire-api-key` header. Keys belonging to callers whose organization role is `ADMIN` are accepted; a `MEMBER` key, or any Agent API key, is rejected with `401`.

The user identified by `userId` must belong to your organization and must be active. A user from another organization is reported as `404`, and a deactivated user returns `400`.

### What this call creates

A single request creates:

1. A **seller agent** owned by the user, with the `displayName` you supply.
2. A **wallet** for that agent.
3. An **API key** for that agent, returned as `apiKey`.

> `apiKey` is returned **only in this response** and cannot be retrieved again. Store it securely before discarding the response.

### One seller agent per user

Each organization user can own at most one seller agent. Calling this endpoint for a user who already has one returns `400`, and the existing agent is left untouched. To give an organization several seller agents, create a separate user for each.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "skyfire-agent-and-token-apis",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.skyfire.xyz"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "skyfire-api-key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v1/organizations/users/{userId}/agents/seller": {
      "post": {
        "summary": "Create Organization User Seller Agent",
        "description": "As an Organization Admin, create a seller agent for a user in your organization.",
        "operationId": "create-enterprise-user-2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "displayName"
                ],
                "properties": {
                  "displayName": {
                    "type": "string",
                    "description": "Label for the new seller agent. Does not have to be unique. e.g. `\"Chloe Cupcakes\"`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/json": {
                "examples": {
                  "Ok": {
                    "value": {
                      "id": "b7c1f2a4-6d38-4e91-9c05-2f8ad4e7b613",
                      "apiKey": "d92e5c07-13ab-4f6e-8a24-71c0be3d9f45"
                    },
                    "summary": "Ok"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "906fc259-ef0a-4736-bdcd-c1d5a78db483",
                      "description": "Unique identifier of the created seller agent."
                    },
                    "apiKey": {
                      "type": "object",
                      "properties": {},
                      "description": "API key for the seller agent. Returned only in this response and cannot be retrieved again, store it securely."
                    }
                  },
                  "required": [
                    "id",
                    "apiKey"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "examples": {
                  "Bad Request ": {
                    "value": {
                      "code": "BAD_REQUEST",
                      "message": "Agent already exists"
                    },
                    "summary": "Bad Request "
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "BAD_REQUEST"
                    },
                    "message": {
                      "type": "string",
                      "example": "Cannot create organization user. Organization user with email ankit+skyfire-enterprise-admin-user-2@skyfire.xyz already exists"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Unauthorized": {
                    "summary": "Unauthorized",
                    "value": {
                      "code": "NOT_AUTHORIZED",
                      "message": "Invalid Organization User API Key"
                    }
                  }
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Not Found": {
                    "summary": "Not Found",
                    "value": {
                      "code": "NOT_FOUND",
                      "message": "User not found"
                    }
                  }
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "examples": {
                  "": {
                    "value": "{\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Validation Error\",\n    \"details\": {\n        \"request.email\": {\n            \"message\": \"Must be a valid email address\"\n        }\n    }\n}",
                    "summary": ""
                  },
                  "Unprocessable Entity": {
                    "summary": "Unprocessable Entity",
                    "value": {
                      "code": "VALIDATION_ERROR",
                      "message": "Validation Error",
                      "details": {
                        "userId": {
                          "message": "Must be a valid UUID"
                        }
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "VALIDATION_ERROR"
                    },
                    "message": {
                      "type": "string",
                      "example": "Validation Error"
                    },
                    "details": {
                      "type": "object",
                      "properties": {
                        "request.email": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "example": "Must be a valid email address"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -i -X POST 'https://api.skyfire.xyz/api/v1/organizations/users/906fc259-ef0a-4736-bdcd-c1d5a78db483/agents/seller' \\\n-H 'skyfire-api-key: 039695d8-bb96-408d-b31a-6afddf0c33cb' \\\n-H 'Content-Type: application/json' \\\n-d '{\n  \"displayName\": \"Chloe Cupcakes\"\n}'"
            },
            {
              "language": "node",
              "code": "var https = require('follow-redirects').https;\nvar fs = require('fs');\nvar userId = '906fc259-ef0a-4736-bdcd-c1d5a78db483';\nvar options = {\n  'method': 'POST',\n  'hostname': 'api.skyfire.xyz',\n  'path': '/api/v1/organizations/users/' + userId + '/agents/seller',\n  'headers': {\n    'skyfire-api-key': '039695d8-bb96-408d-b31a-6afddf0c33cb',\n    'Content-Type': 'application/json'\n  },\n  'maxRedirects': 20\n};\n\nvar req = https.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function (chunk) {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n\n  res.on(\"error\", function (error) {\n    console.error(error);\n  });\n});\n\nvar postData = JSON.stringify({\n  \"displayName\": \"Chloe Cupcakes\"\n});\n\nreq.write(postData);\n\nreq.end();"
            },
            {
              "language": "python",
              "code": "import http.client\nimport json\nuser_id = \"906fc259-ef0a-4736-bdcd-c1d5a78db483\"\nconn = http.client.HTTPSConnection(\"api.skyfire.xyz\")\npayload = json.dumps({\n  \"displayName\": \"Chloe Cupcakes\"\n})\nheaders = {\n  'skyfire-api-key': '039695d8-bb96-408d-b31a-6afddf0c33cb',\n  'Content-Type': 'application/json'\n}\nconn.request(\"POST\", f\\\"/api/v1/organizations/users/{user_id}/agents/seller\\\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))"
            }
          ],
          "samples-languages": [
            "curl",
            "node",
            "python"
          ]
        },
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Unique identifier of the organization user who will own the seller agent. Must be a user in your own organization. e.g. `58dbc331-c32a-4d65-8157-e11a59e5790d`."
          }
        ],
        "x-internal": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "skyfire-api-key",
        "value": "<Your Skyfire Agent Account API Key>"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```