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"}'

Parameters

FieldTypeReqDefaultDescription
idstringY

Request Body

FieldTypeReqDefaultDescription
publicKeystringYBase64 or hex-encoded ECDH public key
algorithmstringNECDH-P256Key agreement algorithm identifier

Response Example

{
  "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