> ## 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 https://app.loops.so/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.21.6
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: Configuration
    description: View configuration settings
  - name: Contacts
    description: Manage contacts in your audience
  - name: Contact properties
    description: Manage contact properties
  - name: Components
    description: View email components
  - 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
  - name: Webhooks
    description: >-
      Events Loops sends to your configured webhook endpoint when certain events
      happen in your account. Configure an endpoint in Settings → Webhooks. Each
      account supports one webhook endpoint. Events are signed with
      `webhook-id`, `webhook-timestamp`, and `webhook-signature` headers and
      delivered at a maximum rate of 10 per second. See
      https://loops.so/docs/webhooks for setup, verification, and payload
      details.
paths:
  /v1/contacts/create:
    post:
      tags:
        - Contacts
      summary: Create a contact
      description: Add a contact to your audience.
      operationId: createContact
      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
          examples:
            - clh3k9m2p4q6r8s0t2v4x6z8
      required:
        - success
        - id
      examples:
        - success: true
          id: clh3k9m2p4q6r8s0t2v4x6z8
    ContactFailureResponse:
      type: object
      properties:
        success:
          type: boolean
          examples:
            - false
        message:
          type: string
          examples:
            - Invalid email address.
      required:
        - success
        - message
      examples:
        - success: false
          message: Invalid email address.
    ContactFields:
      type: object
      properties:
        email:
          type: string
          description: The contact's email address.
          examples:
            - alex@company.com
        firstName:
          type: string
          description: The contact's first name.
          examples:
            - Alex
        lastName:
          type: string
          description: The contact's last name.
          examples:
            - Rivera
        source:
          type: string
          description: A custom source value to replace the default “API”.
          examples:
            - 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: The contact's user group.
          examples:
            - customers
        userId:
          type: string
          description: A unique user ID (for example, from an external application).
          examples:
            - usr_7f8e9d0c1b2a
        mailingLists:
          $ref: '#/components/schemas/MailingListSubscriptions'
      additionalProperties:
        oneOf:
          - type: string
          - type: number
          - type: boolean
      examples:
        - email: alex@company.com
          firstName: Alex
          lastName: Rivera
          subscribed: true
          userGroup: customers
          userId: usr_7f8e9d0c1b2a
          mailingLists:
            clm2k8j4h6g0f8d6s4a2b0z8: true
          favoriteColor: blue
    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

````

## Related topics

- [Contacts API examples](/docs/api-reference/examples/contacts.md)
- [Bubble integration](/docs/integrations/bubble.md)
- [Export contacts](/docs/contacts/export-contacts.md)
- [Contact properties](/docs/contacts/properties.md)
- [Integrately](/docs/integrations/integrately.md)
