Skip to content

Broadcast to customers

Send one SMS or email notification to multiple recipients and track each resulting delivery.

A broadcast turns one notification into individual Chimes for many recipients. Use it for shipping updates, service notices, and campaigns when every recipient should receive the same SMS or email and each delivery still needs its own tracking record.

Prerequisites

  • At least one valid inline phone number or email address, or a saved customer with the contact method you intend to use
  • An allowed sender address for email broadcasts

Choose one audience and one content source

Every recipient in a broadcast must resolve to the same transport. An SMS broadcast can contain only phone recipients; an email broadcast can contain only email recipients. If any recipient is malformed, refers to an unavailable customer, or lacks the selected contact method, the request is rejected before the broadcast is accepted.

Use one of these recipient shapes:

Inline recipient

new {
  recipients = new[] {
    new {
      type = "phone",
      phone = new {
        number = "+233544998605",
      },
      name = "Gloria Kesewaa",
    },
  },
}
{
  "recipients": [
    {
      "type": "phone",
      "phone": {
        "number": "+233544998605"
      },
      "name": "Gloria Kesewaa"
    }
  ]
}
broadcast.CreateParams{
  Recipients: []string{
    "+233544998605",
  },
}
import com.inttegro.chimes.BroadcastChimeParams;
import java.util.List;

var params = BroadcastChimeParams.builder()
  .recipients(List.of(
      "+233544998605"
    ))
  .build();
[
  'recipients' => [
    [
      'type' => 'phone',
      'phone' => [
        'number' => '+233544998605',
      ],
      'name' => 'Gloria Kesewaa',
    ],
  ],
]
inttegro.broadcast.Request(
  recipients=[
    inttegro.chime.InlineRecipientInputVariant1(
      type="phone",
      phone=inttegro.chime.InlineRecipientInputVariant1Phone(
        number="+233544998605",
      ),
      name="Gloria Kesewaa",
    ),
  ],
)
{
  recipients: [
    {
      type: "phone",
      phone: {
        number: "+233544998605",
      },
      name: "Gloria Kesewaa",
    },
  ],
}
{
  recipients: [
    {
      type: "phone",
      phone: {
        number: "+233544998605",
      },
      name: "Gloria Kesewaa",
    },
  ],
}

Saved customer

new {
  recipients = new[] {
    new {
      customer_id = "cu_gloria_k",
      transport = "sms",
    },
  },
}
{
  "recipients": [
    {
      "customer_id": "cu_gloria_k",
      "transport": "sms"
    }
  ]
}
broadcast.CreateParams{
  Recipients: []string{
    "cu_gloria_k",
  },
}
import com.inttegro.chimes.BroadcastChimeParams;
import java.util.List;

var params = BroadcastChimeParams.builder()
  .recipients(List.of(
      "cu_gloria_k"
    ))
  .build();
[
  'recipients' => [
    [
      'customer_id' => 'cu_gloria_k',
      'transport' => 'sms',
    ],
  ],
]
inttegro.broadcast.Request(
  recipients=[
    inttegro.chime.SavedCustomerRecipientInput(
      customer_id="cu_gloria_k",
      transport="sms",
    ),
  ],
)
{
  recipients: [
    {
      customer_id: "cu_gloria_k",
      transport: "sms",
    },
  ],
}
{
  recipients: [
    {
      customerId: "cu_gloria_k",
      transport: "sms",
    },
  ],
}

For SMS, set messageTemplate to either raw message text or a stored SMS template reference. For email, provide either email or a stored email template reference in messageTemplate. Do not combine the inline and stored-template content sources.

Submit the broadcast

Call Broadcast Chimes. A successful request returns 202 Accepted with a id; it means the audience and content were accepted for asynchronous processing, not that every message has already been delivered.

The examples below send the same SMS to three inline recipients. sender is optional in the wire contract, but no broadcast-specific default is applied, so production integrations should provide it explicitly.

Broadcast notification

POST/chimes/broadcast
cURLbash
curl https://api.inttegro.com/chimes/broadcast \
  -H "Authorization: Bearer $INTTEGRO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-or-12345-shipped" \
  -d '{
    "message_template": "Your order OR-12345 has shipped. Track it at https://yourstore.example/track/or-12345.",
    "purpose": "shipping_update",
    "recipients": [
      { "type": "phone", "phone": { "number": "+233544998605" } },
      { "type": "phone", "phone": { "number": "+233501234567" } },
      { "type": "phone", "phone": { "number": "+233208765432" } }
    ],
    "sender": "YourStore"
  }'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.chimes.broadcast({
  messageTemplate: "Your order OR-12345 has shipped. Track it at https://yourstore.example/track/or-12345.",
  purpose: "shipping_update",
  recipients: [
    {
      type: "phone",
      phone: {
        number: "+233544998605",
      },
    },
    {
      type: "phone",
      phone: {
        number: "+233501234567",
      },
    },
    {
      type: "phone",
      phone: {
        number: "+233208765432",
      },
    },
  ],
  sender: "YourStore",
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/broadcast"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := broadcast.CreateParams{
    MessageTemplate: "Your order OR-12345 has shipped. Track it at https://yourstore.example/track/or-12345.",
    Purpose: "shipping_update",
    Recipients: []string{
      "+233544998605",
      "+233501234567",
      "+233208765432",
    },
    Sender: "YourStore",
  }
  result, err := client.Chimes.Broadcast(ctx, params)
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.chimes.broadcast(inttegro.broadcast.Request(
  message_template="Your order OR-12345 has shipped. Track it at https://yourstore.example/track/or-12345.",
  purpose="shipping_update",
  recipients=[
    inttegro.chime.InlineRecipientInputVariant1(
      type="phone",
      phone=inttegro.chime.InlineRecipientInputVariant1Phone(
        number="+233544998605",
      ),
    ),
    inttegro.chime.InlineRecipientInputVariant1(
      type="phone",
      phone=inttegro.chime.InlineRecipientInputVariant1Phone(
        number="+233501234567",
      ),
    ),
    inttegro.chime.InlineRecipientInputVariant1(
      type="phone",
      phone=inttegro.chime.InlineRecipientInputVariant1Phone(
        number="+233208765432",
      ),
    ),
  ],
  sender="YourStore",
))
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->chimes->broadcast([
  'message_template' => 'Your order OR-12345 has shipped. Track it at https://yourstore.example/track/or-12345.',
  'purpose' => 'shipping_update',
  'recipients' => [
    [
      'type' => 'phone',
      'phone' => [
        'number' => '+233544998605',
      ],
    ],
    [
      'type' => 'phone',
      'phone' => [
        'number' => '+233501234567',
      ],
    ],
    [
      'type' => 'phone',
      'phone' => [
        'number' => '+233208765432',
      ],
    ],
  ],
  'sender' => 'YourStore',
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.chimes.broadcast(
  message_template: "Your order OR-12345 has shipped. Track it at https://yourstore.example/track/or-12345.",
  purpose: "shipping_update",
  recipients: [
    {
      type: "phone",
      phone: {
        number: "+233544998605",
      },
    },
    {
      type: "phone",
      phone: {
        number: "+233501234567",
      },
    },
    {
      type: "phone",
      phone: {
        number: "+233208765432",
      },
    },
  ],
  sender: "YourStore"
)
Javajava
import com.inttegro.Client;
import com.inttegro.chimes.BroadcastChimeParams;
import java.util.List;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = BroadcastChimeParams.builder()
      .messageTemplate("Your order OR-12345 has shipped. Track it at https://yourstore.example/track/or-12345.")
      .purpose("shipping_update")
      .recipients(List.of(
          "+233544998605",
          "+233501234567",
          "+233208765432"
        ))
      .sender("YourStore")
      .build();
    var result = client.chimes().broadcast(params);
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Chimes.BroadcastAsync(new {
  message_template = "Your order OR-12345 has shipped. Track it at https://yourstore.example/track/or-12345.",
  purpose = "shipping_update",
  recipients = new[] {
    new {
      type = "phone",
      phone = new {
        number = "+233544998605",
      },
    },
    new {
      type = "phone",
      phone = new {
        number = "+233501234567",
      },
    },
    new {
      type = "phone",
      phone = new {
        number = "+233208765432",
      },
    },
  },
  sender = "YourStore",
});

For an email broadcast, keep the recipient transport consistent and replace the SMS messageTemplate string with an email object containing email.from, email.subject, and email.text. Optional email.headers and email.html are validated before acceptance. You may instead use a published email template reference in messageTemplate.

Track execution and delivery

Store the returned broadcast ID and retrieve it with Lookup a broadcast. The response changes as processing progresses:

The accepted broadcast does not promise an exact send or delivery time. Provider processing and recipient networks can delay or reject individual transmissions, so use each Chime’s transmission object as the delivery record.

Cancel before completion

Cancel a broadcast stops a broadcast only while it has not completed. Immediate broadcasts may complete quickly, so treat cancellation as a narrow recovery control, not as an approval window.

The cancel endpoint requires broadcastId. A fresh cancellation request for an already completed or already canceled broadcast returns an error.

Type to search…

↑↓ navigate↵ selectEsc close