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

# Create or update a Contact

> Creates a Contact or updates the matching Contact, then returns the persisted Contact. Resolve an existing person using id or target; provide phone or email to create one when no person is found. Provided top-level fields replace existing values; use PATCH for nested merges. See [Contact fields](https://vida.io/docs/api-reference/platform-guides/contacts-and-objectives#contact-fields) for the complete field reference.



## OpenAPI

````yaml post /api/v2/contact
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
tags:
  - name: Agents
  - name: Apps
    description: Install Vida apps and use their enabled integration functions.
  - name: Integrations
    description: Configure Vader integrations.
  - name: Inbound Email
    description: Control which senders may create inbound email work for an Agent.
  - name: Features
    description: Inspect capabilities available within an account hierarchy.
  - name: Conversation Logs
    description: Query conversation activity and calculate account-level metrics.
  - name: Computer Agents
    description: Set up, configure, inspect, and manage Vida Computer Agents.
  - name: Computer Agent Sessions
    description: View and reset Computer Agent sessions.
  - name: Accounts
  - name: Agent Templates
    description: Create, manage, and apply reusable Agent configurations.
paths:
  /api/v2/contact:
    post:
      tags:
        - Contacts
      summary: Create or update a Contact
      description: >-
        Creates a Contact or updates the matching Contact, then returns the
        persisted Contact. Resolve an existing person using id or target;
        provide phone or email to create one when no person is found. Provided
        top-level fields replace existing values; use PATCH for nested merges.
        See [Contact
        fields](https://vida.io/docs/api-reference/platform-guides/contacts-and-objectives#contact-fields)
        for the complete field reference.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactCreate'
            example:
              phone: '+15551234567'
              name: Example Person
              email: lead@example.com
              address:
                state: LA
                zip: '71101'
              customFields:
                vendorLeadCode: lead-123
      responses:
        default:
          description: ''
      security:
        - apiKeyAuth: []
components:
  schemas:
    ContactCreate:
      type: object
      additionalProperties: false
      description: >-
        Create or update an organization Contact. Supply id or target to resolve
        an existing person, or phone/email to create one. Fields are sent
        directly in the body, not inside meta.contact. Provided top-level values
        replace existing values; prefer PATCH for nested merges or deleting a
        field.
      properties:
        id:
          oneOf:
            - type: string
            - type: integer
          description: Existing Contact identifier. Takes precedence over target.
        target:
          type: string
          description: >-
            Existing person identifier, phone number or Vida username. If
            unresolved, provide phone or email to create a Contact.
        name:
          type: string
          nullable: true
          example: Example Person
        title:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
          example: lead@example.com
        phone:
          type: string
          nullable: true
          example: '+15551234567'
        cnam:
          type: string
          nullable: true
          description: >-
            Organization Contact display data only; does not change outbound
            caller ID.
        mobile:
          type: string
          nullable: true
        birthday:
          type: string
          nullable: true
        gender:
          type: string
          nullable: true
        image:
          type: string
          nullable: true
        address:
          type: object
          nullable: true
          additionalProperties: false
          properties:
            street:
              type: string
              nullable: true
            city:
              type: string
              nullable: true
            state:
              type: string
              nullable: true
            zip:
              type: string
              nullable: true
              example: '07101'
            country:
              type: string
              nullable: true
        company:
          type: object
          nullable: true
          additionalProperties: false
          properties:
            name:
              type: string
              nullable: true
            industry:
              type: string
              nullable: true
            position:
              type: string
              nullable: true
            website:
              type: string
              nullable: true
            address:
              type: string
              nullable: true
        preferredContactMethod:
          type: string
          nullable: true
        marketingOptIn:
          type: boolean
          nullable: true
        contactSource:
          type: string
          nullable: true
        socialMedia:
          type: object
          nullable: true
          additionalProperties: false
          properties:
            linkedin:
              type: string
              nullable: true
            twitter:
              type: string
              nullable: true
            facebook:
              type: string
              nullable: true
            instagram:
              type: string
              nullable: true
        leadSource:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
        tags:
          type: array
          nullable: true
          items:
            type: string
        notes:
          type: string
          nullable: true
        agentContext:
          type: string
          nullable: true
        customFields:
          type: object
          nullable: true
          additionalProperties: true
          maxProperties: 20
          description: >-
            Custom JSON data, at most 20 top-level keys and 8192 UTF-8 JSON
            bytes, including existing values after merge.
          example:
            vendorLeadCode: lead-123
            source: website
        lastTask:
          type: object
          nullable: true
          additionalProperties: false
          properties:
            taskId:
              oneOf:
                - type: string
                - type: number
              nullable: true
            listId:
              oneOf:
                - type: string
                - type: number
              nullable: true
            timestamp:
              type: number
              nullable: true
            success:
              type: boolean
              nullable: true
        lists:
          type: array
          nullable: true
          items:
            type: object
            required:
              - label
            properties:
              label:
                type: string
              timestamp:
                type: number
        appointments:
          type: array
          nullable: true
          items:
            type: object
            additionalProperties: true
      anyOf:
        - required:
            - id
        - required:
            - target
        - required:
            - phone
        - required:
            - email
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````