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

# Phone number

> International telephone numbers

Phone number attributes represent telephone numbers. They are represented in [E164 format](https://en.wikipedia.org/wiki/E.164) and always prefixed with a country code.

The person object comes with a phone number attribute (`phone_numbers`), which is is a multi-select attribute, but users can also create their own phone number attributes on other objects or lists as well.

There are three properties on a phone number: `original_phone_number` (as inputted by the user), `country_code` (an ISO 3166-1 alpha-2 country code) and `normalized_phone_number` (as set by Attio). All properties are represented as strings.

### Reading values

<CodeGroup>
  ```jsonc Example: a US telephone number theme={"system"}
  {
    "active_from": "2023-04-03T15:21:06.447000000Z",
    "active_until": null,
    "created_by_actor": {
      /*...*/
    },
    "attribute_type": "phone-number",
    "original_phone_number": "+15558675309",
    "normalized_phone_number": "+15558675309",
    "country_code": "US"
  }
  ```
</CodeGroup>

### Writing values

You may either write phone number values as strings or objects. For both formats, you must provide sufficient information to identify the country code of the number.

For string values, the phone number must be prefixed with the area code, starting with "+".

Object values must include both a `original_phone_number` and `country_code` property. You may pass `null` to `country_code` if an area code prefix is provided as part of `original_phone_number`.

All values are validated against the E164 format.

Since the `phone_numbers` attribute is multi-select, you must always pass values as part of an array.

<CodeGroup>
  ```json Using string theme={"system"}
  {
    "phone_numbers": ["+447777777777"]
  }
  ```

  ```json Setting phone number with country theme={"system"}
  {
    "phone_numbers": [
      {
        "original_phone_number": "+447777777777",
        "country_code": "GB"
      }
    ]
  }
  ```

  ```json Setting just the number theme={"system"}
  {
    "phone_numbers": [
      {
        "original_phone_number": "+44 7777777777",
        "country_code": null
      }
    ]
  }
  ```
</CodeGroup>

### Filtering

Phone numbers can be filtered by equality or substrings (`$eq`,`$contains`,`$starts_with`,`$ends_with`). Note that the explicit property is called `phone_number`, internally Attio will use the normalized phone number for searching.

The `country_code` property can also be filtered by `$eq` and `$not_empty`.

<CodeGroup>
  ```json People by exact phone number theme={"system"}
  {
    "filter": {
      "phone_numbers": "+15558675309"
    }
  }
  ```

  ```json ... with US phone numbers theme={"system"}
  {
    "filter": {
      "phone_numbers": {
        "country_code": {
          "$eq": "US"
        }
      }
    }
  }
  ```

  ```json ... with part of a phone number theme={"system"}
  {
    "filter": {
      "phone_numbers": {
        "phone_number": {
          "$contains": "67530"
        }
      }
    }
  }
  ```
</CodeGroup>
