SMTP credentials
Issue a username and a once-only password.
SMTP credentials authenticate SMTP and HTTP inject on one cluster, for one tenant. The password is returned once, on create, so store it then. Delete disables a credential, and enable turns it back on.
POST /api/v1/teams/:obfuscated_team_id/clusters/:obfuscated_cluster_id/smtp_credentials
Create a credential. Optional tenant_id. Defaults to the team's default tenant.
obfuscated_cluster_id: Public cluster id
request.sh
1curl -sS -X POST \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 -H 'Content-Type: application/json' \
4 -d '{"smtp_credential":{"tenant_id":"WbLcFd"}}' \
5 https://app.postshiba.com/api/v1/teams/KjkAJW/clusters/:obfuscated_cluster_id/smtp_credentials
response.json
1{
2 "id": "RvWsXq",
3 "username": "smtp_9",
4 "password": "once-only-password",
5 "tenant_id": "WbLcFd",
6 "tenant": "default",
7 "cluster_id": "NmQpXr"
8}
DELETE /api/v1/teams/:obfuscated_team_id/clusters/:obfuscated_cluster_id/smtp_credentials/:id
Disable a credential. Password is omitted.
obfuscated_cluster_id: Public cluster idid: Public credential id
request.sh
1curl -sS -X DELETE \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 https://app.postshiba.com/api/v1/teams/KjkAJW/clusters/:obfuscated_cluster_id/smtp_credentials/:smtp_credential_id
response.json
1{
2 "id": "RvWsXq",
3 "username": "smtp_9",
4 "tenant_id": "WbLcFd",
5 "tenant": "default",
6 "cluster_id": "NmQpXr"
7}
POST /api/v1/teams/:obfuscated_team_id/clusters/:obfuscated_cluster_id/smtp_credentials/:id/enable
Enable a disabled credential. Password is omitted.
obfuscated_cluster_id: Public cluster idid: Public credential 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/teams/KjkAJW/clusters/:obfuscated_cluster_id/smtp_credentials/:smtp_credential_id/enable
response.json
1{
2 "id": "RvWsXq",
3 "username": "smtp_9",
4 "tenant_id": "WbLcFd",
5 "tenant": "default",
6 "cluster_id": "NmQpXr"
7}