Create a new tenant (project) in the system. This is the initial setup step for new organizations.
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.
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants
- Production APIhttps://api.pers.ninja/v2/tenants
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.pers.ninja/_mock/swagger/tenants \
-H 'Content-Type: application/json' \
-H 'x-project-key: YOUR_API_KEY_HERE' \
-d '{
"projectName": "string"
}'Tenant created successfully
Unique identifier for tenant. This id is used to identify tenant in the system for client requests.
Unique identifier for tenant. This id is used to identify tenant in the system for client requests.
Testnet project API key for tenant. Used in case of testnet project.
This is an optional field for any extra login requirements for your users.
Default wallet management type for tenant. This is used when creating a new wallet for the tenant. It can be either CUSTODIAL or NON_CUSTODIAL. CUSTODIAL means that the wallet is managed by the platform, while NON_CUSTODIAL means that the wallet is managed by the user.
{ "projectName": "string", "acronym": "string", "id": "string", "createdAt": "2019-08-24T14:15:22Z", "projectDescription": "string", "projectWebsite": "string", "projectEmail": "string", "projectImageUrl": "string", "projectApiKey": "string", "testnetProjectApiKey": "string", "stripeApiKey": "string", "stripeWebhookSecret": "string", "loginToken": "string", "allowJWTForUnauthenticatedUsers": true, "firebaseTenantId": "string", "defaultWalletManagementType": "custodial" }
This is an optional field for any extra login requirements for your users.
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants
- Production APIhttps://api.pers.ninja/v2/tenants
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://docs.pers.ninja/_mock/swagger/tenants \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"projectName": "My Project",
"projectDescription": "string",
"stripeApiKey": "string",
"stripeWebhookSecret": "string",
"stripePublishableKey": "string",
"loginToken": "string",
"allowJWTForUnauthenticatedUsers": true,
"firebaseTenantId": "string",
"projectWebsite": "string",
"projectEmail": "string",
"projectImageUrl": "string"
}'Tenant updated successfully
Unique identifier for tenant. This id is used to identify tenant in the system for client requests.
Unique identifier for tenant. This id is used to identify tenant in the system for client requests.
Testnet project API key for tenant. Used in case of testnet project.
This is an optional field for any extra login requirements for your users.
Default wallet management type for tenant. This is used when creating a new wallet for the tenant. It can be either CUSTODIAL or NON_CUSTODIAL. CUSTODIAL means that the wallet is managed by the platform, while NON_CUSTODIAL means that the wallet is managed by the user.
{ "projectName": "string", "acronym": "string", "id": "string", "createdAt": "2019-08-24T14:15:22Z", "projectDescription": "string", "projectWebsite": "string", "projectEmail": "string", "projectImageUrl": "string", "projectApiKey": "string", "testnetProjectApiKey": "string", "stripeApiKey": "string", "stripeWebhookSecret": "string", "loginToken": "string", "allowJWTForUnauthenticatedUsers": true, "firebaseTenantId": "string", "defaultWalletManagementType": "custodial" }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants/client-config
- Production APIhttps://api.pers.ninja/v2/tenants/client-config
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.pers.ninja/_mock/swagger/tenants/client-config \
-H 'x-project-key: YOUR_API_KEY_HERE'{ "projectName": "My Project", "id": "ererf-erf-erf-erf", "stripePublishableKey": "string", "firebaseTenantId": "string", "infuraApiKey": "string", "polyScanApiKey": "string", "clientIpLocation": { "country_code": "string", "country_name": "string", "region_code": "string", "region_name": "string", "city_name": "string", "postal_code": "string", "latitude": 37.7749, "longitude": -122.4194, "accuracy_radius": 5 } }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants/login-token
- Production APIhttps://api.pers.ninja/v2/tenants/login-token
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.pers.ninja/_mock/swagger/tenants/login-token \
-H 'x-project-key: YOUR_API_KEY_HERE'"string"
Request
Convenience endpoint for API key holders to retrieve their own tenant information.
REQUIREMENTS:
- Header: x-project-key (project identification)
RETURNS:
- Enhanced public tenant information for the project associated with the API key
This is equivalent to calling GET /tenants/:id with your own tenant ID, but you don't need to know the ID.
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants/me
- Production APIhttps://api.pers.ninja/v2/tenants/me
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.pers.ninja/_mock/swagger/tenants/me \
-H 'x-project-key: YOUR_API_KEY_HERE'{ "projectName": "string", "acronym": "string", "id": "string", "createdAt": "2019-08-24T14:15:22Z", "projectDescription": "string", "projectWebsite": "string", "projectEmail": "string", "projectImageUrl": "string", "projectApiKey": "string" }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants/{id}
- Production APIhttps://api.pers.ninja/v2/tenants/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.pers.ninja/_mock/swagger/tenants/{id}' \
-H 'x-project-key: YOUR_API_KEY_HERE'{ "projectName": "string", "acronym": "string", "id": "string", "createdAt": "2019-08-24T14:15:22Z", "projectDescription": "string", "projectWebsite": "string", "projectEmail": "string", "projectImageUrl": "string", "projectApiKey": "string" }