API reference

User sync

Create and update up to 500 users of an app in one call, and read the stored sync runs.

The bulk sync endpoint writes users into one app, which can sit in the workspace in the URL or anywhere below it. A Master workspace can load users into any client app under it. Each user is matched to an existing user by external_id, then email, then phone; a match is updated and a user with no match is created.

Every call is stored as a sync run that you can read back.

Authentication#

Send an API key in Authorization and an M2M token in X-Authorization. For the sync call, the M2M token's app must be in the target app's workspace or a workspace above it. For the run reads, it must be in the workspace named in the URL. The sync call needs the token's write scope and the run reads need read.

Headershttp
Authorization: Bearer scworks_...X-Authorization: Bearer scm2m_...

Sync users#

POST/v1/workspaces/:workspace_id/apps/:app_id/users/bulkAPI key + M2M token
workspace_idstringrequired
UUID or slug of the workspace. The app must be in it or below it.
app_idstringrequired
The app to write users into (app_...).
usersobject[]required
1 to 500 user objects. See User object.
sourceobject
kind (thread_sync, msp_sync, admin_bulk or other; any other value is stored as other), version and file_name. Stored on the run.
send_inviteboolean
Sends an invitation link to each new user who has an email and is not inactive. Default false.
skipped_rowsobject[]
Rows your importer left out (line, email, phone, external_id, reason). Kept on the run as skipped.

User object#

Each user needs at least one of external_id, email or phone. A user that does not exist yet needs email or phone.

external_idstring
Your own ID for the person. Matched first.
emailstring
Email address.
phonestring
Phone number in E.164.
first_namestring
First name.
middle_namestring
Middle name.
last_namestring
Last name.
namestring
Full name. Used only when no name parts are sent.
statusstring
active (default) or inactive, which deactivates the user. deactivated is read as inactive.
metaobject
Custom fields, merged into the user's metadata. Also accepted as user_meta.
alternate_phonesobject[]
Extra phone numbers, each { "phone": "+1...", "label": "..." }. Stored as trusted without an SMS check.
entraobject
Microsoft Entra identity: upn and oid (both required, or the block is ignored) and optional tid. The first user sent for a client with a tid connects that client to the tenant.
lineinteger
Line of your source file. Echoed on the row's result and conflicts.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/apps/$SCUTE_APP_ID/users/bulk \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "users": [      { "external_id": "crm_42", "email": "jane@example.com", "first_name": "Jane" },      { "external_id": "crm_43", "email": "bob@example.com" }    ],    "source": { "kind": "msp_sync", "version": "2026-11-19" }  }'
Response 200json
{  "summary": { "processed": 2, "created": 1, "updated": 1, "errors": 0, "conflicts": 0 },  "results": [    { "index": 0, "external_id": "crm_42", "status": "created", "app_user_id": "0193f900-aaaa-7bbb-8ccc-000000000001" },    { "index": 1, "external_id": "crm_43", "status": "updated", "app_user_id": "0193f900-aaaa-7bbb-8ccc-000000000002" }  ],  "conflicts": [],  "idempotency_hit": false,  "run_id": "0193f950-1234-7abc-8def-000000000010"}

200 means the batch was processed, including when some rows failed. Read summary.errors and each results[] entry. status is created, updated or error; error rows carry error_code. entra_linked: true means the Entra identity was stored. When send_invite is set, invites has sent and failed counts.

Behavior#

  • Idempotency. An identical payload (same users, source, send_invite and skipped_rows) within 5 minutes returns the first response with idempotency_hit: true and is not processed again. Change source.version to force a new run.
  • Conflicts. When a user has confirmed their own email or phone, Scute keeps it and reports the change in conflicts. The rest of the batch is processed.
  • Carrier lookups for new phone numbers run in the background after the response.
Conflict kindMeaning
canonical_phone_changeThe phone sent differs from the one the user confirmed. The confirmed phone is kept
canonical_email_changeThe email sent differs from the one the user confirmed. The confirmed email is kept
otp_alternate_orphanedThe user verified an alternate phone by code and the payload leaves it out. The phone is kept
email_belongs_to_other_userThe email is on another user. The row is skipped with identity_collision
phone_belongs_to_other_userThe phone is on another user. The row is skipped with identity_collision
repeated_in_batchAn earlier row in the batch already wrote this user. The row is skipped
Row error_codeWhen
no_identifierNo external_id, email or phone
identity_collisionThe email or phone belongs to another user
repeated_in_batchThe same user appears earlier in the batch
validation_failedA field failed validation
invalid_requestThe row cannot be processed, for example a new user with only external_id

Errors#

Statuserror_codeWhen
400invalid_requestusers is missing or empty
403app_not_in_subtreeThe app is not in the URL workspace or below it
403workspace_access_deniedThe key and token do not reach the URL workspace
403workspace_admin_requiredA member JWT of a non-admin sent authz_attributes, alternate_phones, entra or status
404Workspace or app not found
413batch_size_exceededMore than 500 users

List sync runs#

Lists the stored runs into the apps of the workspace and the workspaces below it, newest first, without their rows. An app key with no member JWT sees its own app's runs only.

GET/v1/workspaces/:workspace_id/users/sync_runsAPI key + M2M token
app_idstring
Only this app's runs (UUID or app_...).
sourcestring
admin_bulk, thread_sync, msp_sync or other.
limitinteger
Default 25, maximum 100.
beforestring
The next value of the previous page.
Requestbash
curl "https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/users/sync_runs?limit=10" \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "runs": [    {      "id": "0193f950-1234-7abc-8def-000000000010",      "app": { "id": "app_3mxZRrzWxhPZ08dXvqq6", "name": "Wayne Industries" },      "source": "msp_sync",      "version": "2026-11-19",      "batches": 1,      "summary": { "processed": 2, "created": 1, "updated": 1, "errors": 0, "conflicts": 0 },      "truncated": false,      "created_at": "2026-11-19T09:12:00.000Z",      "updated_at": "2026-11-19T09:12:01.000Z"    }  ],  "next": "0193f950-1234-7abc-8def-000000000010"}

next is absent on the last page. by (who ran it) and file_name appear when they are known. An unknown app_id returns 404 with App not found.

Retrieve a sync run#

Returns one run with its results and conflicts.

GET/v1/workspaces/:workspace_id/users/sync_runs/:idAPI key + M2M token
Requestbash
curl https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/users/sync_runs/0193f950-1234-7abc-8def-000000000010 \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"

Returns {"run": {...}} with the summary fields plus results and conflicts. An unknown run returns 404 with Run not found.