Tenant Management API

Apr 5, 2026 · 449 views

Multi-tenant mode lets one OneSigner instance serve several isolated clients or departments — each with its own API token, folders and signing profiles. These endpoints manage tenants programmatically (admin token required unless noted).

List Tenants

GET /api/tenants
Authorization: Bearer ADMIN_TOKEN

Get Current Tenant

GET /api/tenants/me
Authorization: Bearer ANY_TOKEN

Returns the tenant that the presented token belongs to — useful for client self-diagnosis.

Create a Tenant

POST /api/tenants
Authorization: Bearer ADMIN_TOKEN
Content-Type: application/json

{
  "id": "client-a",
  "name": "Client A Corp",
  "token": "unique-api-token",
  "uploadFolder": "C:\\uploads\\client-a",
  "signedFolder": "C:\\signed\\client-a",
  "enabled": true
}

Update a Tenant

PUT /api/tenants/client-a
Authorization: Bearer ADMIN_TOKEN
Content-Type: application/json

{ "name": "Client A Corporation", "enabled": true }

Delete a Tenant

DELETE /api/tenants/client-a
Authorization: Bearer ADMIN_TOKEN

Removes the tenant and its token; files on disk are left untouched.

Apply Changes

POST /api/reload-config
Authorization: Bearer ADMIN_TOKEN

Reloads appsettings.json without a service restart. Tenant changes made through the API are persisted to the config file automatically.

How Tenants Interact With Signing

  • An upload authenticated with a tenant's token lands in that tenant's upload folder and matches that tenant's signing profiles.
  • Typical setup: one tenant per client, one PDF profile + one code-signing profile per tenant, each with the client's own certificate.
  • Tenant availability depends on your license plan (see License Plans).