# Create User

When an end-user starts a conversation in the Fin Messenger and there is no information about them in the third party we request a new record be created.

Endpoint: POST /create_user
Version: 0.0.1
Security: BearerAuth

## Security:

  - `BearerAuth` (unknown)
    oauth2

## Request fields (application/json):

  - `name` (string)
    User's name (may not be known at creation time)
    Example: Jane Doe

  - `email` (string)
    User's email (may not be known at creation time)
    Example: jane.doe@example.com

  - `object_id` (string)
    Unique identifier for the user in our system
    Example: 123456

  - `attributes` (object)
    Attributes associated with the end-user
    Example: {"plan_type":"enterprise","signup_date":"2024-01-15","is_premium":true}

## Response 201:

  - `201` (unknown)
    End-user created successfully

## Response 201 fields (application/json):

  - `id` (string, required)
    Unique identifier for the user in your system
    Example: user_123456

  - `user_type` (string, required)
    Type of user
    Enum: "end_user"

  - `name` (string)
    User's display name
    Example: Jane Doe

  - `email` (string)
    User's email address
    Example: jane.doe@example.com

  - `photo_url` (string)
    URL to user's avatar/profile picture (displayed in Fin Messenger)
    Example: https://example.com/avatars/jane.jpg

  - `attributes` (object)
    Attributes associated with the end-user
    Example: {"plan_type":"enterprise","signup_date":"2024-01-15","is_premium":true}

## Response 201 examples:

  - `End-user created successfully` (unknown)

  - `Bad Request` (unknown)

