Skip to content

Create an offer chat thread

POST
/api/offers/{offerId}/chat/threads
curl --request POST \
--url https://example.com/api/offers/example/chat/threads \
--header 'Content-Type: application/json' \
--cookie better-auth.session_token=<better-auth.session_token> \
--data '{ "title": "example" }'
offerId
required
string

Optional chat thread title.

Media type application/json
object
title
string
>= 1 characters
Example generated
{
"title": "example"
}

The created chat thread.

Media type application/json
object
thread
required

Persisted chat thread attached to an offer.

object
id
required
string
offerId
required
string
title
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example generated
{
"thread": {
"id": "example",
"offerId": "example",
"title": "example",
"createdAt": "2026-04-15T12:00:00Z",
"updatedAt": "2026-04-15T12:00:00Z"
}
}

No valid Better Auth session was present.

Media type application/json

Returned when no valid Better Auth session is present.

object
error
required
string
Example generated
{
"error": "example"
}

The offer was not found.

Media type application/json

Standard API error payload.

object
error
required
object
code
required
string
message
required
string
issues
Array<string>
Example generated
{
"error": {
"code": "example",
"message": "example",
"issues": [
"example"
]
}
}