Integrations / post
Create/update Crisp/Intercom/manual setup.
API Overview
Path: /api/integrations/post — Method: POST
Auth: header — User ID required in header.
Header: x-user-id (e.g., USER_ID)
Example: curl -X POST https://www.advancelytics.com/api/integrations/post -H 'x-user-id: USER_ID' -H 'Content-Type: application/json' -d '{"crisp":{"enabled":true,"websiteId":"CRISP_WEBSITE_ID"}}'
Request Details
Headers
- x-user-id(string, required)
No path params required
No query required
Body
- crisp.enabled(boolean)
- crisp.websiteId(string)
- intercom.enabled(boolean)
- manualUpload.enabled(boolean)
Example JSON
{
"crisp": { "enabled": true, "websiteId": "CRISP_WEBSITE_ID" }
}Responses
- 200Upserted document
{"userId":"USER_ID","crisp":{"enabled":true,"websiteId":"CRISP_WEBSITE_ID"}} - 400User ID is required
{"error":"User ID is required"} - 500Failed to save integration
{"error":"Failed to save integration"}
Notes & Tips
- Ensure headers match exactly (e.g.,
x-apikey). - Use
Content-Type: application/jsonfor JSON bodies. - For Bearer auth, you can provide either a session JWT or an opaque API key where supported.