Tenants
Give each of your customers their own custom emoji set, from one app.
On this page
If your product serves many customers, such as workspaces in a chat app or communities on a forum, each customer may want its own custom emoji. Tenants give every customer a separate set inside one app, with one key and one bill.
How tenants work
- A tenant has your own external id, for example the workspace id from your database. You never need to store an Emojisense id.
- Custom emoji belong to the whole app or to one tenant.
- A search with
tenant=<externalId>returns the app-wide custom emoji, that tenant’s emoji and Unicode emoji. Other tenants’ emoji never appear. - Tenant emoji count toward the plan’s custom emoji limit: 10k on Scale.
Manage tenants from your server
The tenants API takes a secret key in Authorization: Bearer sk_live_…, so call it from your back end, for example when a customer creates a workspace.
| Route | Does |
|---|---|
GET /v1/tenants | List tenants |
POST /v1/tenants | Create a tenant |
DELETE /v1/tenants/:externalId | Delete a tenant |
GET /v1/tenants/:externalId/emoji | List a tenant’s emoji |
POST /v1/tenants/:externalId/emoji | Upload an emoji (multipart: file, shortcode, aliases) |
DELETE /v1/tenants/:externalId/emoji/:shortcode | Delete an emoji |
curl -X POST "https://api.emojisense.com/v1/tenants/acme/emoji" \
-H "Authorization: Bearer sk_live_…" \
-F "file=@shipit.png" \
-F "shortcode=shipit" \
-F "aliases=ship it, launch, deploy"The dashboard has the same tenant list, with each tenant’s emoji count.
Search per tenant
Pass the tenant to search, reaction suggestions and the custom pack that the SDK loads on the device:
GET https://api.emojisense.com/v1/search?q=ship%20it&tenant=acme&key=pk_live_…
GET https://api.emojisense.com/v1/custom-pack?key=pk_live_…&tenant=acmeThe custom pack has a short edge cache (60 seconds), so a new emoji is in the tenant’s custom pack within about a minute.