> For the complete documentation index, see [llms.txt](https://doc1.antgst.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc1.antgst.com/ant-api/rcs.md).

# RCS

## Get Company Templates

> Retrieves a list of rich message templates for the company.

```json
{"openapi":"3.0.3","info":{"title":"RCS Rich Message API","version":"1.0.0"},"servers":[{"url":"https://api.antgst.com"}],"paths":{"/rcs/richMessageTemplate":{"get":{"summary":"Get Company Templates","description":"Retrieves a list of rich message templates for the company.","operationId":"getRichMessageTemplate","tags":["Templates"],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Company API key"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplatesResponse"}}}}}}}},"components":{"schemas":{"GetTemplatesResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Return code, 200 on success; negative values see error code table."},"msg":{"type":"string","description":"Return message"},"result":{"type":"array","description":"Template list","items":{"$ref":"#/components/schemas/Template"}}}},"Template":{"type":"object","properties":{"templateId":{"type":"string","description":"Template ID"},"senderId":{"type":"string","description":"Sender ID"},"category":{"type":"string","description":"Category","enum":["MARKETING","AUTHENTICATION","UTILITY"]},"messageType":{"type":"string","description":"Message type","enum":["TEXT","CARD","CAROUSEL"]},"contentData":{"type":"object","description":"Template core JSON"},"buttonData":{"type":"array","description":"Buttons"},"status":{"type":"string","description":"Status","enum":["PENDING","APPROVED","REJECTED","EXPIRED"]},"rejectReason":{"type":"object","description":"Rejection reason"}}}}}}
```

## Send RCS

> Sends an RCS message using a specified template.

```json
{"openapi":"3.0.3","info":{"title":"RCS Rich Message API","version":"1.0.0"},"servers":[{"url":"https://api.antgst.com"}],"paths":{"/rcs/txt/send/json":{"post":{"summary":"Send RCS","description":"Sends an RCS message using a specified template.","operationId":"send_rcs_v1","tags":["Messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRcsRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRcsResponse"}}}}}}}},"components":{"schemas":{"SendRcsRequest":{"type":"object","properties":{"authSecret":{"type":"string","description":"Company API key"},"from":{"type":"string","description":"Sender ID"},"numbers":{"type":"array","description":"Recipient number list (digits only, must start with the account country code, length ≤ 20)","items":{"type":"string"}},"templateId":{"type":"string","description":"Template ID"},"params":{"type":"array","description":"Template variables","items":{"$ref":"#/components/schemas/TemplateParam"}}},"required":["authSecret","numbers","templateId"]},"TemplateParam":{"type":"object","properties":{"name":{"type":"string","description":"Parameter name; must exactly match the content inside the template {{...}} placeholder"},"value":{"type":"string","description":"Parameter value"}},"required":["name","value"]},"SendRcsResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Return code, 200 on success (including partial failures); negative values see error code table"},"msg":{"type":"string","description":"Return message"},"result":{"type":"array","description":"Per-number send result list","items":{"$ref":"#/components/schemas/SendResult"}}}},"SendResult":{"type":"object","properties":{"number":{"type":"string","description":"Recipient number"},"smsId":{"type":"string","description":"Message ID"},"code":{"type":"integer","description":"Per-number result: 200 success / -1 failure"},"result":{"type":"string","description":"Result description: 'success' or error reason"}}}}}}
```

## The GetTemplatesResponse object

```json
{"openapi":"3.0.3","info":{"title":"RCS Rich Message API","version":"1.0.0"},"components":{"schemas":{"GetTemplatesResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Return code, 200 on success; negative values see error code table."},"msg":{"type":"string","description":"Return message"},"result":{"type":"array","description":"Template list","items":{"$ref":"#/components/schemas/Template"}}}},"Template":{"type":"object","properties":{"templateId":{"type":"string","description":"Template ID"},"senderId":{"type":"string","description":"Sender ID"},"category":{"type":"string","description":"Category","enum":["MARKETING","AUTHENTICATION","UTILITY"]},"messageType":{"type":"string","description":"Message type","enum":["TEXT","CARD","CAROUSEL"]},"contentData":{"type":"object","description":"Template core JSON"},"buttonData":{"type":"array","description":"Buttons"},"status":{"type":"string","description":"Status","enum":["PENDING","APPROVED","REJECTED","EXPIRED"]},"rejectReason":{"type":"object","description":"Rejection reason"}}}}}}
```

## The SendRcsRequest object

```json
{"openapi":"3.0.3","info":{"title":"RCS Rich Message API","version":"1.0.0"},"components":{"schemas":{"SendRcsRequest":{"type":"object","properties":{"authSecret":{"type":"string","description":"Company API key"},"from":{"type":"string","description":"Sender ID"},"numbers":{"type":"array","description":"Recipient number list (digits only, must start with the account country code, length ≤ 20)","items":{"type":"string"}},"templateId":{"type":"string","description":"Template ID"},"params":{"type":"array","description":"Template variables","items":{"$ref":"#/components/schemas/TemplateParam"}}},"required":["authSecret","numbers","templateId"]},"TemplateParam":{"type":"object","properties":{"name":{"type":"string","description":"Parameter name; must exactly match the content inside the template {{...}} placeholder"},"value":{"type":"string","description":"Parameter value"}},"required":["name","value"]}}}}
```

## The SendRcsResponse object

```json
{"openapi":"3.0.3","info":{"title":"RCS Rich Message API","version":"1.0.0"},"components":{"schemas":{"SendRcsResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Return code, 200 on success (including partial failures); negative values see error code table"},"msg":{"type":"string","description":"Return message"},"result":{"type":"array","description":"Per-number send result list","items":{"$ref":"#/components/schemas/SendResult"}}}},"SendResult":{"type":"object","properties":{"number":{"type":"string","description":"Recipient number"},"smsId":{"type":"string","description":"Message ID"},"code":{"type":"integer","description":"Per-number result: 200 success / -1 failure"},"result":{"type":"string","description":"Result description: 'success' or error reason"}}}}}}
```

## The ErrorCodes object

```json
{"openapi":"3.0.3","info":{"title":"RCS Rich Message API","version":"1.0.0"},"components":{"schemas":{"ErrorCodes":{"type":"object","description":"List of possible error codes","properties":{"200":{"type":"string","description":"Success"},"500":{"type":"string","description":"service error!"},"-20":{"type":"string","description":"Params can't be empty!"},"-21":{"type":"string","description":"JSON format error!"},"-22":{"type":"string","description":"Auth failed"},"-24":{"type":"string","description":"Unsupported country code"},"-25":{"type":"string","description":"Params Too long!"},"-26":{"type":"string","description":"Phone number error!"},"-27":{"type":"string","description":"Params error!"},"-29":{"type":"string","description":"IP whitelist error"},"-30":{"type":"string","description":"Your account balance is insufficient!"},"-33":{"type":"string","description":"Params type error!"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://doc1.antgst.com/ant-api/rcs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
