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

# Start a conversation

POST https://api.prolific.com/api/v1/conversations/
Content-Type: application/json

Starts a new conversation with a participant or researcher, separate from the default one between you. Give it a subject and a topic, and optionally the study it is about and a first message.

Send further messages into it with `POST /api/v1/messages` and its `conversation_id`. Other conversations with the same person are untouched.


Reference: https://docs.prolific.com/api-reference/messages/create-conversation

## Authentication

- `Authorization` header (required) (prefixed with `Token `) — The Prolific API uses API token to authenticate requests. You can create an API token directly from your settings. Your API token does not have an expiry date and carries full permission, so be sure to keep them secure. If your token is leaked, delete it and create a new one directly in the app. In your requests add `Authorization` header with the value `Token <your token>`.

## Request

### Body (application/json)

This endpoint expects a CreateConversation.

- `recipient_id` (string, required) — The participant or researcher to start the conversation with.
- `subject` (string, required) — What the conversation is about, shown as its title.
- `topic` (enum, required) — Which of the fixed categories the conversation falls under.
  - Allowed values: `payment-timing`, `payment-issues`, `technical-issues`, `feedback`, `rejections`, `other`
- `study_id` (string, optional) — The study it relates to.
- `workspace_id` (string, optional) — Start it as this workspace rather than as yourself. Requires workspace messaging.
- `body` (string, optional) — A first message, sent into the conversation as part of creating it.

## Response

### 201

The new conversation

- `id` (string, required) — The conversation id. The same value appears as `channel_id` on its messages.
- `members` (list of ConversationMember, required) — Who is in the conversation. A member is a user or, for workspace messaging, a workspace.
- `subject` (string, required, nullable) — What the conversation is about. Null on conversations that predate subjects.
- `topic` (enum, required, nullable) — One of the message categories, or null.
  - Allowed values: `payment-issues`, `technical-issues`, `feedback`, `rejections`, `other`
- `study_id` (string, required, nullable) — The study the conversation is about, or null.
- `unread_count` (integer, required) — Unread messages for the caller.
- `datetime_created` (datetime, required)
- `datetime_updated` (datetime, required) — When the most recent message was sent.
- `last_message_body` (string, optional, nullable) — Body of the most recent message.

## Errors

### 503 Service Unavailable Error

Message service temporarily unavailable

- `status` (integer, required) — Status code as in the http standards
- `error_code` (integer, required) — Internal error code
- `title` (string, required) — Error title
- `detail` (ErrorDetailDetail, required) — Error detail
- `additional_information` (string, optional) — Optional extra information
- `traceback` (string, optional) — Optional debug information
- `interactive` (boolean, optional)

### 504 Gateway Timeout Error

Message query timed out

- `status` (integer, required) — Status code as in the http standards
- `error_code` (integer, required) — Internal error code
- `title` (string, required) — Error title
- `detail` (ErrorDetailDetail, required) — Error detail
- `additional_information` (string, optional) — Optional extra information
- `traceback` (string, optional) — Optional debug information
- `interactive` (boolean, optional)

### 400 Client Request Error

Error

- `status` (integer, required) — Status code as in the http standards
- `error_code` (integer, required) — Internal error code
- `title` (string, required) — Error title
- `detail` (ErrorDetailDetail, required) — Error detail
- `additional_information` (string, optional) — Optional extra information
- `traceback` (string, optional) — Optional debug information
- `interactive` (boolean, optional)

## Types

### ConversationMember

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `user`, `space`

### ErrorDetailDetail

Error detail

### ErrorDetailDetail2

All fields with validation errors

- `any_field` (list of string, optional) — Name of the field with a validation error and as a value an array with the error descriptions

## Examples

**Request**

```json
{
  "recipient_id": "619e049f7648a4e1f8f3645b",
  "subject": "Bonus for the second session",
  "topic": "payment-issues",
  "study_id": "719e049f7648a4e1f8f3645a",
  "body": "Hi, your bonus for the second session is on its way."
}
```

**Response**

```json
{
  "id": "d45c8a5e812ff990fc6546beaf888c9820f4c184f7200a45d900cf0f321f7f38",
  "members": [
    {
      "id": "619e049f7648a4e1f8f3645b",
      "type": "user"
    }
  ],
  "subject": "Bonus for the second session",
  "topic": "payment-issues",
  "study_id": "620ca2735fcbba4fa2b3211a",
  "unread_count": 1,
  "datetime_created": "2024-01-15T09:30:00Z",
  "datetime_updated": "2024-01-15T09:30:00Z",
  "last_message_body": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.prolific.com/api/v1/conversations/"

payload = {
    "recipient_id": "619e049f7648a4e1f8f3645b",
    "subject": "Bonus for the second session",
    "topic": "payment-issues",
    "study_id": "719e049f7648a4e1f8f3645a",
    "body": "Hi, your bonus for the second session is on its way."
}
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.prolific.com/api/v1/conversations/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"recipient_id":"619e049f7648a4e1f8f3645b","subject":"Bonus for the second session","topic":"payment-issues","study_id":"719e049f7648a4e1f8f3645a","body":"Hi, your bonus for the second session is on its way."}'
};

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.prolific.com/api/v1/conversations/"

	payload := strings.NewReader("{\n  \"recipient_id\": \"619e049f7648a4e1f8f3645b\",\n  \"subject\": \"Bonus for the second session\",\n  \"topic\": \"payment-issues\",\n  \"study_id\": \"719e049f7648a4e1f8f3645a\",\n  \"body\": \"Hi, your bonus for the second session is on its way.\"\n}")

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

	req.Header.Add("Authorization", "Token <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
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/conversations/")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"recipient_id\": \"619e049f7648a4e1f8f3645b\",\n  \"subject\": \"Bonus for the second session\",\n  \"topic\": \"payment-issues\",\n  \"study_id\": \"719e049f7648a4e1f8f3645a\",\n  \"body\": \"Hi, your bonus for the second session is on its way.\"\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.prolific.com/api/v1/conversations/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"recipient_id\": \"619e049f7648a4e1f8f3645b\",\n  \"subject\": \"Bonus for the second session\",\n  \"topic\": \"payment-issues\",\n  \"study_id\": \"719e049f7648a4e1f8f3645a\",\n  \"body\": \"Hi, your bonus for the second session is on its way.\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/conversations/', [
  'body' => '{
  "recipient_id": "619e049f7648a4e1f8f3645b",
  "subject": "Bonus for the second session",
  "topic": "payment-issues",
  "study_id": "719e049f7648a4e1f8f3645a",
  "body": "Hi, your bonus for the second session is on its way."
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/conversations/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"recipient_id\": \"619e049f7648a4e1f8f3645b\",\n  \"subject\": \"Bonus for the second session\",\n  \"topic\": \"payment-issues\",\n  \"study_id\": \"719e049f7648a4e1f8f3645a\",\n  \"body\": \"Hi, your bonus for the second session is on its way.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "recipient_id": "619e049f7648a4e1f8f3645b",
  "subject": "Bonus for the second session",
  "topic": "payment-issues",
  "study_id": "719e049f7648a4e1f8f3645a",
  "body": "Hi, your bonus for the second session is on its way."
] as [String : Any]

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

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