Skip to main content
POST
/
api
/
v2
/
admin
/
tenants
Create new tenant
curl --request POST \
  --url https://faisalshop.mvp-apps.ae/api/v2/admin/tenants \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My Store"
}
'
{
  "id": 123,
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Overview

Create a new tenant (organization). The authenticated user will automatically be added as an ADMIN of the new tenant.

Authorization

  • User must be authenticated with a valid Bearer token

Automatic Admin Assignment

When you create a tenant, you are automatically assigned as an ADMIN, giving you full control over the organization.

Example Usage

curl -X POST \
  https://faisalshop.mvp-apps.ae/api/v2/admin/tenants \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My New Store"
  }'
await axios.post(
  '/api/v2/admin/tenants',
  {
    name: 'My New Store'
  },
  {
    headers: {
      Authorization: `Bearer ${token}`
    }
  }
);

Next Steps

After creating a tenant:
  1. Add team members using the team member endpoints
  2. Create categories for your products
  3. Add products to your catalog
  4. Configure webhooks for integrations

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
Example:

"My Store"

Response

201 - application/json

Tenant created

id
integer
name
string
created_at
string<date-time>