Sign in to fill these examples with your own keys. Sign in Start free trial

Outbound messages

Stored copies of messages PostShiba composed, with the raw .eml.

Copies of messages PostShiba composed for the token's team: POST /emails, POST /sends, and sends and template tests from the dashboard. Mail you relay over SMTP or HTTP inject is not kept. Copies are kept only while outbound retention is on, for the retention_days the team had when the message was sent. expires_at is when the copy is deleted. Only a key created by a Team Administrator can read them. Other keys get 404.

GET /api/v1/teams/:obfuscated_team_id/outbound_messages

List stored outbound messages, newest first. The list omits text, html, and attachments.

  • q: Optional. Matches message_id, subject, from, or to.
  • before: Optional. Public id of the last message on the previous page.
  • limit: Optional. Page size. Default 100. Max 200.
request.sh
1curl -sS -X GET \ 2 -H 'Authorization: Bearer YOUR_API_KEY' \ 3 https://app.postshiba.com/api/v1/teams/KjkAJW/outbound_messages
response.json
1[ 2 { 3 "id": "OuTbMs", 4 "message_id": "<abc123@mail.example.com>", 5 "from": "hello@mail.example.com", 6 "to": [ 7 "you@example.com" 8 ], 9 "cc": [], 10 "bcc": [], 11 "subject": "Your receipt", 12 "source": "api", 13 "sandbox": false, 14 "bytesize": 24310, 15 "retention_days": 45, 16 "cluster_id": "NmQpXr", 17 "tenant_id": "WbLcFd", 18 "created_at": "2026-08-29T00:00:00.000Z", 19 "expires_at": "2026-10-13T00:00:00.000Z" 20 } 21]

GET /api/v1/outbound_messages/:id

Get one stored outbound message with its text and html parts and attachment metadata. text, html, and attachments are empty when the stored copy can't be read.

  • id: Public outbound message id
request.sh
1curl -sS -X GET \ 2 -H 'Authorization: Bearer YOUR_API_KEY' \ 3 https://app.postshiba.com/api/v1/outbound_messages/:outbound_message_id
response.json
1{ 2 "id": "OuTbMs", 3 "message_id": "<abc123@mail.example.com>", 4 "from": "hello@mail.example.com", 5 "to": [ 6 "you@example.com" 7 ], 8 "cc": [], 9 "bcc": [], 10 "subject": "Your receipt", 11 "source": "api", 12 "sandbox": false, 13 "bytesize": 24310, 14 "retention_days": 45, 15 "cluster_id": "NmQpXr", 16 "tenant_id": "WbLcFd", 17 "created_at": "2026-08-29T00:00:00.000Z", 18 "expires_at": "2026-10-13T00:00:00.000Z", 19 "text": "Hi", 20 "html": "<p>Hi</p>", 21 "attachments": [ 22 { 23 "filename": "invoice.pdf", 24 "content_type": "application/pdf", 25 "size": 18204 26 } 27 ] 28}

GET /api/v1/outbound_messages/:id/raw

Download the stored message as a .eml file (message/rfc822). Returns 410 when the stored copy can't be read.

  • id: Public outbound message id
request.sh
1curl -sS -X GET \ 2 -H 'Authorization: Bearer YOUR_API_KEY' \ 3 https://app.postshiba.com/api/v1/outbound_messages/:outbound_message_id/raw

GET /api/v1/outbound_messages/:id/attachments/:index

Download one attachment as the decoded file. Index is 1-based and matches the attachments array on show. Returns 410 when the stored copy can't be read.

  • id: Public outbound message id
  • index: 1-based attachment position from the message attachments array
request.sh
1curl -sS -X GET \ 2 -H 'Authorization: Bearer YOUR_API_KEY' \ 3 https://app.postshiba.com/api/v1/outbound_messages/:outbound_message_id/attachments/:index