*REST API › Endpoint reference › CRM › Contacts*

# Unrelate two contacts

> Removes the relationship between two contacts, in both directions, whichever order the pair is given in.

It does NOT delete either contact. 404 if they were not related. Returns the main contact in detail, the same projection as its GET, so the remaining `relatedContacts` come back with it.

`DELETE /api/v1/contacts/{contactId}/related-contacts/{relatedContactId}` — scope `contacts:write`

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

## 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 | Identifier of the main contact. |
| `relatedContactId` | string | Yes | Identifier of the related contact. |

## Request examples

*Unrelate two contacts*

**cURL**

```bash
curl https://app.filmo.io/api/v1/contacts/cont_8f2a1c/related-contacts/rela_8f2a1c \
  --request DELETE \
  --header "Authorization: Bearer $FILMO_API_KEY" \
  --header "Idempotency-Key: $(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid)"
```

**Node.js**

```javascript
fetch('https://app.filmo.io/api/v1/contacts/cont_8f2a1c/related-contacts/rela_8f2a1c', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer YOUR_FILMO_API_KEY',
    'Idempotency-Key': crypto.randomUUID()
  }
})
```

**Python**

```python
import uuid
import requests

requests.delete(
    "https://app.filmo.io/api/v1/contacts/cont_8f2a1c/related-contacts/rela_8f2a1c",
    headers={
      "Authorization": "Bearer YOUR_FILMO_API_KEY",
      "Idempotency-Key": str(uuid.uuid4())
    }
)
```

## Response

Response schema: `ContactDetailDto`

| Status | Description |
| --- | --- |
| 200 | Successful response. |
| 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 |
| --- | --- | --- |
| 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/unrelate-two-contacts  
Last updated: 2026-10-25