TokenOS
  • Overview
    • Introduction
    • Authentication
    • User & Wallet Identification
    • Errors
    • Versioning
  • Guides
    • How our system works
    • Rewarding your audience
      • In exchange for completing an incentive
      • In exchange for your own points
      • As a credit
  • Wallet API
    • Balances
    • Allocations
  • Management API
    • Token Selection
    • Campaigns
    • Subscriptions
    • Codes
  • Payments API
    • Introduction
    • Payments
    • Deliveries
    • Relayer
Powered by GitBook
On this page
  1. Management API

Subscriptions

PreviousCampaignsNextCodes

Last updated 2 years ago

To keep track of users' participation within various campaigns, we use subscriptions. Before a user can participate in a campaign, they must first subscribe to the campaign.

The subscription object

This object represents the subscription of a user to a campaign.

Create subscription

Retrieve subscription

get

Get subscription state for a user, including incentives completion

Authorizations
Path parameters
userIdstringRequired
Query parameters
identifierTypestring ยท enumRequiredPossible values:
Responses
200
Ok
application/json
get
GET /v1/campaigns/{campaignId}/subscriptions/{userId} HTTP/1.1
Host: localhost:8080
Accept: */*
200

Ok

{
  "createdAt": "2025-05-09",
  "incentives": [
    {
      "id": "text",
      "status": "VERIFIED",
      "reward": 1,
      "createdAt": "2025-05-09"
    }
  ]
}
  • The subscription object
  • Create subscription
  • POSTCreate a new subscription for the given user
  • Retrieve subscription
  • GET/campaigns/{campaignId}/subscriptions/{userId}

Create a new subscription for the given user

post
Authorizations
Path parameters
campaignIdstringRequired
Body
userany ofRequired
or
or
Responses
200
accepted
application/json
400
missing required parameters
application/json
post
POST /v1/campaigns/{campaignId}/subscriptions HTTP/1.1
Host: localhost:8080
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "user": {
    "email": "name@gmail.com"
  }
}
{
  "subscriptionId": "text"
}