Menu

Expand

This documentation is for the SendGrid Web API v2

To access all the latest features and upcoming developments, please see our v3 API.

Multiple Credentials

The Reseller API endpoints for creating and managing Multiple User Credentials may still be used. However, with the release of Teammates, creating a Multiple User Credential through this API will create a teammate with administrator privileges.

While Teammates is backwards compatible with the Multiple User Credentials Reseller API, we do recommend that you use the Teammates API to create and manage teammates.

There will eventually be a deprecation plan for the Multiple Credential Users Reseller API.

Add user credential

Notes: This API call allows SendGrid resellers to add a new set of credentials to a specified child account.

Parameter Required Requirements Description
user Yes The username must be be between 3 and 64 characters and cannot be completely numeric. The child account we are adding a credential to.
task Yes The task must be set to add The task we are setting so we create a credential.
credential_name Yes The credential_name must be be between 3 and 64 characters and cannot be completely numeric. The credential we are creating under the child account.
credential_password Yes See SendGrid password requirements The password used to authenticate the newly generated credential.

Call

POST https://api.sendgrid.com/apiv2/reseller.credential.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=reseller_customer&task=add&credential_name=reseller_customer_credential&credential_password=reseller_customer_password

Response: Success

{
  "message": "success"
}

Response: Error

{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/reseller.credential.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=reseller_customer&task=add&credential_name=reseller_customer_credential&credential_password=reseller_customer_password

Response: Success

<result>
   <message>success</message>
</result>

Response: Error

<result>
   <message>error</message>
   <errors>
      ...
      <error>... error messages ...</error>
      ...
   </errors>
</result>

Edit user credential

This API call allows SendGrid resellers to edit an already existing credential password. Changing the credential name is not currently allowed.

Parameter Required Requirements Description
user Yes The username must be be between 3 and 64 characters and cannot be completely numeric. The username that we are checking against existing usernames.
task Yes The task must be set to edit The task we are setting so we edit a credential password
credential_name Yes The credential_name must be be between 3 and 64 characters and cannot be completely numeric. The credential we want to modify
new_credential_password Yes See SendGrid password requirements The updated password

Call

POST https://api.sendgrid.com/apiv2/reseller.credential.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=reseller_customer&task=edit&credential_name=reseller_customer_credential&new_credential_password=reseller_customer_password

Response: Success

{
  "message": "success"
}

Response: Error

{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/reseller.credential.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=reseller_customer&task=edit&credential_name=reseller_customer_credential&new_credential_password=reseller_customer_password

Response: Success

<result>
   <message>success</message>
</result>

Response: Error

<result>
   <message>error</message>
   <errors>
      ...
      <error>... error messages ...</error>
      ...
   </errors>
</result>

Delete user credential

This API call allows SendGrid resellers to delete an existing credential under a child account.

Parameter Required Requirements Description
user Yes The username must be be between 3 and 64 characters and cannot be completely numeric. The username that we are checking against existing usernames.
task Yes The task must be set to delete The task we are setting so we delete a credential
credential_name Yes The credential_name must be be between 3 and 64 characters and cannot be completely numeric. The credential we want to remove

Call

POST https://api.sendgrid.com/apiv2/reseller.credential.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=reseller_customer&task=delete&credential_name=reseller_customer_credential

Response: Success

{
  "message": "success"
}

Response: Error

{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/reseller.credential.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=reseller_customer&task=delete&credential_name=reseller_customer_credential

Response: Success

<result>
   <message>success</message>
</result>

Response: Error

<result>
   <message>error</message>
   <errors>
      ...
      <error>... error messages ...</error>
      ...
   </errors>
</result>

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.