Email Broadcast System - API Documentation
Full reference for all commands, modes, and webhook endpoints.
In all URLs below, replace XXX with your AI Apps Account ID, found in your account settings.
How Endpoints Work
Two ways to call each endpoint - read this first
App Command (API Call)
POST your request to
Mode / Webhook (Direct URL)
POST directly to the endpoint URL shown in each section. The fields go in the POST body as standard form fields (the same fields you would include in an HTML form POST). Use this method for provider webhooks, website forms, or any third-party system that sends form data. No API key is required - the account ID is part of the URL.
POST your request to
https://api.aiappsapi.com with your API key and account ID in the POST body. The fields described in each section below go inside the jsonData POST field as a JSON-encoded string. Use this method when your server is making the call and you have your API credentials available.Mode / Webhook (Direct URL)
POST directly to the endpoint URL shown in each section. The fields go in the POST body as standard form fields (the same fields you would include in an HTML form POST). Use this method for provider webhooks, website forms, or any third-party system that sends form data. No API key is required - the account ID is part of the URL.
ISP group values used throughout this API:
gmail, outlook, yahoo, aol, cables, other. The system automatically detects the ISP group from the email domain, so you rarely need to pass this value yourself.
Provider Webhook URLs
Configure these in your email service provider dashboard
Each supported email provider gets a dedicated webhook URL. Enter this URL in your provider account wherever it asks for an event notification URL, a webhook endpoint, or a delivery callback URL. The system tracks deliveries, bounces, opens, clicks, spam complaints and unsubscribes automatically. Hard bounces, spam complaints and unsubscribes will suppress the email address from all future sends.
SendGrid
https://api.aiappsapi.com/XXX/emailbroadcast/sendgrid
Mailgun
https://api.aiappsapi.com/XXX/emailbroadcast/mailgun
Postmark
https://api.aiappsapi.com/XXX/emailbroadcast/postmark
Amazon SES
https://api.aiappsapi.com/XXX/emailbroadcast/ses
SMTP2GO
https://api.aiappsapi.com/XXX/emailbroadcast/smtp2go
Brevo (Sendinblue)
https://api.aiappsapi.com/XXX/emailbroadcast/brevo
SparkPost
https://api.aiappsapi.com/XXX/emailbroadcast/sparkpost
Elastic Email
https://api.aiappsapi.com/XXX/emailbroadcast/elasticemail
Mailtrap
https://api.aiappsapi.com/XXX/emailbroadcast/mailtrap
Mailjet
https://api.aiappsapi.com/XXX/emailbroadcast/mailjet
SMTP.com
https://api.aiappsapi.com/XXX/emailbroadcast/smtpcom
Post Subscriber Data
command: postrecord | mode: emailbroadcastpost
Adds a new subscriber record to your email list. This is the primary way to get contacts into the system - from a web form, a data feed partner, or any lead source. If the email address is already on your suppression list (from a previous unsubscribe or hard bounce), the record will not be added. If the address was previously pruned for inactivity, it will be re-imported automatically.
POST Mode URL (no API key needed)
https://api.aiappsapi.com/XXX/emailbroadcast/emailbroadcastpost
POST App Command URL
https://api.aiappsapi.com app: emailbroadcast command: postrecord
Required Fields
| Field Name | Field Key | Notes |
|---|---|---|
| Email Address | A valid email address. Must contain an @ symbol. Example: user@example.com |
|
| Feed Name | feed | A short code identifying which data source or campaign this record came from. Used for tracking and filtering. Defaults to Default_Feed if not provided. Example: webform-jan |
Optional Fields
| Field Name | Field Key | Notes |
|---|---|---|
| First Name | fname | First name only. Automatically capitalized. |
| Last Name | lname | Last name only. Automatically capitalized. |
| Signup URL | sourceurl | The page where this subscriber opted in. The http/https prefix and www are stripped automatically. Example: yourwebsite.com/offer |
| Opt-In Date | optin | Human-readable date and time the subscriber opted in. Example: 05-01-2025 05:45:00 |
| IP Address | ip | IPv4 or IPv6 address of the subscriber at the time of opt-in. |
| State | state | Two-letter US state code. Example: NY, FL |
| Country | country | Two-letter country code. Defaults to US if not provided. |
| ISP Group | ISP | One of: gmail, outlook, yahoo, aol, cables, other. Automatically detected from the email domain if not provided. |
Unsubscribe an Email Address
command: emailunsub | mode: emailunsub
Removes an email address from your active subscriber list and adds it to your suppression file. Once suppressed, that address will not receive any future broadcasts regardless of how it was added. You can suppress globally or for a specific sending domain only. Webhook events from your email provider (hard bounces, spam complaints, unsubscribes) are handled automatically by the system, but you can also trigger an unsubscribe manually using this endpoint.
POST Mode URL (no API key needed)
https://api.aiappsapi.com/XXX/emailbroadcast/emailunsub
POST App Command URL
https://api.aiappsapi.com app: emailbroadcast command: emailunsub
Required Fields
| Field Name | Field Key | Notes |
|---|---|---|
| Email Address | The email address to unsubscribe. Must contain an @ symbol. |
Optional Fields
| Field Name | Field Key | Notes |
|---|---|---|
| Sending Domain | domain | If provided, the unsubscribe is recorded against this specific sending domain. The contact's record will note the domain-level opt-out. If omitted, the address is fully suppressed from all sends. |
Send a Single Email Message
command: sendmessage
Sends an individual email message to one address immediately. The sending domain you specify must already be configured in your account with valid SMTP credentials. The system looks up the SMTP host, username, password, port, sender address and sender name from your domain settings automatically. This endpoint is for on-demand single sends - for sending to a list, use the broadcast scheduling features in the dashboard.
POST App Command URL
https://api.aiappsapi.com app: emailbroadcast command: sendmessage
This command is only available as an App Command. It is not available as a direct mode/webhook URL.
Required Fields
| Field Name | Field Key | Notes |
|---|---|---|
| Email Address | The recipient email address. | |
| Sending Domain | domain | The sending domain to use. Must match a configured domain in your account with valid SMTP credentials. Example: mail.yourdomain.com |
| Subject | subject | The email subject line. |
| HTML Body | html | The HTML content of the email. You can also use the key message instead of html. |
Optional Fields
| Field Name | Field Key | Notes |
|---|---|---|
| Plain Text Body | text | Plain text version of the email. If not provided, the system generates it automatically by stripping HTML tags from the HTML body. |
| Unsubscribe URL | unsubUrl | If provided, a List-Unsubscribe header is added to the email with this URL and the sender address. Recommended for bulk sending compliance. |
Enroll in a Responder Series
command: respondercreate
Enrolls an email address into an automated responder series. Once enrolled, the contact receives a sequence of messages at scheduled intervals (daily, weekly, or monthly) as configured in the series settings in your dashboard. Each subscriber gets their own independent schedule starting from when they enrolled. If the first message is due and the current time is between 8am and 5pm Eastern, it sends immediately.
POST App Command URL
https://api.aiappsapi.com app: emailbroadcast command: respondercreate
This command is only available as an App Command. It is not available as a direct mode/webhook URL.
Required Fields
| Field Name | Field Key | Notes |
|---|---|---|
| Email Address | A valid email address to enroll. If the address is already subscribed to this series, enrollment will be rejected. | |
| Series ID | series | The ID of the responder series to enroll the contact in. Series are created and configured in your dashboard. |
Optional Fields
| Field Name | Field Key | Notes |
|---|---|---|
| Start Time | starttime | Unix timestamp for when the first message should go out. If omitted or within the next 10 hours, the first message sends immediately if the current Eastern time is between 8am and 5pm. |
| Start Date | startdate | Alternative to starttime. Date in m-d-Y format. Example: 03-15-2026 |
| First Name | fname | Subscriber's first name. Used for personalization macros in message content. |
| ISP Group | ISP | One of: gmail, outlook, yahoo, aol, cables, other. Used for ISP-based exclusion filtering. |
| Exclude ISPs | excludeISPs | Comma-separated list of ISP groups to skip. If the subscriber's ISP group is in this list, enrollment is silently skipped. Example: gmail,outlook |
| Feed Name | feed | Tracking tag identifying the source of this enrollment. |
Remove from a Responder Series
command: responderunsub
Stops an email address from receiving further messages in a responder series. You can remove a subscriber from one specific series or from all series at once. The email address is also added to the global suppression list. This does not affect broadcast sends - to fully suppress an address from all broadcasts as well, also call the unsubscribe endpoint.
POST App Command URL
https://api.aiappsapi.com app: emailbroadcast command: responderunsub
This command is only available as an App Command. It is not available as a direct mode/webhook URL.
Required Fields
| Field Name | Field Key | Notes |
|---|---|---|
| Email Address | The email address to remove from the responder series. |
Optional Fields
| Field Name | Field Key | Notes |
|---|---|---|
| Series ID | series | The ID of the specific series to remove the subscriber from. If omitted, the subscriber is removed from all responder series. |