> This page is for version latest (default).
> For other versions, use one of these documentation indexes:
> - latest (default): https://docs.machanirobotics.dev/latest/llms.txt
> - v2026.01.16-dev: https://docs.machanirobotics.dev/v-2026-01-16-dev/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.machanirobotics.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.machanirobotics.dev/_mcp/server.

# Create Character

POST https://api.machanirobotics.com/v1/conversation/characters
Content-Type: application/json

Create creates a new Character resource.

 This RPC accepts a CreateCharacterRequest containing the character details
 along with a unique character identifier (character_id) provided by the client.
 The new Character is then returned as the response.

 HTTP Mapping: POST "/v1/conversation/characters"

Reference: https://docs.machanirobotics.dev/latest/2026-01-16-dev/character-service/createcharacter

## Request

### Query parameters

- `characterId` (string, optional) — character_id is a client-assigned identifier for the Character.

### Body (application/json)

This endpoint expects a Character.

- `displayName` (string, required) — display_name is the human-readable name for the Character.
- `name` (string, optional) — name is the unique resource identifier for the Character. It follows the format "characters/\{character}".
- `description` (string, optional) — description provides a brief overview of the Character's purpose.
- `versions` (list of CharacterItem, optional) — version is the current version of the Character.

## Response

### 200

OK

- `displayName` (string, required) — display_name is the human-readable name for the Character.
- `name` (string, optional) — name is the unique resource identifier for the Character. It follows the format "characters/\{character}".
- `description` (string, optional) — description provides a brief overview of the Character's purpose.
- `versions` (list of CharacterItem, optional) — version is the current version of the Character.

## Errors

### 400 Bad Request Error

Bad Request

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of GoogleProtobufAny, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

## Types

### CharacterItem

CharacterItem represents a single version of a Character, with full settings.

- `defaultModel` (string, required) — default_model is the LLM model used in this version.
- `changeNote` (string, required) — change_note explains why this version was created.
- `id` (string, optional) — id is the unique version identifier for this snapshot (e.g., ULID).
- `version` (integer, optional) — version is the ordinal version number for this snapshot.
- `versionCreateTime` (datetime, optional) — timestamp marks when this snapshot was created.
- `personalityTraits` (list of string, optional) — personality_traits define personality keywords for this version.
- `interests` (list of string, optional) — interests list areas of interest in this version.
- `goals` (list of string, optional) — goals list the objectives or motivations for this version.
- `systemInstructions` (list of string, optional) — system_instructions are prompts always added to the system context.
- `scenarioContext` (list of string, optional) — scenario_context provides background context for this version.
- `location` (map from string to string, optional) — location holds situational or geographical metadata.
- `metadata` (map from string to string, optional) — metadata holds arbitrary key/value pairs for this version.
- `localeTime` (datetime, optional) — locale_time records the local time when this version was created.
- `weather` (string, optional) — weather is optional weather information for this version.
- `supportedLanguages` (list of string, optional) — supported_languages lists spoken/written languages supported.
- `styleSettings` (CharacterConversationStyle, optional) — style_settings configure tone and behavior for this version.
- `signature` (CharacterSignature, optional) — signature holds metadata about who created or modified this version.
- `favorite` (boolean, optional) — favorite marks if this version is bookmarked.

### GoogleProtobufAny

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

- `@type` (string, optional) — The type of the serialized message.

### CharacterConversationStyle

CharacterConversationStyle defines adjustable style attributes (0–100) that influence dialogue tone.

- `formality` (integer, required) — Formality sets the level of formality (0=casual, 100=very formal).
- `humor` (integer, required) — Humor sets the level of humor or playfulness.
- `empathy` (integer, required) — Empathy sets how empathetic the RobotCharacter responds.
- `professionalism` (integer, required) — Professionalism sets businesslike tone (useful for meetings/events).
- `enthusiasm` (integer, required) — Enthusiasm sets energetic or enthusiastic tone.
- `conciseness` (integer, required) — Conciseness sets how brief vs. verbose the responses are.

### CharacterSignature

CharacterOptions is the options for the profile.

- `username` (string, required) — The name of the profile.``
- `email` (string, required) — Email is the email of the creator.
- `company` (string, required) — Company is the company of the creator.

## Examples

**Request**

```json
{
  "displayName": "Ava the Assistant"
}
```

**Response**

```json
{
  "displayName": "Ava the Assistant",
  "name": "characters/ava-assistant-001",
  "description": "Ava is a friendly and knowledgeable virtual assistant designed to help users with daily tasks and provide information.",
  "versions": [
    {
      "defaultModel": "gpt-4-chat",
      "changeNote": "Initial version with core assistant capabilities.",
      "id": "01F8MECHZX3TBDSZ7XRADM79XE",
      "version": 1,
      "versionCreateTime": "2024-01-15T09:30:00Z",
      "personalityTraits": [
        "helpful",
        "patient",
        "curious"
      ],
      "interests": [
        "technology",
        "education",
        "productivity"
      ],
      "goals": [
        "assist users efficiently",
        "provide accurate information",
        "learn from interactions"
      ],
      "systemInstructions": [
        "Always respond politely and clearly.",
        "Prioritize user privacy and data security."
      ],
      "scenarioContext": [
        "Customer support chatbot",
        "Virtual personal assistant"
      ],
      "location": {},
      "metadata": {},
      "localeTime": "2024-01-15T09:30:00Z",
      "weather": "clear skies",
      "supportedLanguages": [
        "en-US",
        "es-ES",
        "fr-FR"
      ],
      "styleSettings": {
        "formality": 70,
        "humor": 40,
        "empathy": 85,
        "professionalism": 80,
        "enthusiasm": 60,
        "conciseness": 75
      },
      "signature": {
        "username": "jdoe",
        "email": "jdoe@machanirobotics.com",
        "company": "Machani Robotics"
      },
      "favorite": true
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.machanirobotics.com/v1/conversation/characters"

payload = { "displayName": "Ava the Assistant" }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.machanirobotics.com/v1/conversation/characters';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"displayName":"Ava the Assistant"}'
};

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://api.machanirobotics.com/v1/conversation/characters"

	payload := strings.NewReader("{\n  \"displayName\": \"Ava the Assistant\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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://api.machanirobotics.com/v1/conversation/characters")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"displayName\": \"Ava the Assistant\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.machanirobotics.com/v1/conversation/characters")
  .header("Content-Type", "application/json")
  .body("{\n  \"displayName\": \"Ava the Assistant\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.machanirobotics.com/v1/conversation/characters', [
  'body' => '{
  "displayName": "Ava the Assistant"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.machanirobotics.com/v1/conversation/characters");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"displayName\": \"Ava the Assistant\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["displayName": "Ava the Assistant"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.machanirobotics.com/v1/conversation/characters")! 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()
```