Add or Edit User
Create a new user or update an existing user's information.
Endpoint
POST /api/user
Request Body
{
"id": "string", // Optional - Include for updates
"email": "string",
"firstName": "string",
"lastName": "string",
"role": "string",
"platformId": "string",
"profileImage": "string",
"bannerImage": "string",
"bio": "string",
"groupIds": ["string"],
"isActive": boolean,
"isVerified": boolean
}
Response
{
"id": "string",
"email": "string",
"firstName": "string",
"lastName": "string",
"role": "string",
"platformId": "string",
"profileImage": "string",
"bannerImage": "string",
"bio": "string",
"groups": [
{
"id": "string",
"name": "string"
}
],
"isActive": boolean,
"isVerified": boolean,
"createdAt": "string",
"updatedAt": "string"
}
Notes
- If an
idis provided in the request body, the endpoint will update the existing user - If no
idis provided, a new user will be created - The
rolefield must be one of: "user", "admin", "creator" - Email addresses must be unique within a platform