Skip to main content
POST
/
users
cURL
curl --request POST \
  --url https://www.greenflash.ai/api/v1/users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "externalUserId": "user-123",
  "externalOrganizationId": "org-456",
  "name": "Alice Example",
  "email": "alice@example.com",
  "phone": "+15551234567",
  "anonymized": false,
  "properties": {
    "plan": "premium"
  }
}
'
{
  "success": true,
  "participant": {
    "id": "part-001",
    "externalId": "user-123",
    "organizationId": "org-001",
    "externalOrganizationId": "org-456",
    "name": "Alice Example",
    "email": "alice@example.com",
    "phone": "+15551234567",
    "anonymized": false,
    "properties": {
      "plan": "premium"
    },
    "createdAt": "2025-07-01T12:00:00Z",
    "updatedAt": "2025-07-01T12:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request payload for creating a new user profile.

externalUserId
string
required

Your unique identifier for the user. Use this same ID in other API calls to reference this user.

organizationId
string<uuid>

The Greenflash organization ID that the user belongs to.

externalOrganizationId
string

Your unique identifier for the organization this user belongs to. If provided, the user will be associated with this organization.

name
string

The user's full name.

email
string<email>

The user's email address.

phone
string

The user's phone number.

anonymized
boolean

Whether to anonymize the user's personal information. Defaults to false.

properties
object

Additional data about the user (e.g., plan type, preferences).

Response

User profile created or updated successfully

Success response for user creation.

success
boolean
required

Whether the API call was successful.

participant
object
required

The user profile.