Hey there
{{name || 'API enthusiast'}}!

This talk is interactive. To play along, we just need your name!

When it's time, this page will refresh and you can play with it!

Introduction

Getting Started

Welcome to the Messages API. This platform allows you to send and retrieve messages via a RESTful API structure, providing a robust and scalable solution for your messaging needs.

API Purpose

The key purpose of this API is to enable sending messages and retrieving them. With an emphasis on reliability and scalability, this API is designed to seamlessly handle your messaging requirements, whether for a small number of messages or at large scale.

Authentication

Before interacting with the API, you need to authenticate via an API key, which is used synonymous to a password, with the username being blank. This key is encoded as an Authorization bearer token in your requests.

REST Architecture

Our API adheres to a RESTful architectural style, which utilizes standard HTTP methods:

  • GET: Retrieves messages
  • POST: Sends a new message
  • PUT: Updates an existing message
  • DELETE: Deletes a message

Each of these methods must be used appropriately as per the requirement.

API Service URLs

Differentiate between a real environment and a sandbox via different URLs:

The Sandbox environment is ideal for development and testing purposes as it resembles the actual environment but doesn't affect your live data.

Message API

The messaging API endpoints allow you to interact with the messages in various ways. You can post new messages, fetch existing messages, update the content of an existing message, or remove a message if it's no longer needed.

Content-Type Requirement

For every request, you must include a Content-Type header with the value application/json. This indicates that the request body contains a JSON object.

Content-Type: application/json

Support

If you encounter any problems, have any questions, or need further clarification with our API, please don't hesitate to reach out to our support team at support@test.com. We're here to assist and make your experience as smooth as possible.

Conclusion

With Test API, you have the power of a robust and reliable messaging API service at your disposal. We're keen to see how you can better your applications, services, and workflows by leveraging our services. Get started and Happy coding!

Introduction

Authentication

To ensure a secure interaction with our services, your applications need to authenticate with our API. This document provides detailed instructions on how to authenticate your requests.

Obtaining the API Key

Your unique API key is available directly from your dashboard. Navigate to the dashboard then proceed to the 'API Keys' section to locate it. The API key is designed to facilitate your access to our API services, and each key is associated with your account details, usage, and any corresponding APIs you have created.

Using Sandbox API Key

If you wish to test the services using the Sandbox environment, a test API (Sandbox API Key) must be used. This means there are not any actions executed against your live data, meaning it's safe for you to develop and test new features in this environment.

API Key

Here is an example of what your API key might look like:

acme_34e12d3efbd4341def234fc3b77f625e

Please note that this is a fake API key and it's generated for illustration purposes only. Your actual API key may look different but should follow a similar pattern/structure.

Using the API Key for Authentication

It's crucial to understand how to use your obtained API Key correctly to authenticate requests. The API key should be used as the password for Basic Authentication wherein the username field should be left blank.

The credentials (an empty string as the username and your API Key as the password) must be base64 encoded and further be included in each API request. The encoded result is used in the 'Authorization' header with the 'Basic' authentication scheme.

Here's an example of how to generate the required 'Authorization' header in Python:

import base64

api_key = 'your-api-key'
credential = ":" + api_key
encoded_credential = base64.b64encode(credential.encode('utf-8')).decode('utf-8')
auth_header = f'Basic {encoded_credential}'
print(auth_header)

Use the auth_header variable in your API application to authenticate your requests.

Please ensure you store and handle your keys securely. Do not expose them in any public client-side code, repositories or in any other places where unauthorized entities might access them.

For more information or help, please refer to our complete API documentation or reach out to our support team. Happy Coding!

Messages

Message Object

Overview

The Message Object is a core element of the API, used commonly in both requests and responses. It facilitates the communication and exchange of information between systems in a structured way.

Object Structure

The Message object includes two parameters, messages and type.

Key: messages

The messages parameter is an array of data objects. Each object within the array contains details related to a particular message. The structure of each message object can differ based on requirements, however currently the parameters should be 'message' and 'sender'.

The message is the message you want to send, and the sender is your name.

Key: type

The type parameter is a string that specifies whether the Message object is part of a request or a response. It only accepts two values: 'request' or 'response'. This parameter is used to distinguish if the message object is being sent to the server or received from the server.

Example of type Parameter:

"type": "<insert type>"

Usage

When constructing requests, the Message object must be structured accurately and must adhere to the above mentioned specifications. Similarly, when handling responses, understanding the structure of the Message object is crucial for successful data extraction and manipulation.

Please note that a well structured Message object is pivotal in ensuring successful and error-free API interactions.

Messages

Get conversation

GET/message/{id}

The "Messages" API is designed to facilitate the seamless integration of communication functionalities into any software application. It allows developers to send, receive, and manage short message service (SMS), multimedia messaging service (MMS), and in-app chat messages, enhancing the user engagement level. The API provides a comprehensive set of endpoints for different messaging needs, including group messaging, scheduled messages, auto-reply, and retrieval of interaction history. The high level of customization and advanced features make the "Messages" API a flexible choice for businesses looking to provide smooth and reliable communication experiences.

Messages

Create conversation

POST/message

The "Messages" API is designed to facilitate the seamless integration of communication functionalities into any software application. It allows developers to send, receive, and manage short message service (SMS), multimedia messaging service (MMS), and in-app chat messages, enhancing the user engagement level. The API provides a comprehensive set of endpoints for different messaging needs, including group messaging, scheduled messages, auto-reply, and retrieval of interaction history. The high level of customization and advanced features make the "Messages" API a flexible choice for businesses looking to provide smooth and reliable communication experiences.

Body Params

messages array required
The messages you want to send to the API
message string required
The messages you want to send to the API
sender string required
The person sending the message
type string required
Include the type of message you're sending