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

Core Campaign Management

Core campaign CRUD operations with intelligent access detection. Handles campaign lifecycle management including creation, updates, activation, and querying with role-based access control.
**Campaign Operations:**

• **Campaign Discovery:** Public browsing of active campaigns without authentication

• **Advanced Filtering:** Query campaigns by tags, status, and custom criteria

• **Lifecycle Management:** Full campaign CRUD with proper state transitions

• **Environment Control:** Toggle campaigns between testnet and mainnet modes

• **Access Intelligence:** Automatic privilege detection for appropriate data exposure ![Campaign Module](https://s3.eu-west-1.amazonaws.com/pers.assets.prod/tenant/a0df6ebf-51cc-4c18-afcd-0de355c250dc_DemoApp_eXplorins/Documentation/Campaign_image.png)

Get campaigns (Intelligent Access)

Request

Intelligent endpoint that adapts based on authentication: Public users get active campaigns with filtering, Admin users get all campaigns with full filtering. Replaces GET /campaign and GET /campaign/admin

Security
projectKey
Query
activeboolean

Filter by active status (Admin only: true=active, false=inactive, omit=all). Ignored for public access.

tagstring

Filter by tag

limitstring

Maximum number of results

offsetstring

Number of results to skip

sortstring

Sort field

Enum"name""createdAt""startDate"
orderstring

Sort direction

Enum"ASC""DESC"
curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/campaigns?active=true&tag=string&limit=string&offset=string&sort=name&order=ASC' \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Campaigns retrieved based on access level

Bodyapplication/jsonArray [
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": { … }, "tokenUnits": [ … ], "businessEngagements": [ … ], "createdAt": "2025-10-22T19:05:50.493Z", "updatedAt": null, "order": 1, "tags": [], "countryCodeRestrictions": [ … ] } ]

Request

Create a new campaign. Admin-only operation. Replaces POST /campaign/admin/

Security
tenantAdminJWT
Bodyapplication/jsonrequired
namestringrequired

Campaign name

descriptionstring or null

Campaign description

beneficiaryAccountAddressstring or null

Campaign beneficiary account address

startDatestring or null(date-time)

Campaign start date, default is the current date

endDatestring or null(date-time)

Campaign end date

imageUrlstring or null

img url

externalUrlstring or null

Campaign url

ordernumber

Campaign order

Default false
countryCodeRestrictionsobject

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

Example: ["NOT_ES","FR"]
curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/campaigns \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "description": "string",
    "beneficiaryAccountAddress": "string",
    "startDate": "2019-08-24T14:15:22Z",
    "endDate": "2019-08-24T14:15:22Z",
    "imageUrl": "string",
    "externalUrl": "string",
    "order": false,
    "countryCodeRestrictions": [
      "NOT_ES",
      "FR"
    ]
  }'

Responses

Campaign created 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

Get single campaign details by ID. Available to public with project key. Replaces GET /campaign/{id}

Security
projectKey
Path
idstringrequired
curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/campaigns/{id}' \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Campaign retrieved

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

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

Security
tenantAdminJWT
Path
idstringrequired
Bodyapplication/jsonrequired
namestringrequired

Campaign name

descriptionstring or null

Campaign description

beneficiaryAccountAddressstring or null

Campaign beneficiary account address

startDatestring or null(date-time)

Campaign start date, default is the current date

endDatestring or null(date-time)

Campaign end date

imageUrlstring or null

img url

externalUrlstring or null

Campaign url

ordernumber

Campaign order

Default false
countryCodeRestrictionsobject

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

Example: ["NOT_ES","FR"]
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/campaigns/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "description": "string",
    "beneficiaryAccountAddress": "string",
    "startDate": "2019-08-24T14:15:22Z",
    "endDate": "2019-08-24T14:15:22Z",
    "imageUrl": "string",
    "externalUrl": "string",
    "order": false,
    "countryCodeRestrictions": [
      "NOT_ES",
      "FR"
    ]
  }'

Responses

Campaign updated 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

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

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

Responses

Campaign deleted successfully

Bodyapplication/json
boolean
Response
application/json
true

Request

Toggle campaign active/inactive status. Admin-only operation. Replaces PUT /campaign/admin/{id}/activate

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

Responses

Campaign status toggled 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" ] }

Toggle campaign environment (Admin)

Request

Toggle campaign between testnet and mainnet environment. Admin-only operation. Replaces PUT /campaign/admin/{id}/environment

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

Responses

Campaign environment toggled 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" ] }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations