Partner API: Setting MetaData¶
Attach custom metadata to a partner and their events during signup using query parameters.
Who this is for
Developers and technical partners who need to pass custom tracking or segmentation data through the 3Common partner onboarding flow.
Overview¶
The Partner API allows attaching custom metadata fields to both:
- The partner user who signs up via a referral code
- Any events they create in the future
This is done by including extra query parameters in the sign-up URL. These parameters are automatically parsed and stored as metaData on the user and cascade to their events.
How it works¶
When sending a partner to your signup URL, include:
- The required
referral_code - Any number of additional key-value parameters representing custom metadata
Example¶
referral_code=hello123is required.- All other query parameters (
any,field,you,want) are attached as metadata.
This results in the following structure being saved:
Where metadata is stored¶
The data is stored in the metaData object on:
- The partner user's account
- Every event created by that user
This allows for targeted querying, filtering, and analytics later via the Partner Events API.
Querying by metadata¶
You can retrieve events associated with a referral code and matching specific metadata values using the same parameter key used during onboarding.
Example request¶
This returns events created by users signed up with:
This makes metadata-based filtering flexible for downstream uses like:
- Custom analytics
- Campaign attribution
- Partner segmentation
Important notes¶
Requirements and constraints
referral_codeis mandatory in the sign-up URL and API requests.- Metadata values must be flat key-value strings.
- Metadata keys are case-sensitive.
- Avoid sensitive or PII values unless encrypted.