Skip to content
Navigation

Send a customer communication

POST
https://api.caretlegal.net/communications/send

Authorization

  • InternalApiKey
    optional
    API key in header
  • PartnerBearer
    optional
    HTTP

Header parameters

  • x-organization-id
    string
    required

    Local organization UUID used to scope ACF resolution and communication logging.

    format: uuid

Request body JSON required

  • recipientRef
    object
    required
    • entityType
      customer
      required

      Entity type to resolve through ACF.

    • acfSource
      string
      required

      Connector/source name in the ACF ledger.

    • sourceId
      string
      required

      Source-system entity ID to resolve to a local customer.

  • communicationType
    optional
    generic
    or
    customer_statement

    Use generic for ad-hoc email or customer_statement for a statement of account email.

    default: "generic"
  • recipients
    optional
    object

    Canonical recipient envelope. to is required when using recipients; contact.email remains supported as a legacy primary recipient.

    • to
      array of
      required

      One of the following:

      • string
      • object
        • email
          string
          required
          format: email
        • name
          optional
          string
    • cc
      optional
      array of

      One of the following:

      • string
      • object
        • email
          string
          required
          format: email
        • name
          optional
          string
    • bcc
      optional
      array of

      One of the following:

      • string
      • object
        • email
          string
          required
          format: email
        • name
          optional
          string
  • contact
    optional
    object

    Legacy primary recipient override. Prefer recipients.to for new integrations.

    • email
      optional
      string

      Recipient email. Defaults to the local customer email when omitted.

      format: email
    • firstName
      optional
      string
    • lastName
      optional
      string
    • name
      optional
      string

      Display name used by generic email rendering when first/last are omitted.

  • subject
    optional
    string

    Required for generic communications. Customer statements generate their own subject.

  • bodyHtml
    optional
    string

    Rendered HTML body. Either bodyHtml or bodyText is required.

  • bodyText
    optional
    string

    Plain text body. Used to derive HTML when bodyHtml is omitted.

  • metadata
    optional
    object

    Caller metadata. The API fortifies this with local communication and ACF resolution metadata.

  • dateRange
    optional
    object

    Statement period for customer_statement. Defaults to the trailing 12 months when omitted.

    • startDate
      string
      required
      format: date
    • endDate
      string
      required
      format: date
  • ccEmails
    optional
    array of
    string

    Additional statement CC recipients.

    format: email
  • customMessage
    optional
    string

    Optional custom message for customer_statement emails.

  • organizationName
    optional
    string

    Optional display name used by the statement email template.

  • idempotencyKey
    optional
    string

    Optional caller-supplied statement idempotency key.

  • templateVariables
    optional
    map of
    string
  • replyTo
    optional
    string
    format: email
  • cc
    optional

    One of the following:

    • string
    • array<string>
  • bcc
    optional

    One of the following:

    • string
    • array<string>

Example requests

{
  "communicationType": "generic",
  "recipientRef": {
    "entityType": "customer",
    "acfSource": "salesforce",
    "sourceId": "001xx000003DGbYAAW"
  },
  "contact": {
    "email": "billing@example.com",
    "name": "Example Customer"
  },
  "subject": "Action required: billing update",
  "bodyHtml": "<p>Please update your billing information.</p>",
  "metadata": {
    "campaignId": "sf-campaign-123"
  }
}

Returns

202

Communication accepted, sent through the handler, and logged locally.

JSON
  • success
    optional
    boolean
  • data
    optional
    object
    • communicationId
      optional
      string

      Local customer_communications ID.

      format: uuid
    • messageId
      optional
      string

      Provider message ID when available.

    • customerId
      optional
      string

      Resolved local customers.id.

      format: uuid
    • organizationId
      optional
      string

      Resolved local organizations.id.

      format: uuid
    • recipientEmail
      optional
      string
      format: email
    • recipientEnvelope
      optional
      object
      • to
        optional
        array of
        string
        format: email
      • cc
        optional
        array of
        string
        format: email
      • bcc
        optional
        array of
        string
        format: email
    • strategy
      optional
      string
    • netsuiteCustomerId
      optional
      string

      NetSuite customer ID used for statement generation when applicable.

    • dateRange
      optional
      object
      • startDate
        optional
        string
        format: date
      • endDate
        optional
        string
        format: date

400

Invalid request or organization scope.
JSON
  • success
    optional
    boolean
  • error
    optional
    string
  • details
    optional
    array of
    object
    • path
      optional
      string
    • message
      optional
      string

401

Missing or invalid API key.
JSON
  • success
    optional
    boolean
  • error
    optional
    string
  • details
    optional
    array of
    object
    • path
      optional
      string
    • message
      optional
      string

403

API key lacks communications:write.
JSON
  • success
    optional
    boolean
  • error
    optional
    string
  • details
    optional
    array of
    object
    • path
      optional
      string
    • message
      optional
      string

404

Recipient reference did not resolve to a local customer.
JSON
  • success
    optional
    boolean
  • error
    optional
    string
  • details
    optional
    array of
    object
    • path
      optional
      string
    • message
      optional
      string

Type to search…

↑↓ navigate↵ selectEsc close