---
title: "Generate RCS Link"
method: POST
path: "/rcs/link"
tags: ["rcs"]
---

# Generate RCS Link

`POST /rcs/link`

## Request

- Base URL: `https://api.pinnacle.sh`
- URL: `https://api.pinnacle.sh/rcs/link`
- Auth: API key in header `PINNACLE-API-KEY`

Generate a link for initiating an RCS conversation with your agent.

Users can click these links to start conversations with your RCS agent directly
from websites, emails, or other applications.

## Request body

- RcsLinkRequest: Request body for generating an RCS link
  - `agentId` string, required: The RCS agent ID (must be prefixed with 'agent_')
  - `phoneNumber` string: Fallback phone number (E.164 format) to use if the phone number does not support RCS. If not provided, no url will be generated.
  - `body` string: Optional message body to pre-fill after the user clicks the link

## Response `200`

Response containing the generated RCS service id and/or url.

You can always create a link with the service id that is returned using the format:
```
sms://{PHONE_NUMBER}?service_id={SERVICE_ID}&body={URL_ENCODED_BODY}
```

- RcsLinkResult: Response containing the generated RCS service id and/or url. You can always create a link with the service id that is returned. To create a link follow the format: sms://{PHONE_NUMBER}?service_id={SERVICE_ID}&body={URL_ENCODED_BODY}
  - `url` string, uri: The generated RCS link URL. If no phone number is provided, no url will be generated.
  - `serviceId` string, required: The service ID used for the link

## Other responses

- `400`: Validation failed. The payload has missing required fields and/or invalid types. <br> See https://zod.dev/error-formatting for more information.
- `401`: The request lacks valid authentication credentials or the provided credentials are invalid. <br> Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.
- `403`: Your subscription does not include access to this feature. <br> This occurs when attempting to use functionality that requires a higher subscription tier. Please upgrade your subscription to access this feature.
- `404`: The requested resource could not be found. <br> This may occur if the identifier is incorrect, the resource has been deleted, or you don't have permission to access it.
- `500`: An unexpected error occurred on Pinnacle's servers while processing your request. <br> If this error persists, please contact support with the request details.
- `501`: The requested functionality is not implemented on the server. <br> This typically indicates that the feature or endpoint you attempted to access is unavailable or not yet supported.

---

[API](https://skmtc.dev/pinnacle/apis/pinnacle-2.md) - [All operations](https://skmtc.dev/pinnacle/apis/pinnacle-2/llms.txt) - [OpenAPI document](https://skmtc.dev/pinnacle/apis/pinnacle-2/revisions/45416dadab79?raw)
