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

# Manage Contact and Account Sub-resources

> Use sub-resource endpoints for contact emails, contact phone numbers, and account domains.

<Warning>
  **Restricted access.** Public API v2 is currently available only to allowlisted
  organizations. Requests from workspaces that have not been enabled are rejected.
  Contact your Reevo representative to have your organization added to the allowlist.
</Warning>

# Manage Contact and Account Sub-resources

Sub-resource endpoints let you edit specific array-like fields without replacing the whole parent record.

## Contact emails

Add an email:

```bash theme={null}
curl -X POST "https://api.reevo.ai/api/v2/public/contact/<contact_id>/attribute/contact_emails" \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "sarah.chen@acme.com",
    "is_primary": true,
    "labels": ["WORK"]
  }'
```

Update an email item:

```bash theme={null}
curl -X PATCH "https://api.reevo.ai/api/v2/public/contact/<contact_id>/attribute/contact_emails/<item_id>" \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "is_primary": true
  }'
```

Remove an email item:

```bash theme={null}
curl -X DELETE "https://api.reevo.ai/api/v2/public/contact/<contact_id>/attribute/contact_emails/<item_id>" \
  -H "Authorization: Bearer <your-api-key>"
```

## Contact phone numbers

```json theme={null}
{
  "phone_number": "+14155551234",
  "is_primary": true,
  "labels": ["WORK"]
}
```

Use:

```text theme={null}
POST   /api/v2/public/contact/{contact_id}/attribute/contact_phone_numbers
PATCH  /api/v2/public/contact/{contact_id}/attribute/contact_phone_numbers/{item_id}
DELETE /api/v2/public/contact/{contact_id}/attribute/contact_phone_numbers/{item_id}
```

## Account domains

Add a domain:

```bash theme={null}
curl -X POST "https://api.reevo.ai/api/v2/public/account/<account_id>/attribute/domains" \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "domain_name": "acme.com"
  }'
```

Set primary or update an item:

```bash theme={null}
curl -X PATCH "https://api.reevo.ai/api/v2/public/account/<account_id>/attribute/domains/acme.com" \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "is_primary": true
  }'
```

Remove a domain:

```bash theme={null}
curl -X DELETE "https://api.reevo.ai/api/v2/public/account/<account_id>/attribute/domains/acme.com" \
  -H "Authorization: Bearer <your-api-key>"
```

## Behavior notes

* **Item identity.** Email and phone items are addressed by a server-minted UUID `item_id` (returned when you add the item); pass that `item_id` in the `PATCH`/`DELETE` path. Account domains have no separate item id — address them by the `domain_name` path segment directly.
* **Default labels.** When you omit `labels`, the stored default is `["PERSONAL"]` for both emails and phone numbers, regardless of `is_primary` — a **primary** email defaults to `["PERSONAL"]` just like a non-primary one.
* **Unset-primary semantics.** `PATCH` with `{"is_primary": true}` promotes an item to primary (demoting the previous one). Sending `{"is_primary": false}` behaves differently by family: account domains accept it and can leave the account with no primary domain, while contact emails reject demoting any primary — even when a non-primary sibling email exists.
* **DELETE success and idempotency.** A successful `DELETE` returns `204 No Content`. Whether a repeat `DELETE` of an already-removed item is idempotent (also `204`) differs by family, so do not rely on it — confirm state with a read if it matters.
* **Domains do not re-derive `websites`.** Editing account domains through this sub-resource does not refresh the account's `websites` or `official_website` fields. (The reverse derivation — writing `websites` populates `domains`/`official_website` — does apply; see [Accounts](/Public-API-v2/Objects/Accounts).)

## Unsupported sub-resources

Not every record type exposes generic attribute sub-resources.

| Request                                                                  | Expected outcome                 |
| ------------------------------------------------------------------------ | -------------------------------- |
| Unsupported contact/opportunity/task/note/meeting attribute sub-resource | `400 sub_resource_not_supported` |
| Unsupported account attribute name other than `domains`                  | Method/path is not routed        |
| Custom object attribute sub-resource                                     | Not available                    |

When in doubt, check [Supported Resources](/Public-API-v2/Supported-Resources) before using an attribute sub-resource.
