> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.ada.cx/reference/conversations/create-sms-reply/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ada.cx/_mcp/server. # Accept the caller's SMS reply into a live voice conversation POST https://example.ada.support/api/v2/conversations/{conversation_id}/sms/ Content-Type: application/json Accept a text the caller sent during a live voice call over the AI Agent's own SMS channel. Send `author.role` as `end_user` with the caller's `author.id` from the webhook's `data.end_user_id`, and `content.type` as `text`. The reply becomes the caller's next turn and the AI Agent answers by voice on the call. Ada accepts a reply only on a live voice call it has already texted over your SMS channel, with **Use your own SMS channel** turned on. Reference: https://docs.ada.cx/reference/conversations/create-sms-reply ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `conversation_id` (string, required) — The ID of the conversation ### Body (application/json) This endpoint expects a MessageCreateRequest. - `author` (ConversationMessageAuthor, required) — Information about the message author - `content` (MessageCreateRequestContent, required) — The message content ## Response ### 201 Reply accepted into the live call. The response returns `content.body` as sent. - `id` (string, optional) — The ID of the message - `conversation_id` (string, optional) — The ID of the conversation - `author` (ConversationMessageAuthor, optional) — Information about the message author - `content` (MessageContent, optional) — The message content - `created_at` (string, optional) — The date and time the message was created - `updated_at` (string, optional) — The date and time the message was updated ## Errors ### 400 Bad Request Error Bad Request - `errors` (list of ErrorsErrorsItems, required) — A list of errors ### 401 Unauthorized Error Unauthorized - `errors` (list of ErrorsErrorsItems, required) — A list of errors ### 404 Not Found Error Not Found - `errors` (list of ErrorsErrorsItems, required) — A list of errors ### 422 Unprocessable Entity Error The conversation cannot accept an SMS reply. The message names the reason: the conversation is not a voice call, the AI Agent has no SMS channel, **Use your own SMS channel** is off, or the AI Agent has not texted on this conversation. - `errors` (list of ErrorsErrorsItems, required) — A list of errors ### 429 Too Many Requests Error Too Many Requests - `errors` (list of ErrorsErrorsItems, required) — A list of errors ### 500 Internal Server Error Internal Server Error - `errors` (list of ErrorsErrorsItems, required) — A list of errors ### 503 Service Unavailable Error A dependency was unavailable. Retry later. - `errors` (list of ErrorsErrorsItems, required) — A list of errors ## Types ### ConversationMessageAuthor Information about the message author - `role` (enum, required) — The author's role - Allowed values: `end_user`, `human_agent` - `id` (string, optional, nullable) — The ID of the user that will be participating in the conversation. Required when the role is `end_user`. - `avatar` (string, optional, nullable) — The URL of the author's avatar - `display_name` (string, optional, nullable) — The author's display name. Required when the role is `human_agent`. ### MessageCreateRequestContent The message content ### MessageContent The message content ### ErrorsErrorsItems - `type` (string, required) — The error type - `message` (string, required) — The error message - `details` (string, optional, nullable) — Extra information about the error ### TextContent The content of the text message - `type` (enum, required) — The type of the message - Allowed values: `text` - `body` (string, required) — The body of the message ### FileContent The content of a file message - `type` (enum, required) — The type of the message - Allowed values: `file` - `url` (string, required) — Presigned URL from the attachment upload endpoint (valid for 7 days) - `mime_type` (string, required) — MIME type of the file - `filename` (string, required) — Name of the file ## Examples **Request** ```json { "author": { "role": "end_user", "id": "5df263b7db5a7e6ea03fae9b" }, "content": { "type": "text", "body": "ABC123" } } ``` **Response** ```json { "id": "5df263b7db5a7e6ea03fae9b", "conversation_id": "5df263b7db5a7e6ea03fae9b", "author": { "role": "end_user", "id": "5df263b7db5a7e6ea03fae9b", "avatar": "https://www.gravatar.com", "display_name": "Ada Lovelace" }, "content": { "type": "text", "body": "Hello, how can I help you?" }, "created_at": "2020-09-20T00:00:00+00:00", "updated_at": "2020-09-20T00:00:00+00:00" } ``` **SDK Code** ```python import requests url = "https://example.ada.support/api/v2/conversations/conversation_id/sms/" payload = { "author": { "role": "end_user", "id": "5df263b7db5a7e6ea03fae9b" }, "content": { "type": "text", "body": "ABC123" } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://example.ada.support/api/v2/conversations/conversation_id/sms/'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"author":{"role":"end_user","id":"5df263b7db5a7e6ea03fae9b"},"content":{"type":"text","body":"ABC123"}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://example.ada.support/api/v2/conversations/conversation_id/sms/" payload := strings.NewReader("{\n \"author\": {\n \"role\": \"end_user\",\n \"id\": \"5df263b7db5a7e6ea03fae9b\"\n },\n \"content\": {\n \"type\": \"text\",\n \"body\": \"ABC123\"\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://example.ada.support/api/v2/conversations/conversation_id/sms/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"author\": {\n \"role\": \"end_user\",\n \"id\": \"5df263b7db5a7e6ea03fae9b\"\n },\n \"content\": {\n \"type\": \"text\",\n \"body\": \"ABC123\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://example.ada.support/api/v2/conversations/conversation_id/sms/") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"author\": {\n \"role\": \"end_user\",\n \"id\": \"5df263b7db5a7e6ea03fae9b\"\n },\n \"content\": {\n \"type\": \"text\",\n \"body\": \"ABC123\"\n }\n}") .asString(); ``` ```php request('POST', 'https://example.ada.support/api/v2/conversations/conversation_id/sms/', [ 'body' => '{ "author": { "role": "end_user", "id": "5df263b7db5a7e6ea03fae9b" }, "content": { "type": "text", "body": "ABC123" } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://example.ada.support/api/v2/conversations/conversation_id/sms/"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"author\": {\n \"role\": \"end_user\",\n \"id\": \"5df263b7db5a7e6ea03fae9b\"\n },\n \"content\": {\n \"type\": \"text\",\n \"body\": \"ABC123\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "author": [ "role": "end_user", "id": "5df263b7db5a7e6ea03fae9b" ], "content": [ "type": "text", "body": "ABC123" ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://example.ada.support/api/v2/conversations/conversation_id/sms/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```