Create a new tenant (project) in the system. This is the initial setup step for new organizations.
PERS-api docs (2.0.7)
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants
- https://explorins-loyalty.ngrok.io/tenants
- https://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-api-key: YOUR_API_KEY_HERE' \
-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.
JWT token for tenant admin user. This token is used to authenticate tenant admin user. It is generated when tenant is created. Please store it securely, you will not be able to see this again. However, you can generate a new one if needed.
API private key for tenant. This key is used to authenticate tenant when making API requests. It is generated on demand. Please store it securely, you will not be able to see this again. However, you can generate a new one if needed.
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", "jwt": "string", "apiPrivateKey": "string", "defaultWalletManagementType": "custodial" }
This is an optional field for any extra login requirements for your users.
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants
- https://explorins-loyalty.ngrok.io/tenants
- https://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.
JWT token for tenant admin user. This token is used to authenticate tenant admin user. It is generated when tenant is created. Please store it securely, you will not be able to see this again. However, you can generate a new one if needed.
API private key for tenant. This key is used to authenticate tenant when making API requests. It is generated on demand. Please store it securely, you will not be able to see this again. However, you can generate a new one if needed.
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", "jwt": "string", "apiPrivateKey": "string", "defaultWalletManagementType": "custodial" }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants/client-config
- https://explorins-loyalty.ngrok.io/tenants/client-config
- https://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
- https://explorins-loyalty.ngrok.io/tenants/login-token
- https://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-API-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
- https://explorins-loyalty.ngrok.io/tenants/me
- https://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" }
Request
Context-aware tenant information retrieval:
UNAUTHENTICATED ACCESS:
- No headers required
- Returns: Basic public tenant information
API KEY ACCESS:
- Header: X-API-Key (project identification)
- Returns: Enhanced public information + project configuration
ADMIN ACCESS:
- Header: Authorization Bearer (admin JWT)
- Returns: Full tenant configuration and sensitive data
The endpoint automatically detects authentication context and returns appropriate data level.
- Mock serverhttps://docs.pers.ninja/_mock/swagger/tenants/{id}
- https://explorins-loyalty.ngrok.io/tenants/{id}
- https://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-api-key: YOUR_API_KEY_HERE' \
-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" }