UtilitayDevelopers
Ravenraven
Get an API key
API reference

Links

/links

A link says which people hear about a membership. In the Political party pack the label reads “linked to” and the contact a primary-only rule writes to is called the “Main contact”. Links upsert on the pair; there is no unlink through the API.

POSTLink a person to a membership

Requires contacts:write. Upserts on (contact_id, subject_id): posting the same pair again updates relationship and is_primary instead of making a second link.

Body parameters
contact_iduuid · required
subject_iduuid · required
relationshipstring · optional
This pack has one value (Self), so Raven fills it in when you leave it out.
is_primaryboolean · default false
The main contact. Exactly one per membership; it is who a primary-only rule writes to.
Returns

201 with the link, the first time and every time after.

Response body

One link: the same fields in every pack. Press Response on the sample to see one whole.

FieldTypeDescription
tenant_iduuidThe instance.
contact_iduuid
subject_iduuid
relationshipstringA value from the Political party pack's relationship_options; filled in by Raven when the pack has only one.Varies by pack
is_primarybooleanExactly one per membership.
created_atdatetime

On failure the body is { error, code } instead.