SPB Git

Repository Public

update.md 2.1 KB 88 lines markdown

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.23## Update a conversation45**post** `/conversations/{conversation_id}`67Update a conversation89### Path Parameters1011- `conversation_id: string`1213### Body Parameters1415- `metadata: Metadata or null`1617  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.18  Keys are strings with a maximum length of 64 characters. Values are strings         with a maximum length of 512 characters.1920### Returns2122- `Conversation object { id, created_at, metadata, object }`2324  - `id: string`2526    The unique ID of the conversation.2728  - `created_at: number`2930    The time at which the conversation was created, measured in seconds since the Unix epoch.3132  - `metadata: unknown`3334    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.35    Keys are strings with a maximum length of 64 characters. Values are strings         with a maximum length of 512 characters.3637  - `object: "conversation"`3839    The object type, which is always `conversation`.4041    - `"conversation"`4243### Example4445```http46curl https://api.openai.com/v1/conversations/$CONVERSATION_ID \47    -H 'Content-Type: application/json' \48    -H "Authorization: Bearer $OPENAI_API_KEY" \49    -d '{50          "metadata": {51            "foo": "string"52          }53        }'54```5556#### Response5758```json59{60  "id": "id",61  "created_at": 0,62  "metadata": {},63  "object": "conversation"64}65```6667### Example6869```http70curl https://api.openai.com/v1/conversations/conv_123 \71  -H "Content-Type: application/json" \72  -H "Authorization: Bearer $OPENAI_API_KEY" \73  -d '{74    "metadata": {"topic": "project-x"}75  }'76```7778#### Response7980```json81{82  "id": "conv_123",83  "object": "conversation",84  "created_at": 1741900000,85  "metadata": {"topic": "project-x"}86}87```88
Files main
Menu

Theme