AS2 Messages
Query and manage sent and received AS2 messages.
POST
/api/v1/messages
Get the list of recent AS2 messages. The current router mainly supports the limit parameter.
Request body (optional)
| Field | Type | Description |
|---|---|---|
| limit | integer | Result limit, default 50, maximum 500 |
Response fields
| Field | Description |
|---|---|
| id | Unique message ID |
| message_id | Business AS2 identifier exposed by the router for convenience |
| asunto | Message subject |
| entrante | True if received, False if sent |
| fecha | Creation date |
| mdn | MDN status or operational result |
| socio_nombre | Partner associated with the message |
Ejemplo Python
response = requests.post(
f"{BASE_URL}/messages",
headers=headers,
json={
"limit": 10
}
)
messages = response.json()["data"]
POST
/api/v1/messages/detail
Return basic details for a specific message.
| Field | Type | Required |
|---|---|---|
| id | integer | Yes |
Use the numeric message id returned by /messages. Do not send the business message_id value here.
{
"status": "success",
"data": {
"id": 261326,
"subject": "T38 API ECHO 20260501T045624",
"message_id": "as2experts.com_7c8c0793-b738-4195-b9e9-3e8a3a7b6bdc",
"partner_name": "AS2EXPERT ECHO STATION",
"station_name": "Free Station - Carlos"
}
}
POST
/api/v1/messages/download
Return the binary message content in base64. This endpoint does not return a parsed attachment list in the current contract.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Message ID |
Ejemplo Python
response = requests.post(
f"{BASE_URL}/messages/download",
headers=headers,
json={"id": 12345}
)
import base64
payload = response.json()["data"]
contenido = base64.b64decode(payload["content_b64"])
with open("message.raw", "wb") as f:
f.write(contenido)