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.

Create Subuser

POST /v3/subusers

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

This endpoint allows you to create a new subuser.

Authentication

  • API Key

Headers

Authorization
string
default: Bearer <<YOUR_API_KEY_HERE>>
required

Request Body

object
username
string

The username for this subuser.

required
email
string

The email address of the subuser.

format: email
required
password
string

The password this subuser will use when logging into SendGrid.

required
ips
array[string]

The IP addresses that should be assigned to this subuser.

required
region
string

The region this subuser should be assigned to. Can be global or eu. (Regional email is in Public Beta and requires SendGrid Pro plan or above.).

default: globalAllowed Values: global, eu
include_region
boolean

A flag that determines if the subuser's region should be returned in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.)

default: False
{
  "username": "John@example.com",
  "email": "John@example.com",
  "password": "johns_password",
  "ips": [
    "1.1.1.1",
    "2.2.2.2"
  ],
  "region": "global",
  "include_region": true
}

Responses

object
username
string

The username of the subuser.

required
user_id
number

The user ID for this subuser.

required
email
string

The email address for this subuser.

format: email
required
credit_allocation
object
type
string
region
string

The region this subuser is assigned to. Only returned if include_region was set to true in the request.

default: globalAllowed Values: global, eu
{
  "username": "example_subuser",
  "user_id": 1234,
  "email": "example@example.com",
  "credit_allocation": {
    "type": "unlimited"
  },
  "region": "global"
}
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": "field_name",
      "message": "error message"
    }
  ]
}
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": "field_name",
      "message": "error message"
    }
  ]
}
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": "field_name",
      "message": "error message"
    }
  ]
}
object
Loading Code Sample...
        
        

        Create 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