POST/conversations/{conversation_id}

Update conversation metadata

Updates the metadata associated with a conversation. Supply the complete metadata value to replace the conversation's existing metadata, or use null to clear it.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
conversation_idstringrequired
The unique identifier of the conversation to update.

Conversation metadata to replace the existing metadata, or null to clear it.

metadataobjectrequired
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

5 status codes
200Returns the updated conversation with its identifier, object type, metadata, and creation time.
idstringrequired
The unique ID of the conversation.
objectstringrequired
The object type, which is always `conversation`.
Allowed:conversationDefault:conversation
metadataobjectrequired
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
created_atintegerrequired
The time at which the conversation was created, measured in seconds since the Unix epoch.
400Returned when the conversation metadata is invalid.
errorobjectrequired
404Returned when the conversation is not found.
errorobjectrequired
429Returned when the request exceeds a rate limit.
errorobjectrequired
500Returned when the conversation update could not be finalized.
errorobjectrequired

Error handling

A 400 is returned when the conversation metadata is invalid. A 404 is returned when the conversation is not found; a 429 indicates a rate limit; and a 500 means the update could not be finalized. The conversation_id path parameter must identify the conversation. When a request body is supplied, metadata is required and supports up to 16 key-value pairs with keys no longer than 64 characters.