@@ -8385,6 +8385,110 @@ paths:
83858385 message: Access Token Invalid
83868386 schema:
83878387 "$ref": "#/components/schemas/error"
8388+ "/contacts/deleted":
8389+ get:
8390+ summary: List deleted contacts
8391+ parameters:
8392+ - name: Intercom-Version
8393+ in: header
8394+ schema:
8395+ "$ref": "#/components/schemas/intercom_version_preview"
8396+ - name: per_page
8397+ in: query
8398+ description: The number of results per page. Defaults to `10`, with a maximum
8399+ of `150`.
8400+ required: false
8401+ schema:
8402+ type: integer
8403+ minimum: 1
8404+ default: 10
8405+ maximum: 150
8406+ - name: page
8407+ in: query
8408+ description: The page of results to fetch. Defaults to `1`.
8409+ required: false
8410+ schema:
8411+ type: integer
8412+ minimum: 1
8413+ default: 1
8414+ tags:
8415+ - Contacts
8416+ operationId: listDeletedContacts
8417+ description: |
8418+ Fetch a paginated list of the contacts in your workspace that are no longer active,
8419+ so you can recover ones whose `id`, `email`, or `external_id` you no longer have and
8420+ then permanently delete them. Each entry carries a `status` describing why the contact
8421+ is inactive: `archived`, `blocked`, `merged`, `pending_deletion`, or `permanently_deleted`.
8422+ `merged_into_id` is present only when `status` is `merged`, and `external_id` and `email`
8423+ are `null` for `permanently_deleted` contacts.
8424+ responses:
8425+ '200':
8426+ description: successful
8427+ content:
8428+ application/json:
8429+ examples:
8430+ successful:
8431+ value:
8432+ type: list
8433+ data:
8434+ - type: contact
8435+ id: 5ba682d23d7cf92bef87bfd4
8436+ external_id: "70"
8437+ email: joe@example.com
8438+ role: user
8439+ status: archived
8440+ updated_at: 1756636800
8441+ - type: contact
8442+ id: 5ba682d23d7cf92bef87bfd5
8443+ external_id: "71"
8444+ email: jane@example.com
8445+ role: user
8446+ status: merged
8447+ merged_into_id: 5ba682d23d7cf92bef87bfd9
8448+ updated_at: 1756636800
8449+ - type: contact
8450+ id: 5ba682d23d7cf92bef87bfd6
8451+ external_id:
8452+ email:
8453+ role: user
8454+ status: permanently_deleted
8455+ updated_at: 1756636800
8456+ total_count: 3
8457+ pages:
8458+ type: pages
8459+ page: 1
8460+ per_page: 10
8461+ total_pages: 1
8462+ schema:
8463+ "$ref": "#/components/schemas/deleted_contact_list"
8464+ '400':
8465+ description: Bad Request
8466+ content:
8467+ application/json:
8468+ examples:
8469+ Bad Request:
8470+ value:
8471+ type: error.list
8472+ request_id: 6a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
8473+ errors:
8474+ - code: invalid_page
8475+ message: page must be a positive integer
8476+ schema:
8477+ "$ref": "#/components/schemas/error"
8478+ '401':
8479+ description: Unauthorized
8480+ content:
8481+ application/json:
8482+ examples:
8483+ Unauthorized:
8484+ value:
8485+ type: error.list
8486+ request_id: e097e446-9ae6-44a8-8e13-2bf3008b87ef
8487+ errors:
8488+ - code: unauthorized
8489+ message: Access Token Invalid
8490+ schema:
8491+ "$ref": "#/components/schemas/error"
83888492 "/contacts/{id}":
83898493 put:
83908494 summary: Update a contact
@@ -31015,6 +31119,113 @@ components:
3101531119 type: boolean
3101631120 description: Whether the contact is archived or not.
3101731121 example: false
31122+ deleted_contact:
31123+ title: Deleted Contact
31124+ type: object
31125+ description: A contact that is no longer active, returned by the list deleted
31126+ contacts endpoint.
31127+ properties:
31128+ type:
31129+ type: string
31130+ description: always contact
31131+ enum:
31132+ - contact
31133+ example: contact
31134+ id:
31135+ type: string
31136+ description: The unique identifier for the contact which is given by Intercom.
31137+ example: 5ba682d23d7cf92bef87bfd4
31138+ external_id:
31139+ type: string
31140+ nullable: true
31141+ description: The unique identifier for the contact which is provided by the
31142+ Client. `null` for permanently deleted contacts.
31143+ example: "70"
31144+ email:
31145+ type: string
31146+ nullable: true
31147+ description: The contact's email address. `null` for permanently deleted
31148+ contacts.
31149+ example: joe@example.com
31150+ role:
31151+ type: string
31152+ description: The role of the contact.
31153+ enum:
31154+ - user
31155+ - lead
31156+ example: user
31157+ status:
31158+ type: string
31159+ description: Why the contact is no longer active.
31160+ enum:
31161+ - archived
31162+ - blocked
31163+ - merged
31164+ - pending_deletion
31165+ - permanently_deleted
31166+ example: archived
31167+ merged_into_id:
31168+ type: string
31169+ description: The id of the contact this one was merged into. Present only
31170+ when `status` is `merged`.
31171+ example: 5ba682d23d7cf92bef87bfd9
31172+ updated_at:
31173+ type: integer
31174+ format: date-time
31175+ description: The time the contact record was last updated as a UNIX timestamp.
31176+ This is a last-modified time, not a deletion time.
31177+ example: 1756636800
31178+ deleted_contact_list:
31179+ title: Deleted Contact List
31180+ type: object
31181+ description: A paginated list of deleted contacts.
31182+ properties:
31183+ type:
31184+ type: string
31185+ description: Always list
31186+ enum:
31187+ - list
31188+ example: list
31189+ data:
31190+ type: array
31191+ description: The list of deleted contact objects.
31192+ items:
31193+ "$ref": "#/components/schemas/deleted_contact"
31194+ example:
31195+ - type: contact
31196+ id: 5ba682d23d7cf92bef87bfd4
31197+ external_id: "70"
31198+ email: joe@example.com
31199+ role: user
31200+ status: archived
31201+ updated_at: 1756636800
31202+ total_count:
31203+ type: integer
31204+ description: A count of the total number of deleted contacts.
31205+ example: 100
31206+ pages:
31207+ type: object
31208+ description: Offset-based pagination metadata.
31209+ example:
31210+ type: pages
31211+ page: 1
31212+ per_page: 10
31213+ total_pages: 1
31214+ properties:
31215+ type:
31216+ type: string
31217+ enum:
31218+ - pages
31219+ example: pages
31220+ page:
31221+ type: integer
31222+ example: 1
31223+ per_page:
31224+ type: integer
31225+ example: 10
31226+ total_pages:
31227+ type: integer
31228+ example: 1
3101831229 contact_blocked:
3101931230 title: Contact Blocked
3102031231 type: object
0 commit comments