1.Introduction #
The UpViral API allows for a wide variety of interactions with the UpViral Platform using an application.
The API endpoint is located here: https://app.upviral.com/api/v1/
- All API requests should use the above URL as their base url.
- All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Responses from the UpViral API are returned in JSON format, unless otherwise stipulated.
PHP SDK Installation
composer require upviral/php-sdk
2.Contact #
To add, see or edit contacts in a campaign.
2.1 Add Contact #
This POST request adds contacts in your particular campaign.
ARGUMENTS
uvapikey
The unique UpViral API Key. This field is required.
uvmethod
The method name. This field is required.
campaign_id
The Campaign ID. This field is required.
The user’s email address. This field is required.
name
The user’s name. This field is optional.
IP Address
The user’s IP Address. This field is optional.
Referral Code
The unique referral code (Last part of unique Referral URL). For example - https://upvir.al/ref/XXXX, Referral Code will be XXXX.This will be the referral code of the person who referred this new contact. The original participant will get the credit for this new contact.
custom_fields
The campaign’s custom fields, which you add in your lead page editor or advance settings Click here to get more details
2.2 Get Contact Details #
This POST request gets contact details.
ARGUMENTS
uvapikey
The unique UpViral API Key. This field is required.
uvmethod
The method name. This field is required.
campaign_id
The Campaign ID. This field is required.
lead_id
The user’s unique ID. This field is required.
RESPONSE PARAMETERS
is_fraud
If a lead is fraudulent, it will return 1 else it will be 0.
2.3 Get All Contact Details #
This POST request gets contact details using pagination.
ARGUMENTS
uvapikey
The unique UpViral API Key. This field is required.
uvmethod
The method name. This field is required.
campaign_id
The Campaign ID. This field is required.
start
The start limit of pagination.
size
The number of contact for listing.
2.4 Get All Contact Details Filtered By Points #
Example: Searching for people with more than 10 points
This POST request gets contact details using pagination.
ARGUMENTS
uvapikey
The unique UpViral API Key. This field is required.
uvmethod
The method name. This field is required.
campaign_id
The Campaign ID. This field is required.
operator
The operator for searching( e.g. <,>,= ). This field is required.
points
The point for searching(e.g. 1,100)
start
The start limit of pagination. This field is required.
size
The number of contact for listing. This field is required.
2.5 Add Points #
Add other points.
This POST request adds points in user profile.
ARGUMENTS
uvapikey
The unique UpViral API Key. This field is required.
uvmethod
The method name. This field is required.
campaign_id
The Campaign ID. This field is required.
lead_id
The lead ID is user ID to whom you want to add points. This field is required.
points
The points to add. This field is required.
2.6Get Contact Details By Email #
This POST request gets contact details.
ARGUMENTS
uvapikey
The unique UpViral API Key. This field is required.
uvmethod
The method name. This field is required.
campaign_id
The Campaign ID. This field is required.
The email address. This field is required.
RESPONSE PARAMETERS
is_fraud
If a lead is fraudulent, it will return 1 else it will be 0.
3.Custom Fields #
This POST request gets all custom fields of campaign.
3.1Get All Custom Fields #
This POST request gets all custom fields of campaign.
ARGUMENTS
uvapikey
The unique UpViral API Key. This field is required.
uvmethod
The method name. This field is required.
campaign_id
The Campaign ID. This field is required.
4.Campaigns #
To get a list of all campaigns in your account.
4.1Get list campaigns #
This POST request gets the campaign list.
ARGUMENTS
uvapikey
The unique UpViral API Key. This field is required.
uvmethod
The method name. This field is required.