Outbound retention
How long PostShiba keeps copies of the messages it composes.
How many days PostShiba keeps a copy of each message it composes for the token's team. 0 turns retention off. options lists every allowed value and its price per 1,000 stored messages in cents. A change applies to messages sent after it. Only a key created by a Team Administrator can read or change it. Other keys get 404.
GET /api/v1/teams/:obfuscated_team_id/outbound_retention
Get the team's outbound retention and the allowed values.
request.sh
1curl -sS -X GET \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 https://app.postshiba.com/api/v1/teams/KjkAJW/outbound_retention
response.json
1{
2 "retention_days": 45,
3 "options": [
4 {
5 "days": 0,
6 "price_per_1000_cents": 0
7 },
8 {
9 "days": 7,
10 "price_per_1000_cents": 13
11 },
12 {
13 "days": 28,
14 "price_per_1000_cents": 13
15 },
16 {
17 "days": 45,
18 "price_per_1000_cents": 0
19 },
20 {
21 "days": 90,
22 "price_per_1000_cents": 13
23 },
24 {
25 "days": 180,
26 "price_per_1000_cents": 26
27 },
28 {
29 "days": 365,
30 "price_per_1000_cents": 52
31 }
32 ]
33}
PATCH /api/v1/teams/:obfuscated_team_id/outbound_retention
Set outbound_retention_days to one of the options. Any other value returns 422.
request.sh
1curl -sS -X PATCH \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 -H 'Content-Type: application/json' \
4 -d '{"team":{"outbound_retention_days":45}}' \
5 https://app.postshiba.com/api/v1/teams/KjkAJW/outbound_retention
response.json
1{
2 "retention_days": 45,
3 "options": [
4 {
5 "days": 0,
6 "price_per_1000_cents": 0
7 },
8 {
9 "days": 7,
10 "price_per_1000_cents": 13
11 },
12 {
13 "days": 28,
14 "price_per_1000_cents": 13
15 },
16 {
17 "days": 45,
18 "price_per_1000_cents": 0
19 },
20 {
21 "days": 90,
22 "price_per_1000_cents": 13
23 },
24 {
25 "days": 180,
26 "price_per_1000_cents": 26
27 },
28 {
29 "days": 365,
30 "price_per_1000_cents": 52
31 }
32 ]
33}