/init
Bootstrap contact tracking
Initialize contact tracking and (optionally) generate an authentication URL. Typically called when a contact first interacts with your feedback widget. If a `contact` object with an `email` is provided, the contact is created or updated and an `auth_url` is returned. With no contact, an empty object is returned.
Body parameters
contact
|
object
Contact attributes. Requires `email` to create/update a contact. Unknown keys are stored as metadata. |
releaseNotes
|
object
Optional release-notes widget configuration. |
testimonials
|
object
Optional testimonials widget configuration. |
Responses
| 200 | OK. Returns an auth URL when a contact was supplied, otherwise an empty object. |
| 401 | Missing or invalid API token. |
Request
curl -X POST "http://feedbackpilgrim.com/api/public/v1/init" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"contact": {
"name": "John Doe",
"email": "[email protected]",
"mrr": 99.99,
"ltv": 1200,
"avatar": "https://example.com/avatar.jpg",
"plan": "premium"
},
"releaseNotes": {
"show": true
}
}'
Response
{
"auth_url": "https://acme.feedbackpilgrim.com/authenticate-contact?contactUuid=550e8400-e29b-41d4-a716-446655440000"
}