Skip to content

Give or remove a platform role

The platform.staff.set_role operation: POST /api/v1/platform/staff in the REST API and the platform_staff_set_role tool in the MCP server.

POST/api/v1/platform/staff

Gives a person a platform role (platform_admin, platform_tax_admin or platform_support), changes it, or removes it (platformRole: null) (spec §3.2). Only addresses at the platform's staff domains (PLATFORM_STAFF_DOMAINS) can hold a role; a person without an account gets one and signs in with Google or Microsoft (staff can't use email links, spec §6.2). The platform always keeps one platform admin. Platform roles never open an organization's data by themselves: support staff still request access per organization. Platform admins only, after signing in within the last 15 minutes.

At a glance

  • REST: POST /api/v1/platform/staff
  • MCP tool: platform_staff_set_role
  • Operation ID: platform.staff.set_role
  • Scope: Platform
  • Permission: platform:admin
  • Risk tier: security
  • Dry run: Supported (send Ownrecord-Dry-Run: true)
  • Idempotency: Idempotency-Key required
  • Modes: Test and live
  • Authentication: API key with the platform:admin scope
  • Fresh sign-in: In the console, a sign-in within the last 15 minutes
  • Since: M12

Request

Body

A JSON object (Content-Type: application/json):

FieldTypeRequiredDescription
emailstringYesThe person's address at a staff domain.
platformRoleone of platform_admin, platform_tax_admin, platform_support or nullYesThe role, or null to remove it.

Response

200 OK with a JSON object:

FieldTypeDescription
object"platform_staff_member"
userIdusr_… ID
emailstring
namestring or null
platformRoleone of platform_admin, platform_tax_admin, platform_support or null
lastLoginAtdate-time or null
disabledboolean

Examples

Add a support engineer

HTTP
POST /api/v1/platform/staff
Authorization: Bearer or_test_…
Idempotency-Key: 3f1c9a52-7d0e-4b8f-9a61-0c2d5e8b7f14
Content-Type: application/json

{
  "email": "ivo@ownrecord.com",
  "platformRole": "platform_support"
}

Response (200):

JSON
{
  "object": "platform_staff_member",
  "userId": "usr_01m5wvkry1e6w94sjxgme33fsb",
  "email": "ivo@ownrecord.com",
  "name": null,
  "platformRole": "platform_support",
  "lastLoginAt": null,
  "disabled": false
}

Errors

CodeHTTP statusWhenWhat to do
platform_staff_domain_required400The address isn't at one of the staff domains.Use the person's address at one of the staff domains (PLATFORM_STAFF_DOMAINS, shown on the Staff page).
platform_last_admin409The change would leave the platform without a platform admin.Make someone else a platform admin first, then change this person's role.
validation_failed400The address or role is invalid.Fix the fields listed in details.issues and send the request again.
fresh_auth_required403You last signed in more than 15 minutes ago.Sign in again, then repeat the action within 15 minutes.
permission_denied403You aren't a platform admin.Ask an organization owner or admin for a role or scope that allows this action.

It can also return these common errors: api_version_unsupported, invalid_json, unsupported_media_type, authentication_required, api_key_invalid, resource_not_found, idempotency_key_required, idempotency_key_reused, idempotency_in_progress, rate_limited, internal_error.