We will deprecate this version on February 10, 2025. To access all the latest features and upcoming developments, please see our v3 API. For assistance with transitioning, refer to our migration guide.
When you need your subuser to send only a specific amount of emails at a specified interval, you can set account limits, or throttle their sending capabilities.
Retrieve account limits for a specific subuser. If the API call response is empty that means the subuser has the limits removed.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to retrieve | Task to retrieve account limits |
user | Yes | Subuser must be under your account | The subuser who will have their account limits retrieved |
POST | https://api.sendgrid.com/apiv2/customer.limit.json |
---|---|
POST Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=retrieve |
1{2"credit": "200",3"credit_remain": "200",4"last_reset": "2014-11-21"5}
Remove the limit for a subuser.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to none | Task to remove account limits |
user | Yes | Subuser must be under your account | The subuser who will have their credit limits removed |
A recurring reset will allow you to periodically reset a subusers credits to a number you specify. This can be daily, weekly, or monthly.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to recurring | Task to setup recurring credits |
user | Yes | Subuser must be under your account | The subuser you will be applying a recurring credit limit to |
credits | Yes | Unsigned integer | The number of credits the subuser will be reset to |
period | Yes | Must be either daily, weekly, or monthly | How often you want SendGrid to reset the subuser credits |
startdate | No | Date must be in YYYY-mm-dd format | The date you want to start resetting the subuser credits |
enddate | No | Date must be in YYYY-mm-dd format | The date you want to stop resetting the subusers credits. After this date, credits will not be added to the account, but can still be consumed |
initial_credits | No | Unsigned integer | The number of credits you initially want the account reset to. If this is not set, the credits will be reset using the credits parameter. Useful when setting up a subuser with partially-consumed credits |
Set a subusers credits to a specified amount.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to total | Task to set the credits to the specified amount |
user | Yes | Subuser must be under your account | The subuser who will have their credits updated |
credits | Yes | Unsigned integer | The total number of credits the subuser will be set to |
Set the number of credits that a subuser can use.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to increment | Task to increment the credits by the specified amount |
user | Yes | Subuser must be under your account | The subuser who will have their credits incremented |
credits | Yes | Unsigned integer | The total number of credits the subuser will be incremented by |
Remove credits from a subuser.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to decrement | Task to decrement the credits by the specified amount |
user | Yes | Subuser must be under your account | The subuser who will have their credits decremented |
credits | Yes | Unsigned integer | The total number of credits the subuser will be decremented by |