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 #

đź’»
Quick start (cURL)
Copy
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.

đź“‹
Call data (URL)
Copy
https://api.ip1.net/v3/messages/65eb3d14f1234567890abcdef/cards

Fields for request data #

Field nameDescription of the projectRequiredTypeExample
messageIdID of the message for which you want to list cardsYesQuery Parameter65eb3d14f1234567890abcdef

Responsibility #

Returns a list of cards included in the message (e.g., a single card or multiple in a carousel).

Example of response data #

đź“‹
Response data (JSON)
Copy
[
  {
    "id": "65eb3d14f1234567890a1b2c3d4",
    "messageId": "msg-12345",
    "type": "Standalone",
    "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": "Medium",
    "width": 1,
    "orientation": "Horizontal",
    "suggestions": [
      {
        "text": "Se rean",
        "type": "OpenUrlAction",
        "url": "https://site.se/rea"
      }
    ]
  }
]

Fields for response data #

Field nameDescription of the projectTypeExample
idUnique card ID.string65eb3d14f1234567890a1b2c3d4
messageIdMessage ID the card belongs to.string65eb3d14f784682890abc24f
typeType of card.String (enum)”Standalone”
orderThe position of the card.Integer0
titleCard title (max 100 characters).string”Our big summer sale!”
contentThe descriptive text (max 2000 characters).string”Click below...”
mediaUrlURL to image or video.URI”https://cdn.se/bild.jpg”
HeightHeight (1=Small, 2=Medium, 3=Large).String (enum)”Medium”
widthWidth (1=Small, 2=Large).String (enum)”Large”
orientationOrientation (1=Horizontal, 2=Vertical).String (enum)”Horizontal”
suggestionsA 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 #

đź’»
Quick Start (cURL)
Copy
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.

đź“‹
Call data (URL)
Copy
https://api.ip1.net/v3/messages/65eb3d14f784682890abc24f/cards/65eb3d14f1234567890a1b2c3d4/suggestions

Fields for request data #

Field nameDescription of the projectRequiredTypeExample
messageIdMessage ID.YesQuery Parameter65eb3d14f1234567890abcdefHello.
cardIdUnique card ID.YesQuery Parameter65eb3d14f1234567890a1b2c3d4

Responsibility #

Returns a list of all suggestions/buttons for the selected card

Example of response data #

đź“‹
Response data (JSON)
Copy
[
  {
    "id": "65eb3d14f1234567890a1e2f3dg",
    "messageId": "65eb3d14f1234567890abcdef",
    "cardId": "65eb3d14f1234567890a1b2c3d4",
    "type": "DialAction",
    "order": 0,
    "text": "Call us now",
    "postbackData": "call_clicked",
    "phoneNumber": "+468123456"
  }
]

Fields for response data #

Field nameDescription of the projectTypeExample
idSuggestion/button ID.string65eb3d14f1234567890abcdefHello.
messageIdMessage IDstring65eb3d14f1234567890abcdef
cardIdUnique ID for the card that the suggestion/button belongs to.string65eb3d14f1234567890a1b2c3d4
typeType of suggestion/buttonstring”DialAction”
orderButton layout on the card.Integer0
textThe text on the Suggestion/button.string”Call us”
postbackDataThe code that is sent to your webhook on click.string”call_button_clicked”
phone numberPhone number (Tied to type 4)string”46101606060”

Do you want to know more? #

Read our Rich Cards guide to learn about best practices and code examples.