Multiple Credentials
These are the API endpoints to manage the Multiple Credentials feature.
get
Retrieve a list of all credentials, or permissions for a specific credential.
| URI Parameter | Required | Requirements | Description |
|---|---|---|---|
| username | No | alphanumeric | If a username is supplied, the API returns the JSON permissions for that user |
|
Call
| GET |
https://api.sendgrid.com/api/credentials/get.json?api_user=your_sendgrid_username&api_key=your_sendgrid_password
|
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Call
| GET |
https://api.sendgrid.com/api/credentials/get.xml?api_user=your_sendgrid_username&api_key=your_sendgrid_password
|
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
Add
This API call allows user to add a new set of credentials to their account. Please see the SendGrid password requirements before proceeding.
| URI Parameter | Required | Requirements | Description |
|---|---|---|---|
| username | Yes | alphanumeric | Enter a username for the new account |
| password | Yes | alphanumeric | Enter a password for the new account |
| permissions | No | JSON array of bits | Credentials are specified using a JSON object. There are three key names: email for access to SMTP, api for programmatic access, and web for administration. The values for each are a bit, 0 for off or 1 for on.The following example allows the specified username/password to log into the dashboard, but not send email or have access to any of the APIs:{"email": 0, "web": 1, "api": 0} |
|
Call
| POST |
https://api.sendgrid.com/api/credentials/add.json
|
| POST Data |
api_user=your_sendgrid_username&
|
Response
1 2 3 | |
Call
| POST |
https://api.sendgrid.com/api/credentials/add.xml
|
| POST Data |
api_user=your_sendgrid_username&
|
Response
1 2 3 | |
Edit
Please see the SendGrid password requirements before proceeding.
| URI Parameter | Required | Requirements | Description |
|---|---|---|---|
| username | Yes | alphanumeric | The existing credentials to edit |
| password | No | alphanumeric | Optionally update the password |
| permissions | No | JSON array of bits | Credentials are specified using a JSON object. There are three key names: email for access to SMTP, api for programmatic access, and web for administration. The values for each are a bit, 0 for off or 1 for on.The following example allows the specified username/password to log into the dashboard, but not send email or have access to any of the APIs:{"email": 0, "web": 1, "api": 0}If you do not specify any additional parameters (i.e., email, web, api), then no permissions will be changed. This behavior allows you to change passwords without having to lookup the current applied permissions. |
|
Call
| POST |
https://api.sendgrid.com/api/credentials/edit.json
|
| POST Data |
api_user=your_sendgrid_username&
|
Response
1 2 3 | |
Call
| POST |
https://api.sendgrid.com/api/credentials/edit.xml
|
| POST Data |
api_user=your_sendgrid_username&
|
Response
1 2 3 | |
Delete
| URI Parameter | Required | Requirements | Description |
|---|---|---|---|
| username | Yes | alphanumeric | The credential to remove |
|
Call
| POST |
https://api.sendgrid.com/api/credentials/remove.json
|
| POST Data |
api_user=your_sendgrid_username&
|
Response
1 2 3 | |
Call
| POST |
https://api.sendgrid.com/api/credentials/remove.xml
|
| POST Data |
api_user=your_sendgrid_username&
|
Response
1 2 3 | |
Yes
No
Feedback