API Reference / Relationship Types

POST /relationship_types

Create a new relationship type

Creates a relationship type from a variants list: one variant name makes a symmetrical type (Partner/Partner), two make a directional one (Manager/Reports to). Whether a type is symmetrical is derived from that count, not set directly. An account is limited to 50 types, and variant names to 35 characters.

Request body

  • variantsarray<object>

    The relationship variants.

    array item fields →
    • namestring

      The relationship variant name.

Responses

201 Created
  • statusintegerint32

    Response code

  • messagestring

    Response message

  • timestampintegerunix-timestamp

    Response time

  • dataobject
    object fields →
    • relationship_typesarray<object>
      array item fields →
      • relationship_typeobject

        The relationship types that identifies the relationships between the contacts.

        object fields →
        • idstringbson-id

          ID of the relationship type

        • symmetricalboolean

          Is the relationship symmetrical? (read only).

        • relationship_variantsarray<object>required

          The directional variants of this relationship type.

          array item fields →
          • idstringbson-id

            ID of the relationship type

          • namestring

            The relationship variant name

        • created_atstringdate-time

          Creation time of the relationship type

        • modified_atstringdate-time

          Last modification time of the relationship type

Standard error responses: 400 · 401 · 403 · 404 · 409 · 500 — shared across the API. See Errors.

Related guides