Outpost API

Tenants

Endpoint:http://localhost:3333/api/v1

The API segments resources per tenant. A tenant represents a user/team/organization in your product. The provided value determines the tenant's ID, which can be any string representation.

If your system is not multi-tenant, create a single tenant with a hard-code tenant ID upon initialization. If your system has a single tenant but multiple environments, create a tenant per environment, like live and test.


Get Tenant

GET
http://localhost:3333/api/v1
/{tenant_id}

Retrieves details for a specific tenant.

Get Tenantpath Parameters

  • tenant_idstring · required

    The ID of the tenant. Required when using AdminApiKey authentication.

Get TenantResponses

    • idstring

      User-defined system ID for the tenant.

    • destinations_countinteger

      Number of destinations associated with the tenant.

    • topicsstring[]

      List of subscribed topics across all destinations for this tenant.

    • created_atstring · date-time

      ISO Date when the tenant was created.


Create or Update Tenant

PUT
http://localhost:3333/api/v1
/{tenant_id}

Idempotently creates or updates a tenant. Required before associating destinations.

Create or Update Tenantpath Parameters

  • tenant_idstring · required

    The ID of the tenant. Required when using AdminApiKey authentication.

Create or Update TenantResponses

    • idstring

      User-defined system ID for the tenant.

    • destinations_countinteger

      Number of destinations associated with the tenant.

    • topicsstring[]

      List of subscribed topics across all destinations for this tenant.

    • created_atstring · date-time

      ISO Date when the tenant was created.


Delete Tenant

DELETE
http://localhost:3333/api/v1
/{tenant_id}

Deletes the tenant and all associated destinations.

Delete Tenantpath Parameters

  • tenant_idstring · required

    The ID of the tenant. Required when using AdminApiKey authentication.

Delete TenantResponses

    • successboolean

Get Portal Redirect URL

GET
http://localhost:3333/api/v1
/{tenant_id}/portal

Returns a redirect URL containing a JWT to authenticate the user with the portal.

Get Portal Redirect URLpath Parameters

  • tenant_idstring · required

    The ID of the tenant. Required when using AdminApiKey authentication.

Get Portal Redirect URLquery Parameters

  • themestring · enum

    Optional theme preference for the portal.

    Enum values:
    light
    dark

Get Portal Redirect URLResponses

    • redirect_urlstring · url

      Redirect URL containing a JWT to authenticate the user with the portal.


Get Tenant JWT Token

GET
http://localhost:3333/api/v1
/{tenant_id}/token

Returns a JWT token scoped to the tenant for safe browser API calls.

Get Tenant JWT Tokenpath Parameters

  • tenant_idstring · required

    The ID of the tenant. Required when using AdminApiKey authentication.

Get Tenant JWT TokenResponses

    • tokenstring

      JWT token scoped to the tenant for safe browser API calls.


Get Portal Redirect URL (JWT Auth Context)

GET
http://localhost:3333/api/v1
/portal

Returns a redirect URL containing a JWT to authenticate the user with the portal (infers tenant from JWT). Requires Admin API Key.

Get Portal Redirect URL (JWT Auth Context)query Parameters

  • themestring · enum

    Optional theme preference for the portal.

    Enum values:
    light
    dark

Get Portal Redirect URL (JWT Auth Context)Responses

    • redirect_urlstring · url

      Redirect URL containing a JWT to authenticate the user with the portal.


Get Tenant JWT Token (JWT Auth Context)

GET
http://localhost:3333/api/v1
/token

Returns a JWT token scoped to the tenant (infers tenant from JWT). Requires Admin API Key.

Get Tenant JWT Token (JWT Auth Context)Responses

    • tokenstring

      JWT token scoped to the tenant for safe browser API calls.