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}" + }, + ... + ] } ```