> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-parschat.parstechai.com/api-reference/robots/create-robot/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-parschat.parstechai.com/_mcp/server. # Create a robot POST https://api-chat.parstechai.com/v1/robots Content-Type: application/json Creates the workspace that holds one customer's conversations, automation rules and training data. Create the robot before connecting any channel to it. Put your own customer id in `external_id` and we return it on every webhook event, so you never need a lookup table between our ids and yours. Each robot consumes one unit of your plan's capacity. Deleting one frees that capacity immediately. Reference: https://docs-parschat.parstechai.com/api-reference/robots/create-robot ## Authentication - `Authorization` header (bearer token, required) — Your API key, issued by ParsChat sales. One key per account, spanning every robot you own. Send it as `Authorization: Bearer pk_live_…`. ## Request ### Body (application/json) This endpoint expects an object. - `name` (string, required) — Display name, shown in the panel. Unique across your robots; reusing one returns 409. - `external_id` (string, optional) — Your own customer id. Unique across your robots; reusing one returns 409. ## Response ### 201 The robot was created. - `id` (string, optional) — ParsChat identifier for the robot. - `name` (string, optional) — Display name, shown in the panel. - `external_id` (string, optional) — Your own identifier for this customer. Returned on every webhook event, so you do not need a lookup table. - `channels` (list of ChannelSummary, optional) — Channels attached to this robot, in short form. Empty until you connect one. Call the channels endpoint for the full record. - `created_at` (datetime, optional) — When the robot was created. ## Errors ### 400 Bad Request Error The request itself is malformed: a parameter is missing, unparseable, or out of range. Unlike 422, the request never reached validation of its contents. - `error` (ErrorError, optional) ### 401 Unauthorized Error The key is missing, wrong, revoked, or past its expiry date. All four answer `invalid_key`: telling an expired key from an unknown one would confirm to whoever holds a leaked key that it was once real. - `error` (ErrorError, optional) ### 403 Forbidden Error The call is understood but not permitted: a missing role, a lapsed plan, or exhausted capacity. - `error` (ErrorError, optional) ### 409 Conflict Error The request collides with something that already exists. - `error` (ErrorError, optional) ### 422 Unprocessable Entity Error The payload is malformed, or a prerequisite is not configured. - `error` (ErrorError, optional) ### 429 Too Many Requests Error You are calling the API too fast. `details` names the limit you are held to. This never means an automated reply to an end customer was discarded: those are queued, not dropped. - `error` (ErrorError, optional) ### 500 Internal Server Error Something failed on our side. Retry with backoff, and quote `request_id` if it persists. - `error` (ErrorError, optional) ### 503 Service Unavailable Error A service we depend on (a channel provider, or our AI service) is unavailable. Retry with backoff. - `error` (ErrorError, optional) ## Types ### ChannelSummary The short form of a channel, as it appears inside a robot. - `id` (string, optional) — ParsChat identifier for the channel. - `type` (enum, optional) — The kind of surface this channel connects. - Allowed values: `telegram`, `instagram`, `goftino`, `widget`, `crisp`, `gap`, `whatsapp` - `is_active` (boolean, optional) — Whether the channel is receiving traffic. ### ErrorError - `code` (string, optional) — Stable machine-readable code. Branch on this, not on the message. - `message` (string, optional) — Human-readable explanation. Wording may change. - `request_id` (string, optional) — Log this. It is what lets support find your exact request. - `details` (map from string to any, optional) — Machine-readable context for the code. On `capacity_exhausted` it carries `occupied`, `requested` and `capacity`; on `rate_limited`, `limit_per_minute` and `window_seconds`. ## Examples ### With your own customer id **Request** ```json { "name": "Rose Flower Shop", "external_id": "shop_10422" } ``` **Response** ```json { "id": "rbt_8fK2mQ", "name": "Rose Flower Shop", "external_id": "shop_10422", "channels": [], "created_at": "2026-09-20T11:04:33Z" } ``` **SDK Code** ```python With your own customer id import requests url = "https://api-chat.parstechai.com/v1/robots" payload = { "name": "Rose Flower Shop", "external_id": "shop_10422" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript With your own customer id const url = 'https://api-chat.parstechai.com/v1/robots'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"name":"Rose Flower Shop","external_id":"shop_10422"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go With your own customer id package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-chat.parstechai.com/v1/robots" payload := strings.NewReader("{\n \"name\": \"Rose Flower Shop\",\n \"external_id\": \"shop_10422\"\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 With your own customer id require 'uri' require 'net/http' url = URI("https://api-chat.parstechai.com/v1/robots") 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 \"name\": \"Rose Flower Shop\",\n \"external_id\": \"shop_10422\"\n}" response = http.request(request) puts response.read_body ``` ```java With your own customer id import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-chat.parstechai.com/v1/robots") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"name\": \"Rose Flower Shop\",\n \"external_id\": \"shop_10422\"\n}") .asString(); ``` ```php With your own customer id request('POST', 'https://api-chat.parstechai.com/v1/robots', [ 'body' => '{ "name": "Rose Flower Shop", "external_id": "shop_10422" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp With your own customer id using RestSharp; var client = new RestClient("https://api-chat.parstechai.com/v1/robots"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"name\": \"Rose Flower Shop\",\n \"external_id\": \"shop_10422\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift With your own customer id import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "name": "Rose Flower Shop", "external_id": "shop_10422" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-chat.parstechai.com/v1/robots")! 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() ``` ### Name only **Request** ```json { "name": "Rose Flower Shop" } ``` **Response** ```json { "id": "rbt_8fK2mQ", "name": "Rose Flower Shop", "channels": [], "created_at": "2026-09-20T11:04:33Z" } ``` **SDK Code** ```python Name only import requests url = "https://api-chat.parstechai.com/v1/robots" payload = { "name": "Rose Flower Shop" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Name only const url = 'https://api-chat.parstechai.com/v1/robots'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"name":"Rose Flower Shop"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Name only package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-chat.parstechai.com/v1/robots" payload := strings.NewReader("{\n \"name\": \"Rose Flower Shop\"\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 Name only require 'uri' require 'net/http' url = URI("https://api-chat.parstechai.com/v1/robots") 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 \"name\": \"Rose Flower Shop\"\n}" response = http.request(request) puts response.read_body ``` ```java Name only import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-chat.parstechai.com/v1/robots") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"name\": \"Rose Flower Shop\"\n}") .asString(); ``` ```php Name only request('POST', 'https://api-chat.parstechai.com/v1/robots', [ 'body' => '{ "name": "Rose Flower Shop" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Name only using RestSharp; var client = new RestClient("https://api-chat.parstechai.com/v1/robots"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"name\": \"Rose Flower Shop\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Name only import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["name": "Rose Flower Shop"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-chat.parstechai.com/v1/robots")! 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() ```