Menu

Expand
Rate this page:

Subusers API

For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console.

Get the Credits for a Subuser

GET /v3/subusers/{subuser_name}/credits

Base url: https://api.sendgrid.com

This endpoint allows you to retrieve a Credits overview for a Subuser.

Authentication

  • API Key

Headers

Authorization
string
default: Bearer <<YOUR_API_KEY_HERE>>
required

Path Parameters

subuser_name
string

The username of the Subuser.

default: None
required

Responses

object
type
string

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.

Allowed Values: unlimited, recurring, nonrecurring
required
reset_frequency
string or null

The frequency with which a Subuser's credits are reset if type is set to recurring, otherwise null.

Allowed Values: monthly, weekly, daily
required
remain
integer or null

Total number of remaining credits. remain is null if the reset type for the Subuser's credits is set to unlimited.

minimum: 0
required
total
integer or null

Total number of allowable credits. total is null if the reset type for the Subuser's credits is set to unlimited or nonrecurring.

minimum: 0
required
used
integer or null

Total number of used credits. used is null if the reset type for the Subuser's credits is set to unlimited or nonrecurring.

minimum: 0
required
{
  "type": "recurring",
  "reset_frequency": "monthly",
  "remain": 99,
  "total": 100,
  "used": 1
}
object
errors
array[object]
message
string

the error message

required
field
string or null

the field that generated the error

help
object

helper text or docs for troubleshooting

id
string
{
  "errors": [
    {
      "field": null,
      "message": "No user found"
    }
  ]
}
Loading Code Sample...
        
        

        Get the Credits for a Subuser

        Rate this page:

        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.

        Loading Code Sample...
              
              
              

              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              thanks-feedback-gif