> ## Documentation Index
> Fetch the complete documentation index at: https://studio.assembly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a client

> Creates a client. Requires givenName, familyName, email, and a company
association (companyId, or companyIds in multi-company portals). Set the
`sendInvite=true` query param to email the client an invite on creation.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/clients
openapi: 3.0.0
info:
  contact: {}
  title: Assembly API
  version: 0.0.1
servers:
  - url: https://api.assembly.com
security: []
paths:
  /v1/clients:
    post:
      tags:
        - Clients
      summary: Create a client
      description: |-
        Creates a client. Requires givenName, familyName, email, and a company
        association (companyId, or companyIds in multi-company portals). Set the
        `sendInvite=true` query param to email the client an invite on creation.
      operationId: create-client
      parameters:
        - description: Send the client an invite email on creation
          in: query
          name: sendInvite
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api.CreateClientInput'
        description: Client to create
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ClientItem'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Invalid request body or field values
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Unexpected server error
      security:
        - APIKeyHeader: []
components:
  schemas:
    api.CreateClientInput:
      properties:
        companyId:
          description: CompanyID associates the client with a single company.
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        customFields:
          additionalProperties:
            nullable: true
            oneOf:
              - description: >-
                  Value for text, number (numeric string), email, url, and
                  phoneNumber fields.
                type: string
              - description: Selected option IDs for multiSelect fields.
                items:
                  type: string
                type: array
              - description: Structured value for address fields.
                properties:
                  addressLine1:
                    type: string
                  addressLine2:
                    type: string
                  city:
                    type: string
                  country:
                    type: string
                  fullAddress:
                    type: string
                  postalCode:
                    type: string
                  region:
                    type: string
                type: object
          description: CustomFields holds custom field values keyed by custom field key.
          type: object
        email:
          description: Email is the client's email address.
          example: jane@example.com
          format: email
          type: string
        familyName:
          description: FamilyName is the client's last name.
          example: Doe
          type: string
        givenName:
          description: GivenName is the client's first name.
          example: Jane
          type: string
      required:
        - email
        - familyName
        - givenName
      type: object
    api.ClientItem:
      properties:
        avatarImageUrl:
          description: AvatarImageUrl is the URL of the client's avatar image. Read-only.
          example: https://portal.example.com/avatars/alex.png
          format: uri
          type: string
        companyId:
          description: >-
            CompanyID is the ID of the company the client belongs to. In
            multi-company portals see companyIds.
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        companyIds:
          description: >-
            CompanyIDs lists every company the client belongs to in
            multi-company portals.
          items:
            type: string
          type: array
        createdAt:
          description: Created is the RFC 3339 timestamp at which the object was created.
          example: '2024-01-15T09:30:00Z'
          format: date-time
          type: string
        creationMethod:
          description: CreationMethod records how the client was created. Read-only.
          enum:
            - client
            - directSignUp
            - import
            - internalUser
          example: client
          type: string
        customFields:
          additionalProperties:
            nullable: true
            oneOf:
              - description: >-
                  Value for text, number (numeric string), email, url, and
                  phoneNumber fields.
                type: string
              - description: Selected option IDs for multiSelect fields.
                items:
                  type: string
                type: array
              - description: Structured value for address fields.
                properties:
                  addressLine1:
                    type: string
                  addressLine2:
                    type: string
                  city:
                    type: string
                  country:
                    type: string
                  fullAddress:
                    type: string
                  postalCode:
                    type: string
                  region:
                    type: string
                type: object
          description: >-
            CustomFields holds custom field values for the client, keyed by
            custom field key.
          type: object
        deleted:
          description: >-
            Deleted is true when the object has been deleted; present only on
            delete responses.
          example: true
          type: boolean
        email:
          description: >-
            Email is the client's email address, used as the unique login
            identifier within the portal.
          example: alex.morgan@example.com
          format: email
          type: string
        fallbackColor:
          description: >-
            FallbackColor is the hex color (e.g. "#4F46E5") used as the avatar
            background when

            no avatar image is set. The native pattern documents intent; the
            constraint is

            re-applied to the spec by the enrich-openapi post-processing step.
          example: '#4F46E5'
          pattern: ^#[0-9a-fA-F]{6}$
          type: string
        familyName:
          description: FamilyName is the client's last (family) name.
          example: Morgan
          type: string
        firstLoginDate:
          description: FirstLogin is the timestamp of the client's first login. Read-only.
          example: '2024-01-15T09:30:00Z'
          nullable: true
          type: string
        givenName:
          description: GivenName is the client's first (given) name.
          example: Alex
          type: string
        id:
          description: ID is the unique identifier of the object.
          example: 550e8400-e29b-41d4-a716-446655440000
          type: string
        inviteUrl:
          description: >-
            InviteUrl is the one-time invite link, returned only when an invite
            has just been sent. Read-only.
          example: https://portal.example.com/invite/abc123
          format: uri
          type: string
        invitedBy:
          description: >-
            InvitedBy is the ID of the internal user who invited the client,
            when applicable. Read-only.
          example: 550e8400-e29b-41d4-a716-446655440001
          type: string
        lastLoginDate:
          description: >-
            LastLogin is the timestamp of the client's most recent login.
            Read-only.
          example: '2024-02-20T14:05:00Z'
          nullable: true
          type: string
        object:
          allOf:
            - $ref: '#/components/schemas/constants.ApiObject'
          description: Object is the type of the object (e.g. "client", "company").
        status:
          description: Status is the client's lifecycle status. Server-managed (read-only).
          enum:
            - unknown
            - deleted
            - active
            - notInvited
            - invited
          example: active
          type: string
        updatedAt:
          description: >-
            Updated is the RFC 3339 timestamp at which the object was last
            updated.
          example: '2024-02-20T14:05:00Z'
          format: date-time
          type: string
      type: object
    dispatcher.Error:
      properties:
        code:
          type: string
        data: {}
        message:
          type: string
      type: object
    constants.ApiObject:
      enum:
        - client
        - internalUser
        - company
        - customField
        - customFieldOption
        - file
        - fileChannel
        - folder
        - messageChannel
        - message
        - notification
      type: string
      x-enum-varnames:
        - ApiObjectClient
        - ApiObjectInternalUser
        - ApiObjectCompany
        - ApiObjectCustomField
        - ApiObjectCustomFieldOption
        - ApiObjectFile
        - ApiObjectFileChannel
        - ApiObjectFolder
        - ApiObjectMessageChannel
        - ApiObjectMessage
        - ApiObjectNotification
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-KEY
      type: apiKey

````