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 to clipboard
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.

📋
Anropsdata (URL)
Copy to clipboard
https://api.ip1.net/v3/messages/65eb3d14f1234567890abcdef/cards

Fields for call 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 #

📋
Responsdata (JSON)
Copy to clipboard
[
  {
    "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 nameDescription of the projectTypeExample
idUnique card ID.string65eb3d14f1234567890a1b2c3d4
messageIdMessage ID the card belongs to.string65eb3d14f784682890abc24f
typeType of card.string”Carousell”
orderCard position (important for carousels).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).Integer2
widthWidth (1=Small, 2=Large).Integer1
orientationOrientation (1=Horizontal, 2=Vertical).Integer2
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 to clipboard
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.

📋
Anropsdata (URL)
Copy to clipboard
https://api.ip1.net/v3/messages/65eb3d14f784682890abc24f/cards/65eb3d14f1234567890a1b2c3d4/suggestions

Fields for call 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 #

📋
Responsdata (JSON)
Copy to clipboard
[
  {
    "id": "65eb3d14f1234567890a1e2f3dg",
    "messageId": "65eb3d14f1234567890abcdef",
    "cardId": "65eb3d14f1234567890a1b2c3d4",
    "text": "Ring oss nu",
    "type": 5,
    "phoneNumber": "+468123456",
    "postbackData": "call_clicked"
  }
]

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/buttonstringPhone
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”
fallbackUrlFallback URL if functionality is not supportedURI”https://site.se/contact”