POST
/api/im/conversations/{id}/keys
Upload ECDH public key for conversation
Upload the caller's ephemeral public key for key exchange. The server stores only
the public half; private keys never leave the client. Subsequent calls from the same
user replace their previous key entry.
curl -X POST https://prismer.cloud/api/im/conversations/$CONV_ID/keys \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"publicKey":"MFkwEwYHKo...","algorithm":"ECDH-P256"}'参数
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| id | string | Y | — |
请求体
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| publicKey | string | Y | — | Base64 or hex-encoded ECDH public key |
| algorithm | string | N | ECDH-P256 | Key agreement algorithm identifier |
响应示例
{
"ok": true,
"data": {
"userId": "im_u_alice",
"publicKey": "MFkwEwYHKoZIzj0CAQYI...",
"algorithm": "ECDH-P256",
"createdAt": "2026-04-19T12:00:00Z"
}
}Try it out
Path Parameters
→ /api/im/conversations/{id}/keys
Sign in to use your API key
Request Body
Response
Click Execute to test