Skip to main content
POST
Create a message

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
class
string
required

The delivery channel. Either "sms" or "email".

type
string
required

The recipient type. Use "contact" to send to a single contact. (Other values: bookmark, trigger, campaign, trigger_lesson, trigger_wait.)

type_id
string
required

The ID of the recipient. When type is "contact", this is the contact's ID.

body
string
required

The message body. Supports Liquid syntax for personalization.

subject
string

Email subject line. Required when class is "email". Supports Liquid syntax.

close
boolean
default:false

Close the conversation thread after sending.

inherit_thread_close_state
boolean
default:false

Adopt the thread's existing closed state instead of setting it explicitly.

Response

Success.

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

Create returns only an id and a fixed placeholder time — not the message record.