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.
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
.
Parameter | Description | Example |
---|---|---|
brand_id* |
The unique identifier for the brand | ABC123 |
campaign_id* |
The unique identifier for the campaign | DEF456 |
curl -X GET 'https://gamifiedmarketing.ai/newFormSubmittion?brand_id=ABC123&campaign_id=DEF456' \
-H 'x-api-key: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
[
{
"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
}
]
Returned when the request does not include an API key in the headers.
{
"error": "Missing API key"
}
curl -X GET 'https://gamifiedmarketing.ai/newFormSubmittion?brand_id=ABC123&campaign_id=DEF456' \
-H 'x-api-key: invalidffffffffffffffffffffffffffffffffffffffffffffffffff'
{
"error": "Invalid API key"
}
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."
}
Returned when the specified campaign does not exist for the given brand.
{
"error": "Permission denied: The specified campaign does not exist for this brand."
}
Returned when no statistics are found for the requested brand_id
and campaign_id
.
{
"error": "No statistics found for this campaign."
}
Returned when an unexpected error occurs on the server.
{
"error": "Internal server error. Please try again later."
}