SenderPool Senders resource
The Senders in a SenderPool subresource lets you manage which senders are assigned to a specific SenderPool. You can list, add, and remove senders from a pool.
A reference to a Sender.
comms_sender_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_sender_[0-7][a-hjkmnpqrstv-z0-9]{25,34}The name associated with the address inventory, such as phone number or email address.
This name might be visible to recipients in certain communications, such as Email, and helps identify the sender.
Note: To update this value, use the appropriate Twilio API for the inventory type. For example, for Senders with the channel email, update displayName using the EmailSenders API.
The Sender’s communication address within a channel, such as a phone number, email address, or device token.
The medium which a unit of communication is transmitted through. These are differentiated by a mix of transmission protocol, network controller/owner, endpoint and address model, as well as the model for content of the atomic unit of communication itself.
SMSRCSEMAILWHATSAPPPUSHThe status of a Sender.
If a Sender is activated, it is available to send and receive communications.
If a Sender is deactivated, it is not available to send or receive communications.
ACTIVATEDDEACTIVATEDCustom metadata in the form of key-value pairs. Maximum size of a tag key is 128 characters. Maximum size of a tag value is 256 characters. There can be a maximum of 10 key-value pairs.
This field can be templated with Liquid.
Specify variables with each recipient for personalization.
10POST https://comms.twilio.com/v1/SenderPools/{senderPoolId}/Senders
Add one or more Senders to a SenderPool.
comms_senderpool_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_senderpool_[0-7][a-hjkmnpqrstv-z0-9]{25,34}application/jsonArray of:
A reference to a Sender.
comms_sender_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_sender_[0-7][a-hjkmnpqrstv-z0-9]{25,34}The request was accepted and an Operation was created to track its progress. The response body contains the ID and link to the Operation resource.
Optional
The Operation ID is an identifier that can be used to correlate all of the resources created in a request.
Issue a GET request to the resource list location, using the Operation ID as a query parameter to retrieve the resources that correlate with the Operation.
comms_operation_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_operation_[0-7][a-hjkmnpqrstv-z0-9]{25,34}Optional
The location (uri) of the Operation resource identified by operationId.
1import { TwilioClient } from "twilio-comms";23async function main() {4const client = new TwilioClient({5accountId: "TWILIO_ACCOUNT_SID",6authToken: "TWILIO_AUTH_TOKEN",7});8await client.senderPools.addSender("comms_senderpool_01h9krwprkeee8fzqspvwy6nq8", [9{10senderId: "comms_sender_01h9krwprkeee8fzqspvwy6nq8",11},12]);13}14main();
GET https://comms.twilio.com/v1/SenderPools/{senderPoolId}/Senders
Retrieve a list of Senders assigned to a specific SenderPool.
comms_senderpool_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_senderpool_[0-7][a-hjkmnpqrstv-z0-9]{25,34}Filter to Senders that match a specific channel.
SMSRCSEMAILWHATSAPPPUSHFilter to Senders with the specified status.
ACTIVATEDDEACTIVATEDFilter to Senders created after the specified date and time in ISO 8601 format.
Filter to Senders created before the specified date and time in ISO 8601 format.
50Example: 50Minimum: 1Maximum: 1000OK
Optional
A list of Senders that belong to the SenderPool.
Optional
Metadata for paginated results. This object contains two tokens to navigate through paginated results.
- Use
nextto retrieve the 'next' page in the result list. - Use
selfto retrieve the same page of the result list again. - Supply the token in the
pageTokenquery param.
1import { TwilioClient } from "twilio-comms";23async function main() {4const client = new TwilioClient({5accountId: "TWILIO_ACCOUNT_SID",6authToken: "TWILIO_AUTH_TOKEN",7});8await client.senderPools.listSenders("comms_senderpool_01h9krwprkeee8fzqspvwy6nq8", {9channel: "SMS",10status: "ACTIVATED",11startDate: new Date("2024-01-15T09:30:00Z"),12endDate: new Date("2024-01-15T09:30:00Z"),13pageToken: "pageToken",14pageSize: 50,15});16}17main();
DELETE https://comms.twilio.com/v1/SenderPools/{senderPoolId}/Senders/{senderId}
Remove a specific Sender from a SenderPool.
comms_senderpool_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_senderpool_[0-7][a-hjkmnpqrstv-z0-9]{25,34}comms_sender_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_sender_[0-7][a-hjkmnpqrstv-z0-9]{25,34}The request was accepted and a resource ID is available to check the result. The response body contains the resource ID and link to the resource.
Optional
The Resource ID is an identifier for the resource that was created or updated in response to the request.
Optional
The location (uri) of the resource identified by Resource-Id.
1import { TwilioClient } from "twilio-comms";23async function main() {4const client = new TwilioClient({5accountId: "TWILIO_ACCOUNT_SID",6authToken: "TWILIO_AUTH_TOKEN",7});8await client.senderPools.removeSender("comms_senderpool_01h9krwprkeee8fzqspvwy6nq8", "comms_sender_01h9krwprkeee8fzqspvwy6nq8");9}10main();