OrgsAdmins

updateOrgAdmin

PUT
/api/v1/orgs/{org_id}/admins/{admin_id}

Update identity fields and privilege assignments for an existing administrator under this organization.

Authorization

Authorization<token>

Preferred authentication method for automation and integrations. Send the API token in the HTTP Authorization header.

Format: Authorization: Token {apitoken}

Notes:

  • An API token generated for a specific admin has the same privileges as that admin
  • An API token is automatically removed if it is not used for more than 90 days
  • SSO admins cannot generate admin API tokens. Use organization API tokens when scoped Org/Site privileges are needed.

In: header

Path Parameters

org_id*string
Formatuuid
admin_id*string
Formatuuid

Request Body

application/json

Request Body

Mist administrator account or organization API token details

compliance_status?admin_compliance_status

Trade compliance status for this administrator. enum: blocked, restricted.

Value in

  • "blocked"
  • "restricted"
email?string

If admin account is not an Org API Token

Formatemail
expire_time?integer

Expiration time for the admin invitation, in epoch seconds

first_name?string

If admin account is not an Org API Token. For an invite, this is the original first name used

hours?integer

If admin account is not an Org API Token, how long the invite should be valid

Range1 <= value <= 168
Default24
last_name?string

If admin account is not an Org API Token. For an invite, this is the original last name used

name?string

For Org API Token Only

no_tracking?|

Optional, whether to store privacy-consent information. When it doesn’t exist, it’s assumed true on EU (i.e. no tracking, the user has to opt-in); otherwise, the user would have to opt-out

Defaultnull
password_modified_time?number

Password last modified time, in epoch

Formatdouble
phone?string

If admin account is not an Org API Token. Phone number (numbers only, including country code)

phone2?string

If admin account is not an Org API Token. Secondary phone number (numbers only, including country code)

privileges?array<>

Privilege assignments that define the admin's MSP, organization, site, or site group access

Items1 <= items

Response Body

curl -X PUT "https://example.com/api/v1/orgs/000000ab-00ab-00ab-00ab-0000000000ab/admins/000000ab-00ab-00ab-00ab-0000000000ab" \  -H "Content-Type: application/json" \  -d '{    "email": "jsnow@abc.com",    "expire_time": 0,    "first_name": "John",    "hours": 24,    "last_name": "Sno",    "phone": "string",    "phone2": "string",    "privileges": [      {        "msp_id": "c0cf23fc-d82f-4219-988c-82fb61d8c875",        "name": "string",        "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",        "org_name": "string",        "orggroup_ids": [          "497f6eca-6276-4993-bfeb-53d5bbba6f08"        ],        "role": "admin",        "scope": "org",        "site_id": "72771e6a-6f5e-4de4-a5b9-1266c4197811",        "sitegroup_ids": [          "497f6eca-6276-4993-bfeb-53d6bbba6f08"        ],        "views": [          "switch_admin"        ]      }    ]  }'
{  "admin_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",  "email": "user@example.com",  "first_name": "string",  "last_name": "string",  "password_modified_time": 1656353525,  "privileges": [    {      "msp_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",      "msp_name": "string",      "name": "string",      "org_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",      "org_name": "string",      "orggroup_ids": [        "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"      ],      "role": "admin",      "scope": "org",      "site_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1",      "sitegroup_ids": [        "6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9"      ]    }  ]}