appyBridge API Documentation

Reward Management by appyReward

Mike

Last Update 9 months ago

Welcome to the API documentation for AppyBridge!

This documentation provides detailed information on how to integrate and use the AppyBridge API to manage campaigns and send rewards to your contacts. The API allows you to authenticate users, list active campaigns, and send rewards based on specific campaign references.

By following this documentation, you will be able to seamlessly incorporate the AppyBridge Rewards functionality into your applications or systems, enabling you to efficiently manage campaigns and deliver rewards to your contacts.

Whether you are building a custom integration, developing a third-party application, or automating reward sending processes, this documentation will guide you through the available endpoints, request/response formats, and provide examples to facilitate a smooth integration experience.

Endpoint URL

The endpoint URL https://www.appyreward.com/appybridge/zapier/ is the base URL for the AppyBridge integration with the Zapier platform.

Please note that the "zapier" part of the URL is specific to the integration with the Zapier platform. If you are integrating with a different platform, the URL may vary accordingly.


To integrate AppyBridge with a different platform, replace "zapier" in the URL with the appropriate platform name.


This URL serves as the entry point for the AppyBridge API integration with the specified platform, allowing you to interact with the available endpoints and perform actions such as authentication, listing campaigns, and sending rewards.

/auth-user

The first endpoint is an authentication endpoint. Here's a description of how it works:

Method: POST

Description:

This endpoint handles the authentication process for accessing the API. It expects the client to send a request with the appropriate API key in the HTTP header field X-API-KEY. The endpoint verifies the API key and authenticates the user.


Request:

  • Method: POST
  • Headers: X-API-KEY: [API key]

    Response:

    The response will be in JSON format and will contain the authentication result. Possible response fields are:

  • success: A boolean indicating whether the authentication was successful or not.
  • message: A string providing additional information about the authentication result.
  • account: If the authentication is successful, this field will contain the email address associated with the authenticated user.

If the authentication is successful, the response will have a success value of true, along with a message indicating the success and the account field containing the email address of the authenticated user.

If the authentication fails due to an invalid API key, the response will have a success value of false, and the message field will indicate the failure reason.


Example Response (Authentication Successful):

Example Response (Authentication Failed):

/campaigns

This endpoint allows you to retrieve the list of active campaigns for the logged-in user.


Request Headers

  • X-API-KEY: The API key for authentication. Include this header in the request to authenticate the user.


Response

The response will be in JSON format and will contain the list of active campaigns for the authenticated user.

200 OK - Success response

  • campaigns (array): An array containing the active campaigns. Each campaign object in the array will have the following properties:
  • id (string): The unique identifier of the campaign.
  • name (string): The name of the campaign.
  • start_date (string): The start date of the campaign in YYYY-MM-DD format.
  • end_date (string): The end date of the campaign in YYYY-MM-DD format (if available).


401 Unauthorized - Error response

error (string): Indicates the reason for the unauthorized access.

Example

Response

Note: Replace [API key] in the request header with the actual API key obtained for authentication.

/sendreward

Request Headers

  • X-API-KEY: The API key for authentication. Include this header in the request to authenticate the user.


Request Body

The request should include a JSON payload with the following parameters:


  • campaign_reference (string, required): The reference code of the campaign.
  • email (string, required): The email address of the contact.
  • unique_identifier (string, optional): A unique identifier associated with the reward event.


Response

The response will be in JSON format and will contain the result of the reward sending operation.


201 Created - Success response

  • success (boolean): Indicates whether the reward was successfully sent.
  • message (string): A success message indicating that the reward was sent.


400 Bad Request - Error response

  • success (boolean): Indicates whether the reward sending operation was successful.
  • message (string): An error message indicating the reason for the failure.


401 Unauthorized - Error response

  • success (boolean): Indicates whether the authentication was successful.
  • message (string): An error message indicating that the API key is invalid or missing.

Example

Request

Response

Note: Replace [API key] in the request header with the actual API key obtained for authentication.

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us