Customer Timezone
Get and/or edit the timezone for reseller customers.
List Timezones
This will return a list of all available timezones.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
method | Yes | Must be set to timezone |
Allows you to access timezone functionality |
task | Yes | Must be set to list |
This will allow you to retrieve the timezones |
These are Reseller only APIs. For more information, see Reseller Overview.
Call
GET | https://api.sendgrid.com/apiv2/reseller.manage.json |
GET Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=timezone&task=list |
Response
[
{
"display": "GMT+02:00",
"name": "Athens, Bucharest",
"offset": -7200,
"timezone": "Europe/Bucharest"
},
{
"display": "GMT-00:00",
"name": "Dublin, Lisabon, London, Edinburgh",
"offset": 0,
"timezone": "Europe/London"
},
{
"display": "GMT-08:00",
"name": "Pacific Time, US & Canada",
"offset": 28800,
"timezone": "America/Los_Angeles"
}
]
Call
GET | https://api.sendgrid.com/apiv2/reseller.manage.xml |
GET Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=timezone&task=list |
Response
<timezones>
<timezone>
<display>GMT+02:00</display>
<name>Athens, Bucharest</name>
<offset>-7200</offset>
<timezone>Europe/Bucharest</timezone>
</timezone>
<timezone>
<display>GMT-00:00</display>
<name>Dublin, Lisabon, London, Edinburgh</name>
<offset>0</offset>
<timezone>Europe/London</timezone>
</timezone>
<timezone>
<display>GMT-08:00</display>
<name>Pacific Time, US Canada</name>
<offset>28800</offset>
<timezone>America/Los_Angeles</timezone>
</timezone>
</timezones>
Get Timezone
This API call will return the timezone currently set for your customer.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
user | Yes | Customer must be registered under your account | The customer for which we are retrieving the timezone |
method | Yes | Must be set to timezone |
Allows you to access timezone functionality |
task | Yes | Must be set to get |
This will allow you to retrieve the timezone for your customer |
Call
GET | https://api.sendgrid.com/apiv2/reseller.manage.json |
GET Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=timezone&task=get&user=eexampexample@example.com |
Response
{
"name": "Central Time, US & Canada",
"offset": 21600,
"timezone": "America\\/Chicago",
"display": "GMT-06:00"
}
Call
GET | https://api.sendgrid.com/apiv2/reseller.manage.xml |
GET Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=timezone&task=get&user=eexampexample@example.com |
Response
<timezone>
<name>Central Time, US Canada</name>
<offset>21600</offset>
<timezone>America/Chicago</timezone>
<display>GMT-06:00</display>
</timezone>
Edit Timezone
This API call will allow you to set the timezone for your customer
URI Parameter | Required | Requirements | Description |
---|---|---|---|
user | Yes | Customer must be registered under your account | The customer for which we are editing the timezone |
method | Yes | Must be set to timezone |
Allows you to access timezone functionality |
task | Yes | Must be set to set |
This will allow you to set the timezone for your customer |
timezone | Yes | Must be a timezone. Ex: America/Los_Angeles |
This will be the new timezone from List Timezones |
Call
POST | https://api.sendgrid.com/apiv2/reseller.manage.json |
POST Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=timezone&task=set&user=eexampexample@example.com&timezone=America/Los_Angeles |
Response
{
"message": "success"
}
Call
POST | https://api.sendgrid.com/apiv2/reseller.manage.xml |
POST Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=timezone&task=set&user=eexampexample@example.com&timezone=America/Los_Angeles |
Response
<result>
<message>success</message>
</result>
Need some help?
We all do sometimes. Get help now from the Twilio SendGrid Support Team.
Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.