Skip to content

Commit 0b48538

Browse files
updated get message api (#75)
* updated get message api * Apply suggestions from code review --------- Co-authored-by: Will Power <[email protected]>
1 parent 2a0e49e commit 0b48538

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

content/4.developer/1.api.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,28 @@ For both these methods, the API will return the same information as the result.
5252
}
5353
}
5454
```
55+
56+
## GET Message
57+
58+
To retrieve a message and its contents, use the `GET` method with the `id` (received when sending the message) and `_expansions` parameters (if you need more information than the basics) for the message from Postal. For more details, refer to the [Postal API documentation](https://postalserver.github.io/postal-api/controllers/messages/message.html).
59+
60+
```json
61+
{
62+
"id": 14,
63+
"_expansions": true
64+
}
65+
```
66+
67+
### Example cURL Request
68+
69+
You can use the following cURL command to make the request:
70+
71+
```bash
72+
curl --location 'https://<your.postal.domain.com>/api/v1/messages/message' \
73+
--header 'X-Server-API-Key: $yourAPIKeyFromTheCredentialsPage' \
74+
--header 'Content-Type: application/json' \
75+
--data '{
76+
"id": 14,
77+
"_expansions": true
78+
}'
79+
```

0 commit comments

Comments
 (0)