Skip to main content
POST

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <credential>, where the credential is either:

  • an API key (sk_…), generated by an organization admin in Settings, for scripts and automation;
  • an access token from tth auth login (the TalkToHumans CLI), which any member of the workspace can use.

Both resolve to the same organization and user. A login token acts in the user's workspace: one with no workspace yet returns 403 workspace_setup_required, and one in several workspaces returns 403 forbidden (use an API key instead).

Body

application/json

Provide exactly one target: conversation_id or contact_id. Provide exactly one of draft_message (with or without attachments), steps, template_id, connection_request, or clear.

account_id
string
required

LinkedIn account ID returned by GET /v1/accounts.

Pattern: ^[1-9][0-9]*$
conversation_id
string
required

Existing conversation ID returned by GET /v1/conversations. Provide exactly one target.

Minimum string length: 1
contact_id
string

Contact ID returned by GET /v1/contacts or a contact import's results. Provide exactly one target.

Pattern: ^[1-9][0-9]*$
draft_message
string

Plain-text draft. Surrounding whitespace is trimmed and the existing draft for the selected compose context is replaced. Provide exactly one of draft_message, steps, template_id, connection_request, or clear.

Minimum string length: 1
attachments
object[]

Files the draft_message sends, in order, each written as {"file_id": ...} from POST /v1/files. Can stand without draft_message, like a voice message. A message carries up to 20 MB of files and one audio file; InMail carries none. Sequence steps carry their own attachments.

Minimum array length: 1
steps
object[]

Ordered sequence steps staged in the conversation for the user to launch in TalkToHumans. Provide exactly one of draft_message, steps, template_id, connection_request, or clear.

Minimum array length: 1
template_id
string

Template ID returned by GET /v1/templates. Writes the draft from a message or sequence template. Provide exactly one of draft_message, steps, template_id, connection_request, or clear.

Minimum string length: 1
connection_request
object

A connection request drafted on its own, without a sequence. The user sends it with the Connect button in TalkToHumans. Send {} for an invite without a note.

clear
boolean

Set to true to delete the draft of the selected conversation or contact instead of writing one. Succeeds when there is no draft. Provide exactly one of draft_message, steps, template_id, connection_request, or clear.

variables
object

Values for the template's own {{key}} variables, keyed by variable key. Only with template_id. Variables can be left unfilled by omitting them or passing an empty value; they stay in the draft for the user to fill in TalkToHumans. Keys the template does not use return 400 bad_request listing them.

Response

Draft saved in TalkToHumans. The message was not sent.

data
object
required