# RCS

{% hint style="info" %}
To enable this feature, please [contact the technical team](https://www.smspartner.fr/contact/)
{% endhint %}

## URL

<mark style="color:green;">`POST`</mark> `https://api.smspartner.fr/v1/rcs/send`

{% hint style="warning" %}
The platform does not send commercial SMS messages between **8 PM and 8 AM on weekdays and on Sundays and public holidays** (legal restriction). If a commercial SMS is sent, the message is **paused until the next working day at 8 AM**.\
Not sending commercial SMS messages? Contact us to disable this restriction: <help@smspartner.fr>
{% endhint %}

#### **Required Parameters**

| Name           | Value                                                                                                                                                                                                                                                                                                                                                   |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apiKey`       | [Your API key](https://my.smspartner.fr/dashboard/api)                                                                                                                                                                                                                                                                                                  |
| `phoneNumbers` | <p>Recipient phone numbers.<br>To send multiple messages, separate the numbers with commas. <strong>Maximum of 500 numbers per request.</strong><br>They can be:</p><ul><li>in national format (06xxxxxxxx) or international format (+336xxxxxxxx) for French numbers.</li><li>in international format (+496xxxxxxxx) for non-French numbers.</li></ul> |
| `isUnicode`    | 1                                                                                                                                                                                                                                                                                                                                                       |
| `richContent`  | [See below](#contenu-enrich)                                                                                                                                                                                                                                                                                                                            |

#### **Optional Parameters**

| Name                    | Value                                                                                           |
| ----------------------- | ----------------------------------------------------------------------------------------------- |
| `scheduledDeliveryDate` | Scheduled send date in `dd/mm/YYYY` format. Set this only if you want the SMS to be sent later. |
| `time`                  | Send time (0–24 format), required if `scheduledDeliveryDate` is set.                            |
| `minute`                | Send minute (0–55, in five-minute intervals), required if `scheduledDeliveryDate` is set.       |

#### Rich Content

{% tabs %}
{% tab title="Send a text" %}

```json
{
    "apiKey": "",
    "isUnicode": 1,
    "phoneNumbers": [
        "+33....."
    ],
    "richContent": {
        "conversation": {
            "text": "",
            "suggestions": [
                // See the suggestions section (maximum 4)
            ]
        }
    },
    
    "failover": {
        "sender": "cyril",
        "message": "this is a fallback SMS",
        "isStopSms": 1,
        "isUnicode": 1
    }
}
```

{% endtab %}

{% tab title="Send a file" %}

```json
{
   "apiKey": "",
   "phoneNumbers": [
       ""
   ],
   "isUnicode": 1,
   "richContent": {
       "conversation": {
           "file": {
                "media": {
                   "fileUrl": ""
               }
           },
           "suggestions": [
               // See the suggestions section (maximum 4)
           ]
       }
   },
   "failover": {
       "sender": "cyril",
       "message": "this is a fallback SMS",
       "isStopSms": 1,
       "isUnicode": 1
   }
}
```

{% endtab %}

{% tab title="Send a rich card" %}

```json
{
   "apiKey": "",
   "phoneNumbers": [
       ""
   ],
   "isUnicode": 1,
   "richContent": {
       "conversation": {
           "richCard": {
               "orientation": "VERTICAL", //VERTICAL or HORIZONTAL
               "thumbnailImageAlignment": "LEFT", //Only if orientation == HORIZONTAL
               "title": "", //Max 200 characters
               "description": "", //Max 500 characters
               "media": {
                   "height": "MEDIUM", //Only if orientation == VERTICAL
                   "mediaUrl": ""
               },
               "suggestions": [
                   // See the suggestions section (max 4)
               ]
           },
           "suggestions": [
               // Global suggestions (max 8)
           ]
       }
   },

   "failover": {
       "sender": "cyril",
       "message": "This is a fallback SMS",
       "isStopSms": 1,
       "isUnicode": 1
   }
}
```

{% endtab %}

{% tab title="Send a carousel" %}

```json
{
   "apiKey": "",
   "phoneNumbers": [
       ""
   ],
   "isUnicode": 1,
   "richContent": {
       "conversation": {
           "carousel": {
               "cardWidth": "MEDIUM", //OR SMALL

               "cards": [
                   {
                       "title": "", //Max 200 characters
                       "description": "", //Max 500 characters
                       "media": {
                           "height": "MEDIUM",
                           "mediaUrl": ""
                       },
                       "suggestions": [
                            // Max 4 suggestions
                       ]
                   },
                   {
                       "title": "",
                       "description": "",
                       "media": {
                           "height": "MEDIUM",
                           "mediaUrl": ""
                       },
                       "suggestions": []
                   }
               ]
           },
           "suggestions": [
               // Global suggestions (max 8)
           ]
       }
   },

   "failover": {
       "sender": "cyril",
       "message": "this is a fallback SMS",
       "isStopSms": 1,
       "isUnicode": 1
   }
}
```

{% endtab %}
{% endtabs %}

#### Suggestions

{% tabs %}
{% tab title="Réponse" %}

```json
{
    "reply": {
        "text": "Réponse 2",
        "postbackData": "postback_data_1234" //Valeur qui sera envoyée en réponse à une suggestion.
    }
}
```

{% endtab %}

{% tab title="Action :  Open a URL" %}

```json
{
    "action": {
        "text": "Open SMSPartner",
        "postbackData": "postback_data_1",
        "openUrlAction": {
            "url": "https://www.smspartner.fr"
        }
    }
}
```

{% endtab %}

{% tab title="Action :  Appeler" %}

```json
{
    "action": {
       "text": "Call SMSPartner",
       "postbackData": "postback_data_2",
       "dialAction": {
           "phoneNumber": "+33......."
       }
    }
}
```

{% endtab %}

{% tab title="Action : Location" %}

```json
{
    "action": {
        "text": "Location",
        "postbackData": "postback_data_3",
        "viewLocationAction": {
           "label": "Here !!!",
           "latLong": {
                 "latitude": 2.4220188,
                 "longitude": -122.0844786
            }
        }
    }
}
```

{% endtab %}

{% tab title="Action : Calendar" %}

```json
{
    "action": {
        "text": "Our appointment",
        "postbackData": "postback_data_4",
        "createCalendarEventAction": {
            "startTime": "2020-06-30 19:00:00",
            "endTime": "2020-06-30 19:30:00",
            "title": "Meeting",
            "description": "Meeting description"
        }
    }
}
```

{% endtab %}
{% endtabs %}

#### **Response**

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

```json
{
   "success":true,
   "code":200,
   "message_id":1,
   "nb_rcs": 1,
   "cost": 0.12,
   "currency": "EUR"
}
```

{% endtab %}
{% endtabs %}

#### **Supported Media File Types**

RBM supports the following media types:

| Content Type    | Document Type     | Extension   | Compatible with Rich Cards |
| --------------- | ----------------- | ----------- | -------------------------- |
| application/ogg | Audio OGG         | .ogx        | No                         |
| application/pdf | PDF               | .pdf        | No                         |
| audio/aac       | Audio AAC         | .aac        | No                         |
| audio/mp3       | MP3 Audio Format  | .mp3        | No                         |
| audio/mpeg      | Audio MPEG        | .mpeg       | No                         |
| audio/mpg       | Audio MPG         | .mp3        | No                         |
| audio/mp4       | Audio MP4         | .mp4        | No                         |
| audio/mp4-latm  | Audio MP4-latm    | .mp4        | No                         |
| audio/3gpp      | Audio 3GPP        | .3gp        | No                         |
| image/jpeg      | JPEG              | .jpeg, .jpg | Yes                        |
| image/gif       | GIF               | .gif        | Yes                        |
| image/png       | PNG               | .png        | Yes                        |
| video/h263      | H263 Video        | .h263       | Yes                        |
| video/m4v       | M4V Video         | .m4v        | Yes                        |
| video/mp4       | MP4 Video         | .mp4        | Yes                        |
| video/mpeg4     | MPEG-4 Video      | .mp4, .m4p  | Yes                        |
| video/mpeg      | MPEG Video        | .mpeg       | Yes                        |
| video/webm      | WebM Video Format | .webm       | Yes                        |


---

# 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://www.docpartner.dev/en/api/sms-partner/rcs.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.
