Contacts

Relate two contacts

Ties a contact to another with a role (the contact person of a company, the director of a production).

POST
/api/v1/contacts/{contactId}/related-contacts

Request examples

curl https://app.filmo.io/api/v1/contacts/cont_8f2a1c/related-contacts \
  --request POST \
  --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 '{
  "relatedContactId": "cont_3d9b77",
  "relationRole": "Persona de contacto en rodaje"
}'
{
  "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"
      }
    ]
  }
}

Generated from the schema

A company relating a person must give the role (400 otherwise); a person relating a company must not (the role lives on the inverse relationship); any other pair is free and the role is recorded. 409 if the pair was already related. Returns the relationship as recorded. Returns the full contact, with relatedContacts as they now stand, the same projection as its GET.

Authorizations

Bearer API key with the scope below. contacts:write

Headers

Idempotency-Keystring

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.

Limits: min length 1, max length 255

Example:"9f1c2f4e-3a5b-4f6d-8e7a-0b1c2d3e4f5a"

If-Matchstring

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.

Example:"\"3sT3d9pBvZq4h2N0w8x1YkLmQ7c\""

Path parameters

contactIdstringRequired

Identifier of the main contact.

Limits: min length 1

Body

application/json

Body schema: RelatedContactCreateBody

relationRolestring

Role of the relationship, e.g. "Director", "Contact person". Required when a company relates a person; not allowed when a person relates a company.

Limits: max length 200

relatedContactIdstringRequired

Contact to relate to.

Limits: min length 1

Response

application/json

Successful response.

Response schema: ContactDetailDto

Envelope: ContactDetailResponse. meta.warnings is present only when the operation is deprecated.

Headers: X-Request-Id · RateLimit-Limit · RateLimit-Remaining · RateLimit-Reset · ETag · Idempotent-Replay

dataobject

The contact in full, as returned by the API.

Show child attributes
data.idstring

Unique identifier of the contact.

data.namestring

Contact name (person or company).

data.contactTypestring

Contact type: person (individual) or company (business).

Available options: person, company

data.rolestring

Contact role: client, provider, lead, debtor, creditor, student, teacher or unspecified.

Available options: client, provider, lead, debtor, creditor, student, teacher, unspecified

data.statusstring

Contact status: active (operational), inactive (deactivated) or archived (closed, kept for historical records).

Available options: active, inactive, archived

data.nifstring | null

NIF/CIF or tax identification number; null if not recorded.

data.commercialNamestring | null

Trade name; null if it matches the name or is not recorded.

data.positionstring | null

Job title or position of the contact person; null if not recorded.

data.contactNumberstring | null

Contact number assigned by the account (internal reference); null if not recorded.

data.emailsobject[]

List of email addresses of the contact.

Show child attributes
data.emails.idstring

Internal identifier of the email within the contact.

data.emails.labelstring | null

Descriptive label of the email; null if it has none.

data.emails.emailstring

Email address.

data.emails.isPrimaryboolean

Whether this is the primary email of the contact.

data.billingEmailstring | null

Dedicated billing email; null means the primary email is used.

data.phoneNumbersobject[]

List of phone numbers of the contact.

Show child attributes
data.phoneNumbers.idstring

Internal identifier of the phone number within the contact.

data.phoneNumbers.labelstring | null

Descriptive label of the phone number; null if it has none.

data.phoneNumbers.numberstring

Phone number.

data.phoneNumbers.countryCodestring | null

International country calling code (e.g. "+34"); null if not recorded.

data.phoneNumbers.isPrimaryboolean

Whether this is the primary phone number of the contact.

data.websitesobject[]

List of websites of the contact.

Show child attributes
data.websites.idstring

Internal identifier of the website within the contact.

data.websites.labelstring | null

Descriptive label of the website; null if it has none.

data.websites.urlstring

Website URL.

data.addressesobject[]

List of addresses of the contact.

Show child attributes
data.addresses.idstring

Internal identifier of the address within the contact.

data.addresses.labelstring | null

Descriptive label of the address; null if it has none.

data.addresses.addressLine1string | null

First line of the address; null if not recorded.

data.addresses.addressLine2string | null

Second line of the address; null if not recorded.

data.addresses.citystring | null

City; null if not recorded.

data.addresses.provincestring | null

Province or region; null if not recorded.

data.addresses.postcodestring | null

Postcode; null if not recorded.

data.addresses.countrystring | null

Country; null if not recorded.

data.addresses.isMainboolean

Whether this is the main address of the contact.

data.folderstring | null

Folder or organizational grouping; null if the contact is not classified.

data.discountPercentagenumber | null

General discount percentage of the contact (0-100); null if no discount is configured.

data.preferredLanguagestring | null

Preferred language of the contact; null if not recorded.

data.currencystring | null

Default currency of the contact as an ISO 4217 code; null if not recorded.

data.paymentMethodobject | null

Preferred payment method of the contact; null if not configured.

Show child attributes
data.paymentMethod.typestring

Payment method type: bank_transfer, card, cash, sepa_direct_debit or other.

Available options: bank_transfer, card, cash, other, sepa_direct_debit

data.paymentMethod.customValuestring | null

Free-text detail when the type is "other" (for example a method recorded before it was configured); null otherwise.

data.paymentDaysinteger[] | null

Days of the month on which the contact makes payments; null if not configured.

data.expirationDaysinteger | null

Default due days for the invoices of the contact; null if not configured.

data.subscribedToMarketingboolean

Whether the contact is subscribed to marketing communications.

data.isAppUserboolean

Whether the contact has access to the app.

data.customFieldsobject<string, any>

Custom field values by custom field identifier; the definitions are in /api/v1/custom-fields.

data.createdAtstring<date-time>

Creation date in ISO 8601 with offset.

data.updatedAtstring<date-time>

Last update date in ISO 8601 with offset.

data.relatedContactsobject[]

Contacts related to this contact (e.g. people of a company).

Show child attributes
data.relatedContacts.idstring

Unique identifier of the related contact.

data.relatedContacts.namestring

Name of the related contact.

data.relatedContacts.commercialNamestring | null

Trade name of the related contact; null if not recorded.

data.relatedContacts.contactTypestring

Type of the related contact: person or company.

Available options: person, company

data.relatedContacts.rolestring

Role of the related contact.

Available options: client, provider, lead, debtor, creditor, student, teacher, unspecified

data.relatedContacts.statusstring

Status of the related contact: active, inactive or archived.

Available options: active, inactive, archived

data.relatedContacts.relationRolestring | null

Role of the relationship between the two contacts (e.g. "employee of"); null if not recorded.

metaobject

Additional information about the response.

Show child attributes
meta.warningsobject[]

Lifecycle warnings; present only when the operation is deprecated.

Show child attributes
meta.warnings.codestring

Stable warning code.

Available options: deprecated

meta.warnings.messagestring

For people: what is deprecated, until when, and what to use.

meta.warnings.sunsetstring

Day (YYYY-MM-DD) the operation stops being served.

meta.warnings.replacementstring | null

operationId of the operation to use instead, or null if there is none.

Errors

StatusCodesMeaning
400validation_errorMalformed query or body. errors[] lists every offending field with its stable code.
404not_foundIt does not exist or is outside the scope of the API key.
409conflictThe 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.
412precondition_failedThe If-Match entity tag does not match the current representation. Read the resource again and retry.
422idempotency_key_reusedThe same key was used before with a different body. Change the key.

401, 403, 429, 500 can be returned by any operation. Errors

Deprecation

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

  • CRM

    Contact

    The contact, as returned by the API.