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

# Create a contact

> Creates a single contact in the database. This endpoint expects a top-level `attributes` object. For bulk uploads, use `PUT /management/contacts/bulk`, which expects `contacts[].attributes[]` instead. Each contact must have a valid email address in the attributes. All attribute keys must already exist in the environment. The email is used as the unique identifier along with the environment.



## OpenAPI

````yaml /api-v2-reference/openapi.yml post /management/contacts
openapi: 3.1.0
info:
  title: Formbricks API
  description: Manage Formbricks resources programmatically.
  version: 2.0.0
servers:
  - url: https://app.formbricks.com/api/v2
    description: Formbricks Cloud
security:
  - apiKeyAuth: []
tags:
  - name: Health
    description: Operations for checking critical application dependencies health status.
  - name: Roles
    description: Operations for managing roles.
  - name: Me
    description: Operations for managing your API key.
  - name: Management API - Responses
    description: Operations for managing responses.
  - name: Management API - Contacts
    description: Operations for managing contacts.
  - name: Management API - Contact Attributes
    description: Operations for managing contact attributes.
  - name: Management API - Contact Attribute Keys
    description: Operations for managing contact attribute keys.
  - name: Management API - Surveys
    description: Operations for managing surveys.
  - name: Management API - Surveys - Contact Links
    description: Operations for generating personalized survey links for contacts.
  - name: Management API - Webhooks
    description: Operations for managing webhooks.
  - name: Organizations API - Teams
    description: Operations for managing teams.
  - name: Organizations API - Project Teams
    description: Operations for managing project teams.
  - name: Organizations API - Users
    description: Operations for managing users.
paths:
  /management/contacts:
    post:
      tags:
        - Management API - Contacts
      summary: Create a contact
      description: >-
        Creates a single contact in the database. This endpoint expects a
        top-level `attributes` object. For bulk uploads, use `PUT
        /management/contacts/bulk`, which expects `contacts[].attributes[]`
        instead. Each contact must have a valid email address in the attributes.
        All attribute keys must already exist in the environment. The email is
        used as the unique identifier along with the environment.
      operationId: createContact
      requestBody:
        required: true
        description: >-
          The single contact to create. Must include a top-level `attributes`
          object with an email attribute, and all attribute keys must already
          exist in the environment.
        content:
          application/json:
            schema:
              type: object
              properties:
                environmentId:
                  type: string
                attributes:
                  type: object
                  additionalProperties:
                    type: string
              required:
                - environmentId
                - attributes
            example:
              environmentId: env_01h2xce9q8p3w4x5y6z7a8b9c0
              attributes:
                email: john.doe@example.com
                firstName: John
                lastName: Doe
                userId: h2xce9q8p3w4x5y6z7a8b9c1
      responses:
        '201':
          description: Contact created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                  environmentId:
                    type: string
                  attributes:
                    type: object
                    additionalProperties:
                      type: string
              example:
                id: ctc_01h2xce9q8p3w4x5y6z7a8b9c2
                createdAt: '2023-01-01T12:00:00.000Z'
                environmentId: env_01h2xce9q8p3w4x5y6z7a8b9c0
                attributes:
                  email: john.doe@example.com
                  firstName: John
                  lastName: Doe
                  userId: h2xce9q8p3w4x5y6z7a8b9c1
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Use your Formbricks x-api-key to authenticate.

````