Skip to content

[BUG] Carousel message buttons (URL, CALL, COPY_CODE) lose their parameters during serialization #51

@santosdevco

Description

@santosdevco

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Description:
When sending a Carousel message via the POST /send/carousel endpoint, the parameters for non-REPLY buttons (URL, CALL, and COPY_CODE) are not serialized correctly. The buttonParamsJSON is generated with empty values (e.g., "url":"", "phone_number":""). Furthermore, COPY_CODE buttons are incorrectly downgraded to quick_reply with an empty ID.

Only the REPLY buttons are being serialized correctly with their respective IDs.

Environment:

  • API Version: evolution-go-dev (Docker)
  • Endpoint: POST /send/carousel

Steps to Reproduce:

  1. Send a POST request to /send/carousel with a payload containing multiple cards.
  2. Include different types of buttons (REPLY, URL, CALL, COPY_CODE).
  3. Check the WhatsApp client behavior (returns "No app available" for links) and inspect the API's 200 OK response payload.

What did you expect?

The API should correctly pass the url, phoneNumber, and copyCode parameters to the buttonParamsJSON string so the WhatsApp client can render and execute the interactive buttons properly.

What did you observe instead of what you expected?

Actual Behavior (Evidence):
As seen in the InteractiveMessage response block, the parameters are completely stripped out:

  1. URL Button Failure:
"buttons": [
  {
    "name": "cta_url",
    "buttonParamsJSON": "{\"display_text\":\"Visitar Tienda 🛒\",\"url\":\"\"}" 
  }
]

(Notice "url":"" is empty).

  1. CALL Button Failure:
"buttons": [
  {
    "name": "cta_call",
    "buttonParamsJSON": "{\"display_text\":\"Llamar a Soporte 📞\",\"phone_number\":\"\"}"
  }
]

(Notice "phone_number":"" is empty).

  1. COPY_CODE Button Downgraded:
"buttons": [
  {
    "name": "quick_reply",
    "buttonParamsJSON": "{\"display_text\":\"Copiar Cupón ✂️\",\"id\":\"\"}"
  }
]

(Notice the type was changed to quick_reply and the ID/Code is empty).

  1. REPLY Button (Works correctly):
"buttons": [
  {
    "name": "quick_reply",
    "buttonParamsJSON": "{\"display_text\":\"¡Hacer una prueba!\",\"id\":\"btn_prueba_reply\"}"
  }
]

Additional Context:
Because the url and phone_number arrive empty to the mobile device, Android/iOS WhatsApp clients throw an OS error ("No app available to open this link") when the user taps the button. For now, only REPLY buttons are usable inside carousels.

Screenshots/Videos

No response

Which version are you using?

0.7.1

What is your environment?

Docker

If applicable, paste the log output

POST

curl -X 'POST' \
  'http://localhost:4000/send/carousel' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "number": "573123235830",
  "delay": 1500,
  "formatJid": true,
  "body": "¡Conoce todas las funciones de Restaurant! Desliza para ver más 👉",
  "footer": "Order Manager",
  "cards": [
    {
      "header": {
        "title": "1. Botón de Respuesta",
        "subtitle": "Tipo: REPLY",
        "imageUrl": "https://image.com/imge.jpg"
      },
      "body": {
        "text": "Este botón enviará un mensaje de texto de vuelta a nuestro sistema."
      },
      "footer": "Interacción rápida",
      "buttons": [
        {
          "type": "REPLY",
          "id": "btn_prueba_reply",
          "displayText": "¡Hacer una prueba!"
        }
      ]
    },
    {
      "header": {
        "title": "2. Botón de Enlace",
        "subtitle": "Tipo: URL",
        "imageUrl": "https://image.com/imge.jpg"
      },
      "body": {
        "text": "Toca este botón para salir de WhatsApp y visitar nuestra tienda web."
      },
      "footer": "Navegación externa",
      "buttons": [
        {
          "type": "URL",
          "displayText": "Visitar Tienda 🛒",
          "url": "https://RESTAURANT.com"
        }
      ]
    },
    {
      "header": {
        "title": "3. Botón de Llamada",
        "subtitle": "Tipo: CALL",
        "imageUrl": "https://image.com/imge.jpg"
      },
      "body": {
        "text": "Este botón abrirá el marcador de tu celular listo para llamarnos."
      },
      "footer": "Atención telefónica",
      "buttons": [
        {
          "type": "CALL",
          "displayText": "Llamar a Soporte 📞",
          "phoneNumber": "+57313623432"
        }
      ]
    },
    {
      "header": {
        "title": "4. Botón de Copiar",
        "subtitle": "Tipo: COPY_CODE",
        "imageUrl": "https://image.com/imge.jpg"
      },
      "body": {
        "text": "Ideal para cupones. Cópialo y pégalo en tu próximo pedido."
      },
      "footer": "Portapapeles",
      "buttons": [
        {
          "type": "COPY_CODE",
          "displayText": "Copiar Cupón ✂️",
          "copyCode": "RESTAURANT2026"
        }
      ]
    }
  ]
}

RESPONSE

{
  "data": {
    "Info": {
      "Chat": "[REDACTED_PHONE]@s.whatsapp.net",
      "Sender": "[REDACTED_SENDER_PHONE]:7@s.whatsapp.net",
      "IsFromMe": true,
      "IsGroup": false,
      "AddressingMode": "",
      "ID": "3EB0132561855FEA96C1E5",
      "Type": "InteractiveMessage",
      "Timestamp": "2026-05-01T16:45:43.638014142-03:00"
    },
    "Message": {
      "interactiveMessage": {
        "InteractiveMessage": {
          "CarouselMessage": {
            "cards": [
              {
                "InteractiveMessage": {
                  "NativeFlowMessage": {
                    "buttons": [
                      {
                        "name": "quick_reply",
                        "buttonParamsJSON": "{\"display_text\":\"¡Hacer una prueba!\",\"id\":\"btn_prueba_reply\"}"
                      }
                    ]
                  }
                },
                "header": {
                  "Media": {
                    "ImageMessage": {
                      "URL": "[REDACTED_MEDIA_URL]",
                      "mimetype": "image/jpeg"
                      /* Hashes and Media Keys redacted for brevity */
                    }
                  },
                  "title": "1. Botón de Respuesta",
                  "subtitle": "Tipo: REPLY",
                  "hasMediaAttachment": true
                },
                "body": {
                  "text": "Este botón enviará un mensaje de texto de vuelta a nuestro sistema."
                }
              },
              {
                "InteractiveMessage": {
                  "NativeFlowMessage": {
                    "buttons": [
                      {
                        "name": "cta_url",
                        "buttonParamsJSON": "{\"display_text\":\"Visitar Tienda 🛒\",\"url\":\"\"}"
                      }
                    ]
                  }
                },
                "header": {
                  "Media": {
                    "ImageMessage": {
                      "URL": "[REDACTED_MEDIA_URL]",
                      "mimetype": "image/jpeg"
                    }
                  },
                  "title": "2. Botón de Enlace",
                  "subtitle": "Tipo: URL",
                  "hasMediaAttachment": true
                },
                "body": {
                  "text": "Toca este botón para salir de WhatsApp y visitar nuestra tienda web."
                }
              },
              {
                "InteractiveMessage": {
                  "NativeFlowMessage": {
                    "buttons": [
                      {
                        "name": "cta_call",
                        "buttonParamsJSON": "{\"display_text\":\"Llamar a Soporte 📞\",\"phone_number\":\"\"}"
                      }
                    ]
                  }
                },
                "header": {
                  "Media": {
                    "ImageMessage": {
                      "URL": "[REDACTED_MEDIA_URL]",
                      "mimetype": "image/jpeg"
                    }
                  },
                  "title": "3. Botón de Llamada",
                  "subtitle": "Tipo: CALL",
                  "hasMediaAttachment": true
                },
                "body": {
                  "text": "Este botón abrirá el marcador de tu celular listo para llamarnos."
                }
              },
              {
                "InteractiveMessage": {
                  "NativeFlowMessage": {
                    "buttons": [
                      {
                        "name": "quick_reply",
                        "buttonParamsJSON": "{\"display_text\":\"Copiar Cupón ✂️\",\"id\":\"\"}"
                      }
                    ]
                  }
                },
                "header": {
                  "Media": {
                    "ImageMessage": {
                      "URL": "[REDACTED_MEDIA_URL]",
                      "mimetype": "image/jpeg"
                    }
                  },
                  "title": "4. Botón de Copiar",
                  "subtitle": "Tipo: COPY_CODE",
                  "hasMediaAttachment": true
                },
                "body": {
                  "text": "Ideal para cupones. Cópialo y pégalo en tu próximo pedido."
                }
              }
            ],
            "messageVersion": 1
          }
        },
        "body": {
          "text": "¡Conoce todas las funciones de restaurant! Desliza para ver más 👉"
        },
        "footer": {
          "text": "Order Manager"
        }
      }
    }
  },
  "message": "success"
}

Additional Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions