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

# Create a contact

> Creates a contact and returns it with 201: the app's own save of a person. `email` (a bare address, stored lower-cased), a name and `accounts` are required. Send `name`, or `first_name` and/or `last_name`: when either part is sent, the name is built from the parts sent and replaces `name` (a blank part counts as not sent). `accounts` holds live account ids, the primary first; one listed twice counts once, and `account` is read-only, the first of them. `title`, `role` (the contact's buying role, such as Economic Buyer, as your workspace's People roles name it; free text) and custom fields under `fields` are optional. Text is trimmed and takes at most 1000 characters. Every key is checked before anything is written, and any problem refuses the whole request with a 422 listing each one in `details`; an address conflict (409) is checked once the body passes. The API writes contacts only: an address that matches one of your company's domains (its primary or an alias) is a teammate's, a 422. A domain matches by its first name, so on acme.com an acme.io address is refused and an eu.acme.com one is not. An address another person already has is a 409: if that person is a contact, `details[0].contact_ids` holds its id; if not (a vendor, a digital worker, a teammate off your domains), `contact_ids` is empty and no id is revealed. As in the app, the contact's accounts count as set by hand: where an email, meeting or chat could belong to more than one account, they outrank a match by domain. Where your workspace pushes contacts to Salesforce, the next push creates a Salesforce Contact with the contact's name, title and mapped custom fields; not its email or account. Describe's `writable` lists what an update takes, not a create: `email` shows as not writable but a create requires it, and `department` shows as writable but a create refuses it (set it with an update). A 500 that says the contact was created names it in `details` (`contact_ids`): do not create it again. Send an `Idempotency-Key` header to make a retry safe: the same key replays the first answer, including such a 500.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/objects/contact/records
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/objects/contact/records:
    post:
      tags:
        - contacts
      summary: Create a contact
      description: >-
        Creates a contact and returns it with 201: the app's own save of a
        person. `email` (a bare address, stored lower-cased), a name and
        `accounts` are required. Send `name`, or `first_name` and/or
        `last_name`: when either part is sent, the name is built from the parts
        sent and replaces `name` (a blank part counts as not sent). `accounts`
        holds live account ids, the primary first; one listed twice counts once,
        and `account` is read-only, the first of them. `title`, `role` (the
        contact's buying role, such as Economic Buyer, as your workspace's
        People roles name it; free text) and custom fields under `fields` are
        optional. Text is trimmed and takes at most 1000 characters. Every key
        is checked before anything is written, and any problem refuses the whole
        request with a 422 listing each one in `details`; an address conflict
        (409) is checked once the body passes. The API writes contacts only: an
        address that matches one of your company's domains (its primary or an
        alias) is a teammate's, a 422. A domain matches by its first name, so on
        acme.com an acme.io address is refused and an eu.acme.com one is not. An
        address another person already has is a 409: if that person is a
        contact, `details[0].contact_ids` holds its id; if not (a vendor, a
        digital worker, a teammate off your domains), `contact_ids` is empty and
        no id is revealed. As in the app, the contact's accounts count as set by
        hand: where an email, meeting or chat could belong to more than one
        account, they outrank a match by domain. Where your workspace pushes
        contacts to Salesforce, the next push creates a Salesforce Contact with
        the contact's name, title and mapped custom fields; not its email or
        account. Describe's `writable` lists what an update takes, not a create:
        `email` shows as not writable but a create requires it, and `department`
        shows as writable but a create refuses it (set it with an update). A 500
        that says the contact was created names it in `details` (`contact_ids`):
        do not create it again. Send an `Idempotency-Key` header to make a retry
        safe: the same key replays the first answer, including such a 500.
      operationId: contacts_create
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: true
              description: >-
                A create body in the contact's own shape: standard keys at the
                top level, custom

                keys under ``fields``. ``email``, a name and ``accounts`` are
                required.
              properties:
                accounts:
                  default: null
                  description: >-
                    Required: the ids of the accounts the contact is on, the
                    primary first
                  items:
                    type: string
                  title: Accounts
                  type: array
                email:
                  default: null
                  description: 'Required: the contact''s email address'
                  title: Email
                  type: string
                fields:
                  anyOf:
                    - additionalProperties: true
                      type: object
                    - type: 'null'
                  default: null
                  description: Custom field keys to values
                  title: Fields
                first_name:
                  default: null
                  description: >-
                    A part of the name: when it or last_name is sent, the name
                    is built from the parts sent
                  title: First Name
                  type: string
                last_name:
                  default: null
                  description: >-
                    A part of the name: when it or first_name is sent, the name
                    is built from the parts sent
                  title: Last Name
                  type: string
                name:
                  default: null
                  description: >-
                    The contact's full name; required unless first_name or
                    last_name is sent
                  title: Name
                  type: string
                role:
                  default: null
                  description: >-
                    The contact's buying role, such as Economic Buyer (your
                    workspace's People roles); free text
                  title: Role
                  type: string
                title:
                  default: null
                  description: The contact's job title
                  title: Title
                  type: string
              type: object
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    Contact:
      properties:
        account:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The id of the contact's primary account; null when it has none (it
            may still be on accounts)
          title: Account
        accounts:
          description: The ids of every account the contact is on, the primary first
          items:
            type: string
          title: Accounts
          type: array
        crm_contact_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The contact's id in your CRM
          title: Crm Contact Id
        department:
          anyOf:
            - type: string
            - type: 'null'
          title: Department
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        engagements:
          default: 0
          description: Engagements in the last 90 days
          title: Engagements
          type: integer
        fields:
          additionalProperties: true
          title: Fields
          type: object
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        id:
          title: Id
          type: string
        is_key_contact:
          default: false
          title: Is Key Contact
          type: boolean
        last_engagement_date:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            YYYY-MM-DD (UTC) of the latest engagement, at any time; null when
            none
          title: Last Engagement Date
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        origin:
          anyOf:
            - enum:
                - crm
                - statisfy
              type: string
            - type: 'null'
          description: Where the contact first came from; null when not recorded
          title: Origin
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        sentiment:
          anyOf:
            - enum:
                - negative
                - neutral
                - positive
              type: string
            - type: 'null'
          description: null when none is recorded
          title: Sentiment
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - id
      title: Contact
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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