Throttle your customer subuser when you need them to send only a specific amount of emails at a specified interval.

Retrieve

Retrieve account limits for a specific customer subuser. If the API call response is empty that means the customer subuser has the limits removed.

Parameter Required Requirements Description
task Yes Must be set to retrieve Retrieve account limits
user Yes Customer subuser must be registered under your account The customer subuser who will have their account limits retrieved
method Yes Must be set to limit Allows you to access limit functionality
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=retrieve

Response

1
2
3
4
5
{
  "credit": "0",
  "credit_remain": "2000",
  "last_reset": "2011-02-21"
}

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=retrieve

Response

1
2
3
4
5
<credits>
   <credit>0</credit>
   <credit_remain>2000</credit_remain>
   <last_reset>2011-02-21</last_reset>
</credits>

No Limit

Obtain a complete list of all customer subuser.

Parameter Required Requirements Description
task Yes Must be set to none Remove account limits
user Yes Customer subuser must be registered under your account The customer subuser who will have their account limits removed
method Yes Must be set to limit Allows you to access limit functionality
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=none

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=none

Response

1
2
3
<result>
   <message>success</message>
</result>

Set Recurring Limits

A recurring reset will allow you to periodically reset a subusers credits to a number you specify. This can be either daily, weekly or monthly.

Parameter Required Requirements Description
task Yes Must be set to recurring The task required to set the recurring reset
user Yes Customer subuser must be registered under your account The customer subuser you will be applying a recurring reset to
method Yes Must be set to limit Allows you to access limit functionality
credits Yes Must be an integer and greater than 0 The number of credits the customer subuser will be reset to
period Yes Must be either daily, weekly, or monthly How often you want SendGrid to reset your customer subusers credits
startdate No Date must be in YYYY-mm-dd format The date you want to start resetting the customer subusers credits
enddate No Date must be in YYYY-mm-dd format The date you want to stop resetting the customer subusers credits
initial_credits No Must be an integer greater than 0 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
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=recurring&credits=200&period=daily

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=recurring&credits=200&period=daily

Response

1
2
3
<result>
   <message>success</message>
</result>

Total Credits

Set a subusers credits to a specified amount.

Parameter Required Requirements Description
task Yes Must be set to total Set the credits to the specified amount
user Yes Customer subuser must be registered under your account The customer subuser who will have their credits updated
method Yes Must be set to limit Allows you to access limit functionality
credits Yes Must be an integer and greater than 0 The total number of credits the customer subuser will be reset to
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=total&credits=20

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=total&credits=20

Response

1
2
3
<result>
   <message>success</message>
</result>

Increment Credits

Increment a subusers credits by a specified amount.

Parameter Required Requirements Description
task Yes Must be set to increment Increment the credits by the specified amount
user Yes Customer subuser must be registered under your account The customer subuser who will have their credits incremented
method Yes Must be set to limit Allows you to access limit functionality
credits Yes Must be an integer and greater than 0 The total number of credits the customer subuser will be incremented by
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=increment&credits=20

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=increment&credits=20

Response

1
2
3
<result>
   <message>success</message>
</result>

Decrement Credits

Decrement a subusers credits by a specified amount.

Parameter Required Requirements Description
task Yes Must be set to decrement Decrement the credits by the specified amount
user Yes Customer subuser must be registered under your account The customer subuser who will have their credits decremented
method Yes Must be set to limit Allows you to access limit functionality
credits Yes Must be an integer and greater than 0 The total number of credits the customer subuser will be decremented by
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=decrement&credits=20

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/reseller.subuserManage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=limit&user=example@example.com&task=decrement&credits=20

Response

1
2
3
<result>
   <message>success</message>
</result>