Skip to content

PERS-api Documentation (2.0.12)

PERS API Documentation

This RESTful API enables seamless integration of Web3 loyalty, token management, and engagement features into your applications.

Usage Guidelines:

  • RESTful Design: Resources are accessed via standard HTTP methods (GET, POST, PUT, DELETE) with predictable, resource-oriented URLs.
  • Authentication: Secure access is enforced via Bearer Tokens (JWT) and Project Keys (defining the Tenant context).
  • Data Format: All requests and responses utilize standard JSON formatting.

Explore the modules below for detailed endpoint specifications, schemas, and testing capabilities.

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://docs.pers.ninja/_mock/swagger
Production API
https://api.pers.ninja/v2
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

File Management System

File upload and management system for platform assets including campaign images, user avatars, and document attachments with secure storage and access control.
File Operations:

•
Secure Upload:
File upload with type validation and security scanning

•
Asset Management:
Organize and manage platform media assets

•
Access Control:
Role-based file access and sharing permissions

•
CDN Integration:
Fast global file delivery through content delivery networks

•
File Processing:
Automatic image resizing and format optimization

Generate signed URL for entity storage

Request

Creates S3 signed URLs for uploading or downloading entity files. Supports both business and admin authentication flows.

Security
authJWT or projectKey
Bodyapplication/jsonrequired
entityTypestringrequired

The entity type

Enum"token""campaign""redemption""business""tenant""user"
entityIdstringrequired

The entity id

signedUrlTypestringrequired

The signed url type, GET or PUT. PUT is used for uploading files, GET is used for downloading files

Enum"GET""PUT"
fileExtensionstringrequired

The file extension

fileNamestring

The file name

curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/files/entity-storage-url \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "entityType": "token",
    "entityId": "string",
    "signedUrlType": "GET",
    "fileExtension": "string",
    "fileName": "string"
  }'

Responses

Signed URL generated successfully

Bodyapplication/json
signedUrlstringrequired

The signed url

Response
application/json
{ "signedUrl": "string" }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations