Create a key to copy examples filled with your team.
Tenants
Extra tenants under the token's team.
A tenant is a namespace under the team. Index hides the default tenant. DKIM records are on sending domains.
GET /api/v1/teams/:team_id/tenants
List extra tenants. The default tenant is omitted.
request.sh
1
curl -sS -X GET \
2
-H 'Authorization: Bearer YOUR_API_KEY' \
3
https://postshiba.com/api/v1/teams/1/tenants
response.json
1
[
2
{
3
"id": 12,
4
"name": "Acme Florist",
5
"slug": "acme-florist",
6
"suspended": false
7
}
8
]
request.sh
1
curl -sS -X POST \
2
-H 'Authorization: Bearer YOUR_API_KEY' \
3
-H 'Content-Type: application/json' \
4
-d '{"tenant":{"name":"Acme Florist"}}' \
5
https://postshiba.com/api/v1/teams/1/tenants
response.json
1
{
2
"id": 12,
3
"name": "Acme Florist",
4
"slug": "acme-florist",
5
"suspended": false
6
}
request.sh
1
curl -sS -X GET \
2
-H 'Authorization: Bearer YOUR_API_KEY' \
3
https://postshiba.com/api/v1/tenants/:tenant_id
response.json
1
{
2
"id": 12,
3
"name": "Acme Florist",
4
"slug": "acme-florist",
5
"suspended": false
6
}
request.sh
1
curl -sS -X POST \
2
-H 'Authorization: Bearer YOUR_API_KEY' \
3
-H 'Content-Type: application/json' \
4
https://postshiba.com/api/v1/tenants/:tenant_id/suspend
response.json
1
{
2
"id": 12,
3
"name": "Acme Florist",
4
"slug": "acme-florist",
5
"suspended": true
6
}
request.sh
1
curl -sS -X POST \
2
-H 'Authorization: Bearer YOUR_API_KEY' \
3
-H 'Content-Type: application/json' \
4
https://postshiba.com/api/v1/tenants/:tenant_id/resume
response.json
1
{
2
"id": 12,
3
"name": "Acme Florist",
4
"slug": "acme-florist",
5
"suspended": false
6
}
DELETE /api/v1/tenants/:id
Delete an extra tenant. Rejected if it is default or still owns a domain, SMTP credential, or inbox, including disabled credentials and inboxes.
id: Tenant id
request.sh
1
curl -sS -X DELETE \
2
-H 'Authorization: Bearer YOUR_API_KEY' \
3
https://postshiba.com/api/v1/tenants/:tenant_id