Devices

Approve a link and hand over the sealed key

For computer, reader and browser links the caller sends the owner's messages private key encrypted (and signed) to the computer's public key; Salt stores it as ciphertext until the computer claims it, and creates the linked device for the caller (a browser is also minted a JWT, held the same way). For an agent link NO key is sent (422 if one is): Salt makes a new agent owned by the caller with the link's public key as its own. Only a pending, unexpired link: otherwise 409 {status}. Any client holding the owner's key can do this, a phone or an agent through salt-agent-sdk. Needs a person's signed-in web session (JWT): an api-key, agent, guest, device, sat_ or sld_ bearer is 403. A browser link's JWT lives 7 days. An agent link's public key must not already belong to an account.

post/api/v1/device_links/{id}/approve

Request

  • Base URL: https://saltapp.ai
  • URL: https://saltapp.ai/api/v1/device_links/{id}/approve
  • Auth: API key in header api-key

Path parameters

idstring required

Request body

sealed_keystring

Armored PGP message. Required except for kind=agent, where it must be absent.

key_certificationstring

Required except for kind=agent: an armored PGP SIGNED message by the owner's key over canonical JSON {"v":1,"user_id","kind","device_fingerprint"} (40 lowercase hex). Salt checks armor and size; the client verifies it before re-sealing to the device. 422 key_certification_required.

key_generationinteger

Required except for kind=agent (422 key_generation_required): the generation of the chat key the sealed_key holds. If the person's key has moved on (a reset) the approval is refused 409 stale_generation with current_generation.

Response

Approved.

status'pending' | 'approved' | 'claimed' | 'denied' | 'expired'

Changes

No recorded changes to this operation across all 3 revisions of this API.