Multi User Credentials allow you to have multiple people who can log into the same subuser account, using a different username and password. This way, you don’t have to worry if someone goes out of town and you can control who has access to the account.

Get All Subuser Multiple Credentials

GET a new subuser credential.

URI Parameter Required Requirements Description
task Yes Must be set to get Task to get all subuser credentials
user Yes The subuser name The subuser whose multi cred users you are looking for
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/customer.credential.json
POST Data api_user=apikey&api_key=your_sendgrid_password&task=get&user=subuser_name

Response

1
2
3
4
[
    {"id":12345,"name":"subuser_cred_1","permissions":{"web":1,"api":0,"mail":1}},
    {"id":67890,"name":"subuser_cred_2","permissions":{"mail":1,"api":1,"web":1}}
]

Call

POST https://api.sendgrid.com/apiv2/customer.credential.xml
POST Data api_user=apikey&api_key=your_sendgrid_password&task=get&user=subuser_name

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
<result>
        <credential>
            <id>12345</id>
            <name>subuser_cred_1</name>
            <permissions>
                <permission>
                    <web>1</web>
                    <api>0</api>
                    <mail>1</mail>
                </permission>
            </permissions>
        </credential>
        <credential>
            <id>67890</id>
            <name>subuser_cred_2</name>
            <permissions>
                <permission>
                    <web>1</web>
                    <api>1</api>
                    <mail>1</mail>
                </permission>
            </permissions>
        </credential>
    </result>

Add a Subuser Multiple Credential

Create a new subuser credential.

URI Parameter Required Requirements Description
task Yes Must be set to add Task to create a subuser credential
user Yes The subuser name The subuser whose multi cred users you are looking for
credential_name Yes The new user name, unique for your account The subuser whose multi cred users you are looking for
credential_password Yes The password for your credential. See the SendGrid password requirements The password for your subuser credential
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/customer.credential.json
POST Data api_user=apikey&api_key=your_sendgrid_password&task=create&user=subuser_name&credential=new_user_name&credential_password=new_credential_password

Response

1
2
3
{
    "message" : "success"
}

Call

POST https://api.sendgrid.com/apiv2/customer.credential.xml
POST Data api_user=apikey&api_key=your_sendgrid_password&task=create&user=subuser_name&credential=new_user_name&credential_password=new_credential_password

Response

1
2
3
<result>
      <message>success</message>
   </result>

Edit Subuser Multiple Credential

Edit a subuser credential.

URI Parameter Required Requirements Description
task Yes Must be set to edit Task to edit a subuser credential
user Yes The subuser name The subuser whose multi cred users you are looking for
credential_name Yes The credential name The current name of the credential
new_credential_password Yes The password for your credential. See the SendGrid password requirements The password for your subuser credential
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/customer.credential.json
POST Data api_user=apikey&api_key=your_sendgrid_password&task=edit&user=subuser_name&credential_name=credential_name&new_credential_password=credential_password

Response

1
2
3
{
    "message" : "success"
}

Call

POST https://api.sendgrid.com/apiv2/customer.credential.xml
POST Data api_user=apikey&api_key=your_sendgrid_password&task=edit&user=subuser_name&credential_name=credential_name&new_credential_password=credential_password

Response

1
2
3
<result>
      <message>success</message>
   </result>

Delete Subuser Multiple Credential

Delete a subuser credential.

URI Parameter Required Requirements Description
task Yes Must be set to delete Task to delete a subuser credential
user Yes The subuser name The subuser whose multi cred users you are looking for
credential_name Yes The credential name The current name of the credential
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/customer.credential.json
POST Data api_user=apikey&api_key=your_sendgrid_password&task=delete&user=subuser_name&credential_name=credential_name

Response

1
2
3
{
    "message" : "success"
}

Call

POST https://api.sendgrid.com/apiv2/customer.credential.xml
POST Data api_user=apikey&api_key=your_sendgrid_password&task=delete&user=subuser_name&credential_name=credential_name

Response

1
2
3
<result>
      <message>success</message>
   </result>