Please note that cards are created as part of a message via /bundles or /conversations, but you can retrieve details about them afterwards via these endpoints.
Get all cards for a message #
⚡Quick start #
curl -X GET https://api.ip1.net/v3/messages/msg-12345/cards \
-H "Authorization: Bearer DIN_API_TOKEN"
Call #
Endpoint: /messages/{messageId}/cards
Method: GET
Example of call data #
This call requires no body. The message ID is sent in the URL.
https://api.ip1.net/v3/messages/65eb3d14f1234567890abcdef/cards
Fields for call data #
| Field name | Description of the project | Required | Type | Example |
|---|---|---|---|---|
| messageId | ID of the message for which you want to list cards | Yes | Query Parameter | 65eb3d14f1234567890abcdef |
Responsibility #
Returns a list of cards included in the message (e.g., a single card or multiple in a carousel).
Example of response data #
[
{
"id": "65eb3d14f1234567890a1b2c3d4",
"messageId": "msg-12345",
"type": 1,
"order": 0,
"title": "Vår stora sommarrea!",
"content": "Klicka nedan för att se alla fantastiska erbjudanden.",
"mediaUrl": "https://cdn.site.se/summer-sale.jpg",
"height": 2,
"width": 1,
"orientation": 2,
"suggestions": [
{
"text": "Se rean",
"type": 1,
"url": "https://site.se/rea"
}
]
}
]
Fields for response data #
| Field name | Description of the project | Type | Example |
|---|---|---|---|
| id | Unique card ID. | string | 65eb3d14f1234567890a1b2c3d4 |
| messageId | Message ID the card belongs to. | string | 65eb3d14f784682890abc24f |
| type | Type of card. | string | ”Carousell” |
| order | Card position (important for carousels). | Integer | 0 |
| title | Card title (max 100 characters). | string | ”Our big summer sale!” |
| content | The descriptive text (max 2000 characters). | string | ”Click below...” |
| mediaUrl | URL to image or video. | URI | ”https://cdn.se/bild.jpg” |
| Height | Height (1=Small, 2=Medium, 3=Large). | Integer | 2 |
| width | Width (1=Small, 2=Large). | Integer | 1 |
| orientation | Orientation (1=Horizontal, 2=Vertical). | Integer | 2 |
| suggestions | A list of buttons connected directly to the card. | Array | […] |
Get suggestions for a specific card #
If you want to retrieve only the buttons (suggestions) belonging to a specific card in a message.
⚡Quick start #
curl -X GET https://api.ip1.net/v3/messages/msg-123/cards/card-888/suggestions \
-H "Authorization: Bearer DIN_API_TOKEN"
Call #
Endpoint: /messages/{messageId}/cards/{cardId}/suggestions
Methodology: GET
Example of call data #
This call requires no body. The message ID is sent in the URL.
https://api.ip1.net/v3/messages/65eb3d14f784682890abc24f/cards/65eb3d14f1234567890a1b2c3d4/suggestions
Fields for call data #
| Field name | Description of the project | Required | Type | Example |
|---|---|---|---|---|
| messageId | Message ID. | Yes | Query Parameter | 65eb3d14f1234567890abcdefHello. |
| cardId | Unique card ID. | Yes | Query Parameter | 65eb3d14f1234567890a1b2c3d4 |
Responsibility #
Returns a list of all suggestions/buttons for the selected card
Example of response data #
[
{
"id": "65eb3d14f1234567890a1e2f3dg",
"messageId": "65eb3d14f1234567890abcdef",
"cardId": "65eb3d14f1234567890a1b2c3d4",
"text": "Ring oss nu",
"type": 5,
"phoneNumber": "+468123456",
"postbackData": "call_clicked"
}
]
Fields for response data #
| Field name | Description of the project | Type | Example |
| id | Suggestion/button ID. | string | 65eb3d14f1234567890abcdefHello. |
| messageId | Message ID | string | 65eb3d14f1234567890abcdef |
| cardId | Unique ID for the card that the suggestion/button belongs to. | string | 65eb3d14f1234567890a1b2c3d4 |
| type | Type of suggestion/button | string | Phone |
| order | Button layout on the card. | Integer | 0 |
| text | The text on the Suggestion/button. | string | ”Call us” |
| postbackData | The code that is sent to your webhook on click. | string | ”call_button_clicked” |
| phone number | Phone number (Tied to type 4) | string | ”46101606060” |
| fallbackUrl | Fallback URL if functionality is not supported | URI | ”https://site.se/contact” |