Skip to main content
POST
/
api
/
v1
/
appuid
/
{appUid}
/
threads
Create a conversation thread by resolving a user and invoking an AI agent
curl --request POST \
  --url https://a.api.mindset.ai/api/v1/appuid/{appUid}/threads \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "agentUid": "<string>",
  "message": "<string>",
  "messageType": "user",
  "humanUid": "<string>",
  "externalUserId": "<string>",
  "sdkUserEmail": "<string>",
  "realEmailAddress": "<string>"
}
'
{
  "threadUid": "<string>",
  "humanUid": "<string>",
  "agentUid": "<string>"
}

Authorizations

x-api-key
string
header
required

Path Parameters

appUid
string
required

Your application's uid

Minimum string length: 1

Body

application/json
agentUid
string
required

Agent UID to invoke. Can be a plain agentUid or composite agentUid::sessionUid.

message
string
required

Message to send to the agent. When messageType is 'user' (default), appears as a visible user message in the conversation. When messageType is 'system', used as an invisible prompt that triggers the agent without appearing in the conversation.

messageType
enum<string>
default:user

Message type. 'user' (default) sends a visible user message. 'system' sends an invisible prompt (like an icebreaker) that triggers the agent without appearing in the conversation.

Available options:
user,
system
humanUid
string

Direct Firestore human UID. Mutually exclusive with other user identifiers.

externalUserId
string

External system user identifier. Valid characters are A-Za-z0-9_-. Mutually exclusive with other user identifiers.

Maximum string length: 100
sdkUserEmail
string

SDK user email address. Mutually exclusive with other user identifiers.

Maximum string length: 100
realEmailAddress
string

User's actual email address for SSO or email-based auth. Mutually exclusive with other user identifiers.

Maximum string length: 100

Response

Thread created successfully

threadUid
string

UID of the created conversation thread

humanUid
string

Resolved human UID

agentUid
string

Agent UID that was invoked