Skip to main content
POST
Create a contact

Authorizations

x-conveyour-token
string
header
required

Your API key token. Contacts endpoints require a Server-only — Full API key — see Authentication.

Query Parameters

teams[]
string[]

Team scope for the request, as one or more team ObjectIds. The brackets are required: PHP keeps only the last value for a repeated plain key, so teams=A&teams=B silently resolves to B alone. On requests with a JSON body you may send teams (no brackets) in the body instead.

Values that are not valid ObjectIds are silently ignored — a mistyped team ID behaves as if no team was sent. See the teams section of the API conventions guide.

Body

application/json
first_name
string
required

Required. Checked after field-level errors are empty.

last_name
string
required

Required. Checked after field-level errors are empty.

email
string<email>

Optional. Stored lowercased when present. Not required to create a contact.

mobile
string

Mobile phone number in E.164 format.

teams
string[]

Team scope for this request, as team ObjectIds. Values that are not valid ObjectIds are silently ignored.

Example:
{key}
any

Org-defined contact field machine names. crew_role in the example is a sample organization field, not a built-in. An unknown key fails the whole create.

Response

HTTP 200 on success and on a failed create. Branch on status. Failure message is failed to create contact.

The common response envelope shared by all ConveYour endpoints.

status
enum<string>

ok on success, failed on error.

Available options:
ok,
failed
message
string

Human-readable description of the result.

data
object

On success, the created contact ref. On failure, a one-element list. Each element has messages keyed by the request field name and format set to :message.