The Pigeon instance resource represents a single pigeon that you may ask Twilio to deploy to send a message. The Pigeons list resource represents the set of an account's pigeons. You can POST to this resource to add a new pigeon to your account.
To send messages to a destination via carrier pigeon see the Deploying Carrier Pigeons documentation.
/2010-04-01/Accounts/{AccountSid}/Pigeons/{PigeonSid}
Property | Description |
---|---|
Sid | A 34 character string that uniquely identifies this pigeon. |
DateCreated | The date that this pigeon was added to your account, given in RFC 2822 format. |
DateUpdated | The date that this pigeon was last updated, given in RFC 2822 format. |
FriendlyName | A human readable descriptive name for this pigeon, up to 64 characters long. By default, the FriendlyName is the name of the pigeon given to it by the breeder. |
AccountSid | The unique id of the Account responsible for this pigeon. |
Color | The current paint color of this pigeon. |
Uri | The URI for this resource, relative to https://api.twilio.com. |
GET /2010-04-01/Accounts/AC228ba.../Pigeons/PIe905d7e6b410746a0fb08c57e5a186f3
<TwilioResponse> <Pigeon> <Sid>PNe905d7e6b410746a0fb08c57e5a186f3</Sid> <AccountSid>AC228ba7a5fe4238be081ea6f3c44186f3</AccountSid> <FriendlyName>Ping Pong</FriendlyName> <Color>#ff0000</Color> <DateCreated>Fri, 1 Apr 2011 00:21:11 +0000</DateCreated> <DateUpdated>Fri, 1 Apr 2011 00:21:11 +0000</DateUpdated> <Uri>/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/Pigeons/PIe905d7e6b410746a0fb08c57e5a186f3</Uri> </Pigeon> </TwilioResponse>
Updates the pigeon, and returns the updated resource if successful.
There are a couple of fields that you may update:
Parameter | Description |
---|---|
FriendlyName | A human readable description for the pigeon, with maximum length of 64 characters. Defaults to the breeder's name for the pigeon. |
Color | The color you want Twilio to paint this pigeon, as a hexadecimal color code. This is #ff0000 (Twilio red) by default. |
POST /2010-04-01/Accounts/AC228ba.../Pigeons/PIe536d...
FriendlyName=Bo+Bo Color=%23f45532
The response format is identical to the HTTP GET response documented above.
Deletes the pigeon from the account. You will no longer be able to send messages with a pigeon after deleting him from an account. Returns an HTTP 204 response if successful, with no body.
/2010-04-01/Accounts/{AccountSid}/Pigeons
Returns a list of Pigeon resource representations, each representing a pigeon ready for use by this account. The list includes paging information.
The following GET query string parameters allow you to limit the list returned. Note, parameters are case-sensitive:
Parameter | Description |
---|---|
Color | Only return the pigeon resources that exactly match this color. |
FriendlyName | Only return the pigeon resource that exactly matches this name. |
Just grab the entire list of an account's pigeons.
GET /2010-04-01/Accounts/AC30947.../Pigeons
<TwilioResponse> <Pigeons page="0" numpages="1" pagesize="50" total="1" start="0" end="0" uri="/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/Pigeons" firstpageuri="/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/Pigeons?Page=0&PageSize=50" previouspageuri="" nextpageuri="" lastpageuri="/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/Pigeons?Page=0&PageSize=50"> <Pigeon> <Sid>PIe905d7e6b410746a0fb08c57e5a186f3</Sid> <AccountSid>AC228ba7a5fe4238be081ea6f3c44186f3</AccountSid> <FriendlyName>Bo Bo</FriendlyName> <Color>>#f45532</Color> <DateCreated>Fri, 1 Apr 2011 00:21:11 +0000</DateCreated> <DateUpdated>Fri, 1 Apr 2011 00:21:11 +0000</DateUpdated> <Uri>/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/Pigeons/PIe905d7e6b410746a0fb08c57e5a186f3</Uri> </Pigeon> ... </Pigeons>
Only show the pigeon records for pigeons with color #f45532.
GET /2010-04-01/Accounts/AC228ba.../Pigeons?Color=%23f45532
Adds a new pigeon to your account. After making this request, Twilio will feed and paint your new pigeon and ready it for deployment. The following parameters are accepted:
Parameter | Description |
---|---|
FriendlyName | A human readable description for the pigeon with maximum length 64 characters. Defaults to the name of the pigeon as given by the breeder. |
Color | The color you'd like Twilio to paint the pigeon in hexadecimal format. If blank, this defaults to #ff0000 (Twilio red). |
Here is a typical request and response to provision a new pigeon:
POST /2010-04-01/Accounts/AC228ba.../Pigeons
FriendlyName=Peter&Color;=%23ba435b
<TwilioResponse> <Pigeon> <Sid>PIe905d7e6b410746a0fb08c57e5a186f3</Sid> <AccountSid>AC228ba5e5fede1b49e100272a8640f438</AccountSid> <Color>#ba435b</Color> <FriendlyName>Peter</FriendlyName> <DateCreated>Fri, 1 Apr 2011 00:21:11 +0000</DateCreated> <DateUpdated>Fri, 1 Apr 2011 00:21:11 +0000</DateUpdated> <Uri>/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/Pigeons/PIe905d7e6b410746a0fb08c57e5a186f3</Uri> </Pigeon> </TwilioResponse>
Not Supported.
Not Supported.