API GuidesMulti-tenancyTenant Setup

Tenant Setup

SALLY is a multi-tenant platform. Every organization (carrier, broker, fleet operator) operates within its own isolated tenant. All data — drivers, vehicles, loads, routes, and alerts — is automatically scoped to your tenant. Users never see data from other tenants.

Tenant Lifecycle

StatusDescription
PENDING_APPROVALRegistration submitted, awaiting review
ACTIVETenant is live and fully operational
REJECTEDRegistration was denied
SUSPENDEDTenant access temporarily revoked

Registration Flow

Step 1: Register

Create your organization account:

curl -X POST https://sally-api.apps.appshore.in/api/v1/tenants/register \
  -H "Content-Type: application/json" \
  -d '{
    "organization": {
      "name": "Acme Freight Lines",
      "dotNumber": "1234567",
      "mcNumber": "MC-987654",
      "address": "2800 S Western Ave, Chicago, IL 60608",
      "phone": "+1-312-555-0100",
      "contactEmail": "ops@acmefreight.com"
    },
    "adminUser": {
      "firstName": "Robert",
      "lastName": "Williams",
      "email": "robert.williams@acmefreight.com",
      "password": "a_secure_password_here"
    }
  }'

JavaScript (fetch):

const response = await fetch(
  "https://sally-api.apps.appshore.in/api/v1/tenants/register",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      organization: {
        name: "Acme Freight Lines",
        dotNumber: "1234567",
        mcNumber: "MC-987654",
        address: "2800 S Western Ave, Chicago, IL 60608",
        phone: "+1-312-555-0100",
        contactEmail: "ops@acmefreight.com",
      },
      adminUser: {
        firstName: "Robert",
        lastName: "Williams",
        email: "robert.williams@acmefreight.com",
        password: "a_secure_password_here",
      },
    }),
  }
);
 
const result = await response.json();

Response:

{
  "tenant": {
    "id": "tnt_acme001",
    "name": "Acme Freight Lines",
    "dotNumber": "1234567",
    "mcNumber": "MC-987654",
    "status": "PENDING_APPROVAL",
    "createdAt": "2026-02-10T10:00:00Z"
  },
  "user": {
    "id": "usr_r1w2i3l4",
    "firstName": "Robert",
    "lastName": "Williams",
    "email": "robert.williams@acmefreight.com",
    "role": "OWNER",
    "tenantId": "tnt_acme001"
  },
  "message": "Registration submitted. You will receive an email when your account is approved."
}

Registration Fields

FieldRequiredDescription
organization.nameYesLegal business name
organization.dotNumberNoUSDOT number (recommended for carriers)
organization.mcNumberNoMotor Carrier number
organization.addressYesBusiness address
organization.phoneYesBusiness phone number
organization.contactEmailYesPrimary contact email
adminUser.firstNameYesAdmin user’s first name
adminUser.lastNameYesAdmin user’s last name
adminUser.emailYesAdmin user’s email (used for login)
adminUser.passwordYesAdmin user’s password (min 8 characters)

The registering user is automatically assigned the OWNER role, which has full administrative access to the tenant.

Step 2: Await Approval

After registration, the tenant enters PENDING_APPROVAL status. A SALLY administrator reviews the registration and either approves or rejects it. Approval typically takes less than 24 hours during business days.

You can check your tenant status by logging in:

curl -X POST https://sally-api.apps.appshore.in/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "robert.williams@acmefreight.com",
    "password": "a_secure_password_here"
  }'

Response while pending:

{
  "accessToken": "eyJhbGciOiJSUzI1NiIs...",
  "user": {
    "id": "usr_r1w2i3l4",
    "email": "robert.williams@acmefreight.com",
    "role": "OWNER",
    "tenantId": "tnt_acme001",
    "tenantStatus": "PENDING_APPROVAL"
  }
}

While the tenant is pending, API access is limited. You can log in and view your profile, but you cannot create drivers, vehicles, loads, or routes until approved.

Step 3: Activation

Once approved, you receive a confirmation email and the tenant moves to ACTIVE status. All API endpoints become fully available.

Onboarding Steps

After your tenant is approved, complete these steps to start using SALLY:

1. Generate API Keys

Create API keys for your integrations:

curl -X POST https://sally-api.apps.appshore.in/api/v1/api-keys \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Primary Integration Key"
  }'

See API Keys for details.

2. Invite Team Members

Add dispatchers, admins, and other team members:

curl -X POST https://sally-api.apps.appshore.in/api/v1/user-invitations \
  -H "X-API-Key: $SALLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane.smith@acmefreight.com",
    "role": "DISPATCHER",
    "firstName": "Jane",
    "lastName": "Smith"
  }'

Response:

{
  "id": "inv_d5e6f7g8",
  "email": "jane.smith@acmefreight.com",
  "role": "DISPATCHER",
  "status": "PENDING",
  "invitedBy": "usr_r1w2i3l4",
  "expiresAt": "2026-02-17T10:00:00Z",
  "createdAt": "2026-02-10T10:00:00Z"
}

The invited user receives an email with a link to accept the invitation and create their account. Invitations expire after 7 days.

3. Register Fleet

Add your drivers and vehicles:

4. Configure Integrations

Connect your ELD, TMS, and other systems:

5. Plan Your First Route

With drivers, vehicles, and loads in place, plan your first route:

Tenant Configuration

Tenants can configure various settings that affect platform behavior. These are accessible to users with the OWNER or ADMIN role.

Alert Settings

Configure which alerts your team receives and at what thresholds:

curl -X PUT https://sally-api.apps.appshore.in/api/v1/tenant/settings/alerts \
  -H "X-API-Key: $SALLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "hosApproachingThresholdHours": 1.0,
    "routeDeviationThresholdMiles": 2.0,
    "unplannedStopThresholdMinutes": 15,
    "dockDelayThresholdMinutes": 30,
    "enableWeatherAlerts": true,
    "enableMechanicalAlerts": true
  }'

Monitoring Settings

Configure the monitoring service behavior:

curl -X PUT https://sally-api.apps.appshore.in/api/v1/tenant/settings/monitoring \
  -H "X-API-Key: $SALLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "monitoringIntervalSeconds": 60,
    "autoResolveDeviationAfterMinutes": 10,
    "hosWarningThresholdMinutes": 60
  }'

Data Isolation

Every API request is automatically scoped to your tenant based on the authentication token or API key. You cannot access data belonging to other tenants, and other tenants cannot access your data.

This scoping happens transparently — you never need to include a tenant ID in your requests. The system resolves it from your credentials.

For example, when you call GET /api/v1/drivers, you only see drivers that belong to your organization. If another carrier also has a driver named “Mike Johnson”, their driver record is completely invisible to you.

Suspended Tenants

If your tenant is suspended (due to billing issues, policy violations, or administrative action):

  • All API requests return 403 Forbidden with a message explaining the suspension
  • Active routes continue to be monitored but no new routes can be created
  • Existing data is preserved and becomes accessible again upon reactivation
  • Contact support to understand the reason for suspension and steps to resolve it
{
  "statusCode": 403,
  "message": "Tenant tnt_acme001 is suspended. Contact support@sally.appshore.in for assistance.",
  "error": "Forbidden"
}

Next Steps