Skip to content

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
https://organizer.3common.com/auth?referral_code=<your_code>&<key1>=<value1>&<key2>=<value2>

Example

https://organizer.3common.com/auth?referral_code=hello123&any=123&field=abc&you=123&want=abc
  • referral_code=hello123 is required.
  • All other query parameters (any, field, you, want) are attached as metadata.

This results in the following structure being saved:

{
  "metaData": {
    "any": "123",
    "field": "abc",
    "you": "123",
    "want": "abc"
  }
}

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

GET https://3common.com/partner/events?referral_code=hello123&you=123

This returns events created by users signed up with:

{
  "metaData": {
    "you": "123"
  }
}

This makes metadata-based filtering flexible for downstream uses like:

  • Custom analytics
  • Campaign attribution
  • Partner segmentation

Important notes

Requirements and constraints

  • referral_code is 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.