User Status API
About User Status
The User Status API allows Village customers to programmatically create or suspend the status of their end users in the Village System. Functional examples include:
Automatically add users to your Village Network when they sign up to your platform
Suspend users from Village when certain events occur on your platform
Please note: The User Status API should only be used when creating or suspending users. You should not use the User Status API for updating information of an already created user, such as name or segment. Please use the Segments API or User Patch API for these purposes.
Possible user status changes:
Create User: Creates the Village account for the user.
May or may not send an email to this user depending on field:
Unless you are using Village's standalone dashboard, we recommend that you do not send emails when creating users with the User Status API.
Revoke Invite: Revokes an existing Village Invite so that if the user can no longer join the network (if they have not already).
Ban: Suspends the user from all network activity and eligibility. Existing funds can still be accessed.
Using the Admin Dashboard for Viewing User Status
Any Admin User on your Village Network can view the current status of any user through the Network Manager or Side Menu:
Endpoint
POST
/networks/YOUR_NETWORK_ID/user_status
Where 'YOUR_NETWORK_ID' is replaced with your actual Network ID.
API Field Overview
The User Status API allows you to change a user's status programmatically.
Body Fields
User
user
string
The user. Must be a valid email.
Yes
Status Change
status_change
string
Options include: 1. "create_user" -> Creates the Village account and registers the user with your network. 2. "revoke_invite" -> Revokes an existing Village Invite. 3. "ban" -> Suspends the user from all network activity and eligibility. Existing funds can still be accessed.
Yes
Send Email
send_email
boolean
Paired with "create_user". If true, an invite email is sent when the user is created. If this field is not included, or false, an email will not be sent.
No
Referrer*
referrer
string
No
Segment Adds*
segment_adds
array
Optional array of Segment IDs to add this user to upon creation.
No
Metadata
metadata
object
Additional metadata for the user status change. See Metadata fields for options.
No
* Only available on first successful create_user request. Afterwards this field is ignored and you should use the Segments API (or Connections API for referrals) after user creation.
Metadata
*Only available on first successful create_user
request, afterwards the field is ignored. Please use the Segment API, or Connections API after user creation. Fields are ignored for status_change
other than create_user.
Reference ID
reference_id
string
An optional identifier that can be used for reporting purposes.
No
Status Change Timestamp
status_change_timestamp
integer
The Unix timestamp of when the status change occurred. If this is blank, Village will use the timestamp the data was received via the Village API as the Status Change Timestamp.
No
Description
description
string
A reason and description for the status change.
No
Examples
Body
By Language
Last updated