(Personal) name

A person's name

Name attributes represent a person's name. They have three properties: first_name, last_name and full_name.

Only the person object has a name attribute. Name attributes cannot be created by users.

Reading values

All three properties are present in responses:

{
  "active_from": "2023-04-03T15:21:06.447000000Z",
  "active_until": null,
  "created_by_actor": {...},
  "attribute_type": "personal-name",
  "first_name": "John",
  "last_name": "Smith",
  "full_name": "John Smith"
}

Writing values

Attio provides two syntaxes for writing name values, a string syntax and an object syntax. If possible, we recommend using the object syntax as it provides full control over the name values you create.

When writing values using the object syntax, all three properties must be set.

{
  "name": {
    "first_name": "John",
    "last_name": "Smith",
    "full_name": "John Smith"
  }
}

When writing using a string, the string must match format 'Last name(s), First name(s)'. Text without a comma is interpreted as solely comprising the first name. Further commas will be ignored and assumed to be part of the first name.

{
  "name": "Smith, John"
}

Filtering

You can filter by any of the properties, using these operators:

  • $eq
  • $not_empty
  • $contains, $starts_with, $ends_with

Using the implicit filter syntax, you can search for exact matches of full_name, otherwise any combination of property/operator.

{
  "filter": {
    "name": "John Smith"
  }
}
{
  "filter": {
    "name": {
      "first_name": {
        "$starts_with": "jo" /* Case insensitive */
      }
    }
  }
}
{
  "filter": {
    "name": {
      "last_name": {
        "$not_empty": true
      }
    }
  }
}