From f07540425a9252e35c7e6a6f190aaaedccb65f9c Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Fri, 4 Apr 2014 09:25:58 -0700 Subject: [PATCH] Updated API Protocol (markdown) --- API-Protocol.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/API-Protocol.md b/API-Protocol.md index e3c3b0a..0550181 100644 --- a/API-Protocol.md +++ b/API-Protocol.md @@ -192,11 +192,12 @@ message PushMessageContent { If a client does not have an existing session with a recipient, the client will need to retrieve a PreKey for the recipient in order to start one. ``` -GET /v1/keys/{number}?relay={relay} +GET /v1/keys/{number}/{device_id}?relay={relay} Authorization: Basic {basic_auth} ``` -1. `number` is the PSTN number of the recipient. +1. `number` is the number of the recipient. +1. `device_id` is the device id of the recipient, or `*` for all devices. 1. `relay` (optional) is the federated relay the recipient is associated with. The `relay` param should only be included if the destination is at a federated node other than the sender. **Returns**: @@ -208,9 +209,15 @@ Authorization: Basic {basic_auth} ``` { - keyId: {key_id}, - publicKey: "{public_key}", - identityKey: "{public_key}" + "keys" : [ + { + "deviceId": {device_id}, + "keyId": {key_id}, + "publicKey": "{public_key}", + "identityKey": "{public_key}" + }, + ... + ] } ```