Tenants
Extra tenants under the token's team.
A tenant is one of your customers under your team. Each tenant has its own sending domains, SMTP credentials, inboxes, suppressions, and webhooks, and you can suspend one without affecting the others. Every team has a default tenant. The list omits it, but you can fetch it by id.
GET /api/v1/teams/:obfuscated_team_id/tenants
List extra tenants. The default tenant is omitted.
request.sh
1curl -sS -X GET \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 https://app.postshiba.com/api/v1/teams/KjkAJW/tenants
response.json
1[
2 {
3 "id": "WbLcFd",
4 "name": "Acme Florist",
5 "slug": "acme-florist",
6 "suspended": false
7 }
8]
POST /api/v1/teams/:obfuscated_team_id/tenants
Create a tenant. Slug is generated from name when omitted.
request.sh
1curl -sS -X POST \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 -H 'Content-Type: application/json' \
4 -d '{"tenant":{"name":"Acme Florist"}}' \
5 https://app.postshiba.com/api/v1/teams/KjkAJW/tenants
response.json
1{
2 "id": "WbLcFd",
3 "name": "Acme Florist",
4 "slug": "acme-florist",
5 "suspended": false
6}
request.sh
1curl -sS -X GET \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 https://app.postshiba.com/api/v1/tenants/:tenant_id
response.json
1{
2 "id": "WbLcFd",
3 "name": "Acme Florist",
4 "slug": "acme-florist",
5 "suspended": false
6}
request.sh
1curl -sS -X POST \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 -H 'Content-Type: application/json' \
4 https://app.postshiba.com/api/v1/tenants/:tenant_id/suspend
response.json
1{
2 "id": "WbLcFd",
3 "name": "Acme Florist",
4 "slug": "acme-florist",
5 "suspended": true
6}
POST /api/v1/tenants/:id/resume
Resume sending. Returns 403 {error: operator_hold} when the tenant was paused by our abuse team; contact support.
id: Public tenant id
request.sh
1curl -sS -X POST \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 -H 'Content-Type: application/json' \
4 https://app.postshiba.com/api/v1/tenants/:tenant_id/resume
response.json
1{
2 "id": "WbLcFd",
3 "name": "Acme Florist",
4 "slug": "acme-florist",
5 "suspended": false
6}
DELETE /api/v1/tenants/:id
Delete an extra tenant. SMTP users are deleted. Domains and inboxes move to destination_tenant_id, or the default tenant when that is omitted. Rejected if it is the default tenant.
id: Public tenant iddestination_tenant_id: Optional. Tenant that receives domains and inboxes. Defaults to the team's default tenant.
request.sh
1curl -sS -X DELETE \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 https://app.postshiba.com/api/v1/tenants/:tenant_id