Subusers API
For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console.
Update the remaining credits for a Subuser
PATCH /v3/subusers/{subuser_name}/credits/remaining
Base url: https://api.sendgrid.com
This endpoint allows you to update the remaining credits for a Subuser.
Authentication
- API Key
Headers
Request Body
The number of credits to add to or subtract from the current remaining credits for the Subuser. Use a positive number to increase the remaining credits or a negative number to reduce the remaining credits.
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": null,
"message": "No user found"
}
]
}
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.