Sample - OpenAI API
GET/conversations/{conversation_id}

Retrieve a conversation

Retrieves a conversation by its identifier. Use conversation_id to select the conversation whose metadata and creation information you need. The response represents the conversation resource and does not include conversation items.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
conversation_idstringrequired
The identifier of the conversation to retrieve.

2 status codes
200Returns the conversation with its identifier, `conversation` object type, metadata, and Unix creation timestamp.
idstringrequired
The unique ID of the conversation.
objectstringrequired
The object type, which is always `conversation`.
Allowed:conversationDefault:conversation
metadataunknownrequired
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.
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

conversation_id must identify the conversation to retrieve. A 429 is returned when the request exceeds the rate limit.