Palbase Analytics · API
/analytics/audiencesCreate an audience
Makes an audience: the people its rule picks among those behind the project's events. Its members are worked out at once, then every minute; its first members are not told they entered (the rule came to them), everyone who enters or leaves from then on is (audience.entered, audience.exited). A project keeps 100 audiences at most.
Called by your server, with the project's secret key.
Request body
descriptionstring · optionalWhat it is for.namestring · requiredIts name: one per project.ruleobject · requiredWho an audience is: the people every condition holds for (match all), or one at least (any).curl -X POST "https://<your-ref>.palbase.studio/analytics/audiences" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"name":"string","rule":{"conditions":[{"type":"event"}]}}'Responses
201Created
400The request is malformed, or what it sends breaks a limit (the error names which: the SDKs' codes)
401No key, or not a key of this project, or a token that is not valid (the edge's answer)
403Not the project's secret key
409An error: the envelope names it (`error`) and explains it (`error_description`).
429The project is sending analytics faster than its per-second limit (rate_limited), or its quota for the period is used up (quota_exceeded); Retry-After says when to try again
503The platform could not take or answer this now; nothing was kept, and retrying is safe (Retry-After)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation CreateAudience of analytics's contract.