Write
set_card_cover
Set or clear a card's cover image from the outline's media library.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| outlineId | string | — | Outline ID. Defaults to your own outline. |
| stackId | string | Yes | ID of the stack containing the card. |
| cardId | string | Yes | ID of the card to update. Get from list_cards. |
| mediaId | string | null | Yes | Media ID from list_imported_media, or null to remove the cover. |
| forceHorizontalFit | boolean | — | true = show the whole landscape photo (fit) instead of crop-to-fill. |
| ifUpdatedAt | string | — | Optional optimistic-concurrency guard: the outline updatedAt you last read (from get_profile or a previous write's response). If the outline changed since, the call fails with CONFLICT and nothing is written. |
Response
| Field | Type | What it means |
|---|---|---|
| outlineId | string | Resolved outline ID. |
| stackId | string | The stack the card belongs to. |
| cardId | string | The card that was updated. |
| mediaId | string | null | The applied media ID, or null if cleared. |
Example
Request
json
{
"stackId": "stack_abc",
"cardId": "card_xyz789",
"mediaId": "media_123"
}Response
json
{
"outlineId": "42",
"stackId": "stack_abc",
"cardId": "card_xyz789",
"mediaId": "media_123"
}