ID prefixes
Layout of an ID
Section titled “Layout of an ID”Entity IDs are TSIDs: an optional lower-case type prefix, an underscore, and 13 characters of Crockford Base32 that encode a 64-bit value. The value is a 42-bit millisecond timestamp (milliseconds since the Unix epoch), a 12-bit sequence and a 10-bit random part, in that order from the most significant bit. IDs sort by creation time, and the prefix says what kind of entity the ID names (for example clt_ for a client).
Example: clt_0HZXEQ5Y8JY5Z.
| Property | Value |
|---|---|
| Prefix | Three lower-case letters, then _. Raw IDs (no prefix) are used for execution, trace and some event contexts. |
| Body | 13 characters of Crockford Base32: 0123456789ABCDEFGHJKMNPQRSTVWXYZ (no I, L, O or U). Upper case on the wire. |
| Bits | 42 timestamp, 12 sequence, 10 random. |
| Length | 17 characters with a three-letter prefix (the platform stores most ids as VARCHAR(17)). |
| Ordering | String order equals creation order, because Crockford Base32 preserves numeric order and the timestamp is the most significant part. |
Within one process IDs are strictly increasing. The sequence sits above the random part so it decides the order within a millisecond. When 4096 IDs are issued in one millisecond the generator borrows the next millisecond rather than reusing a sequence value, and it never moves backwards if the wall clock steps back.
The platform generates IDs. Callers do not choose the ID of a platform entity, and an ID that
arrives from outside is treated as an opaque string: do not parse a prefix to make decisions.
Application-specific entities in your own database can use the same scheme with a prefix of your
own (tsid.GenerateWithPrefix("ord") in the Go SDK; the other SDKs have the equivalent).
Typed prefixes
Section titled “Typed prefixes”The prefixes are canonical and must never change. A prefix not in the tables below is rendered
unk by the platform’s table, which means “not a platform entity”.
Identity and tenancy
Section titled “Identity and tenancy”| Prefix | Entity | What it names |
|---|---|---|
clt_ |
Client | A tenant client |
prn_ |
Principal | A user or service account |
app_ |
Application | An application or integration |
sac_ |
ServiceAccount | A service account (its own record, linked from a principal) |
rol_ |
Role | A role |
prm_ |
Permission | A permission record |
oac_ |
OAuthClient | An OAuth client |
acd_ |
AuthCode | An OAuth authorisation code |
oat_ |
OAuthAccessToken | A stored OAuth access token record |
ort_ |
OAuthRefreshToken | A refresh token record |
lat_ |
LoginAttempt | A recorded sign-in attempt |
cac_ |
ClientAuthConfig | A client’s authentication configuration |
apc_ |
AppClientConfig | An application’s per-client configuration and entitlement |
irm_ |
IdpRoleMapping | An identity-provider role mapping |
cor_ |
CorsOrigin | An allowed CORS origin |
anc_ |
AnchorDomain | An anchor email domain |
idp_ |
IdentityProvider | An identity provider |
ipc_ |
IdentityProviderCertificate | A certificate the platform authenticates with at an external identity provider’s token endpoint |
edm_ |
EmailDomainMapping | An email-domain mapping |
gnt_ |
ClientAccessGrant | A partner’s grant of access to a client |
prt_ |
PasswordResetToken | A password-reset token record |
pkc_ |
WebauthnCredential | A registered passkey |
mfm_ |
MfaMethod | An enrolled second factor |
mrc_ |
MfaRecoveryCode | A second-factor recovery code |
mep_ |
MfaEmailPin | An emailed one-time PIN |
mtd_ |
MfaTrustedDevice | A trusted device for second factors |
rar_ |
ResetApprovalRequest | A password-reset approval request |
ptu_ |
PortalUser | A portal identity (the separate portal plane) |
pta_ |
PortalApp | A client’s portal application |
Messaging
Section titled “Messaging”| Prefix | Entity | What it names |
|---|---|---|
evt_ |
EventType | An event type |
evn_ |
Event | An event |
evr_ |
EventRead | An event’s read-projection row |
con_ |
Connection | A connection |
sub_ |
Subscription | A subscription |
dpl_ |
DispatchPool | A dispatch pool |
djb_ |
DispatchJob | A dispatch job |
djr_ |
DispatchJobRead | A dispatch job’s read-projection row |
sch_ |
Schema | A schema record |
sjb_ |
ScheduledJob | A scheduled job |
sji_ |
ScheduledJobInstance | A scheduled-job instance (one firing) |
sjl_ |
ScheduledJobInstanceLog | A log line of an instance |
prc_ |
Process | A process definition |
djd_ |
DispatchJobDescriptor | The display name of a dispatch job code |
Platform
Section titled “Platform”| Prefix | Entity | What it names |
|---|---|---|
aud_ |
AuditLog | An audit-log row |
pcf_ |
PlatformConfig | A platform configuration value |
cfa_ |
ConfigAccess | A configuration access grant |
oas_ |
ApplicationOpenApiSpec | An application’s synced OpenAPI document |
doc_ |
AppDoc | An application-synced documentation page |
upd_ |
AppUpdate | One over-the-air update (or rollback) of a phone app |
bin_ |
AppBinary | A published phone-app binary |
lnk_ |
AppInstallLink | A link that installs a published phone-app binary |
Functions
Section titled “Functions”| Prefix | Entity | What it names |
|---|---|---|
fnc_ |
Function | A function |
fnv_ |
FunctionVersion | A function version |
fnr_ |
FunctionRunner | A function runner |
fdm_ |
FunctionDomain | A function public-route domain |
frt_ |
FunctionRoute | A function public route |
ftl_ |
(trace log record) | A function trace-log record; the id is ftl_r<runner's UUID> when the runner supplies one |
Ingestion
Section titled “Ingestion”| Prefix | Entity | What it names |
|---|---|---|
ing_ |
Ingestion | An ingestion |
inv_ |
IngestionVersion | An ingestion version |
ins_ |
IngestionSet | An ingestion set |
isa_ |
IngestionSetApply | An application of a set |
ifl_ |
IngestionFailure | A recorded ingestion failure |
itr_ |
IngestionTest | An ingestion test run (the runtime’s trace ids also use itr) |
itw_ |
(trace window) | An ingestion trace window id |
Field identity
Section titled “Field identity”| Prefix | Entity | What it names |
|---|---|---|
fwu_ |
FieldWorker | A field worker |
fwd_ |
FieldDevice | An enrolled field device |
fwe_ |
FieldEnrolmentCode | A field enrolment code record |
fws_ |
FieldSession | A field session |
fwb_ |
FieldBadge | A field badge |
fwi_ |
FieldSignInCode | A field console sign-in code |
fwk_ |
FieldUnlockKey | A worker’s biometric-gated unlock key on a personal device |
fwl_ |
(sign-in log) | A field sign-in attempt log row |
Other prefixed tokens
Section titled “Other prefixed tokens”These look like IDs but are credentials or short-lived codes, not TSIDs.
| Shape | What it is |
|---|---|
fwr_ + base64url |
A field-session refresh token (32 random bytes). Only its SHA-256 is stored. |
FWB1 + 26 characters |
A field badge token (the QR content), shown once. |
FWS1 + 26 characters |
A field console sign-in code, valid 10 minutes, single use. |
fcfield:1:<base URL>:<code> |
The QR payload of a field enrolment code. |
See Field identity protocol for these.
Prefixes in the SDKs
Section titled “Prefixes in the SDKs”The Go SDK’s tsid.EntityType lists 38 of the prefixes above (the identity, messaging and platform ones through pta) for use by applications. The prefixes added later (second factors, reset approvals, application docs, functions, ingestion and field identity) belong to the platform and are not in that enumeration. Treat any other SDK’s table the same way: it is a convenience, and the platform’s table here is the authority.
Decode an ID
Section titled “Decode an ID”Paste an ID to see its prefix and when it was created. The decoder runs in your browser and sends nothing anywhere. Without JavaScript, use the layout above.