> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# setUserData()

> Sets arbitrary custom data on the local participant, visible to all other participants.

`setUserData(data)`

Associates arbitrary custom data with the local participant and syncs it to all other participants. The data is stored in the `userData` property of the local participant's [`DailyParticipant`](https://docs.daily.co/reference/react-native/types/daily-participant) object and replaces any previously set value.

A participant can only set their own `userData` — not another participant's.

> [!NOTE]
>
> Updates are rate limited. The local copy of `userData` is updated immediately, but propagation to other participants is throttled. All participants are guaranteed to converge on the same final value.

## Parameters

**data** `unknown` *required*

Any JSON-serializable value with a max payload size of 4KB. Pass `undefined` to remove `userData` from the participant object entirely.

## Return value

Returns a `Promise` that resolves to `{ userData: unknown }` — the value that was set.

## Custom avatar in Daily Prebuilt

Setting an `avatar` key displays a custom image on the participant's muted tile and in the People tab. The URL must be publicly accessible.

```javascript theme={null}
call.setUserData({ avatar: 'https://example.com/avatar.jpg' });
```

![Video call participant tile showing a custom avatar image](https://mintcdn.com/daily-co/UZ5SeZfPxiPGRDvT/assets/prebuilt-custom-avatar.png?fit=max\&auto=format\&n=UZ5SeZfPxiPGRDvT\&q=85\&s=366d1363b8ad611cf167119ff0fee859)

## Examples

### Custom application state

```javascript theme={null}
call.setUserData({ hasHandRaised: true });
```

### Reading userData

```javascript theme={null}
const local = call.participants()['local'];
console.log(local.userData);

const remote = call.participants()[participantSessionId];
console.log(remote.userData);
```

## See also

> [card] Types
>
> * [DailyCallOptions: userData](https://docs.daily.co/reference/react-native/types/daily-call-options.md#param-user-data)
> * [DailyParticipant](https://docs.daily.co/reference/react-native/types/daily-participant.md)

> [card] Methods
>
> * [participants()](https://docs.daily.co/reference/react-native/instance-methods/participants.md)
> * [setUserName()](https://docs.daily.co/reference/react-native/instance-methods/set-user-name.md)

> [card] Events
>
> * [participant-updated](https://docs.daily.co/reference/react-native/events/participant-events.md#participant-updated)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.