# Communication

## Ping

<mark style="color:blue;">`GET`</mark> `https://api-<region>.renda.io/communication/ping`

Heartbeat Check

#### Headers

| Name      | Type   | Description   |
| --------- | ------ | ------------- |
| x-api-key | string | Renda API Key |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
[
    {
        "type": "Success",
        "message": "Renda.io ping successful"
    }
]
```

{% endtab %}

{% tab title="403 Could not find a cake matching this query." %}

```
{
    "message": "Unsupported API request. Please refer to Renda 
    documentation for more details documentation.renda.io"
}
```

{% endtab %}
{% endtabs %}

## Send SMS

<mark style="color:green;">`POST`</mark> `https://api-<region>.renda.io/communication/sendSMS`

#### Headers

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| x-api-key | string |             |

#### Request Body

| Name       | Type   | Description                                                                                                                          |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| number     | string | <p>Valid Mobile number <br><br>+441234567890<br>00441234567890<br><br>\<country code> + \<mobile number></p>                         |
| message    | string | SMS Text                                                                                                                             |
| senderName | string | <p>Sender Name<br><br>3-11 chars if alphanumeric <br>3-15 chars if numeric <br>Spaces and special characters are not allowed<br></p> |

{% tabs %}
{% tab title="200 " %}

```
{
    "messageid": "612733016353393435",
    "status": "SENT"
}
```

{% endtab %}

{% tab title="400 " %}

```
//When invalid mobile number and message is provided
[
    {
        "type": "Error",
        "message": "Invalid mobile number"
    },
    {
        "type": "Error",
        "message": "Invalid message content"
    }
]


//When Invalid destination number is provided
{
    "status": "error",
    "errorCode": 4004,
    "message": "Invalid destination number.",
    "permanent": true
}
```

{% endtab %}

{% tab title="403 " %}

```
{
    "message": "Unsupported API request. Please refer to Renda 
    documentation for more details https://documentation.renda.io"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.renda.io/microservices/communication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
