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.
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.
1Values 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.