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

# Create conversation

POST https://api.moveworks.ai/assistant/v1/conversations
Content-Type: application/json

Creates a new conversation thread. Returns the created Conversation object with a unique `conversation_id`. If `title` is not provided, an AI generated title will be assigned based on the first response.

Reference: https://docs.moveworks.com/api-reference/conversations-api/deprecated-conversations-api/conversations/create-conversation

## Authentication

- `Authorization` header (bearer token, required) — JWT bearer token authentication. Obtain an access token from the Moveworks auth endpoint and include it in the Authorization header as 'Bearer \<token>'.

## Request

### Headers

- `Assistant-Name` (string, required) — The Moveworks assistant identifier that was configured for your organization.

### Body (application/json)

- `title` (string, optional) — Optional user-defined title

## Response

### 201

Conversation created successfully

- `conversation_id` (string, required) — A base-62 identifier prefixed by a short resource type
- `created_at` (datetime, required) — Creation timestamp (ISO 8601)
- `updated_at` (datetime, required) — Last update timestamp (ISO 8601)
- `title` (string, optional) — Optional user-defined title
- `archived` (boolean, optional) — User-controlled flag to mark conversation as archived

## Examples

**Request**

```json
{
  "title": "Help with user permissions"
}
```

**Response**

```json
{
  "conversation_id": "conv_32bt7BMLhLyVzTUjfi35N",
  "created_at": "2025-01-20T10:00:00Z",
  "updated_at": "2025-01-20T10:00:00Z",
  "title": "Help with user permissions"
}
```

**SDK Code**

```python Conversations_createConversation_example
import requests

url = "https://api.moveworks.ai/assistant/v1/conversations"

payload = { "title": "Help with user permissions" }
headers = {
    "Assistant-Name": "acmecorp-conversations-rest-api",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Conversations_createConversation_example
const url = 'https://api.moveworks.ai/assistant/v1/conversations';
const options = {
  method: 'POST',
  headers: {
    'Assistant-Name': 'acmecorp-conversations-rest-api',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"title":"Help with user permissions"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Conversations_createConversation_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.moveworks.ai/assistant/v1/conversations"

	payload := strings.NewReader("{\n  \"title\": \"Help with user permissions\"\n}")

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

	req.Header.Add("Assistant-Name", "acmecorp-conversations-rest-api")
	req.Header.Add("Authorization", "Bearer <token>")
	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 Conversations_createConversation_example
require 'uri'
require 'net/http'

url = URI("https://api.moveworks.ai/assistant/v1/conversations")

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

request = Net::HTTP::Post.new(url)
request["Assistant-Name"] = 'acmecorp-conversations-rest-api'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"title\": \"Help with user permissions\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.moveworks.ai/assistant/v1/conversations")
  .header("Assistant-Name", "acmecorp-conversations-rest-api")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"title\": \"Help with user permissions\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.moveworks.ai/assistant/v1/conversations', [
  'body' => '{
  "title": "Help with user permissions"
}',
  'headers' => [
    'Assistant-Name' => 'acmecorp-conversations-rest-api',
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Conversations_createConversation_example
using RestSharp;

var client = new RestClient("https://api.moveworks.ai/assistant/v1/conversations");
var request = new RestRequest(Method.POST);
request.AddHeader("Assistant-Name", "acmecorp-conversations-rest-api");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"title\": \"Help with user permissions\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Conversations_createConversation_example
import Foundation

let headers = [
  "Assistant-Name": "acmecorp-conversations-rest-api",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["title": "Help with user permissions"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.moveworks.ai/assistant/v1/conversations")! 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()
```