Gamified Marketing API Documentation

Overview

Premium users can get their API from https://app.gamifiedmarketing.ai/Account. Users can find their brand_id and campaign_id from their campaign URL. For example, in the URL format: https://gamifiedmarketing.ai/JZZZZZZ/?id=${brand_id}&v=${campaign_id}, replace ${brand_id} and ${campaign_id} with the actual values.

GET /newFormSubmittion

Description: Retrieve form submissions based on brand_id and campaign_id query parameters. The API returns an array of form submissions where each submission contains an id, session_started, contact_info, and additional details such as cta_clicked and copied_coupon.

Headers

x-api-key: Your API key for authentication

Query Parameters (All are required)

Parameter Description Example
brand_id* The unique identifier for the brand ABC123
campaign_id* The unique identifier for the campaign DEF456

Example Request

  curl -X GET 'https://gamifiedmarketing.ai/newFormSubmittion?brand_id=ABC123&campaign_id=DEF456' \
    -H 'x-api-key: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
                  

Example Response

  [
    {
      "id": "ABcD1234",
      "session_id": "ABcD1234",
      "session_started": "2024-09-17T20:00:57.270Z",
      "contact_info": {
        "email": "johndoe@gmail.com",
        "name": "John Doe"
      },
      "cta_clicked": true,
      "copied_coupon": false
    },
    {
      "id": "EFgH5678",
      "session_id": "EFgH5678",
      "session_started": "2024-09-17T19:55:28.610Z",
      "contact_info": {
        "email": "janedoe@example.com",
        "phone": "+123456789"
      },
      "cta_clicked": false,
      "copied_coupon": true
    }
  ]
                  

Error Responses

403 Missing API Key
Returned when the request does not include an API key in the headers.
{
    "error": "Missing API key"
  }
403 Invalid API Key
curl -X GET 'https://gamifiedmarketing.ai/newFormSubmittion?brand_id=ABC123&campaign_id=DEF456' \
    -H 'x-api-key: invalidffffffffffffffffffffffffffffffffffffffffffffffffff'
  
  {
    "error": "Invalid API key"
  }
200 Missing Parameters
Returned when the request is missing required parameters like brand_id or campaign_id.
curl -X GET 'https://gamifiedmarketing.ai/newFormSubmittion' \
    -H 'x-api-key: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
  
  {
    "message": "API key is valid. Please provide brand_id and campaign_id to proceed."
  }
403 Permission Denied
Returned when the specified campaign does not exist for the given brand.
{
    "error": "Permission denied: The specified campaign does not exist for this brand."
  }
404 No Campaign Statistics
Returned when no statistics are found for the requested brand_id and campaign_id.
{
    "error": "No statistics found for this campaign."
  }
500 Internal Server Error
Returned when an unexpected error occurs on the server.
{
    "error": "Internal server error. Please try again later."
  }

Thanks For Your Inquiry!

Our team is reviewing your enquiry, and will be in touch shortly.

GET IN TOUCH

Lets create something magical together!

Or email use - support@gamifiedmarketing.ai