REST ClientLogsMessage Logs

get

View as MarkdownOpen in Claude

Retrieve a specific message log entry.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the log.

Response

idstringRequiredformat: "uuid"
A unique identifier for the log.
fromstringRequired
The origin phone number.
tostringRequired
The destination phone number.
statusenumRequired
The status of the message.
directionenumRequired
The direction of the message.
Allowed values:
kindenumRequired
The kind of message.
Allowed values:
sourceenumRequired
Source of this log entry.
Allowed values:
typeenumRequired
Type of this log entry.
Allowed values:
urlstring or nullRequiredformat: "uri"
URL for the resource associated with this log entry. Null for Relay messages.
number_of_segmentsintegerRequired
The number of segments.
chargedoubleRequired
The charge in dollars.
charge_detailslist of objectsRequired
Details on charges associated with this log.
created_atdatetimeRequired
Date and time when the message entry was created.

Response Example

Response
1{
2 "id": "string",
3 "from": "+12077447397",
4 "to": "+12029921413",
5 "status": "failed",
6 "direction": "inbound",
7 "kind": "sms",
8 "source": "laml",
9 "type": "relay_message",
10 "url": "https://example.signalwire.com/api/laml/2010-04-01/Accounts/c38dacad-2f6c-4de1-93d6-cc732e0c70c5/Messages/9ee38635-899a-490a-bfd1-9e72f5eea53c",
11 "number_of_segments": 1,
12 "charge": 0,
13 "charge_details": [
14 {
15 "description": "Inbound SMS",
16 "charge": 0.00415
17 }
18 ],
19 "created_at": "2024-05-06T12:20:00Z"
20}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9msg = client.logs.messages.get("message-log-id")
10print(msg.get("from"), "->", msg.get("to"))