Write draft
Creates, replaces, or clears a message, connection request, or sequence draft
Authorizations
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
- Option 1
- Option 2
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.
LinkedIn account ID returned by GET /v1/accounts.
^[1-9][0-9]*$Existing conversation ID returned by GET /v1/conversations. Provide exactly one target.
1Contact ID returned by GET /v1/contacts or a contact import's results. Provide exactly one target.
^[1-9][0-9]*$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.
1Files 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.
1Ordered 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.
1Template 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.
1A 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.
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.
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.