> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.repliers.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How To Send Your First Message Using Repliers

This guide will walk you through the process of sending your first message with Repliers, from account setup to message delivery.

## Prerequisites

Before sending messages, ensure that:

* Your account is configured for messaging
* You've subscribed to a plan that includes messaging functionality

For detailed instructions on setting up messaging, refer to our [Integrated Email Messaging Setup Guide](https://help.repliers.com/en/article/setting-up-integrated-email-messaging-with-repliers-hetmyh/).

## Step 1: Create an Agent

Messages in Repliers are exchanged between agents and clients. You'll need to create at least one agent before you can send messages.

Here's a sample API request to create an agent:

```
curl --request POST \
     --url https://api.repliers.io/agents \
     --header 'accept: application/json' \
     --header 'REPLIERS-API-KEY: your-repliers-api-key' \
     --header 'content-type: application/json' \
     --data '
{
  "status": true,
  "fname": "John",
  "lname": "Smith",
  "phone": "12221113333",
  "email": "johnsmith@realestategroup.com",
  "brokerage": "ABC Brokerage",
  "designation": "Sale Representative"
}
'
```

After creating the agent, note the `agentId` in the response as you'll need it for subsequent steps.

## Step 2: Create a Client

Next, create a client and assign them to the agent you created:

```
curl --request POST \
     --url https://api.repliers.io/clients \
     --header 'accept: application/json' \
     --header 'REPLIERS-API-KEY: your-repliers-api-key' \
     --header 'content-type: application/json' \
     --data '
{
  "status": true,
  "preferences": {
    "email": true,
    "sms": true,
    "unsubscribe": false
  },
  "agentId": 12345,  # Replace with your actual agentId
  "fname": "James",
  "lname": "Davidson",
  "phone": "13332224444",
  "email": "jamesd@email.com"
}
'
```

Make sure to replace `12345` with the actual `agentId` from the previous step. Note the `clientId` from the response.

For more information about the relationship between agents and clients, see our [Agents and Clients in Repliers](https://help.repliers.com/en/article/agents-and-clients-in-repliers-1cl1bav/) article.

## Step 3: Send a Message

Now you're ready to send your first message! Messages can be sent from either an agent to a client or from a client to an agent. The `sender` field determines who is sending the message.

To send a message from an agent to a client:

```
curl --request POST \
     --url https://api.repliers.io/messages \
     --header 'accept: application/json' \
     --header 'REPLIERS-API-KEY: your-repliers-api-key' \
     --header 'content-type: application/json' \
     --data '
{
  "content": {
    "message": "This is a test message"
  },
  "sender": "agent",
  "agentId": 12345,  # Replace with your actual agentId
  "clientId": 54321  # Replace with your actual clientId
}
'
```

Make sure to replace the `agentId` and `clientId` with the actual IDs obtained from the previous steps.

## Verifying Message Delivery

After sending the message, it should appear in the client's inbox. If the message doesn't appear:

1. Check the spam folder in the client's email
2. Verify that your account is properly configured for messaging
3. Contact Repliers support if you continue to experience issues

## Next Steps

Now that you've sent your first message, you can:

* Set up automated messaging workflows
* Create message templates
* Configure notification preferences
* Explore advanced messaging features

# What questions does this article answer?

* What prerequisites are required before I can send messages (plan, configuration)?  
* How do I create an agent and a client to use with messaging?  
* What API calls do I use to send a first test message?  
* How do I confirm that messages were delivered successfully?  