Purpose
Purpose
The Twilio integration enables you to send an SMS message to one phone number at a time from AirMDR.Use this integration to:
- Notify an on-call responder about a security incident.
- Send a time-sensitive investigation update.
- Ask a user to review suspicious activity.
Each AirMDR connection uses one Twilio account and one Messaging Service. Create separate connections when using different accounts or services.
Supported Versions
Supported Versions
The Messages API creates messages under the specified Twilio account. The Messaging Service determines which configured sender to use.
Authentication
Authentication
AirMDR authenticates to Twilio using HTTP Basic authentication. Configure either of the following credential pairs:
The Username and Password fields contain API credentials, rather than the email address and password used to sign in to the Twilio Console. Twilio supports API Key SID and Secret authentication for REST API requests.A dedicated API key allows you to revoke AirMDR’s credential independently. However, a Standard key has broad API access within its account; it is not restricted to the selected Messaging Service.
Role-based access considerations
Role-based access considerations
Use a Twilio account role that permits access to API credentials, phone numbers, and messaging configuration. Twilio’s general Developer role provides access to development resources and credentials; Administrator and Owner roles provide broader account access. Apply your organization’s access policy when assigning roles.The Console role controls what the person configuring the integration can manage. Runtime API requests use the permissions of the credentials saved in AirMDR.
Pre-requisites
An active Twilio account with messaging enabled and sufficient available balance or trial allowance.Twilio Console access to manage API credentials and Messaging Services.A Messaging Service containing at least one sender suitable for the destination country.
Running the messaging skill sends a real SMS message and may incur Twilio charges. A message that has been sent cannot be recalled.
Setup Steps
1
Obtain the Account SID
- Sign in to the Twilio Console.
- Select the account or subaccount that will send messages.
- Open its home page or account dashboard.
- Locate Account Info.
- Copy the Account SID, which begins with
AC.
Use the account that owns the Messaging Service. When using a subaccount, obtain the credentials and Messaging Service from that same subaccount.
2
Obtain the Username and Password
Choose one of the authentication method.
Option A: Create a Standard API Key
(or)
Option B: Use the Account SID and Auth TokenEnter the following values in AirMDR:
Option A: Create a Standard API Key
(or)
Option B: Use the Account SID and Auth Token
Option A: Create a Standard API Key
- In the Twilio Console, open Settings → Account settings → API keys & auth tokens.
- Select the appropriate Region.
- Click Create API key.
- Enter an API key name, such as
AirMDR-SMS-Production. - Select Standard as the key type.
- Click Next.
- Copy the generated API Key SID and Secret.
- Store the Secret securely before leaving the page.
- Select Got it!, then click Finish.
For the legacy Console,
- Open Admin → Account management → Keys & credentials → API keys & tokens.
- Click Create API key.
- Enter a Friendly name.
- Select the Region and Standard key type.
- Click Create.
- Click Done.
Option B: Use the Account SID and Auth Token
- Open the selected account’s Twilio Console home page.
- Locate Account Info.
- Copy the Account SID.
- Reveal and copy the Auth Token using the available display control.
You can also manage account credentials through the API Keys & Tokens page.
Before rotating an account Auth Token, identify other applications that use it to avoid interrupting their access
3
Obtain the Messaging Service SID
Choose one of the method.
Option A: Use an Existing Messaging Service
(or)
Option B: Create a Messaging Service
Option A: Use an Existing Messaging Service
(or)
Option B: Create a Messaging Service
Option A: Use an Existing Messaging Service
- In the current Twilio Console, open Communications → Messaging → Services. In the legacy Console, open Messaging → Services.
- Select the service AirMDR should use. Twilio
- Open Properties.
- Copy the Messaging Service SID, which begins with
MG. - Open Sender Pool and verify that the service contains a suitable sender. Twilio
Option B: Create a Messaging Service
If an appropriate service does not exist:- Open Communications → Messaging → Services, or Messaging → Services in the legacy Console.
- Click Create a Messaging Service.
- Enter a descriptive name, such as
AirMDR Security Notifications. - Select the messaging use case appropriate for your notifications.
- Continue through the setup wizard.
- Add an eligible sender to the Sender Pool.
- Complete any applicable sender registration or verification requirements.
- Open the created service and copy its Messaging Service SID.
Twilio’s setup wizard guides you through sender configuration, application integration, and applicable compliance requirements.
Twilio Credential Reference Table
Validate Connectivity
You can optionally validate the Twilio request. The following example illustrates the underlying Twilio request. It is not an AirMDR configuration import. Populate the environment variables securely before running the command.Sample Request
Sample Request
For API key authentication,
TWILIO_USERNAME is the API Key SID and TWILIO_PASSWORD is its Secret. The Account SID remains a separate value in the URL. This request creates a real outbound SMS.Configure Twilio in AirMDR Integrations Dashboard
- Navigate to AirMDR, provide the credentials and click Login
- Navigate to the AirMDR Integrations Dashboard in the left navigation pane and select ADMIN → Integrations.
- Use the search option, enter the keyword “Twilio”, select the Connections tab, and click + New Connection button.
-
Use the following values in the AirMDR integration configuration screen:
Expand Advanced Configuration if required. (Optional)
- In Remote Agent, select an AirMDR Remote Agent when Twilio API requests must run through an approved network route. Ensure the selected agent can resolve and reach
api.twilio.comover HTTPS on TCP port443. For direct connectivity from AirMDR, leave this field unselected. - In Expiry, select a date according to your organization’s credential rotation policy, or an earlier date if the configured Twilio credentials will become invalid sooner.
Expiry controls credential validity in AirMDR. It does not automatically rotate, extend, or revoke credentials in Twilio. For API key rotation, create a replacement key, update Username with its API Key SID, Password with its Secret, and Expiry with the revised date. Save and validate the connection, then delete the previous key when it is no longer required. If using an Account SID and Auth Token, coordinate token rotation with other applications that use the same token. - In Remote Agent, select an AirMDR Remote Agent when Twilio API requests must run through an approved network route. Ensure the selected agent can resolve and reach
- Click Save.
Skills provided by this Integration & Permissions required
Messaging — Outbound ActionsAn
accepted or queued status confirms that Twilio accepted the request. It does not confirm delivery to the recipient.Twilio Console roles govern user access during setup. Runtime access depends on the saved API credentials. A Standard API key provides broader account API access than message sending alone.
Save and Validate the Connection (Optional)
Save and Validate the Connection (Optional)
- Review the account, credential pair, and Messaging Service SID.
- Click Save.
- Open the Skills tab.
- Locate Send Twilio Text Message and click Run skill.
- Select the connection if prompted.
- Enter the recipient phone number in international E.164 format, such as
+14155550123, and enter a short test message. - Run the skill once.
- Record the returned Message SID and status.
- Confirm the message’s final delivery status in Twilio.
E.164 format uses
+, the country code, and the subscriber number without spaces or punctuation.Additional Information
🧰 Error Handling
🧰 Error Handling
🔄 Monitoring & Logs
🔄 Monitoring & Logs
Review Execution Results in AirMDRRecommended Log LevelsWhere your logging system supports configurable levels:
- Open the result of the skill execution or the playbook step that ran it.
- Review the returned Message SID and status.
- Record any Twilio error code and error message.
- Use the Message SID to correlate the execution with Twilio’s logs.
- Sign in to the sending account in the Twilio Console.
- Open Monitor → Logs → Messaging.
- Search for the Message SID or filter by recipient and time.
- Click the message’s linked date to open its details.
- Review the delivery steps, status, sender, recipient, and errors. Twilio
Message status can change after the initial API response. TwilioSample Monitoring RecordThe following is an illustrative record for operational logging, rather than an exact AirMDR log format:
🛑 Security & Access Best Practices
🛑 Security & Access Best Practices
A Standard API key provides broad API access within its Twilio account. Selecting a Messaging Service in AirMDR does not restrict the key’s permissions to that service.
👉 Support & Maintenance
👉 Support & Maintenance
- 📧 Contact AirMDR Support through your designated support channel.
- 🔁 Rotate credentials regularly. Recommended cadence: As per your internal security policy.
- Rotate API Credentials
- Create a replacement API key in the correct Twilio account and Region.
- Update the AirMDR connection’s Username and Password.
- Save the connection.
- Run one controlled validation.
- Confirm that the new credential works.
- Delete the previous API key in Twilio after confirming that it is no longer required.
Deleting an API key revokes its access. - Maintain the Integration
- Review the connection’s Expiry date and credential renewal schedule.
- Confirm that the Messaging Service retains an eligible sender.
- Review destination permissions, account balance, and sender registration status.
- Monitor failed messages, delivery delays, and unexpected usage.
- Revalidate the connection after changing credentials, the Messaging Service, or the Remote Agent.
- Review dependent playbooks before retiring a connection.
🛑 Data Flow & Security
🛑 Data Flow & Security
Data Exchanged
The skill’s returned status reflects the message state at execution time. Use Twilio’s messaging logs to check subsequent delivery changes.Encryption and Network Requirements

