Change a member's role or notifications
const url = 'https://api.nsin.ir/domains/example.com/members/1';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"role":"admin","notify_domain":true,"notify_uptime":true,"notify_ssl":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.nsin.ir/domains/example.com/members/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "role": "admin", "notify_domain": true, "notify_uptime": true, "notify_ssl": true }'Partial update. Changing role requires members.manage; a member may
change their own notification preferences without it.
The owner’s role cannot be changed, and the owner always receives every notification category.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comThe member’s user id, from the member list.
Request Body required
Section titled “Request Body required ”Partial patch — send only what you want to change. At least one field is required.
object
A role that may be assigned to a member or invitation. owner is not
grantable — it always follows domain ownership.
Responses
Section titled “ Responses ”The updated member.
object
Your role on a domain. owner is implicit for the domain’s creator and
for global admins; the other three are grantable via sharing.
True for the account this key belongs to.
Receive domain status notifications.
Receive outage notifications.
Receive certificate notifications.
Example
{ "role": "owner"}Invalid user id or body, nothing to update, an invalid role, or an attempt to change the owner’s role or notifications.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}Missing, malformed, revoked or expired API key — or the owning account is inactive.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}The key is read-only, your role on the domain lacks the required permission, or the domain’s plan does not include the feature.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}Domain or member not found.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}