Create connection

Create a new connection for a person. Returns the id and type name of the new connection. While multi-campus is on, a campus-limited caller gets a 403 for a person outside their campus access; unarchived members of their own household pass. A signed-in caller who holds people read under a campus limit, or who has campus permissions, can create one only for people whose profile they can open in full (a 403 campus_add_directory_person_desc otherwise: add the person to your campus first; or campus_add_unread_person_desc when no active campus gives the caller both people read and people write, so they cannot; a business keeps the campus check). API keys and guest users keep the campus check with a plain 403, and so does a campus-limited caller without people read. A connection naming no campus and no organization takes the person's campuses or organizations, narrowed to those a limited caller holds. While multi-org is on, an assignee whose campus limit reaches none of the connection's organizations is refused with a 400 and the message connection_assignee_outside_organization_desc; another campus of the same organization is allowed.

Required permission: Full Write Connections

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The details of the new connection

type
object | null
required

The connection's type. On a connection only the type's id, code, name and fields are populated, and the fields are filtered to this connection's responses. Set the type by code when creating; the type cannot be changed on update.

person
object | null
required

The person the connection is about. Set the person by id when creating; it cannot be changed afterward. Whoever can open the connection sees the person's email, phone and address; while multi-campus is on and you cannot read the person in full, the birthday shows only if the person shares it with the church, and its year and age only if they share their age too.

status
object | null
required

The connection's status. Set by code.

date | null
required

The connection's effective date: a calendar date (yyyy-MM-dd) with no time component.

fields
array of objects | null

Custom fields for this object

fields
campus
object | null

The alphabetically first of campuses; on writes without campuses it stands in for them as a one-campus set with the same checks (a location that is not an active campus is refused); omit both to clear, except that a campus-limited caller keeps the campuses outside their access, and cannot clear a record whose campuses all sit inside it. On the bulk PATCH /connections it is a set of one for every selected connection; 0 or less changes nothing. Ignored while multi-campus is off.

campuses
array of objects | null

The campuses the connection belongs to, ordered by name; empty when it is available to every campus. On writes,
send the ids to set the campus set (an empty list means every campus); omit the property to keep using
campus alone. A campus-limited caller can only add or remove campuses within their access and
cannot change whether the record is available to every campus. On the bulk PATCH /connections the list replaces
every selected connection's campuses (an empty list makes them available to every campus); leaving out both this
and campus keeps their campuses. A new connection naming no campus and no organization takes its
person's campuses or organizations, narrowed to those a limited caller holds; it stays available to every
campus only when the person has neither.
Ignored while multi-campus is off.

campuses
organizations
array of objects | null

The organizations this record is scoped to, all their campuses now and in the future, in name order; empty
unless the record is organization-scoped (then campuses is empty). Honoured only while multi-org is
on. Omit to keep the current organizations.

organizations
assignee
object | null

The person the connection is assigned to. Set by id, or omit to leave it unassigned; changing the assignee emails the new and former assignees. While multi-org is on, an assignee whose campus limit reaches none of the connection's organizations is refused; another campus of the same organization is allowed. On reads while multi-campus is on and you cannot read the assignee in full, it shows only what the assignee shares with the church.

date | null

The connection's due date, a calendar date (yyyy-MM-dd). Required when an assignee is set.

date | null

The date the connection was completed, a calendar date (yyyy-MM-dd). Required by the public completion endpoint when the status is completed; on create and update, omitting it with a completed status stores the church's current date.

string | null

The connection's outcome notes.

string | null

The connection's initial notes.

string | null

Adds a new comment to the connection when saving. To add a comment on its own, use /api/connections/{id}/comments.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json