Skip to content

One-time user

IdentitySDKHTTPDashboardassigned_toread_scopewrite_scopeconditionalPOST /api/users

Route one item to one named person with a self-scoped membership; they see and answer exactly that form and nothing else in the queue.

The situation

A customer needs to confirm a shipping address. They are not staff, should never see anyone else’s orders, and should land straight on one form that the workflow is waiting on.

The recipe

Provision the person as a member of the role with self scope:

provision
curl -X POST https://lt.acme.dev/api/users \
-H "Authorization: Bearer $LT_TOKEN" -H 'Content-Type: application/json' \
-d '{ "external_id": "cust-881", "email": "pat@example.com",
"roles": [{ "role": "customer-confirm", "type": "member",
"read_scope": "self", "write_scope": "self" }] }'

Park the row already assigned to them:

workflows/confirm-address.ts
const answer = await conditional<{ confirmed: boolean; address: string }>(`addr-${orderId}`, {
role: 'customer-confirm',
assigned_to: userId,
description: 'Confirm your shipping address',
metadata: {
orderId,
form_schema: {
title: 'Confirm address',
properties: { address: { type: 'string' }, confirmed: { type: 'boolean' } },
required: ['confirmed'],
},
},
});

A follow-up is another workflow firing another assigned row to the same person.

The guarantee

Scope folds into the SQL: a self-scoped member sees a row only when assigned_to is them, and can act only on those rows. Self scope keys off the durable assigned_to, independent of the claim’s time window, so the assignment holds until the workflow resolves it. There is no table access and no queue view. See Identity.