Village Product and Developer Docs
  • 📘Welcome to Village Labs
    • Welcome to Village Labs
    • Self Service Onboarding
    • Help Pages
      • Adding and Deleting Users
      • Mapping Users to Source tool IDs
      • How to follow or unfollow other users
      • Configuring & Removing Daily Slack Notification Whitelist
      • Changing the Reporting Lines & Teams
      • Following Custom Reports
      • Google Drive Privacy: When will my documents appear in Village Reports?
    • Custom Reports
      • Creating Team Reports
      • Creating Custom Reports & Custom Prompt Library
    • Meetings
      • Connecting your Calendar
      • Configuring your Meetings
      • Meeting Summary Reports
    • Village Assistant
      • Github PR Review Tool
    • Security & Compliance
    • Data Privacy & Permissions
  • 🔌Data Connections
    • Airtable
    • Ashby
    • Clickup
      • Finding ClickUp User IDs
    • Figma
    • Github
      • Finding GitHub User IDs
    • Gitlab
    • Google - OAuth (Recommended)
    • Google - Manual Connection
    • Hubspot
    • Jira
      • Finding Jira User IDs
    • Confluence
      • Finding Confluence / Jira User IDs
    • Linear
    • Asana
    • Monday
    • Notion
    • Pipedrive
    • Slack
    • Basecamp
    • Zoom
  • 👩‍💻Legacy Developer Docs
    • Developer Quickstart
    • Village APIs: Introduction
      • Activity API
      • User Status API
      • Patch User API
      • Segments API
      • Redemption API
      • Master Award Controls
      • Connections (Referrals) APIs
      • GET APIs
    • 3rd Party Payments Integrations
    • Embedding Village Dashboards
  • 🕵️LEGACY Knowledge Base
    • Admin Quickstart
    • Referrals Support
    • The Basics of Village in 15 Minutes
    • Programs & Rules
      • Triggers
        • Activities
        • Goals
      • Conditions
        • Segment Conditions
        • Time Conditions
        • Max Budget Conditions
        • Conditional Multipliers
    • Awards
      • Monetary (Cash) Awards
      • Non-Monetary Awards
        • Funding
          • In-depth use cases for funding pools
      • Badges & Statuses
      • Award Expiration
    • Segments
      • Segmentation Use Cases
    • Rule Evaluation Logic Deep-dive
    • The Village Dashboards
      • Admin Account Creation
      • User Access Management
      • Network Settings
      • User Dashboard
    • BigQuery
    • Managing Payment Integrations
    • Referrals (Connections)
      • Pre-populating Users' Unique Referral Codes In Signup Flows & Forms
  • No and Low Code Solutions
    • No and Low Code Solutions
      • No & Low Code Solutions
  • Feedback
    • Village Docs Feedback Form
    • Feature Requests
    • Talk to our Team
Powered by GitBook
On this page
  • About Connections (Referrals)
  • POST Add Connection (Referrals) Between Users
  • Endpoint Path
  • API Field Overview
  • Body Fields
  • GET Connection (Referrals) Data

Was this helpful?

  1. Legacy Developer Docs
  2. Village APIs: Introduction

Connections (Referrals) APIs

PreviousMaster Award ControlsNextGET APIs

Last updated 1 year ago

Was this helpful?

Terminology Note: "Referrals" vs. "Connections" in the code

TL;DR - They're the same thing! In the API code, we refer generically to connections and connection programs--not referrals and referral programs.

Why? That's because our Connections system is actually used to power more than just referrals programs, although referrals is the most common use case.

About Connections (Referrals)

Village's Referral programs are used to let you create up to 10 levels of connections between users.

These "connections" may be used in to issue awards or comms to referrers when their referral completes an action, such as a signup.

For detailed use cases: Visit the to explore the endpoints and possible implementations of our Add Connection.

POST Add Connection (Referrals) Between Users

Note this API is primarily for post hoc connections! (Or non-referral use cases)

For example, if you have to correct or backfill referrals for an existing program, this is a good use case for the Add Connection API.

Instead, we recommend using the "referrer" field in the to automatically create referral connections as soon as a suer signs up.

Endpoint Path

POST/networks/YOUR_NETWORK_ID/connections/REFERRAL_PROGRAM_ID

Where 'YOUR_NETWORK_ID' is replaced with your actual Network ID and REFERRAL_PROGRAM_ID is the program under which you want to make the connection. This can be found in the Admin Dashboard under Side Menu > Incentives > Referrals.

API Field Overview

//Example JSON body 

{
    "user": "bradford@villagelabs.co", // The new user being referred
    "connection": "ajwurts@villagelabs.co" // The referrer
}

Body Fields

Field Name
JSON Key
Type
Description
Required

User

user

string

Must be user email. In the case of referrals, this is the NEW user being referred.

Yes

Amount

amount

string

Must be user email. In the case of referrals, this is the EXISTING user who is referring the new user.

Yes

GET Connection (Referrals) Data

  1. All user connections within a Referral Program (GET User Connections)

  2. A user's unique referral code (GET Connection Codes)

  3. A list of Referral Program IDs (GET Connections)

For preprocessing or in-app display purposes, you may use the associated with Referrals to retrieve:

👩‍💻
Is this page helpful? Give us feedback on our docs ->
Program Rules ->
Village Postman collection
User Status API ->
GET Request endpoints ->
Is this page helpful? Give us feedback on our docs ->