Menu

Subusers API

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

Create Subuser

Create Subuser

POST /subusers

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
{
  "username": "John@example.com",
  "email": "John@example.com",
  "password": "johns_password",
  "ips": [
    "1.1.1.1",
    "2.2.2.2"
  ]
}

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
signup_session_token
string
authorization_token
string
credit_allocation
object
type
string
{
  "username": "example_subuser",
  "user_id": 1234,
  "email": "example@example.com",
  "signup_session_token": "",
  "authorization_token": "",
  "credit_allocation": {
    "type": "unlimited"
  }
}
object
errors
array[object]
message
string

the error message

field
string

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

field
string

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

field
string

the field that generated the error

help
object

helper text or docs for troubleshooting

id
string
{
  "errors": [
    {
      "field": "field_name",
      "message": "error message"
    }
  ]
}
object

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.