For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
        • Conference Logs
        • Fax Logs
        • Message Logs
          • get
          • list
        • Voice Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Response Example
  • Example
REST ClientLogsMessage Logs

get

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

list

Next
Built with

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.
error_messagestring or nullRequired
Description of the error when the message failed. Null when the message did not fail. LaML messages use the codes documented at https://signalwire.com/docs/compatibility-api/rest/error-codes.
error_codestring or nullRequired
Error code identifying why the message failed. Null when the message did not fail. Some Relay messages may have an `error_message` without an `error_code` — the `error_code` is a newer pattern that is not used in all Relay areas.

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 "error_message": "From number is not a SMS-capable phone number.",
21 "error_code": "21601"
22}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const msg = await client.logs.messages.get("message-log-id");
10console.log(msg.from, "->", msg.to);