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

# Create a contact

> Add a contact to your audience.

<Tip>If you want to "update or create" contacts, consider using the [Update a contact](https://loops.so/docs/api-reference/update-contact) endpoint instead.</Tip>


## OpenAPI

````yaml /openapi.json post /v1/contacts/create
openapi: 3.1.0
info:
  title: Loops OpenAPI Spec
  description: This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api).
  version: 1.20.0
servers:
  - url: https://app.loops.so/api
security: []
tags:
  - name: API key
  - name: Audience segments
    description: View audience segments
  - name: Campaigns
    description: Create and manage email campaigns
  - name: Campaign groups
    description: Organize campaigns into groups
  - name: Components
    description: View email components
  - name: Configuration
    description: View configuration settings
  - name: Contacts
    description: Manage contacts in your audience
  - name: Contact properties
    description: Manage contact properties
  - name: Email messages
    description: Manage email message content for campaigns
  - name: Events
    description: Trigger workflows with events
  - name: Event patterns
    description: View workflow event patterns
  - name: Mailing lists
    description: View mailing lists
  - name: Themes
    description: View email themes
  - name: Transactional emails
    description: Create, manage, and send transactional emails
  - name: Transactional groups
    description: Organize transactional emails into groups
  - name: Uploads
    description: Upload image assets
  - name: Workflows
    description: View and mutate workflow graphs
  - name: Workflow nodes
    description: View and mutate workflow nodes
paths:
  /v1/contacts/create:
    post:
      tags:
        - Contacts
      summary: Create a contact
      description: Add a contact to your audience.
      requestBody:
        description: >-
          You can add custom contact properties as keys in this request (of type
          `string`, `number`, `boolean` or `date`. [See available date
          formats](https://loops.so/docs/contacts/properties#dates)). Make sure
          to create the properties in Loops before using them in API calls.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactRequest'
        required: true
      responses:
        '200':
          description: Successful create.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactSuccessResponse'
        '400':
          description: Bad request (e.g. invalid email address).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactFailureResponse'
        '405':
          description: Wrong HTTP request method.
        '409':
          description: Email or `userId` already exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactFailureResponse'
      security:
        - apiKey: []
components:
  schemas:
    ContactRequest:
      allOf:
        - $ref: '#/components/schemas/ContactFields'
        - type: object
          required:
            - email
    ContactSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          examples:
            - true
        id:
          type: string
      required:
        - success
        - id
    ContactFailureResponse:
      type: object
      properties:
        success:
          type: boolean
          examples:
            - false
        message:
          type: string
      required:
        - success
        - message
    ContactFields:
      type: object
      properties:
        email:
          type: string
          description: The contact's email address.
        firstName:
          type: string
          description: The contact's first name.
        lastName:
          type: string
          description: The contact's last name.
        source:
          type: string
          description: A custom source value to replace the default “API”.
        subscribed:
          type: boolean
          description: >-
            Whether the contact will receive campaign and workflow emails. All
            new contacts are subscribed by default.
        userGroup:
          type: string
          description: >-
            You can use groups to segment users when sending emails. Currently,
            a contact can only be in one user group. [Read
            more](/contacts/properties#user-group)
        userId:
          type: string
          description: A unique user ID (for example, from an external application).
        mailingLists:
          $ref: '#/components/schemas/MailingListSubscriptions'
      additionalProperties:
        oneOf:
          - type: string
          - type: number
          - type: boolean
    MailingListSubscriptions:
      type: object
      description: >-
        Manage mailing list subscriptions.


        Include key-value pairs of mailing list IDs and a `boolean` denoting if
        the contact should be added (`true`) or removed (`false`) from the list.
      examples:
        - cm06f5v0e45nf0ml5754o9cix: true
          cm16k73gq014h0mmj5b6jdi9r: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````