> ## Documentation Index
> Fetch the complete documentation index at: https://developers.everflow.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Affiliate User

Create a new user account for a specific affiliate. The user will receive an email asking to set their password unless an initial password is provided.


## OpenAPI

````yaml /openapi/affiliate-users.yaml post /networks/affiliates/{affiliateId}/users
openapi: 3.0.3
info:
  title: Everflow Network API - Affiliate Users
  description: >
    Endpoints for managing affiliate (partner) user accounts from the network
    level. Affiliate users are individual people who belong to a partner
    account. Networks can create, update, and retrieve these users to control
    who has access to the partner portal.
  version: 1.0.0
servers:
  - url: https://api.eflow.team/v1
security: []
tags:
  - name: Affiliate Users
paths:
  /networks/affiliates/{affiliateId}/users:
    post:
      tags:
        - Affiliate Users
      summary: Create Affiliate User
      parameters:
        - in: path
          name: affiliateId
          required: true
          schema:
            type: integer
          description: The ID of the affiliate for whom to create a user.
        - in: query
          name: notification
          schema:
            type: boolean
            default: true
          description: >-
            Whether to send a welcome notification email to the user. Defaults
            to `true` when omitted.
      requestBody:
        required: true
        content:
          application/json:
            example:
              first_name: Bob
              last_name: Smith
              email: aff.user.doctest.new@example.com
              language_id: 1
              timezone_id: 90
              currency_id: USD
              account_status: active
              initial_password: ''
              title: CEO
              work_phone: '1234567788'
              instant_messaging_id: 0
            schema:
              type: object
              required:
                - first_name
                - last_name
                - email
                - language_id
                - timezone_id
                - currency_id
                - account_status
              properties:
                first_name:
                  type: string
                  description: The affiliate user's first name.
                last_name:
                  type: string
                  description: The affiliate user's last name.
                email:
                  type: string
                  description: >-
                    The affiliate user's email. Must be unique among all
                    affiliate users. Is used to log in the platform.
                language_id:
                  type: integer
                  description: >-
                    The affiliate user's language ID. This is limited to the
                    value `1` (English).
                timezone_id:
                  type: integer
                  description: >
                    The affiliate user's timezone ID. Can be found using the
                    [metadata API](/api-reference/get-metatimezones).
                title:
                  type: string
                  description: The affiliate user's title.
                work_phone:
                  type: string
                  description: The affiliate user's work phone number.
                cell_phone:
                  type: string
                  description: The affiliate user's cell phone number.
                instant_messaging_id:
                  type: integer
                  description: >
                    The ID of an instant messaging platform. Allows you to save
                    their identifier for further reference. `0` = None, `1` =
                    Skype, `2` = Yahoo Messenger, `3` = Telegram, `4` =
                    WhatsApp, `5` = Other.
                instant_messaging_identifier:
                  type: string
                  description: >-
                    The affiliate user's instant messaging identifier, if
                    `instant_messaging_id` was different than `0`.
                currency_id:
                  type: string
                  description: >
                    The affiliate user's currency ID. Can be found using the
                    [metadata API](/api-reference/get-metacurrencies).
                account_status:
                  type: string
                  enum:
                    - active
                    - inactive
                  description: >-
                    The affiliate user's account status. Can be either `active`
                    or `inactive`.
                initial_password:
                  type: string
                  description: >
                    The affiliate user's login password. If left empty, the
                    affiliate will be sent an email asking to set their
                    password. If supplied, the password must have a length of at
                    least 12 characters.
      responses:
        '200':
          description: ''
          content:
            application/json:
              example:
                network_affiliate_user_id: 166
                network_id: 1
                network_affiliate_id: 36
                first_name: Jane
                last_name: Doe
                email: jane.doe@example.com
                title: ''
                work_phone: ''
                cell_phone: ''
                instant_messaging_id: 0
                instant_messaging_identifier: ''
                language_id: 1
                timezone_id: 90
                currency_id: USD
                account_status: active
                time_created: 1774701394
                time_saved: 1774701394
                relationship:
                  affiliate_account_status: active
              schema:
                $ref: '#/components/schemas/AffiliateUser'
      security:
        - API Key: []
components:
  schemas:
    AffiliateUser:
      type: object
      properties:
        network_affiliate_user_id:
          type: integer
          description: Unique affiliate user ID.
        network_id:
          type: integer
          description: The network ID this user belongs to.
        network_affiliate_id:
          type: integer
          description: The affiliate ID this user belongs to.
        first_name:
          type: string
          description: The affiliate user's first name.
        last_name:
          type: string
          description: The affiliate user's last name.
        email:
          type: string
          description: The affiliate user's email address. Is used to log in the platform.
        title:
          type: string
          description: The affiliate user's title.
        work_phone:
          type: string
          description: The affiliate user's work phone number.
        cell_phone:
          type: string
          description: The affiliate user's cell phone number.
        instant_messaging_id:
          type: integer
          description: The ID of an instant messaging platform.
        instant_messaging_identifier:
          type: string
          description: The affiliate user's instant messaging identifier.
        language_id:
          type: integer
          description: The affiliate user's language ID.
        timezone_id:
          type: integer
          description: The affiliate user's timezone ID.
        currency_id:
          type: string
          description: The affiliate user's currency ID.
        account_status:
          type: string
          enum:
            - active
            - inactive
          description: >-
            The affiliate user's account status. Can be either `active` or
            `inactive`.
        relationship:
          type: object
          nullable: true
          description: >
            Related data for this affiliate user. Populate by passing
            `relationship` query parameters (e.g.
            `?relationship=logins&relationship=api`).
          properties:
            logins:
              type: object
              description: Login history for this user.
              properties:
                total:
                  type: integer
                  description: Total number of login records.
                entries:
                  type: array
                  description: List of login records.
                  items:
                    type: object
            customization:
              type: object
              description: User customization settings.
            audits:
              type: object
              description: Audit history for this user.
              properties:
                total:
                  type: integer
                  description: Total number of audit records.
                entries:
                  type: array
                  description: List of audit records.
                  items:
                    type: object
            api:
              type: object
              description: API key and whitelisted IPs for this user.
              properties:
                total:
                  type: integer
                  description: Total number of API key records.
                entries:
                  type: array
                  description: List of API key records.
                  items:
                    type: object
            affiliate_account_status:
              type: string
              description: >
                The account status of the affiliate this user belongs to. Always
                included in the response, even without requesting the
                `affiliate_status` relationship.
        time_created:
          type: integer
          example: 1734455015
          description: Unix timestamp of when the user was created.
        time_saved:
          type: integer
          example: 1734455015
          description: Unix timestamp of when the user was last updated.
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey

````