*REST API › Endpoint reference › CRM › Contacts*

# Update a contact

> Partially updates a contact (send only the fields to change).

The arrays of emails, phones and addresses replace the existing list entirely. Returns the updated contact in detail.

`PATCH /api/v1/contacts/{contactId}` — scope `contacts:write`

Scope: `contacts:write` · 120/min · Inherited tenancy · Idempotency-Key · If-Match · MCP: `filmo_contacts_update`

## Authorizations

Bearer API key with the scope below. `contacts:write`

## Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | No | Unique identifier of the request, chosen by the client (a UUID works). Between 1 and 255 characters: an empty header is rejected with 400 `validation_error`, because the client would believe itself protected. Repeating the same key with the SAME body within 24 h returns the stored response without executing again, with the `Idempotent-Replay: true` header. With a DIFFERENT body it returns 422. It is the safe way to retry after a network timeout. |
| `If-Match` | string | No | Optimistic locking: the `ETag` you read from the resource (or `*`). If the resource changed since, the write is rejected with `412 precondition_failed` before doing anything; read it again and retry. Without the header the write always proceeds. |

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `contactId` | string | Yes | Contact identifier. |

## Body

Body schema: `ContactUpdateBody`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | No | Contact name (person or company). |
| `contactType` | string | No | Contact type: person (individual) or company (business). `person`, `company` |
| `role` | string | No | Contact role: client, provider, lead, debtor, creditor, student, teacher or unspecified. `client`, `provider`, `lead`, `debtor`, `creditor`, `student`, `teacher`, `unspecified` |
| `status` | string | No | Contact status: active (operational), inactive (deactivated) or archived (closed, kept for historical records). `active`, `inactive`, `archived` |
| `nif` | string | No | NIF/CIF or tax identification number; null clears it ("" is normalized to null too). |
| `commercialName` | string | No | Trade name; null clears it. |
| `position` | string | No | Job title or position; null clears it. |
| `emails` | object[] | No | List of email addresses that REPLACES the existing list entirely (max 20). Internal ids are generated by the server. |
| `emails.email` | string<email> | Yes | Email address; the format is validated. |
| `emails.label` | string | No | Descriptive label of the email (e.g. "Personal", "Billing"). |
| `emails.isPrimary` | boolean | No | Marks this email as the primary one for the contact. |
| `phoneNumbers` | object[] | No | List of phone numbers that REPLACES the existing list entirely (max 20). Internal ids are generated by the server. |
| `phoneNumbers.number` | string | Yes | Phone number. |
| `phoneNumbers.label` | string | No | Descriptive label of the phone number (e.g. "Mobile", "Office"). |
| `phoneNumbers.countryCode` | string | No | International country calling code (e.g. "+34"). |
| `phoneNumbers.isPrimary` | boolean | No | Marks this phone number as the primary one for the contact. |
| `websites` | object[] | No | List of websites that REPLACES the existing list entirely (max 20). Internal ids are generated by the server. |
| `websites.url` | string<uri> | Yes | Website URL; the format is validated. |
| `websites.label` | string | No | Descriptive label of the website (e.g. "Corporate website", "LinkedIn"). |
| `addresses` | object[] | No | List of addresses that REPLACES the existing list entirely (max 20). Send the id of each existing address you want to keep; addresses without id are created with a new one. An id that is not an address of this contact responds 400. Leaving out an address that an order uses as its billing or shipping address responds 409 `address_in_use` and nothing is changed. |
| `addresses.id` | string | No | Identifier of an existing address to keep it; omit it to add a new one. |
| `addresses.label` | string | No | Descriptive label of the address (e.g. "Billing", "Shipping"). |
| `addresses.addressLine1` | string | Yes | First line of the address (street and number). Required. |
| `addresses.addressLine2` | string | No | Second line of the address (floor, door, etc.). |
| `addresses.city` | string | No | City of the address. |
| `addresses.province` | string | No | Province or region of the address. |
| `addresses.postcode` | string | No | Postcode of the address. |
| `addresses.country` | string | No | Country of the address (code or short name). |
| `addresses.isMain` | boolean | No | Marks this address as the main one for the contact. |
| `folder` | string | No | Folder or organizational grouping; null clears it. |
| `contactNumber` | string | No | Contact number (internal reference); null clears it. |
| `discountPercentage` | number | No | General discount percentage of the contact (0-100); null clears it. |
| `subscribedToMarketing` | boolean | No | Whether the contact is subscribed to marketing communications. |

## Request examples

*Update a contact*

**cURL**

```bash
curl https://app.filmo.io/api/v1/contacts/cont_8f2a1c \
  --request PATCH \
  --header "Authorization: Bearer $FILMO_API_KEY" \
  --header "Idempotency-Key: $(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid)" \
  --header 'Content-Type: application/json' \
  --data '{
  "role": "client",
  "status": "active",
  "emails": [
    {
      "email": "facturacion@example.com",
      "label": "Facturación"
    },
    {
      "email": "produccion@example.com",
      "label": "Producción"
    }
  ],
  "discountPercentage": 10
}'
```

**Node.js**

```javascript
fetch('https://app.filmo.io/api/v1/contacts/cont_8f2a1c', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer YOUR_FILMO_API_KEY',
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    role: 'client',
    status: 'active',
    emails: [
      {
        email: 'facturacion@example.com',
        label: 'Facturación'
      },
      {
        email: 'produccion@example.com',
        label: 'Producción'
      }
    ],
    discountPercentage: 10
  })
})
```

**Python**

```python
import uuid
import requests

requests.patch(
    "https://app.filmo.io/api/v1/contacts/cont_8f2a1c",
    headers={
      "Authorization": "Bearer YOUR_FILMO_API_KEY",
      "Idempotency-Key": str(uuid.uuid4()),
      "Content-Type": "application/json"
    },
    json={
      "role": "client",
      "status": "active",
      "emails": [
        {
          "email": "facturacion@example.com",
          "label": "Facturación"
        },
        {
          "email": "produccion@example.com",
          "label": "Producción"
        }
      ],
      "discountPercentage": 10
    }
)
```

## Response

Response schema: `ContactDetailDto`

| Status | Description |
| --- | --- |
| 200 | Successful response. |
| 400 | Invalid request (validation_error): malformed query or body. `errors[]` lists every offending field with its stable code. |
| 401 | Authentication failed (unauthorized, api_key_invalid, api_key_revoked, api_key_expired, api_key_owner_inactive, api_key_owner_not_admin). |
| 403 | Not allowed (insufficient_scope: the API key does not have the required scope, named in `requiredScope`; forbidden: the owner of the key lacks the permission the operation requires). `insufficient_scope` is answered before the request counts against the rate limit, so it carries no `RateLimit-*` headers; `forbidden` does. |
| 404 | Resource not found (not_found): it does not exist or is outside the scope of the API key. |
| 409 | Conflict (conflict): the current state of the resource prevents the operation, a request with that Idempotency-Key is already in progress, or another conditional write (`If-Match`) held the resource for more than five seconds. `errors[0].code` says which: `in_progress` and `lock_timeout` are solved by retrying; `invalid_state` is not, because the state of the resource forbids the operation. |
| 412 | Precondition failed (precondition_failed): the `If-Match` entity tag does not match the current representation. Read the resource again and retry. |
| 422 | Idempotency-Key reused (idempotency_key_reused): the same key was used before with a different body. Change the key. |
| 429 | Rate limit exceeded (rate_limited): retry after `Retry-After` seconds; `RateLimit-*` says which quota ran out. |
| 500 | Internal error (internal_error). |

**200**

| Name | Type | Description |
| --- | --- | --- |
| `data` | object | The contact in full, as returned by the API. |
| `data.id` | string | Unique identifier of the contact. |
| `data.name` | string | Contact name (person or company). |
| `data.contactType` | string | Contact type: person (individual) or company (business). `person`, `company` |
| `data.role` | string | Contact role: client, provider, lead, debtor, creditor, student, teacher or unspecified. `client`, `provider`, `lead`, `debtor`, `creditor`, `student`, `teacher`, `unspecified` |
| `data.status` | string | Contact status: active (operational), inactive (deactivated) or archived (closed, kept for historical records). `active`, `inactive`, `archived` |
| `data.nif` | string | NIF/CIF or tax identification number; null if not recorded. |
| `data.commercialName` | string | Trade name; null if it matches the name or is not recorded. |
| `data.position` | string | Job title or position of the contact person; null if not recorded. |
| `data.contactNumber` | string | Contact number assigned by the account (internal reference); null if not recorded. |
| `data.emails` | object[] | List of email addresses of the contact. |
| `data.emails.id` | string | Internal identifier of the email within the contact. |
| `data.emails.label` | string | Descriptive label of the email; null if it has none. |
| `data.emails.email` | string | Email address. |
| `data.emails.isPrimary` | boolean | Whether this is the primary email of the contact. |
| `data.billingEmail` | string | Dedicated billing email; null means the primary email is used. |
| `data.phoneNumbers` | object[] | List of phone numbers of the contact. |
| `data.phoneNumbers.id` | string | Internal identifier of the phone number within the contact. |
| `data.phoneNumbers.label` | string | Descriptive label of the phone number; null if it has none. |
| `data.phoneNumbers.number` | string | Phone number. |
| `data.phoneNumbers.countryCode` | string | International country calling code (e.g. "+34"); null if not recorded. |
| `data.phoneNumbers.isPrimary` | boolean | Whether this is the primary phone number of the contact. |
| `data.websites` | object[] | List of websites of the contact. |
| `data.websites.id` | string | Internal identifier of the website within the contact. |
| `data.websites.label` | string | Descriptive label of the website; null if it has none. |
| `data.websites.url` | string | Website URL. |
| `data.addresses` | object[] | List of addresses of the contact. |
| `data.addresses.id` | string | Internal identifier of the address within the contact. |
| `data.addresses.label` | string | Descriptive label of the address; null if it has none. |
| `data.addresses.addressLine1` | string | First line of the address; null if not recorded. |
| `data.addresses.addressLine2` | string | Second line of the address; null if not recorded. |
| `data.addresses.city` | string | City; null if not recorded. |
| `data.addresses.province` | string | Province or region; null if not recorded. |
| `data.addresses.postcode` | string | Postcode; null if not recorded. |
| `data.addresses.country` | string | Country; null if not recorded. |
| `data.addresses.isMain` | boolean | Whether this is the main address of the contact. |
| `data.folder` | string | Folder or organizational grouping; null if the contact is not classified. |
| `data.discountPercentage` | number | General discount percentage of the contact (0-100); null if no discount is configured. |
| `data.preferredLanguage` | string | Preferred language of the contact; null if not recorded. |
| `data.currency` | string | Default currency of the contact as an ISO 4217 code; null if not recorded. |
| `data.paymentMethod` | object | Preferred payment method of the contact; null if not configured. |
| `data.paymentMethod.type` | string | Payment method type: bank_transfer, card, cash, sepa_direct_debit or other. `bank_transfer`, `card`, `cash`, `other`, `sepa_direct_debit` |
| `data.paymentMethod.customValue` | string | Free-text detail when the type is "other" (for example a method recorded before it was configured); null otherwise. |
| `data.paymentDays` | integer[] | Days of the month on which the contact makes payments; null if not configured. |
| `data.expirationDays` | integer | Default due days for the invoices of the contact; null if not configured. |
| `data.subscribedToMarketing` | boolean | Whether the contact is subscribed to marketing communications. |
| `data.isAppUser` | boolean | Whether the contact has access to the app. |
| `data.customFields` | object<string, any> | Custom field values by custom field identifier; the definitions are in `/api/v1/custom-fields`. |
| `data.createdAt` | string<date-time> | Creation date in ISO 8601 with offset. |
| `data.updatedAt` | string<date-time> | Last update date in ISO 8601 with offset. |
| `data.relatedContacts` | object[] | Contacts related to this contact (e.g. people of a company). |
| `data.relatedContacts.id` | string | Unique identifier of the related contact. |
| `data.relatedContacts.name` | string | Name of the related contact. |
| `data.relatedContacts.commercialName` | string | Trade name of the related contact; null if not recorded. |
| `data.relatedContacts.contactType` | string | Type of the related contact: person or company. `person`, `company` |
| `data.relatedContacts.role` | string | Role of the related contact. `client`, `provider`, `lead`, `debtor`, `creditor`, `student`, `teacher`, `unspecified` |
| `data.relatedContacts.status` | string | Status of the related contact: active, inactive or archived. `active`, `inactive`, `archived` |
| `data.relatedContacts.relationRole` | string | Role of the relationship between the two contacts (e.g. "employee of"); null if not recorded. |
| `meta` | object | Additional information about the response. |
| `meta.warnings` | object[] | Lifecycle warnings; present only when the operation is deprecated. |
| `meta.warnings.code` | string | Stable warning code. `deprecated` |
| `meta.warnings.message` | string | For people: what is deprecated, until when, and what to use. |
| `meta.warnings.sunset` | string | Day (YYYY-MM-DD) the operation stops being served. |
| `meta.warnings.replacement` | string | `operationId` of the operation to use instead, or null if there is none. |
| `meta.warnings.link` | string | Where the deprecation is documented (the changelog). |

*Example response · 200*

```json
{
  "data": {
    "id": "contact_9f3a2b",
    "name": "Example contact",
    "contactType": "person",
    "role": "client",
    "status": "active",
    "nif": "B00000000",
    "commercialName": "Example commercial name",
    "position": "Example position",
    "contactNumber": "2026-0001",
    "emails": [
      {
        "id": "email_9f3a2b",
        "label": "Main",
        "email": "ana.garcia@example.com",
        "isPrimary": true
      }
    ],
    "billingEmail": "ana.garcia@example.com",
    "phoneNumbers": [
      {
        "id": "phone_number_9f3a2b",
        "label": "Main",
        "number": "+34 600 000 000",
        "countryCode": "+34",
        "isPrimary": true
      }
    ],
    "websites": [
      {
        "id": "website_9f3a2b",
        "label": "Main",
        "url": "https://example.com/resource"
      }
    ],
    "addresses": [
      {
        "id": "address_9f3a2b",
        "label": "Main",
        "addressLine1": "Calle de Ejemplo 12",
        "addressLine2": "Calle de Ejemplo 12",
        "city": "Madrid",
        "province": "Madrid",
        "postcode": "28001",
        "country": "ES",
        "isMain": true
      }
    ],
    "folder": "Example folder",
    "discountPercentage": 1,
    "preferredLanguage": "es-ES",
    "currency": "EUR",
    "paymentMethod": {
      "type": "bank_transfer",
      "customValue": "Example custom value"
    },
    "paymentDays": [
      1
    ],
    "expirationDays": 1,
    "subscribedToMarketing": true,
    "isAppUser": true,
    "customFields": {
      "example": "example"
    },
    "createdAt": "2026-09-01T08:00:00.000Z",
    "updatedAt": "2026-09-01T08:00:00.000Z",
    "relatedContacts": [
      {
        "id": "related_contact_9f3a2b",
        "name": "Example related contact",
        "commercialName": "Example commercial name",
        "contactType": "person",
        "role": "client",
        "status": "active",
        "relationRole": "Example relation role"
      }
    ]
  }
}
```

## Errors

| Status | Codes | Meaning |
| --- | --- | --- |
| 400 | `validation_error` | Malformed query or body. `errors[]` lists every offending field with its stable code. |
| 404 | `not_found` | It does not exist or is outside the scope of the API key. |
| 409 | `conflict` | The current state of the resource prevents the operation, a request with that Idempotency-Key is already in progress, or another conditional write (`If-Match`) held the resource for more than five seconds. `errors[0].code` says which: `in_progress` and `lock_timeout` are solved by retrying; `invalid_state` is not, because the state of the resource forbids the operation. |
| 412 | `precondition_failed` | The `If-Match` entity tag does not match the current representation. Read the resource again and retry. |
| 422 | `idempotency_key_reused` | The same key was used before with a different body. Change the key. |

## Deprecation

This operation is not deprecated. Deprecations are announced with a Deprecation header and a sunset date.

---

Canonical URL: https://docs.filmo.io/rest-api/endpoint-reference/contacts/update-a-contact  
Last updated: 2026-10-25