Sunshine Conversations Passthrough API not working in V2 API | Community
Skip to main content

Sunshine Conversations Passthrough API not working in V2 API

  • July 19, 2022
  • 3 replies
  • 0 views

Jon29
We have the Sunshine Conversations V2 Messages API working, but when we try to use the Passthrough API, we are getting a "should have required property 'content'" error.
 
Here is the request, payload, and the response:

POST: https://api.smooch.io/v2/apps/62d2b047fa1d7700ef4bc9f1/conversations/a63b416485367d8a768f6c6a/messages

{"author": {"type": "business"},"content": {"type": "text","text": "Test"},"override": {"apple": {"payload": {"body": "https://smooch.io/","type": "richLink","richLinkData": {"url": "https://smooch.io/","title": "Title","assets": {"video": {"url": "https://images.apple.com/media/us/homepod/2018/98e6cc1a_37ec_4e69_b717_9e58c71e1937/films/expand/homepod-expand-tpl-cc-us-20180306_1280x720h.mp4","mimeType": "video/mp4"}}}}}}}

{"errors":[{"code":"bad_request","title":"should have required property 'content'"}]}

According to the documentation, the V2 API does support the "override" / passthrough APIs for Apple Business Chat:  https://docs.smooch.io/rest/#operation/postMessage
 

3 replies

  • June 11, 2025

Three years later and I'm getting the identical error.  Did y'all find a workaround?


  • June 11, 2025

I'm getting this exact same error and I'm posting JSON that contains a “content”  key.


Greg29
  • June 12, 2025

In case anyone else sees this post, we found the solution on another post. Apparently the issue is a missing content-header and not the content body itself. I've shared feedback internally to get this cleaned up in the future. For now, the following example should fix this for you:

curl https://api.smooch.io/v2/apps/$ZD_APP_ID/conversations/$CONVERSATION_ID/messages \
 --user $ZD_KEY:$ZD_SECRET \
 -H "content-Type: application/json" \
 -d '{"author": {"type": "business"}, "content": {"type": "text", "text": "Hello!"}}'