Skip to content

Sync mixpanel cohort

Open in ChatGPT Open in Claude
POST
/v1/mixpanel/cohort/sync
curl --request POST \
--url https://api.foldspace.ai/v1/mixpanel/cohort/sync \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "action": "members", "parameters": { "mixpanel_project_id": "1234567", "mixpanel_cohort_name": "Last seen in the past week", "mixpanel_cohort_id": "1234567", "mixpanel_cohort_description": "Users who have been seen in the past week", "mixpanel_session_id": "example", "page_info": { "total_pages": 100, "page_count": 1 }, "members": { "customProperties": { "additionalProperty": {} }, "email": "user@company.com", "mixpanel_distinct_id": "abcdef123456", "first_name": "John", "last_name": "Doe", "phone_number": "+1234567890" } } }'

Endpoint that supports mixpanel Cohort Sync webhook. Segments and user that does not exist in Foldspace will be created. See https://docs.mixpanel.com/docs/cohort-sync/webhooks for more details

Media type application/json

DTO for Mixpanel cohort sync body as per https://docs.mixpanel.com/docs/cohort-sync/webhooks

object
action

Mixpanel cohort action

string
Allowed values: members add_members remove_members
Example
members
parameters

DTO for Mixpanel cohort parameters as per https://docs.mixpanel.com/docs/cohort-sync/webhooks

object
mixpanel_project_id

The project ID of the Mixpanel project

string
Example
1234567
mixpanel_cohort_name

The name of the Mixpanel cohort

string
Example
Last seen in the past week
mixpanel_cohort_id

The ID of the Mixpanel cohort

string
Example
1234567
mixpanel_cohort_description

The description of the Mixpanel cohort

string
Example
Users who have been seen in the past week
mixpanel_session_id

The session ID of the Mixpanel session

string
page_info

DTO for Mixpanel page info

object
total_pages

The number of total messages for the given session ID

integer format: int32
Example
100
page_count

The index of which page this message is

integer format: int32
Example
1
members

DTO for Mixpanel member

object
customProperties
object
key
additional properties
object
email

The email of the Mixpanel member

string
Example
user@company.com
mixpanel_distinct_id

The distinct ID of the Mixpanel member

string
Example
abcdef123456
first_name

The first name of the Mixpanel member

string
Example
John
last_name

The last name of the Mixpanel member

string
Example
Doe
phone_number

The phone number of the Mixpanel member

string
Example
+1234567890

Cohort sync successful

Media type application/json
string
Example
{
"action": "members",
"status": "success"
}

Unauthorized

Media type application/json
string
Example
Missing API key

Rate limit exceeded for subscription

Media type */*
string
Example
Rate limit exceeded for subscription

Internal server error

Media type application/json
string
Example
{
"action": "members",
"status": "failure",
"error": {
"message": "Internal server error",
"code": 500
}