Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Enable/Disable website access for a Subuser, while still preserving email send functionality



API Overview

api-overview page anchor

For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console(link takes you to an external page).


PATCH/v3/subusers/{subuser_name}/website_access

Base url: https://api.sendgrid.com (for global users and subusers)

Base url: https://api.eu.sendgrid.com (for EU regional subusers)

Enable/Disable website access for a Subuser, while still preserving email send functionality.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
subuser_namestringrequired
Encoding type:application/json
SchemaExample
Property nameTypeRequiredDescriptionChild properties
disabledbooleanOptional

Whether or not to disable website access to the Subuser. true means disabled, false means enabled.

204
Schema
Property nameTypeRequiredDescriptionChild properties

No properties defined

Enable/Disable website access for a subuser, while still preserving email send functionality

enabledisable-website-access-for-a-subuser-while-still-preserving-email-send-functionality page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_22
const client = require('@sendgrid/client');
_22
client.setApiKey(process.env.SENDGRID_API_KEY);
_22
_22
const subuser_name = "some_one";
_22
const data = {
_22
"disabled": true
_22
};
_22
_22
const request = {
_22
url: `/v3/subusers/${subuser_name}/website_access`,
_22
method: 'PATCH',
_22
body: data
_22
}
_22
_22
client.request(request)
_22
.then(([response, body]) => {
_22
console.log(response.statusCode);
_22
console.log(response.body);
_22
})
_22
.catch(error => {
_22
console.error(error);
_22
});


Rate this page: