Skip to content

Commit 34cc619

Browse files
VarshSureshclaude
andauthored
Add GET /conversations/deleted endpoint to Unstable API spec (#391)
* Add GET /conversations/deleted endpoint to Unstable API spec Add new endpoint to retrieve deleted conversation IDs with deletion timestamps for compliance and audit purposes. Changes: - Added /conversations/deleted GET endpoint with pagination support - Added deleted_conversation_item schema - Added deleted_conversation_list schema - Fixed response structure to use 'conversations' array key (consistent with conversation_list) - All examples use updated_at field for deletion timestamp Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * Change field name to deleted_at instead of updated_at --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 23aabbf commit 34cc619

File tree

1 file changed

+138
-0
lines changed

1 file changed

+138
-0
lines changed

descriptions/0/api.intercom.io.yaml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8557,6 +8557,100 @@ paths:
85578557
summary: Bad request
85588558
value:
85598559
ticket_type_id: '54'
8560+
"/conversations/deleted":
8561+
get:
8562+
summary: List all deleted conversation IDs
8563+
parameters:
8564+
- name: Intercom-Version
8565+
in: header
8566+
schema:
8567+
"$ref": "#/components/schemas/intercom_version"
8568+
- name: page
8569+
in: query
8570+
required: false
8571+
description: The page of results to fetch. Defaults to first page
8572+
example: 1
8573+
schema:
8574+
type: integer
8575+
- name: per_page
8576+
in: query
8577+
required: false
8578+
description: How many results per page
8579+
schema:
8580+
type: integer
8581+
default: 20
8582+
maximum: 60
8583+
- name: order
8584+
in: query
8585+
required: false
8586+
description: "`asc` or `desc`. Returns the conversation IDs in ascending or descending order. Defaults to desc"
8587+
example: desc
8588+
schema:
8589+
type: string
8590+
tags:
8591+
- Conversations
8592+
operationId: listDeletedConversationIds
8593+
description: |+
8594+
List all deleted conversation IDs.
8595+
8596+
{% admonition type="warning" name="Pagination" %}
8597+
You can use pagination to limit the number of results returned. The default is `20` results per page. You can navigate to next pages using the `page` param.
8598+
{% /admonition %}
8599+
responses:
8600+
'200':
8601+
description: View all deleted conversation IDs
8602+
content:
8603+
application/json:
8604+
examples:
8605+
successful:
8606+
value:
8607+
type: conversations.list
8608+
total_count: 4
8609+
pages:
8610+
type: pages
8611+
next: https://api.intercom.io/conversations/deleted?per_page=2&order=desc&page=2
8612+
page: 1
8613+
per_page: 2
8614+
total_pages: 2
8615+
conversations:
8616+
- type: conversation
8617+
id: '512'
8618+
metrics_retained: false
8619+
deleted_at: 1734537460
8620+
- type: conversation
8621+
id: '513'
8622+
metrics_retained: true
8623+
deleted_at: 1734537400
8624+
schema:
8625+
"$ref": "#/components/schemas/deleted_conversation_list"
8626+
'401':
8627+
description: Unauthorized
8628+
content:
8629+
application/json:
8630+
examples:
8631+
Unauthorized:
8632+
value:
8633+
type: error.list
8634+
request_id: 310f55b0-2660-43e8-bed4-7e82b2f40920
8635+
errors:
8636+
- code: unauthorized
8637+
message: Access Token Invalid
8638+
schema:
8639+
"$ref": "#/components/schemas/error"
8640+
'400':
8641+
description: Resource not available
8642+
content:
8643+
application/json:
8644+
examples:
8645+
Resource not available:
8646+
value:
8647+
type: error.list
8648+
request_id: 7a80b950-b392-499f-85db-ea7c6c424d37
8649+
errors:
8650+
- code: intercom_version_invalid
8651+
message: Requested resource is not available in current API version.
8652+
schema:
8653+
"$ref": "#/components/schemas/error"
85608654
"/custom_channel_events/notify_new_conversation":
85618655
post:
85628656
summary: Notify Intercom of a new conversation created in a custom channel
@@ -18506,6 +18600,50 @@ components:
1850618600
type: boolean
1850718601
description: Whether the conversation is deleted or not.
1850818602
example: true
18603+
deleted_conversation_item:
18604+
title: Conversation
18605+
type: object
18606+
x-tags:
18607+
- Conversation
18608+
description: A deleted conversation record containing its ID, metrics retained status and deletion timestamp.
18609+
properties:
18610+
type:
18611+
type: string
18612+
description: String representing the object's type. Always has the value `conversation`.
18613+
example: 'conversation'
18614+
id:
18615+
type: string
18616+
description: The ID of the deleted conversation.
18617+
example: '512'
18618+
metrics_retained:
18619+
type: boolean
18620+
description: Whether reporting metrics are retained for this conversation ID
18621+
example: true
18622+
deleted_at:
18623+
type: integer
18624+
format: date-time
18625+
description: The time when the conversation was deleted.
18626+
example: 1734537745
18627+
deleted_conversation_list:
18628+
title: Conversations
18629+
type: object
18630+
description: A paginated list of deleted conversation IDs.
18631+
properties:
18632+
type:
18633+
type: string
18634+
description: String representing the object's type. Always has the value `conversations.list`.
18635+
example: conversations.list
18636+
conversations:
18637+
type: array
18638+
description: The list of deleted conversation IDs.
18639+
items:
18640+
"$ref": "#/components/schemas/deleted_conversation_item"
18641+
total_count:
18642+
type: integer
18643+
description: Total number of items available.
18644+
example: 10
18645+
pages:
18646+
"$ref": "#/components/schemas/pages_link"
1850918647
conversation_first_contact_reply:
1851018648
title: First contact reply
1851118649
type: object

0 commit comments

Comments
 (0)