# List conversations

`GET /openai/v1/conversations`

Returns the conversations available in the current project.

## Parameters

### Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | `integer` | No | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. _Default:_ `20` |
| `order` | `PageOrder` | No | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` for descending order. _Enum:_ `asc`, `desc` |
| `after` | `string` | No | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
| `before` | `string` | No | A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
| `agent_name` | `string` | No | Filter by agent name. If provided, only items associated with the specified agent will be returned. |
| `agent_id` | `string` | No | Filter by agent ID in the format `name:version`. If provided, only items associated with the specified agent ID will be returned. |

### Header parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `x-ms-user-isolation-key` | `string` | No | Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. |

## Responses

### 200 — The request has succeeded.

Content-Type: `application/json`

The response data for a requested list of items.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `data` | `OpenAI.ConversationResource[]` | Yes | The requested list of items. |
| `first_id` | `string` | No | The first ID represented in this list. |
| `last_id` | `string` | No | The last ID represented in this list. |
| `has_more` | `boolean` | Yes | A value indicating whether there are additional values available not captured in this list. |

#### `data` — `OpenAI.ConversationResource[]`

The requested list of items.

**Array of** `OpenAI.ConversationResource`**:**

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | The unique ID of the conversation. |
| `object` | `enum` | Yes | The object type, which is always `conversation`. _Default:_ `"conversation"` _Constant:_ `conversation` |
| `metadata` | `OpenAI.Metadata` | Yes | 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_at` | `integer` | Yes | The time at which the conversation was created, measured in seconds since the Unix epoch. _Format:_ `unixtime` |

### 4XX — Client error

Content-Type: `application/json`

Error response for API failures.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `OpenAI.Error` | Yes |  |

#### `error` — `OpenAI.Error`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string \| null` | Yes |  |
| `message` | `string` | Yes |  |
| `param` | `string \| null` | No |  |
| `type` | `string` | No |  |
| `details` | `OpenAI.Error[]` | No |  |
| `additionalInfo` | `object` | No |  |
| `debugInfo` | `object` | No |  |

### 5XX — Server error

Content-Type: `application/json`

Error response for API failures.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `OpenAI.Error` | Yes |  |

#### `error` — `OpenAI.Error`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string \| null` | Yes |  |
| `message` | `string` | Yes |  |
| `param` | `string \| null` | No |  |
| `type` | `string` | No |  |
| `details` | `OpenAI.Error[]` | No |  |
| `additionalInfo` | `object` | No |  |
| `debugInfo` | `object` | No |  |
