Update Peer
POST {{HOST}}/v2/active-rooms/:room_id/peers/:peer_id
You can use this API to update the details of a connected peer, such as name, role, and metadata (custom/additional information to build real-time interactivity scenarios).
Arguments
| Name | Type | Description | Required |
|---|---|---|---|
| room_id — path param | string | Unique identifier of the room where the peer is active. Example: 627cda81ab4f3b56a077dc33 | Yes |
| peer_id — path param | string | Unique identifier of the peer/participant for which you wish to update details. Example: 1038fa72-9345-4651-beab-436f9242ebf4 | Yes |
| name — body param | string | The name of the peer used in the active session. | No |
| role — body param | string | You can use this to update the role type of the peer. For example, to take the peer to a breakout room. | No |
| metadata — body param | object | You can use a stringified JSON to update various custom/additional information to a peer such as businessuserid, raisehand/lowerhand info, and more | No |
Why would you use this API?
- You can use these APIs to update various properties of the connected peer, such as avatar, BRB status, hand-raise status, etc.
- Custom Avatar:
- A user updates their profile information on your app/ongoing session; the data is stored in your data store.
- Use Update peer API and pass the profile picture data from your data store to your client app to display it as the respective connected peer's avatar (based on user_id mapping).
Request Body
{"name"=>"", "role"=>"", "metadata"=>{"card_reveal"=>"<CARD_REVEAL_DATA>", "visibility"=>"private"}}