Chimes
in package
Chimes resource for sending notifications via SMS and email.
Chimes deliver transactional messages to customers instantly. Use chimes for order confirmations, payment receipts, shipping updates, or custom notifications triggered by your application logic.
Tags
Table of Contents
Methods
- __construct() : mixed
- broadcast() : BroadcastCreationDetail
- Broadcast a chime to multiple recipients.
- lookup() : Chime
- Retrieve details of a previously sent chime.
- page() : ChimePage
- Retrieve a paginated list of chimes.
- schedule() : ScheduleCreationDetail
- Schedule a notification to be sent at a future time.
- send() : Chime
- Send an immediate notification to a recipient via SMS or email.
Methods
__construct()
public
__construct(HttpClient $http) : mixed
Parameters
- $http : HttpClient
broadcast()
Broadcast a chime to multiple recipients.
public
broadcast(array<string|int, mixed> $payload) : BroadcastCreationDetail
Queues a broadcast with a shared message template. Use broadcasts for marketing announcements or bulk notifications.
Parameters
- $payload : array<string|int, mixed>
-
Broadcast parameters
- recipients: array - List of recipient phone numbers or emails (required)
- message_template: string - Message template to send (required)
- service_name: string - Service initiating the broadcast (required)
- sender: string - Sender identifier (optional)
- purpose: string - Purpose of this broadcast (optional)
- preferred_gateway: string - Preferred delivery gateway (optional)
- request_meta: array - Request controls such as idempotency_key (optional)
Return values
BroadcastCreationDetail —Broadcast summary
lookup()
Retrieve details of a previously sent chime.
public
lookup(string $chimeId) : Chime
Returns full chime information including recipient, message content, transport method, delivery status, and transmission timestamps. Use this to verify delivery or debug notification issues.
Parameters
- $chimeId : string
-
Unique identifier of the chime to retrieve (required)
Tags
Return values
Chime —Complete chime object with delivery details
page()
Retrieve a paginated list of chimes.
public
page([array<string|int, mixed> $payload = [] ]) : ChimePage
Parameters
- $payload : array<string|int, mixed> = []
Return values
ChimePageschedule()
Schedule a notification to be sent at a future time.
public
schedule(array<string|int, mixed> $payload) : ScheduleCreationDetail
Creates a chime that will be sent automatically at the specified timestamp. Use scheduled chimes for appointment reminders, subscription renewal notices, or time-delayed notifications.
Parameters
- $payload : array<string|int, mixed>
-
Scheduled chime parameters
- recipients: array - List of recipient phone numbers or emails (required)
- full_message: string - Message content to send (required)
- send_after: string - ISO 8601 timestamp when chime should be sent (required)
- sender_id: string - Sender identifier (optional)
- purpose: string - Purpose of this scheduled chime (optional)
Tags
Return values
ScheduleCreationDetail —Scheduled chime object with send time
send()
Send an immediate notification to a recipient via SMS or email.
public
send(array<string|int, mixed> $payload) : Chime
Delivers a message using the specified transport method (sms or email). Messages are sent synchronously, and delivery status is returned in the response. Use chimes for time-sensitive notifications like OTPs, order confirmations, or payment receipts.
Parameters
- $payload : array<string|int, mixed>
-
Chime parameters
- recipient: string - Phone number (E.164 format) or email address (required)
- message: string - Message content to send (required)
- transport: string - Delivery method: 'sms' or 'email' (optional, auto-detected from recipient)
- sender: string - Sender name/number for SMS or from-address for email (optional)
Tags
Return values
Chime —Sent chime with delivery status