Skip to content
Download OpenAPI description
Overview
Languages
Servers
Mock server

https://docs.pers.ninja/_mock/swagger/

https://api.pers.ninja/v2/

Operations
Operations
Operations
Operations
Operations
Operations
Operations

Campaign Activation System

Campaign trigger system managing activation rules and eligibility conditions. Defines when and how campaigns activate including complex condition management for sophisticated campaign logic.
**Trigger Features:**

• **Trigger Catalog:** Public browsing of available campaign activation triggers

• **Condition Management:** Create complex trigger conditions with multiple criteria

• **Campaign Assignment:** Link triggers to campaigns for automated activation

• **Eligibility Rules:** Define sophisticated user participation requirements

• **Event-Based Activation:** Trigger campaigns based on user actions and external events

Request

Get all available triggers for campaign configuration. Public access for catalog browsing. Replaces GET /campaign/trigger/all

Security
projectKey
curl -i -X GET \
  https://docs.pers.ninja/_mock/swagger/campaign-triggers \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

All available triggers retrieved

Bodyapplication/jsonArray [
namestringrequired

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

Campaign trigger max per day

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring

Campaign trigger required user info

Enum"id""email""instagramAccountId""externalId""firstName""lastName""accountAddress""publicProfile""customData""isActive"
triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

idstringrequired

Campaign trigger id

conditionsArray of objects(CampaignTriggerConditionDTO)required

Campaign trigger conditions

conditions[].​conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
conditions[].​valueobjectrequired

Trigger condition value

conditions[].​keystringrequired

Trigger condition key

conditions[].​idstringrequired
]
Response
application/json
[ { "name": "string", "description": "string", "maxPerDay": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "id", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "id": "string", "conditions": [ … ] } ]

Request

Create a new campaign trigger for use in campaigns. Admin-only operation. Replaces POST /campaign/admin/trigger

Security
tenantAdminJWT
Bodyapplication/jsonrequired
namestringrequired

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

Campaign trigger max per day

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring

Campaign trigger required user info

Enum"id""email""instagramAccountId""externalId""firstName""lastName""accountAddress""publicProfile""customData""isActive"
triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/campaign-triggers \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "description": "string",
    "maxPerDay": 0,
    "maxPerUser": 0,
    "minCooldownSeconds": 0,
    "maxGeoDistanceInMeters": 0,
    "requiredUserInfo": "id",
    "triggerType": "CLAIM_BY_USER",
    "maxMultiplier": 0,
    "completionThreshold": 0
  }'

Responses

Campaign trigger created successfully

Bodyapplication/json
namestringrequired

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

Campaign trigger max per day

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring

Campaign trigger required user info

Enum"id""email""instagramAccountId""externalId""firstName""lastName""accountAddress""publicProfile""customData""isActive"
triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

idstringrequired

Campaign trigger id

conditionsArray of objects(CampaignTriggerConditionDTO)required

Campaign trigger conditions

conditions[].​conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
conditions[].​valueobjectrequired

Trigger condition value

conditions[].​keystringrequired

Trigger condition key

conditions[].​idstringrequired
Response
application/json
{ "name": "string", "description": "string", "maxPerDay": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "id", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "id": "string", "conditions": [ { … } ] }

Request

Update an existing campaign trigger. Admin-only operation. Replaces PUT /campaign/admin/trigger/{id}

Security
tenantAdminJWT
Path
idstringrequired
Bodyapplication/jsonrequired
namestringrequired

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

Campaign trigger max per day

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring

Campaign trigger required user info

Enum"id""email""instagramAccountId""externalId""firstName""lastName""accountAddress""publicProfile""customData""isActive"
triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "description": "string",
    "maxPerDay": 0,
    "maxPerUser": 0,
    "minCooldownSeconds": 0,
    "maxGeoDistanceInMeters": 0,
    "requiredUserInfo": "id",
    "triggerType": "CLAIM_BY_USER",
    "maxMultiplier": 0,
    "completionThreshold": 0
  }'

Responses

Campaign trigger updated successfully

Bodyapplication/json
namestringrequired

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

Campaign trigger max per day

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring

Campaign trigger required user info

Enum"id""email""instagramAccountId""externalId""firstName""lastName""accountAddress""publicProfile""customData""isActive"
triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

idstringrequired

Campaign trigger id

conditionsArray of objects(CampaignTriggerConditionDTO)required

Campaign trigger conditions

conditions[].​conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
conditions[].​valueobjectrequired

Trigger condition value

conditions[].​keystringrequired

Trigger condition key

conditions[].​idstringrequired
Response
application/json
{ "name": "string", "description": "string", "maxPerDay": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "id", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "id": "string", "conditions": [ { … } ] }

Request

Delete an existing campaign trigger. Admin-only operation. Replaces DELETE /campaign/admin/trigger/{id}

Security
tenantAdminJWT
Path
idstringrequired
curl -i -X DELETE \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Campaign trigger deleted successfully

Bodyapplication/json
boolean
Response
application/json
true

Assign trigger to campaign (Admin)

Request

Assign a specific trigger to campaign for activation conditions. Admin-only operation. Replaces PUT /campaign/admin/{id}/trigger/{triggerId}

Security
tenantAdminJWT
Path
idstringrequired
triggerIdstringrequired
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/campaigns/{id}/trigger/{triggerId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Trigger assigned to campaign successfully

Bodyapplication/json
namestring or nullrequired

Campaign name

descriptionstring or nullrequired

Campaign description

beneficiaryAccountAddressstring or nullrequired

Campaign beneficiary account address

startDatestring or null(date-time)required

Campaign start date, default is the current date

endDatestring or null(date-time)required

Campaign end date

imageUrlstring or nullrequired

img url

externalUrlstring or nullrequired

Campaign url

idstringrequired

Campaign id

isActivebooleanrequired

Campaign isActive

Default false
isTestnetboolean

Campaign isTestnet, this means that the campaign is running on testnet, not mainnet

Default false
triggerobject or nullrequired
trigger.​namestringrequired

Campaign trigger name

trigger.​descriptionstring

Campaign trigger description

trigger.​maxPerDaynumber or null

Campaign trigger max per day

trigger.​maxPerUsernumber or null

Campaign trigger max per user

trigger.​minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

trigger.​maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

trigger.​requiredUserInfostring

Campaign trigger required user info

Enum"id""email""instagramAccountId""externalId""firstName""lastName""accountAddress""publicProfile""customData""isActive"
trigger.​triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
trigger.​maxMultipliernumber or null

Campaign trigger max multiplier

trigger.​completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

trigger.​idstringrequired

Campaign trigger id

trigger.​conditionsArray of objects(CampaignTriggerConditionDTO)required

Campaign trigger conditions

trigger.​conditions[].​conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
trigger.​conditions[].​valueobjectrequired

Trigger condition value

trigger.​conditions[].​keystringrequired

Trigger condition key

trigger.​conditions[].​idstringrequired
tokenUnitsArray of objects(TokenUnitDTO)required
Array [
tokenUnits[][].​idstringrequired

Token unit id

tokenUnits[][].​tokenobjectrequired
tokenUnits[][].​token.​idstringrequired

Id of the token

tokenUnits[][].​token.​contractAddressstringrequired

Address of the token

tokenUnits[][].​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

tokenUnits[][].​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

tokenUnits[][].​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

tokenUnits[][].​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

tokenUnits[][].​token.​namestring

this is the name of the token contract

tokenUnits[][].​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

tokenUnits[][].​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

tokenUnits[][].​token.​isActivebooleanrequired

This can be used to enable or disable the token

tokenUnits[][].​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

tokenUnits[][].​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
tokenUnits[][].​tokenMetadataIncrementalIdnumber or null

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

tokenUnits[][].​amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

tokenUnits[][].​maxAmountnumber or null

Token unit max amount, this is the maximum amount of tokens that the user can receive when aquiring the token unit. This is relevant e.g. in campaigns where a user may receive token units per revenue spent etc

]
businessEngagementsArray of objects(CampaignBusinessEngagementDTO)required

Campaign businesses: what businesses are involved in the campaign

businessEngagements[].​idstringrequired

id

businessEngagements[].​shortDescriptionnumber or nullrequired

A short description of the business engagement with indications what to do etc

businessEngagements[].​businessesArray of objects(BusinessDTO)required

businesses

businessEngagements[].​businesses[].​idstringrequired

The id of the business, this is unique and will be used to identify the business.

businessEngagements[].​businesses[].​emailobject or nullrequired

The email of the business, this is unique and will be used to identify the business.

businessEngagements[].​businesses[].​accountAddressobject or nullrequired

The address of the business, this is the address that will be shown to the public.

businessEngagements[].​businesses[].​businessLegalNameobject or nullrequired

The legal name of the business, this is the name that will be used for legal purposes.

businessEngagements[].​businesses[].​displayNameobject or nullrequired

The display name of the business, this is the name that will be shown to the public.

businessEngagements[].​businesses[].​descriptionobject or nullrequired

The description of the business, this is the description that will be shown to the public.

businessEngagements[].​businesses[].​shortDescriptionobject or nullrequired

The short description of the business, this is the description that will be shown to the public.

businessEngagements[].​businesses[].​websiteUrlobject or nullrequired

The website of the business, this is the website that will be shown to the public.

businessEngagements[].​businesses[].​imageUrlobject or nullrequired

The image of the business, this is the image that will be shown to the public.

businessEngagements[].​businesses[].​streetAddressobject or nullrequired

The address of the business, this is the address that will be shown to the public.

businessEngagements[].​businesses[].​cityobject or nullrequired

The city of the business, this is the city that will be shown to the public.

businessEngagements[].​businesses[].​postalCodeobject or nullrequired

The postal code of the business, this is the postal code that will be shown to the public.

businessEngagements[].​businesses[].​coordsLatitudeobject or nullrequired

The latitude of the business, this is the latitude that will be shown to the public.

businessEngagements[].​businesses[].​coordsLongitudeobject or nullrequired

The longitude of the business, this is the longitude that will be shown to the public.

businessEngagements[].​businesses[].​businessTypeobject or nullrequired
businessEngagements[].​businesses[].​businessType.​idnumber

Business type id

businessEngagements[].​businesses[].​businessType.​namestring or nullrequired

Business type name

businessEngagements[].​businesses[].​businessType.​descriptionstring or nullrequired

Business type description

businessEngagements[].​businesses[].​businessType.​codestring or nullrequired

Business type code

businessEngagements[].​businesses[].​businessType.​iconUrlstring or nullrequired

Business type icon url

businessEngagements[].​businesses[].​isActivebooleanrequired

The status of the business, this is the status that will be shown to the public.

businessEngagements[].​businesses[].​canMintTokenbooleanrequired

The ability to mint token for the business, this is the ability that will be shown to the public.

businessEngagements[].​businesses[].​canChargeTokenbooleanrequired

The ability to charge token for the business, this is the ability that will be shown to the public.

businessEngagements[].​businesses[].​canManageUsersbooleanrequired

The ability to manage users for the business, this is the ability that will be shown to the public.

businessEngagements[].​businesses[].​canReceiveDonationbooleanrequired

The ability to receive donation for the business, this is the ability that will be shown to the public.

businessEngagements[].​campaignIdstringrequired

Campaign id

businessEngagements[].​maxPerBusinessnumber or nullrequired

max per business, the maximum number of times a user can engage with the buisness in the campaign

businessEngagements[].​maxPerDaynumber or nullrequired

max per day, the maximum number of times a user can engage with the buisness in the campaign per day

businessEngagements[].​externalUrlstring or nullrequired

The external URL for the business engagement, e.g. a link to a website or app

createdAtstring(date-time)required

create date

Default "2025-10-22T19:05:50.493Z"
updatedAtstring or null(date-time)required

update date

Default null
ordernumberrequired

Campaign order

Default 1
tagsArray of stringsrequired

Campaign tags

Default []
countryCodeRestrictionsobject

Country code restrictions as an array of strings (e.g., ["NOT_ES", "FR"])

Example: ["NOT_ES","FR"]
Response
application/json
{ "name": "string", "description": "string", "beneficiaryAccountAddress": "string", "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "imageUrl": "string", "externalUrl": "string", "id": "string", "isActive": false, "isTestnet": false, "trigger": { "name": "string", "description": "string", "maxPerDay": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "id", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "id": "string", "conditions": [ … ] }, "tokenUnits": [ [ … ] ], "businessEngagements": [ { … } ], "createdAt": "2025-10-22T19:05:50.493Z", "updatedAt": null, "order": 1, "tags": [], "countryCodeRestrictions": [ "NOT_ES", "FR" ] }

Request

Create a new trigger condition for use in campaign triggers. Admin-only operation. Replaces POST /campaign/admin/trigger-condition

Security
tenantAdminJWT
Bodyapplication/jsonrequired
conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
valueobjectrequired

Trigger condition value

keystringrequired

Trigger condition key

idstringrequired
curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/campaign-triggers/conditions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "conditionType": "EQUALS",
    "value": {},
    "key": "string",
    "id": "string"
  }'

Responses

Trigger condition created successfully

Bodyapplication/json
conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
valueobjectrequired

Trigger condition value

keystringrequired

Trigger condition key

Response
application/json
{ "conditionType": "EQUALS", "value": {}, "key": "string" }

Request

Update an existing trigger condition. Admin-only operation. Replaces PUT /campaign/admin/trigger-condition/{id}

Security
tenantAdminJWT
Path
idstringrequired
Bodyapplication/jsonrequired
conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
valueobjectrequired

Trigger condition value

keystringrequired

Trigger condition key

idstringrequired
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/conditions/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "conditionType": "EQUALS",
    "value": {},
    "key": "string",
    "id": "string"
  }'

Responses

Trigger condition updated successfully

Bodyapplication/json
conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
valueobjectrequired

Trigger condition value

keystringrequired

Trigger condition key

Response
application/json
{ "conditionType": "EQUALS", "value": {}, "key": "string" }

Toggle condition in trigger (Admin)

Request

Add or remove a condition from a trigger (toggle relationship). Admin-only operation. Replaces PUT /campaign/admin/trigger/{triggerId}/condition/{conditionId}

Security
tenantAdminJWT
Path
triggerIdstringrequired
conditionIdstringrequired
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/{triggerId}/conditions/{conditionId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Trigger condition relationship updated successfully

Bodyapplication/json
namestringrequired

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

Campaign trigger max per day

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring

Campaign trigger required user info

Enum"id""email""instagramAccountId""externalId""firstName""lastName""accountAddress""publicProfile""customData""isActive"
triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

idstringrequired

Campaign trigger id

conditionsArray of objects(CampaignTriggerConditionDTO)required

Campaign trigger conditions

conditions[].​conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
conditions[].​valueobjectrequired

Trigger condition value

conditions[].​keystringrequired

Trigger condition key

conditions[].​idstringrequired
Response
application/json
{ "name": "string", "description": "string", "maxPerDay": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "id", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "id": "string", "conditions": [ { … } ] }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations