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; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the SendGrid tag on Stack Overflow.

Thank you for your feedback!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more