# Modifying a Conversation, Message, or Participant

You can modify certain objects in the Conversations SDK (i.e. Conversation, Message, Participant) for connected [Users](/docs/conversations/api/user-resource) with appropriate [permissions](/docs/conversations/api/role-resource#permission-values).

## Updating

You can update a Conversation object by calling one of the appropriate methods for your chosen language.

For the Conversation, Message, or Participant data object, you could update some specific properties. Please refer to **Update a Conversation, Message or Participant code sample**.

Update a Conversation, Message or Participant

```js
/* Updating Conversations/Messages/Participants */

/* Conversations */

await conversation.updateAttributes({});
await conversation.updateFriendlyName("foo");
await conversation.updateLastReadMessageIndex(0);
await conversation.updateUniqueName("foo");

/* Messages */

await message.updateAttributes([1, {foo: "bar"}]);
await message.updateBody("bar");

/* Participants */

await participant.updateAttributes({foo: 8});
```

```ts
/* Updating Conversations/Messages/Participants */

/* Conversations */

await conversation.updateAttributes({});
await conversation.updateFriendlyName("foo");
await conversation.updateLastReadMessageIndex(0);
await conversation.updateUniqueName("foo");

/* Messages */

await message.updateAttributes([1, {foo: "bar"}]);
await message.updateBody("bar");

/* Participants */

await participant.updateAttributes({foo: 8});
```

## Deleting

You can delete a Conversation object by calling the appropriate method for your chosen language. When you remove a Conversation object, all its Messages, attached Media, and Participants will be deleted.

If you want to only delete a Message from a Conversation, call the specific method to remove it from the Conversation, and destroy any attached Media.

If you want to only delete a Participant from a Conversation, call the specific method to remove them from the Conversation.

Delete a Conversation, Message or Participant

```js
/* Deleting and updating Conversations/Messages/Participants */

/* Conversations */

// destroys the conversation, with all its messages and attached media and removes all participants
await conversation.delete();

/* Messages */

// remove a message from the conversation, destroying any attached media
await message.remove();

/* Participants */

// remove participant from the conversation
await participant.remove();
```

```ts
/* Deleting Conversations/Messages/Participants */

/* Conversations */

// destroys the conversation, with all its messages and attached media and removes all participants
await conversation.delete();

/* Messages */

// remove a message from the conversation, destroying any attached media
await message.remove();

/* Participants */

// remove participant from the conversation
await participant.remove();
```

When you delete a parent object, you will also delete its child object. For example, if you remove a Conversation, then all Messages and Participants will be automatically deleted. Once deleted, these resources are unrecoverable.

Check out our auto-generated documentation for more information about Conversations SDK methods and properties: [JavaScript](https://media.twiliocdn.com/sdk/js/conversations/latest/docs), [Android](https://media.twiliocdn.com/sdk/android/conversations/latest/docs) or [iOS](https://media.twiliocdn.com/sdk/ios/convo/latest/docs/).

## What's Next?

Congratulations! 🎉 You've finished the getting started guides. Now, let's explore more Conversations SDK guides:

* Learn about the [Best Practices using the Conversations SDK](/docs/conversations/best-practices-sdk-clients).
* Read about [Error Handling and Diagnostic](/docs/conversations/error-handling-diagnostics) to help you debug your application.
