Coghub icon

Coghub

Interagir com a API do Coghub

Actions129

Messages → Create A New Message In A Conversation

AI-generated

Summary

Send a new message in an existing conversation by specifying its content, type, privacy, and additional attributes.

Inputs

  • Content (required) — The textual content of the message to send.
  • Message Type — Specifies whether the message is outgoing or incoming.
  • Private — Flag indicating if the message is a private note.
  • Content Type — Defines the content format, such as text, email input, cards, or forms.
  • Content Attributes — JSON object with attributes tailored to the chosen content type.
  • Campaign Id — Identifier for the campaign to which the message belongs.
  • Template Params — JSON object with WhatsApp template parameters for structured messages.

Output shape

a single record representing the created message

The response contains the created message data. Input batching and request-related options like timeout or proxy can be configured but do not affect the output shape.

Examples

Example 1: Create a standard outgoing text message

Set Content with the message text, Message Type to 'outgoing', and optionally configure Campaign Id.

Example 2: Send a structured WhatsApp message

Provide Template Params with appropriate structured message parameters and set Content Type accordingly.

Links

Discussion