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

# (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:

<CodeGroup>
  ```jsonc Example: John Smith theme={"system"}
  {
    "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"
  }
  ```
</CodeGroup>

### 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.

<CodeGroup>
  ```json Using object theme={"system"}
  {
    "name": {
      "first_name": "John",
      "last_name": "Smith",
      "full_name": "John Smith"
    }
  }
  ```
</CodeGroup>

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.

<CodeGroup>
  ```json Using string theme={"system"}
  {
    "name": "Smith, John"
  }
  ```
</CodeGroup>

### Filtering

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

* `$eq`
* `$not_empty`
* `$contains`, `$starts_with`, `$ends_with` (case insensitive)

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

<CodeGroup>
  ```json People exactly named John Smith theme={"system"}
  {
    "filter": {
      "name": "John Smith"
    }
  }
  ```

  ```jsonc ...where first_name starts with "jo" theme={"system"}
  {
    "filter": {
      "name": {
        "first_name": {
          "$starts_with": "jo"
        }
      }
    }
  }
  ```

  ```json ... where last_name is specified theme={"system"}
  {
    "filter": {
      "name": {
        "last_name": {
          "$not_empty": true
        }
      }
    }
  }
  ```
</CodeGroup>
