Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

SenderPools resource


A SenderPool resource represents a group of senders that can be used together for messaging. Use SenderPools to organize and manage senders for different messaging use cases.


SenderPool Properties

senderpool-properties page anchor
Property nameTypeRequiredPIIDescriptionChild properties
idstring
required
Not PII

A reference to a SenderPool.

Example: comms_senderpool_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_senderpool_[0-7][a-hjkmnpqrstv-z0-9]{25,34}

namestring
required

tagsTags
required

Custom 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(link takes you to an external page). Specify variables with each recipient for personalization.

Max properties: 10

createdAtstring<date-time>
required

updatedAtstring<date-time>
required

POST https://comms.twilio.com/v1/SenderPools

Create a new SenderPool.

Request body parameters

request-body-parameters page anchor
Encoding type:application/json
SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
namestring

Optional

The friendly name of the SenderPool.


sendersarray[CreateSenderPoolRequestSender]

Optional

The list of Senders to add to the SenderPool.

Min items: 0Max items: 10000

tagsTags

Optional

Custom 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(link takes you to an external page). Specify variables with each recipient for personalization.

Max properties: 10
202400409429500503

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.

SchemaExample
Property nameTypeRequiredDescriptionChild properties
operationIdstring

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.

Example: comms_operation_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_operation_[0-7][a-hjkmnpqrstv-z0-9]{25,34}

operationLocationstring<uri>

Optional

The location (uri) of the Operation resource identified by operationId.

Create a SenderPoolLink to code sample: Create a SenderPool
1
import { TwilioClient } from "twilio-comms";
2
3
async function main() {
4
const client = new TwilioClient({
5
accountId: "TWILIO_ACCOUNT_SID",
6
authToken: "TWILIO_AUTH_TOKEN",
7
});
8
await client.senderPools.create({
9
name: "Sales Leads - APAC",
10
tags: {
11
"region": "APAC",
12
},
13
});
14
}
15
main();

GET https://comms.twilio.com/v1/SenderPools/{senderPoolId}

Retrieve a SenderPool by its ID.

Property nameTypeRequiredPIIDescription
senderPoolIdstring
required
Example: comms_senderpool_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_senderpool_[0-7][a-hjkmnpqrstv-z0-9]{25,34}
200400404409429500503

OK

SchemaExample
Property nameTypeRequiredDescriptionChild properties
idstring

Optional

A reference to a SenderPool.

Example: comms_senderpool_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_senderpool_[0-7][a-hjkmnpqrstv-z0-9]{25,34}

namestring

Optional


tagsTags

Optional

Custom 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(link takes you to an external page). Specify variables with each recipient for personalization.

Max properties: 10

createdAtstring<date-time>

Optional


updatedAtstring<date-time>

Optional

1
import { TwilioClient } from "twilio-comms";
2
3
async function main() {
4
const client = new TwilioClient({
5
accountId: "TWILIO_ACCOUNT_SID",
6
authToken: "TWILIO_AUTH_TOKEN",
7
});
8
await client.senderPools.fetch("comms_senderpool_01h9krwprkeee8fzqspvwy6nq8");
9
}
10
main();

GET https://comms.twilio.com/v1/SenderPools

Retrieve a list of all SenderPools.

Property nameTypeRequiredPIIDescription
startDatestring<date-time>

Optional

Filter to SenderPools created after the specified date and time in ISO 8601 format.


endDatestring<date-time>

Optional

Filter to SenderPools created before the specified date and time in ISO 8601 format.


operationIdstring

Optional

Filter to SenderPools by SenderPool Operation ID.

Example: comms_operation_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_operation_[0-7][a-hjkmnpqrstv-z0-9]{25,34}

pageTokenstring

Optional

A page token that represents the start SenderPool of a page


pageSizeinteger

Optional

Default: 50Example: 50Minimum: 1Maximum: 1000
200400409429500503

OK

Schema
Property nameTypeRequiredDescriptionChild properties
senderPoolsarray[SenderPool]

Optional

A list of SenderPools.


paginationPaginationMetadata

Optional

Metadata for paginated results. This object contains two tokens to navigate through paginated results.

  • Use next to retrieve the 'next' page in the result list.
  • Use self to retrieve the same page of the result list again.
  • Supply the token in the pageToken query param.
1
import { TwilioClient } from "twilio-comms";
2
3
async function main() {
4
const client = new TwilioClient({
5
accountId: "TWILIO_ACCOUNT_SID",
6
authToken: "TWILIO_AUTH_TOKEN",
7
});
8
await client.senderPools.list({
9
startDate: new Date("2024-01-15T09:30:00Z"),
10
endDate: new Date("2024-01-15T09:30:00Z"),
11
operationId: "comms_operation_01h9krwprkeee8fzqspvwy6nq8",
12
pageToken: "pageToken",
13
pageSize: 50,
14
});
15
}
16
main();

PATCH https://comms.twilio.com/v1/SenderPools/{senderPoolId}

Update an existing SenderPool.

Property nameTypeRequiredPIIDescription
senderPoolIdstring
required
Example: comms_senderpool_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_senderpool_[0-7][a-hjkmnpqrstv-z0-9]{25,34}
Encoding type:application/json
SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
namestring

Optional

The friendly name of the SenderPool


tagsTags

Optional

Custom 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(link takes you to an external page). Specify variables with each recipient for personalization.

Max properties: 10
202400404409429500503

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.

SchemaExample
Property nameTypeRequiredDescriptionChild properties
resourceIdstring

Optional

The Resource ID is an identifier for the resource that was created or updated in response to the request.


resourceLocationstring<uri>

Optional

The location (uri) of the resource identified by Resource-Id.

1
import { TwilioClient } from "twilio-comms";
2
3
async function main() {
4
const client = new TwilioClient({
5
accountId: "TWILIO_ACCOUNT_SID",
6
authToken: "TWILIO_AUTH_TOKEN",
7
});
8
await client.senderPools.update("comms_senderpool_01h9krwprkeee8fzqspvwy6nq8", {
9
name: "Customer Support Senders - Tier 1",
10
tags: {
11
"tier": "1",
12
},
13
});
14
}
15
main();

DELETE https://comms.twilio.com/v1/SenderPools/{senderPoolId}

Delete a SenderPool by its ID.

Property nameTypeRequiredPIIDescription
senderPoolIdstring
required
Example: comms_senderpool_01h9krwprkeee8fzqspvwy6nq8Pattern: ^comms_senderpool_[0-7][a-hjkmnpqrstv-z0-9]{25,34}
202400404409429500503

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.

SchemaExample
Property nameTypeRequiredDescriptionChild properties
resourceIdstring

Optional

The Resource ID is an identifier for the resource that was created or updated in response to the request.


resourceLocationstring<uri>

Optional

The location (uri) of the resource identified by Resource-Id.

1
import { TwilioClient } from "twilio-comms";
2
3
async function main() {
4
const client = new TwilioClient({
5
accountId: "TWILIO_ACCOUNT_SID",
6
authToken: "TWILIO_AUTH_TOKEN",
7
});
8
await client.senderPools.delete("comms_senderpool_01h9krwprkeee8fzqspvwy6nq8");
9
}
10
main();