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

# Create a contact

> Creates a contact in a Space: a record keyed on the Space's base record identity fields, plus a contact folder. An existing folder returns 409. If the Space's base record is set to create sign-ins, a client-role user may also be created for the contact's email; the response says `login_created` or `login_skipped`.



## OpenAPI

````yaml /api-reference/endpoint/workspaces/openapi.json post /workspaces/client
openapi: 3.0.3
info:
  title: Workspaces Service API
  version: 1.0.0
  description: API for managing workspaces, tasks, and comments
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /workspaces/client:
    post:
      summary: Create a contact
      description: >-
        Creates a contact in a Space: a record keyed on the Space's base record
        identity fields, plus a contact folder. An existing folder returns 409.
        If the Space's base record is set to create sign-ins, a client-role user
        may also be created for the contact's email; the response says
        `login_created` or `login_skipped`.
      operationId: createContact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContactRequest'
      responses:
        '200':
          description: >-
            The created contact record, with `login_created` and, when no
            sign-in was made, `login_skipped`.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  login_created:
                    type: boolean
                  login_skipped:
                    type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          description: '`space_id` does not name an existing Space.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  schemas:
    CreateContactRequest:
      type: object
      required:
        - space_id
      properties:
        space_id:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
        phone:
          type: string
        parent_folder:
          type: string
          description: Folder of the organisation the contact belongs to.
        config_id:
          type: string
          description: >-
            Writes the Space's organisation record config instead of its base
            record.
        extra_data:
          type: object
          additionalProperties: true
      description: Fields depend on the Space's base record configuration.
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code. Branch on this, not on `error`.
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.