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

# Client

> Event payload details and trigger documentation for Client data from Intakeq

<img src="https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/intakeq.svg?fit=max&auto=format&n=EU2WCxuXGIUQcziR&q=85&s=191a6c088f13edff5cd7f23a84babb49" alt="images/intakeq.svg" width="40" height="40" data-path="images/intakeq.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Client event payload from Intakeq.

* `Intakeq Client Created`
* `Intakeq Client Updated`

<RequestExample>
  ```json Example theme={null}
  {
    "additional_information": "test",
    "address": "123 Main St, Anytown, USA 12345",
    "archived": false,
    "billing_type": null,
    "city": "Anytown",
    "client_id": 42,
    "country": "USA",
    "created_at": "2024-02-25T23:24:31.585Z",
    "credit_balance": 0,
    "custom_fields": [
      {
        "field_id": "rjrx",
        "text": "Intake Concern",
        "value": "AB1"
      }
    ],
    "date_of_birth": "2016-03-21T04:48:00.368Z",
    "email_address": "ettore@bugatti.com",
    "external_client_id": "a7699305-7142-4599-a661-717b6bcd3305",
    "first_name": "Ettore",
    "gender": "Female",
    "guid": "dd67fe12-2eea-4776-b5b0-91248102da43",
    "home_phone": "(222) 222-2222",
    "last_activity_at": "2024-02-25T23:24:31.585Z",
    "last_activity_name": "Created Appt",
    "last_name": "Bugatti",
    "last_updated_at": "2024-02-25T23:25:01.675Z",
    "linked_clients": [
      {
        "client_number": 42,
        "relationship_type": null
      }
    ],
    "marital_status": "Married",
    "middle_name": "",
    "mobile_phone": "(222) 222-2222",
    "name": "Ettore Bugatti",
    "parent_client_id": "412421",
    "phone_number": "5554016515",
    "postal_code": "12345",
    "practitioner_id": "62e9a2123ccc0219a88d606f",
    "primary_insurance_company": "MGB",
    "primary_insurance_group_number": "121212",
    "primary_insurance_holder_date_of_birth": "1988-05-23T00:00:00Z",
    "primary_insurance_holder_name": "John Smith",
    "primary_insurance_holder_relationship": "Self",
    "primary_insurance_payer_id": "123456",
    "primary_insurance_plan": "MGB",
    "primary_insurance_policy_number": "654321",
    "primary_insured_city": "New York",
    "primary_insured_gender": "Male",
    "primary_insured_state": "NY",
    "primary_insured_street_address": "123 Main St",
    "primary_insured_zip_code": "10001",
    "primary_relationship_to_insured": "Self",
    "secondary_insurance_company": "MGB",
    "secondary_insurance_group_number": "121213",
    "secondary_insurance_holder_date_of_birth": "1988-05-23T00:00:00Z",
    "secondary_insurance_holder_name": "John Smith",
    "secondary_insurance_holder_relationship": "Self",
    "secondary_insurance_payer_id": "123457",
    "secondary_insurance_policy_number": "654322",
    "secondary_relationship_to_insured": "Self",
    "square_customer_id": "123456",
    "state": "NY",
    "state_short": "NY",
    "street_address": "123 Main St",
    "stripe_customer_id": "123456",
    "tags": [
      "website_lead"
    ],
    "timezone_id": "America/New_York",
    "unit_number": "1A",
    "work_phone": "(222) 222-2222"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "additional_information": "Additional information about the client",
    "address": "Full address of the client",
    "archived": "Whether the client is archived",
    "billing_type": "Billing type for the client",
    "city": "City of the client's address",
    "client_id": "IntakeQ's unique identifier for the client",
    "country": "Country of the client's address",
    "created_at": "When the client was created",
    "credit_balance": "Client's credit balance",
    "custom_fields": {
      "field_id": "ID for the custom field",
      "text": "Text for the custom field",
      "value": "Value for the custom field"
    },
    "date_of_birth": "Date of birth of the client (note: This is not rounded to the nearest day by the IntakeQ API)",
    "email_address": "Email address of the client",
    "external_client_id": "External system client ID",
    "first_name": "First name of the client",
    "gender": "Gender of the client",
    "guid": "Globally unique identifier for the client",
    "home_phone": "Home phone number of the client",
    "last_activity_at": "When the client last had activity",
    "last_activity_name": "Name of the last activity",
    "last_name": "Last name of the client",
    "last_updated_at": "When the client was last updated",
    "linked_clients": {
      "client_number": "IntakeQ's unique identifier for the linked client",
      "relationship_type": "The relationship between the client and the linked client"
    },
    "marital_status": "Marital status of the client",
    "middle_name": "Middle name of the client",
    "mobile_phone": "Mobile phone number of the client",
    "name": "Full name of the client",
    "parent_client_id": "ID of the parent client if this is a child account",
    "phone_number": "Primary phone number of the client",
    "postal_code": "Postal/ZIP code of the client's address",
    "practitioner_id": "ID of the assigned practitioner",
    "primary_insurance_company": "Primary insurance company name",
    "primary_insurance_group_number": "Primary insurance group number",
    "primary_insurance_holder_date_of_birth": "Primary insurance holder date of birth",
    "primary_insurance_holder_name": "Primary insurance holder name",
    "primary_insurance_holder_relationship": "Primary insurance holder relationship to client",
    "primary_insurance_payer_id": "Primary insurance payer ID",
    "primary_insurance_plan": "Primary insurance plan name",
    "primary_insurance_policy_number": "Primary insurance policy number",
    "primary_insured_city": "Primary insured person's city",
    "primary_insured_gender": "Primary insured person's gender",
    "primary_insured_state": "Primary insured person's state",
    "primary_insured_street_address": "Primary insured person's street address",
    "primary_insured_zip_code": "Primary insured person's ZIP code",
    "primary_relationship_to_insured": "Primary insured person's relationship to the client",
    "secondary_insurance_company": "Secondary insurance company name",
    "secondary_insurance_group_number": "Secondary insurance group number",
    "secondary_insurance_holder_date_of_birth": "Secondary insurance holder date of birth",
    "secondary_insurance_holder_name": "Secondary insurance holder name",
    "secondary_insurance_holder_relationship": "Secondary insurance holder relationship to client",
    "secondary_insurance_payer_id": "Secondary insurance payer ID",
    "secondary_insurance_policy_number": "Secondary insurance policy number",
    "secondary_relationship_to_insured": "Secondary insurance relationship to insured",
    "square_customer_id": "Square customer ID",
    "state": "State/province of the client's address",
    "state_short": "State/province abbreviation of the client's address",
    "street_address": "Street address of the client",
    "stripe_customer_id": "Stripe customer ID",
    "tags": "Tags associated with the client",
    "timezone_id": "Timezone identifier for the client",
    "unit_number": "Unit/apartment number of the client's address",
    "work_phone": "Work phone number of the client"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Client" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="client_id" type="int64" required>
      IntakeQ's unique identifier for the client

      ```json CEL theme={null}
      client_id
      ```

      ```json Example theme={null}
      42
      ```
    </ResponseField>

    <ResponseField name="name" type="string">
      Full name of the client

      ```json CEL theme={null}
      name
      ```

      ```json Example theme={null}
      "Ettore Bugatti"
      ```
    </ResponseField>

    <ResponseField name="first_name" type="string">
      First name of the client

      ```json CEL theme={null}
      first_name
      ```

      ```json Example theme={null}
      "Ettore"
      ```
    </ResponseField>

    <ResponseField name="last_name" type="string">
      Last name of the client

      ```json CEL theme={null}
      last_name
      ```

      ```json Example theme={null}
      "Bugatti"
      ```
    </ResponseField>

    <ResponseField name="middle_name" type="string">
      Middle name of the client

      ```json CEL theme={null}
      middle_name
      ```

      ```json Example theme={null}
      ""
      ```
    </ResponseField>

    <ResponseField name="email_address" type="string">
      Email address of the client

      ```json CEL theme={null}
      email_address
      ```

      ```json Example theme={null}
      "ettore@bugatti.com"
      ```
    </ResponseField>

    <ResponseField name="phone_number" type="string">
      Primary phone number of the client

      ```json CEL theme={null}
      phone_number
      ```

      ```json Example theme={null}
      "5554016515"
      ```
    </ResponseField>

    <ResponseField name="date_of_birth" type="timing.v1.Timestamp">
      Date of birth of the client (note: This is not rounded to the nearest day by the IntakeQ API)

      ```json CEL theme={null}
      date_of_birth
      ```

      ```json Example theme={null}
      "2016-03-21T04:48:00.368Z"
      ```
    </ResponseField>

    <ResponseField name="marital_status" type="string">
      Marital status of the client

      ```json CEL theme={null}
      marital_status
      ```

      ```json Example theme={null}
      "Married"
      ```
    </ResponseField>

    <ResponseField name="gender" type="string">
      Gender of the client

      ```json CEL theme={null}
      gender
      ```

      ```json Example theme={null}
      "Female"
      ```
    </ResponseField>

    <ResponseField name="tags" type="[]string" required>
      Tags associated with the client

      ```json CEL theme={null}
      tags
      ```

      ```json Example theme={null}
      [
      "website_lead"
      ]
      ```
    </ResponseField>

    <ResponseField name="archived" type="bool" required>
      Whether the client is archived

      ```json CEL theme={null}
      archived
      ```

      ```json Example theme={null}
      false
      ```
    </ResponseField>

    <ResponseField name="home_phone" type="string">
      Home phone number of the client

      ```json CEL theme={null}
      home_phone
      ```

      ```json Example theme={null}
      "(222) 222-2222"
      ```
    </ResponseField>

    <ResponseField name="work_phone" type="string">
      Work phone number of the client

      ```json CEL theme={null}
      work_phone
      ```

      ```json Example theme={null}
      "(222) 222-2222"
      ```
    </ResponseField>

    <ResponseField name="mobile_phone" type="string">
      Mobile phone number of the client

      ```json CEL theme={null}
      mobile_phone
      ```

      ```json Example theme={null}
      "(222) 222-2222"
      ```
    </ResponseField>

    <ResponseField name="address" type="string">
      Full address of the client

      ```json CEL theme={null}
      address
      ```

      ```json Example theme={null}
      "123 Main St, Anytown, USA 12345"
      ```
    </ResponseField>

    <ResponseField name="unit_number" type="string">
      Unit/apartment number of the client's address

      ```json CEL theme={null}
      unit_number
      ```

      ```json Example theme={null}
      "1A"
      ```
    </ResponseField>

    <ResponseField name="street_address" type="string">
      Street address of the client

      ```json CEL theme={null}
      street_address
      ```

      ```json Example theme={null}
      "123 Main St"
      ```
    </ResponseField>

    <ResponseField name="city" type="string">
      City of the client's address

      ```json CEL theme={null}
      city
      ```

      ```json Example theme={null}
      "Anytown"
      ```
    </ResponseField>

    <ResponseField name="state" type="string">
      State/province of the client's address

      ```json CEL theme={null}
      state
      ```

      ```json Example theme={null}
      "NY"
      ```
    </ResponseField>

    <ResponseField name="postal_code" type="string">
      Postal/ZIP code of the client's address

      ```json CEL theme={null}
      postal_code
      ```

      ```json Example theme={null}
      "12345"
      ```
    </ResponseField>

    <ResponseField name="country" type="string">
      Country of the client's address

      ```json CEL theme={null}
      country
      ```

      ```json Example theme={null}
      "USA"
      ```
    </ResponseField>

    <ResponseField name="state_short" type="string">
      State/province abbreviation of the client's address

      ```json CEL theme={null}
      state_short
      ```

      ```json Example theme={null}
      "NY"
      ```
    </ResponseField>

    <ResponseField name="additional_information" type="string">
      Additional information about the client

      ```json CEL theme={null}
      additional_information
      ```

      ```json Example theme={null}
      "test"
      ```
    </ResponseField>

    <ResponseField name="billing_type" type="intakeq.v1.BillingType" required>
      Billing type for the client

      ```json CEL theme={null}
      billing_type
      ```

      ```json Example theme={null}
      intakeq.v1.BillingType.SELF_PAY
      intakeq.v1.BillingType.INSURANCE
      ```
    </ResponseField>

    <ResponseField name="primary_insurance_company" type="string">
      Primary insurance company name

      ```json CEL theme={null}
      primary_insurance_company
      ```

      ```json Example theme={null}
      "MGB"
      ```
    </ResponseField>

    <ResponseField name="primary_insurance_payer_id" type="string">
      Primary insurance payer ID

      ```json CEL theme={null}
      primary_insurance_payer_id
      ```

      ```json Example theme={null}
      "123456"
      ```
    </ResponseField>

    <ResponseField name="primary_insurance_policy_number" type="string">
      Primary insurance policy number

      ```json CEL theme={null}
      primary_insurance_policy_number
      ```

      ```json Example theme={null}
      "654321"
      ```
    </ResponseField>

    <ResponseField name="primary_insurance_group_number" type="string">
      Primary insurance group number

      ```json CEL theme={null}
      primary_insurance_group_number
      ```

      ```json Example theme={null}
      "121212"
      ```
    </ResponseField>

    <ResponseField name="primary_insurance_holder_name" type="string">
      Primary insurance holder name

      ```json CEL theme={null}
      primary_insurance_holder_name
      ```

      ```json Example theme={null}
      "John Smith"
      ```
    </ResponseField>

    <ResponseField name="primary_insurance_holder_relationship" type="string">
      Primary insurance holder relationship to client

      ```json CEL theme={null}
      primary_insurance_holder_relationship
      ```

      ```json Example theme={null}
      "Self"
      ```
    </ResponseField>

    <ResponseField name="primary_insurance_holder_date_of_birth" type="timing.v1.Timestamp">
      Primary insurance holder date of birth

      ```json CEL theme={null}
      primary_insurance_holder_date_of_birth
      ```

      ```json Example theme={null}
      "1988-05-23T00:00:00Z"
      ```
    </ResponseField>

    <ResponseField name="secondary_insurance_company" type="string">
      Secondary insurance company name

      ```json CEL theme={null}
      secondary_insurance_company
      ```

      ```json Example theme={null}
      "MGB"
      ```
    </ResponseField>

    <ResponseField name="secondary_insurance_payer_id" type="string">
      Secondary insurance payer ID

      ```json CEL theme={null}
      secondary_insurance_payer_id
      ```

      ```json Example theme={null}
      "123457"
      ```
    </ResponseField>

    <ResponseField name="secondary_insurance_policy_number" type="string">
      Secondary insurance policy number

      ```json CEL theme={null}
      secondary_insurance_policy_number
      ```

      ```json Example theme={null}
      "654322"
      ```
    </ResponseField>

    <ResponseField name="secondary_insurance_group_number" type="string">
      Secondary insurance group number

      ```json CEL theme={null}
      secondary_insurance_group_number
      ```

      ```json Example theme={null}
      "121213"
      ```
    </ResponseField>

    <ResponseField name="secondary_insurance_holder_name" type="string">
      Secondary insurance holder name

      ```json CEL theme={null}
      secondary_insurance_holder_name
      ```

      ```json Example theme={null}
      "John Smith"
      ```
    </ResponseField>

    <ResponseField name="secondary_insurance_holder_relationship" type="string">
      Secondary insurance holder relationship to client

      ```json CEL theme={null}
      secondary_insurance_holder_relationship
      ```

      ```json Example theme={null}
      "Self"
      ```
    </ResponseField>

    <ResponseField name="secondary_insurance_holder_date_of_birth" type="timing.v1.Timestamp">
      Secondary insurance holder date of birth

      ```json CEL theme={null}
      secondary_insurance_holder_date_of_birth
      ```

      ```json Example theme={null}
      "1988-05-23T00:00:00Z"
      ```
    </ResponseField>

    <ResponseField name="secondary_relationship_to_insured" type="string">
      Secondary insurance relationship to insured

      ```json CEL theme={null}
      secondary_relationship_to_insured
      ```

      ```json Example theme={null}
      "Self"
      ```
    </ResponseField>

    <ResponseField name="created_at" type="timing.v1.Timestamp" required>
      When the client was created

      ```json CEL theme={null}
      created_at
      ```

      ```json Example theme={null}
      "2024-02-25T23:24:31.585Z"
      ```
    </ResponseField>

    <ResponseField name="last_activity_at" type="timing.v1.Timestamp">
      When the client last had activity

      ```json CEL theme={null}
      last_activity_at
      ```

      ```json Example theme={null}
      "2024-02-25T23:24:31.585Z"
      ```
    </ResponseField>

    <ResponseField name="practitioner_id" type="string">
      ID of the assigned practitioner

      ```json CEL theme={null}
      practitioner_id
      ```

      ```json Example theme={null}
      "62e9a2123ccc0219a88d606f"
      ```
    </ResponseField>

    <ResponseField name="custom_fields" type="[]object" required>
      Custom fields associated with the client

      ```json CEL theme={null}
      custom_fields
      ```

      ```json Example theme={null}
      [
      {
      "field_id": "rjrx",
      "text": "Intake Concern",
      "value": "AB1"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="custom_fields.map(x, x.field_id)" type="[]string" required>
      Mapped array of: ID for the custom field

      ```json CEL theme={null}
      custom_fields.map(x, x.field_id)
      ```

      ```json Example theme={null}
      [
      "rjrx"
      ]
      ```
    </ResponseField>

    <ResponseField name="custom_fields.map(x, x.text)" type="[]string" required>
      Mapped array of: Text for the custom field

      ```json CEL theme={null}
      custom_fields.map(x, x.text)
      ```

      ```json Example theme={null}
      [
      "Intake Concern"
      ]
      ```
    </ResponseField>

    <ResponseField name="custom_fields.map(x, x.value)" type="[]string" required>
      Mapped array of: Value for the custom field

      ```json CEL theme={null}
      custom_fields.map(x, x.value)
      ```

      ```json Example theme={null}
      [
      "AB1"
      ]
      ```
    </ResponseField>

    <ResponseField name="guid" type="string">
      Globally unique identifier for the client

      ```json CEL theme={null}
      guid
      ```

      ```json Example theme={null}
      "dd67fe12-2eea-4776-b5b0-91248102da43"
      ```
    </ResponseField>

    <ResponseField name="last_updated_at" type="timing.v1.Timestamp">
      When the client was last updated

      ```json CEL theme={null}
      last_updated_at
      ```

      ```json Example theme={null}
      "2024-02-25T23:25:01.675Z"
      ```
    </ResponseField>

    <ResponseField name="stripe_customer_id" type="string">
      Stripe customer ID

      ```json CEL theme={null}
      stripe_customer_id
      ```

      ```json Example theme={null}
      "123456"
      ```
    </ResponseField>

    <ResponseField name="square_customer_id" type="string">
      Square customer ID

      ```json CEL theme={null}
      square_customer_id
      ```

      ```json Example theme={null}
      "123456"
      ```
    </ResponseField>

    <ResponseField name="timezone_id" type="string">
      Timezone identifier for the client

      ```json CEL theme={null}
      timezone_id
      ```

      ```json Example theme={null}
      "America/New_York"
      ```
    </ResponseField>

    <ResponseField name="primary_insurance_plan" type="string">
      Primary insurance plan name

      ```json CEL theme={null}
      primary_insurance_plan
      ```

      ```json Example theme={null}
      "MGB"
      ```
    </ResponseField>

    <ResponseField name="primary_insured_gender" type="string">
      Primary insured person's gender

      ```json CEL theme={null}
      primary_insured_gender
      ```

      ```json Example theme={null}
      "Male"
      ```
    </ResponseField>

    <ResponseField name="primary_insured_city" type="string">
      Primary insured person's city

      ```json CEL theme={null}
      primary_insured_city
      ```

      ```json Example theme={null}
      "New York"
      ```
    </ResponseField>

    <ResponseField name="primary_insured_zip_code" type="string">
      Primary insured person's ZIP code

      ```json CEL theme={null}
      primary_insured_zip_code
      ```

      ```json Example theme={null}
      "10001"
      ```
    </ResponseField>

    <ResponseField name="primary_insured_state" type="string">
      Primary insured person's state

      ```json CEL theme={null}
      primary_insured_state
      ```

      ```json Example theme={null}
      "NY"
      ```
    </ResponseField>

    <ResponseField name="primary_insured_street_address" type="string">
      Primary insured person's street address

      ```json CEL theme={null}
      primary_insured_street_address
      ```

      ```json Example theme={null}
      "123 Main St"
      ```
    </ResponseField>

    <ResponseField name="external_client_id" type="string">
      External system client ID

      ```json CEL theme={null}
      external_client_id
      ```

      ```json Example theme={null}
      "a7699305-7142-4599-a661-717b6bcd3305"
      ```
    </ResponseField>

    <ResponseField name="credit_balance" type="float64 (double)" required>
      Client's credit balance

      ```json CEL theme={null}
      credit_balance
      ```

      ```json Example theme={null}
      0
      ```
    </ResponseField>

    <ResponseField name="last_activity_name" type="string">
      Name of the last activity

      ```json CEL theme={null}
      last_activity_name
      ```

      ```json Example theme={null}
      "Created Appt"
      ```
    </ResponseField>

    <ResponseField name="parent_client_id" type="string">
      ID of the parent client if this is a child account

      ```json CEL theme={null}
      parent_client_id
      ```

      ```json Example theme={null}
      "412421"
      ```
    </ResponseField>

    <ResponseField name="linked_clients" type="[]object" required>
      List of clients linked to this client

      ```json CEL theme={null}
      linked_clients
      ```

      ```json Example theme={null}
      [
      {
      "client_number": 42,
      "relationship_type": null
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="linked_clients.map(x, x.client_number)" type="[]int64" required>
      Mapped array of: IntakeQ's unique identifier for the linked client

      ```json CEL theme={null}
      linked_clients.map(x, x.client_number)
      ```

      ```json Example theme={null}
      [
      42
      ]
      ```
    </ResponseField>

    <ResponseField name="relationship_type" type="intakeq.v1.RelationshipType" required>
      Mapped array of: The relationship between the client and the linked client

      ```json CEL theme={null}
      relationship_type
      ```

      ```json Example theme={null}
      intakeq.v1.RelationshipType.PARENT
      intakeq.v1.RelationshipType.CHILD
      intakeq.v1.RelationshipType.SPOUSE
      intakeq.v1.RelationshipType.SIBLING
      intakeq.v1.RelationshipType.OTHER
      intakeq.v1.RelationshipType.PARTNER
      ```
    </ResponseField>

    <ResponseField name="primary_relationship_to_insured" type="string">
      Primary insured person's relationship to the client

      ```json CEL theme={null}
      primary_relationship_to_insured
      ```

      ```json Example theme={null}
      "Self"
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
