Messages

This endpoint is used to retrieve message records from CallScaler. It supports the GET method to fetch all records linked to a specific message. To obtain your message records, include your CallScaler email in the request. Utilizing this endpoint allows you to access detailed message data, facilitating effective tracking and analysis of message interactions.

The message model

The messaging model encompasses comprehensive data on the messages and attachments you send to your contacts and groups. This includes information on how your contacts have interacted with these messages, such as reactions and responses.

Properties

  • Name
    uuid
    Type
    string
    Description

    Unique identifier for the message.

  • Name
    message_sid
    Type
    string
    Description

    Message serial identifier.

  • Name
    message_from_number
    Type
    object
    Description

    The number which we do message from.

  • Name
    message_to_number
    Type
    number
    Description

    The CallScaler number.

  • Name
    message
    Type
    string
    Description

    The message content.

  • Name
    message_direction
    Type
    string
    Description

    The direction of the message.

  • Name
    message_status
    Type
    array
    Description

    The message is send or not.

  • Name
    message_price
    Type
    array
    Description

    The message for the message.

  • Name
    message_created_at
    Type
    timestamp
    Description

    Timestamp of when the message was created.

  • Name
    message_updated_at
    Type
    timestamp
    Description

    Timestamp of when the message was last updated.


GET/v2/messages

List all messages

This endpoint allows you to retrieve a paginated list of all your messages (in a conversation if a conversation id is provided). By default, a maximum of ten messages are shown per page.

Optional attributes

  • Name
    limit
    Type
    integer
    Description

    Limit the number of messages returned.

Request

GET
/v2/message
curl --location 'https://v2.callscaler.com/api/all/messages'
--header 'Authorization: Bearer {bearer_token}'

Response

{
   "messages": [
        {
           "uuid": 1,
           "message_sid": "123asd-as12-1234-a234-asdasd23213",
           "message_from_number": "+12345678910",
           "message_to_number": "+12345678910",
           "message": "CallScaler is best",
           "message_direction": "inbound",
           "message_status": "send",
           "message_price": 0.02,
           "message_created_at": "2024-07-31 16:56:16",
           "message_updated_at": "2024-07-31 16:56:16"
        },
        {
           "uuid": 2,
           "message_sid": "123asd-as12-1234-a234-asdasd23213",
           "message_from_number": "+12345678910",
           "message_to_number": "+12345678910",
           "message": "Ok I am purchasing it's subscription.",
           "message_direction": "inbound",
           "message_status": "received",
           "message_price": 0.02,
           "message_created_at": "2024-07-26 21:11:28",
           "message_updated_at": "2024-07-26 21:11:28"
        },
    ]
}

Was this page helpful?