Skip to main content
PATCH
/
prospects
/
{chatId}
/
custom-data
Update Conversation customData
curl --request PATCH \
  --url https://api.kakiyo.com/v1/prospects/{chatId}/custom-data \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customData": "John replied positively to the AI outbound post; reference that follow-up."
}
'
{
  "message": "Conversation customData updated successfully",
  "chatId": "chat_12345abcde",
  "customDataSaved": true,
  "customDataLength": 64
}

Overview

Update the per-conversation customData for an existing chat. customData is the prompt context exposed as {{customData}}, set when the conversation is created via the prospect import endpoints. Use this when the context that personalizes a conversation changes after import (for example, the lead performed a new action), so the AI prompt always uses the latest context.

Path parameters

FieldTypeRequiredDescription
chatIdstringYesID of the chat/conversation to update

Request body

FieldTypeRequiredDescription
customDatastringYesNew prompt context, max 3000 characters. Pass an empty string ("") to clear it

Example

curl -X PATCH "https://api.kakiyo.com/v1/prospects/chat_12345abcde/custom-data" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customData": "John replied positively to the AI outbound post; reference that follow-up."
  }'
const response = await fetch('https://api.kakiyo.com/v1/prospects/chat_12345abcde/custom-data', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    customData: 'John replied positively to the AI outbound post; reference that follow-up.',
  }),
});

const result = await response.json();
console.log(result.customDataSaved, result.customDataLength);

Response

{
  "message": "Conversation customData updated successfully",
  "chatId": "chat_12345abcde",
  "customDataSaved": true,
  "customDataLength": 64
}

Notes

  • The chat must belong to a campaign owned by your team, otherwise the request returns 403.
  • customData is truncated to 3000 characters.
  • An empty string clears the stored context (customDataSaved will be false).
  • The new value applies to subsequent AI message generations for the conversation.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chatId
string
required

ID of the chat/conversation

Body

application/json
customData
string
required

Per-conversation prompt context. Empty string clears it.

Maximum string length: 3000
Example:

"John replied positively to the AI outbound post; reference that follow-up."

Response

Conversation customData updated successfully

message
string
Example:

"Conversation customData updated successfully"

chatId
string
Example:

"chat_12345abcde"

customDataSaved
boolean
Example:

true

customDataLength
integer
Example:

64

Last modified on June 25, 2026