Skip to content

Change a member's role or notifications

PATCH
/domains/{domain}/members/{userId}
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.

domain
required
string

The domain name (for example example.com) — not a numeric id.

Example
example.com
userId
required
integer

The member’s user id, from the member list.

Media type application/json

Partial patch — send only what you want to change. At least one field is required.

object
role

A role that may be assigned to a member or invitation. owner is not grantable — it always follows domain ownership.

string
Allowed values: admin editor viewer
notify_domain
boolean
notify_uptime
boolean
notify_ssl
boolean

The updated member.

Media type application/json
object
user_id
integer
email
string
name
string
role

Your role on a domain. owner is implicit for the domain’s creator and for global admins; the other three are grantable via sharing.

string
Allowed values: owner admin editor viewer
is_owner
boolean
is_self

True for the account this key belongs to.

boolean
joined_at
string format: date-time
notify_domain

Receive domain status notifications.

boolean
notify_uptime

Receive outage notifications.

boolean
notify_ssl

Receive certificate notifications.

boolean
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.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"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.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

Domain or member not found.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}