pub.techne.draft.identity.holdForPhone

Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly "$subject" in `write.record` (and "$subject" in `write.rkey`) with that account's DID, every value exactly "$now" in the record with the time and every value exactly "$name" with that account's name (its public pub.techne.draft.actor.profile displayName, trimmed, at most 64 graphemes, else its handle; a write waits until one is known), and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number's keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose own member space (`space.collective.member/self`) it manages), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller's DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller's writes.

Details · procedure
Kindprocedure
Authorityidentity.draft.techne.pub
Commit rev3n3iob5dmjg2u
Indexed

Procedure

procedure · POST

Input

application/json

actAs

requiredstring · did

The account the record is written as.

app

string

A label the caller gives itself, unverified, echoed in listPhoneHolds.

  • minLength: 1
  • maxLength: 64

phone

requiredstring

The number, E.164 (+15551234567).

write

requiredref
Reference

Output

application/json

id

requiredstring

The hold.

Errors

InvalidRequest

HTTP 400: a number that is not E.164, a record without the "$subject" slot or carrying the number, a record or key permissioned.putRecord would refuse, or a body that is not JSON; 415: not application/json; 422: not the input's shape; 413: a record over 64 KiB.

Forbidden

HTTP 403: the caller may not write as `actAs`.

RateLimitExceeded

Too many writes from this DID (HTTP 429).

#heldWrite

object

Properties

collection

requiredstring · nsid

record

requiredunknown

The record, with the "$subject" (and optionally "$now" and "$name") slots as string values.

rkey

string

The record key, which may carry "$subject". Absent: an accessRule takes its deterministic key, any other record a TID.

space

requiredstring

The space the record is for, as permissioned.putRecord's `space`. Required: a public record is not held.