Updated API Protocol (markdown)

Moxie Marlinspike 2014-04-04 09:25:58 -07:00
parent b0c42255e4
commit f07540425a
1 changed files with 12 additions and 5 deletions

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