The API endpoint

https://app.sparkconvos.com/api/manychat/street

Headers

Authorization: Bearer {{api_token}}
Accept: application/json

The POST body

{
	"pageId": "{{pageId}}",
	"address": "{{address}}"
}

Expected Response

This will return a ManyChat structured Message that includes a Street view image of the address along with adding the data to the user’s fields.

The quick replies expect there to be 2 nodes in your flow named: ‘Confirm Address‘ and ‘Bad Address

{
    "version": "v2",
    "content": {
        "messages": [
            {
                "type": "text",
                "text": "I just wanted to confirm that {{full_address}} is correct?"
            },
            {
                "type": "image",
                "url": "{{streetview image}}"
            }
        ],
        "actions": [
            {
                "action": "add_tag",
                "tag_name": "streetview"
            },
            {
                "action": "set_field_value",
                "field_name": "Home Address",
                "value": "{{full address}}"
            },
            {
                "action": "set_field_value",
                "field_name": "street",
                "value": "{{street_only}}"
            },
            {
                "action": "set_field_value",
                "field_name": "zip",
                "value": "{{zip_code}}"
            }
        ],
        "quick_replies": [
            {
                "type": "node",
                "caption": "Yes",
                "target": "Confirm Address"
            },
            {
                "type": "node",
                "caption": "No",
                "target": "Bad Address"
            }
        ]
    }
}
Did this answer your question?