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

# Create Card

> Creates an X Ads card (website or app, single media or carousel) from raw components matching the X API payload

Creates an X Ads card (website or app, single media or carousel) from raw components matching the X API payload. Pass the returned card\_uri to x\_ads\_create\_post to attach the card.

|                       |                       |
| --------------------- | --------------------- |
| **App**               | X Ads                 |
| **Operation ID**      | `x_ads_create_card`   |
| **Type**              | Action                |
| **Connection**        | `x_ads` (required)    |
| **Credits per run**   | 1                     |
| **Agent / MCP tool**  | Yes                   |
| **Requires approval** | Yes (write operation) |

## Inputs

| Field        | Type                               | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------ | ---------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`    | DynamicAccount                     | Yes      | -       | Select the X Ads account to create the card in.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `name`       | string                             | Yes      | -       | Card name, up to 80 characters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `components` | array of object or string          | No       | -       | Card components as a JSON array matching the X Ads API payload; order defines the render order. A card needs exactly one media component plus a DETAILS or BUTTON component: - \{"type": "MEDIA", "media\_key": "..."} (single image or video from x\_ads\_upload\_media) - \{"type": "SWIPEABLE\_MEDIA", "media\_keys": \["...", "..."]} (2 to 6 items, carousel) - \{"type": "DETAILS", "title": "...", "destination": \{"type": "WEBSITE", "url": "`https://...`"}} (website cards) - \{"type": "BUTTON", "label": \{"type": "ENUM", "value": "INSTALL"}, "destination": \{"type": "APP", "country\_code": "US", "ios\_app\_store\_identifier": "...", "googleplay\_app\_id": "...", "ios\_deep\_link": "...", "googleplay\_deep\_link": "..."}} (app cards; label values: BOOK, CONNECT, INSTALL, OPEN, ORDER, PLAY, SHOP) WEBSITE destinations only go on DETAILS; APP destinations only on BUTTON. Cannot be combined with slides. Example website card: \[\{"type": "MEDIA", "media\_key": "13\_123"}, \{"type": "DETAILS", "title": "Shop now", "destination": \{"type": "WEBSITE", "url": "`https://example.com`"}}] |
| `slides`     | string or array of array of object | No       | -       | For Multi-Destination Carousels: a JSON array of arrays, each inner array a complete card's components (2 to 6 slides). Cannot be combined with components.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

## Output

**Type**: `Dict`

Returns the created card with full details including its card\_uri.

**Fields**: dynamic (depend on the inputs)
