# Updating cards

After sending a card, it is supported to update the card within 14 days. You can refer to this document and choose the appropriate method to update the card based on your actual business scenarios. The update methods supported by Feishu cards are shown in the table below.

Update method | Applicable scenarios | Related APIs
---|---|---
Full update | Applicable to scenarios where the card content has significant differences, such as updating to a submitted card after form submission, or updating a thinking card of an AI Bot to an answer card. | - [Update message card sent by the app](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/patch)<br>- [Delay updating message card](https://open.feishu.cn/document/ukTMukTMukTM/uMDO1YjLzgTN24yM4UjN)<br>- [Fully update card entity](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/update)
Partial update | Applicable to scenarios where part of the card content needs to be modified. For example, in an AI Bot Q&A scenario, adding more components to the card during the Bot's response, deleting the "Stop Generating" button component after the response ends, or updating the button icon after the user clicks the like/dislike feedback button. | Card level:<br>- [Update card configuration](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/settings)<br>- [Batch update card entities](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/batch_update)<br>Component level:<br>- [Add component](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/create)<br>- [Update component](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/update)<br>- [Update component attributes](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/patch)<br>- [Delete component](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/delete)
Text streaming update | Applicable to scenarios where the Bot generates answers, returning text content in a "typewriter" style to avoid long waiting times for end users. | [Streaming update text](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/content)

## Fully updating cards

Fully updating a card refers to directly replacing the original card by passing in the new card's JSON code or template ID.

### Applicable scenarios

Applicable to scenarios where the card content has significant differences, such as updating to a submitted card after form submission, or updating a thinking card of an AI Bot to an answer card.

### Related APIs

In different scenarios, use different APIs or methods to update the card:

**Scenario 1**: After the card is sent, the developer actively updates the card without user interaction with the card:
- [Update message card sent by the app](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/patch): Update the card by specifying the message ID (message_id).
- [Fully update card entity](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/update): Update the card by specifying the card entity ID. Only supports card JSON code.

**Scenario 2**: After the card is sent, the full update of the card is triggered by user interaction with the card. You can choose:

When the user interacts with the card, the developer's server will receive a callback request from the card. When [handling card callbacks](https://open.feishu.cn/document/uAjLw4CM/ukzMukzMukzM/feishu-cards/handle-card-callbacks), you can choose:
- Immediately fully update the card: Pass the card JSON or card template data in the `card.data` parameter of the callback response.
- [Delay fully updating the message card](https://open.feishu.cn/document/ukTMukTMukTM/uMDO1YjLzgTN24yM4UjN): Based on the token parameter obtained from the callback request, pass the card JSON or card template data.

## Partially updating cards

Partially updating a card refers to adding, deleting, or modifying components within the card, or only updating the card's settings.

### Applicable scenarios

Applicable to scenarios where part of the card content needs to be modified. For example, in an AI Bot Q&A scenario, adding more components to the card during the Bot's response, deleting the "Stop Generating" button component after the response ends, or updating the button icon after the user clicks the like/dislike feedback button.

### Related APIs

Card level:
- [Update card configuration](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/settings)
- [Batch update card entities](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/batch_update)

Component level:
- [Add component](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/create)
- [Update component](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/update)
- [Update component attributes](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/patch)
- [Delete component](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/delete)

## Text streaming updates

Continuously incrementally update the content of text-type components to achieve a "typewriter" style text output effect.

### Applicable scenarios

Applicable to scenarios where the Bot generates answers, returning text content in a "typewriter" style to avoid long waiting times for end users.

### Related APIs

Refer to the [Streaming Update OpenAPI Call Guide](https://open.feishu.cn/document/uAjLw4CM/ukzMukzMukzM/feishu-cards/streaming-updates-openapi-overview). After creating the card entity and sending the card, stream the text update based on the card entity ID and component ID to achieve the "typewriter" output effect.