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.
Authorization: Bearer scworks_...X-Authorization: Bearer scm2m_...Sync users#
/v1/workspaces/:workspace_id/apps/:app_id/users/bulkAPI key + M2M tokenUser object#
Each user needs at least one of external_id, email or phone. A user that does not exist yet needs email or phone.
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" } }'{ "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 kind | Meaning |
|---|---|
| canonical_phone_change | The phone sent differs from the one the user confirmed. The confirmed phone is kept |
| canonical_email_change | The email sent differs from the one the user confirmed. The confirmed email is kept |
| otp_alternate_orphaned | The user verified an alternate phone by code and the payload leaves it out. The phone is kept |
| email_belongs_to_other_user | The email is on another user. The row is skipped with identity_collision |
| phone_belongs_to_other_user | The phone is on another user. The row is skipped with identity_collision |
| repeated_in_batch | An earlier row in the batch already wrote this user. The row is skipped |
| Row error_code | When |
|---|---|
| no_identifier | No external_id, email or phone |
| identity_collision | The email or phone belongs to another user |
| repeated_in_batch | The same user appears earlier in the batch |
| validation_failed | A field failed validation |
| invalid_request | The row cannot be processed, for example a new user with only external_id |
Errors#
| Status | error_code | When |
|---|---|---|
| 400 | invalid_request | users is missing or empty |
| 403 | app_not_in_subtree | The app is not in the URL workspace or below it |
| 403 | workspace_access_denied | The key and token do not reach the URL workspace |
| 403 | workspace_admin_required | A member JWT of a non-admin sent authz_attributes, alternate_phones, entra or status |
| 404 | Workspace or app not found | |
| 413 | batch_size_exceeded | More 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.
/v1/workspaces/:workspace_id/users/sync_runsAPI key + M2M tokencurl "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"{ "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.
/v1/workspaces/:workspace_id/users/sync_runs/:idAPI key + M2M tokencurl 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.