Subusers API
For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console.
Update the Credits for a Subuser
PUT /v3/subusers/{subuser_name}/credits
Base url: https://api.sendgrid.com
This endpoint allows you to update the Credits for a Subuser.
Authentication
- API Key
Headers
Request Body
Type determines how credits are reset for a Subuser. unlimited
indicates that there is no limit to the Subuser's credits. recurring
indicates that the credits for the Subuser are reset according to the frequency determined by reset_frequency
. nonrecurring
indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis.
The frequency with which a Subuser's credits are reset if type
is set to recurring
. Do not include reset_frequency
if you choose a reset type
value of unlimited
or nonrecurring
.
Total number of credits to which the Subuser is to be reset. If type
is nonrecurring
then the Subuser's credits will be reset to total
on a one-time basis. If type
is recurring
then the Subuser's credits will be reset to total
every time a reset is scheduled in accordance with the reset_frequency
. Do not include total
if you choose a reset type
value of unlimited
.
Path Parameters
The username of the Subuser.
default: NoneResponses
Type determines how credits are reset for a Subuser. unlimited
indicates that there is no limit to the Subuser's credits. recurring
indicates that the credits for the Subuser are reset according to the frequency determined by reset_frequency
. nonrecurring
indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis.
The frequency with which a Subuser's credits are reset if type
is set to recurring
, otherwise null
.
Total number of remaining credits. remain
is null
if the reset type
for the Subuser's credits is set to unlimited
.
Total number of allowable credits. total
is null
if the reset type
for the Subuser's credits is set to unlimited
or nonrecurring
.
Total number of used credits. used
is null
if the reset type
for the Subuser's credits is set to unlimited
or nonrecurring
.
{
"type": "recurring",
"reset_frequency": "monthly",
"remain": 99,
"total": 100,
"used": 1
}
the error message
the field that generated the error
helper text or docs for troubleshooting
{
"errors": [
{
"field": "type",
"message": "Type should be set to 'recurring', 'nonrecurring', or 'unlimited'"
}
]
}
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.