How to use the SendGrid V3 API

Welcome to SendGrid’s Web API v3! This API is RESTful, fully featured, easy to integrate with, and offers support in 7 different languages.


On Behalf of Subuser

Use the on-behalf-of header to make calls for a particular subuser through the parent account. Use this header to automate bulk updates, or to administer a subuser without changing the authentication in your code.

To use the feature, add the on-behalf-of header:

on-behalf-of: << subuser username >>

This header generates the API call as if the subuser account was making the call.

When authenticating using the on-behalf-of header, you need to use the API key credentials of the parent account. For example:

curl --request GET \
  --url '' \
  --header 'authorization: Bearer << API KEY >>' \
  --header 'on-behalf-of: << subuser username >>'

Note: The on-behalf-of header does not work with the mail.send API.

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.

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!