> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/api/api-reference/recycle-bin.md).

# Recycle Bin

The recycle bin holds soft-deleted resources for 30 days before automatic permanent purge. During this window, resources can be inspected, restored individually or with dependents (cascade restore), or permanently deleted ahead of the 30-day deadline.

### Recycle bin schema

## The RecycleBin object

```json
{"openapi":"3.2.0","info":{"title":"Recycle Bin","version":"1.0.0"},"components":{"schemas":{"RecycleBin":{"type":"object","required":["model","doc"],"properties":{"model":{"type":"string","description":"Identifies the resource type of the wrapped document.","enum":["Connection","Flow","Export","Import","Script","Integration","Stack","FileDefinition","AsyncHelper","LookupCache","Tool","Api","McpServer","EDIProfile","Agent","StorageItem"]},"doc":{"type":"object","required":["_id","name","lastModified"],"description":"The resource document as it existed at deletion time.\nFields vary by resource type; common fields are listed below.","properties":{"_id":{"type":"string","format":"objectId","description":"Unique identifier for the resource."},"name":{"type":"string","description":"Display name for the resource."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the resource was created."},"lastModified":{"type":"string","format":"date-time","description":"Timestamp when the resource was last modified."},"deletedAt":{"type":"string","format":"date-time","description":"Timestamp when the resource was deleted."}},"additionalProperties":true}}}}}}
```

## List deleted resources

> Returns all resources deleted within the last 30 days, across all\
> resource types. Files and folders deleted from Celigo Storage are\
> included as \`StorageItem\` entries. Sorted by \`lastModified\`\
> descending. Not paginated — the full result set is returned in a\
> single response.

```json
{"openapi":"3.2.0","info":{"title":"Recycle Bin","version":"1.0.0"},"tags":[{"name":"Recycle Bin","description":"The recycle bin holds soft-deleted resources for 30 days before\nautomatic permanent purge. During this window, resources can be\ninspected, restored individually or with dependents (cascade\nrestore), or permanently deleted ahead of the 30-day deadline.\n\n## Recycle bin schema\n\n{% openapi-schemas spec=\"recyclebin\" schemas=\"RecycleBin\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"RecycleBin":{"type":"object","required":["model","doc"],"properties":{"model":{"type":"string","description":"Identifies the resource type of the wrapped document.","enum":["Connection","Flow","Export","Import","Script","Integration","Stack","FileDefinition","AsyncHelper","LookupCache","Tool","Api","McpServer","EDIProfile","Agent","StorageItem"]},"doc":{"type":"object","required":["_id","name","lastModified"],"description":"The resource document as it existed at deletion time.\nFields vary by resource type; common fields are listed below.","properties":{"_id":{"type":"string","format":"objectId","description":"Unique identifier for the resource."},"name":{"type":"string","description":"Display name for the resource."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the resource was created."},"lastModified":{"type":"string","format":"date-time","description":"Timestamp when the resource was last modified."},"deletedAt":{"type":"string","format":"date-time","description":"Timestamp when the resource was deleted."}},"additionalProperties":true}}}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/recycleBinTTL":{"get":{"operationId":"listRecycleBin","tags":["Recycle Bin"],"summary":"List deleted resources","description":"Returns all resources deleted within the last 30 days, across all\nresource types. Files and folders deleted from Celigo Storage are\nincluded as `StorageItem` entries. Sorted by `lastModified`\ndescending. Not paginated — the full result set is returned in a\nsingle response.","parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of entries to return per resource type. Applied\nindependently to each type, so the total response size is up to\n`limit` × the number of resource types with deleted items.\nDoes not apply to `StorageItem` entries — every deleted storage\nitem is always included.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Array of deleted resource entries.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecycleBin"}}}}},"204":{"description":"Recycle bin is empty (no body returned)."},"401":{"$ref":"#/components/responses/401-unauthorized"}}}}}}
```

## List deleted resources by type

> Returns deleted resources of a specific type from the recycle bin\
> (last 30 days). Sort order is not guaranteed. Not paginated — the\
> full result set is returned in a single response.\
> \
> \`storageitems\` behaves differently: the request is proxied to Celigo\
> Storage, which returns an object wrapping an \`items\` array (not a\
> bare array), sorted by newest deletion first and paginated via the\
> \`Link\` response header.

```json
{"openapi":"3.2.0","info":{"title":"Recycle Bin","version":"1.0.0"},"tags":[{"name":"Recycle Bin","description":"The recycle bin holds soft-deleted resources for 30 days before\nautomatic permanent purge. During this window, resources can be\ninspected, restored individually or with dependents (cascade\nrestore), or permanently deleted ahead of the 30-day deadline.\n\n## Recycle bin schema\n\n{% openapi-schemas spec=\"recyclebin\" schemas=\"RecycleBin\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"ResourceType":{"name":"_resourceType","in":"path","required":true,"description":"Resource type to operate on.","schema":{"type":"string","enum":["connections","flows","exports","imports","scripts","integrations","stacks","filedefinitions","asynchelpers","lookupcaches","tools","apis","mcpservers","ediprofiles","agents","storageitems"]}}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/recycleBinTTL/{_resourceType}":{"get":{"operationId":"listRecycleBinByType","tags":["Recycle Bin"],"summary":"List deleted resources by type","description":"Returns deleted resources of a specific type from the recycle bin\n(last 30 days). Sort order is not guaranteed. Not paginated — the\nfull result set is returned in a single response.\n\n`storageitems` behaves differently: the request is proxied to Celigo\nStorage, which returns an object wrapping an `items` array (not a\nbare array), sorted by newest deletion first and paginated via the\n`Link` response header.","parameters":[{"$ref":"#/components/parameters/ResourceType"},{"name":"limit","in":"query","required":false,"description":"Maximum number of resources to return.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Array of deleted resource documents.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["_id","name","lastModified"],"properties":{"_id":{"type":"string","format":"objectId","description":"Unique identifier for the resource."},"name":{"type":"string","description":"Display name for the resource."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the resource was created."},"lastModified":{"type":"string","format":"date-time","description":"Timestamp when the resource was last modified."},"deletedAt":{"type":"string","format":"date-time","description":"Timestamp when the resource was deleted."}},"additionalProperties":true}}}}},"204":{"description":"No deleted resources of this type (no body returned)."},"401":{"$ref":"#/components/responses/401-unauthorized"},"403":{"description":"The resource type is not supported by the recycle bin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get a deleted resource

> Returns the full document of a specific deleted resource from\
> the recycle bin. May include fields that the list endpoints omit\
> (e.g. \`content\` on scripts, \`queues\` on connections). Not supported\
> for \`storageitems\` — deleted storage item documents are available\
> only from the list endpoints.

```json
{"openapi":"3.2.0","info":{"title":"Recycle Bin","version":"1.0.0"},"tags":[{"name":"Recycle Bin","description":"The recycle bin holds soft-deleted resources for 30 days before\nautomatic permanent purge. During this window, resources can be\ninspected, restored individually or with dependents (cascade\nrestore), or permanently deleted ahead of the 30-day deadline.\n\n## Recycle bin schema\n\n{% openapi-schemas spec=\"recyclebin\" schemas=\"RecycleBin\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"ResourceType":{"name":"_resourceType","in":"path","required":true,"description":"Resource type to operate on.","schema":{"type":"string","enum":["connections","flows","exports","imports","scripts","integrations","stacks","filedefinitions","asynchelpers","lookupcaches","tools","apis","mcpservers","ediprofiles","agents","storageitems"]}}},"responses":{"400-bad-request":{"description":"Bad request. The server could not understand the request because of malformed syntax or invalid parameters.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"404-not-found":{"description":"Not found. The requested resource does not exist or is not visible to the caller.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/recycleBinTTL/{_resourceType}/{_id}":{"get":{"operationId":"getRecycleBinResource","tags":["Recycle Bin"],"summary":"Get a deleted resource","description":"Returns the full document of a specific deleted resource from\nthe recycle bin. May include fields that the list endpoints omit\n(e.g. `content` on scripts, `queues` on connections). Not supported\nfor `storageitems` — deleted storage item documents are available\nonly from the list endpoints.","parameters":[{"$ref":"#/components/parameters/ResourceType"},{"name":"_id","in":"path","required":true,"schema":{"type":"string","format":"objectId"},"description":"Identifies which deleted resource to retrieve."}],"responses":{"200":{"description":"The deleted resource document.","content":{"application/json":{"schema":{"type":"object","required":["_id","name","lastModified"],"properties":{"_id":{"type":"string","format":"objectId","description":"Unique identifier for the resource."},"name":{"type":"string","description":"Display name for the resource."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the resource was created."},"lastModified":{"type":"string","format":"date-time","description":"Timestamp when the resource was last modified."},"deletedAt":{"type":"string","format":"date-time","description":"Timestamp when the resource was deleted."}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400-bad-request"},"401":{"$ref":"#/components/responses/401-unauthorized"},"403":{"description":"The resource type is not supported by the recycle bin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/404-not-found"},"501":{"description":"Returned when `_resourceType` is `storageitems`, regardless of\n`_id` — storage items cannot be fetched individually from the\nrecycle bin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Restore a deleted resource

> Restores a single resource from the recycle bin back to the\
> account's active resources. Any request body is ignored.\
> \
> Standalone restore is blocked if a child resource is still in the\
> recycle bin. To restore a resource along with all of its dependents\
> (child flows, exports, imports, etc.), use the cascade-restore\
> endpoint instead.

```json
{"openapi":"3.2.0","info":{"title":"Recycle Bin","version":"1.0.0"},"tags":[{"name":"Recycle Bin","description":"The recycle bin holds soft-deleted resources for 30 days before\nautomatic permanent purge. During this window, resources can be\ninspected, restored individually or with dependents (cascade\nrestore), or permanently deleted ahead of the 30-day deadline.\n\n## Recycle bin schema\n\n{% openapi-schemas spec=\"recyclebin\" schemas=\"RecycleBin\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"ResourceType":{"name":"_resourceType","in":"path","required":true,"description":"Resource type to operate on.","schema":{"type":"string","enum":["connections","flows","exports","imports","scripts","integrations","stacks","filedefinitions","asynchelpers","lookupcaches","tools","apis","mcpservers","ediprofiles","agents","storageitems"]}}},"responses":{"400-bad-request":{"description":"Bad request. The server could not understand the request because of malformed syntax or invalid parameters.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"404-not-found":{"description":"Not found. The requested resource does not exist or is not visible to the caller.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/recycleBinTTL/{_resourceType}/{_id}":{"post":{"operationId":"restoreRecycleBinResource","tags":["Recycle Bin"],"summary":"Restore a deleted resource","description":"Restores a single resource from the recycle bin back to the\naccount's active resources. Any request body is ignored.\n\nStandalone restore is blocked if a child resource is still in the\nrecycle bin. To restore a resource along with all of its dependents\n(child flows, exports, imports, etc.), use the cascade-restore\nendpoint instead.","parameters":[{"$ref":"#/components/parameters/ResourceType"},{"name":"_id","in":"path","required":true,"schema":{"type":"string","format":"objectId"},"description":"Identifies which deleted resource to restore."}],"responses":{"204":{"description":"Resource restored successfully (no body returned)."},"400":{"$ref":"#/components/responses/400-bad-request"},"401":{"$ref":"#/components/responses/401-unauthorized"},"403":{"description":"The resource type is not supported by the recycle bin. Also\nreturned for `storageitems` — storage items cannot be restored\nthrough this endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/404-not-found"},"422":{"description":"Resource has dependents still in the recycle bin. Restore the\ndependents first, or use cascade restore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Permanently delete a resource

> Permanently purges a resource from the recycle bin. This action\
> cannot be undone — the resource data is irrecoverably removed.\
> Resources are auto-purged after 30 days.

```json
{"openapi":"3.2.0","info":{"title":"Recycle Bin","version":"1.0.0"},"tags":[{"name":"Recycle Bin","description":"The recycle bin holds soft-deleted resources for 30 days before\nautomatic permanent purge. During this window, resources can be\ninspected, restored individually or with dependents (cascade\nrestore), or permanently deleted ahead of the 30-day deadline.\n\n## Recycle bin schema\n\n{% openapi-schemas spec=\"recyclebin\" schemas=\"RecycleBin\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"ResourceType":{"name":"_resourceType","in":"path","required":true,"description":"Resource type to operate on.","schema":{"type":"string","enum":["connections","flows","exports","imports","scripts","integrations","stacks","filedefinitions","asynchelpers","lookupcaches","tools","apis","mcpservers","ediprofiles","agents","storageitems"]}}},"responses":{"400-bad-request":{"description":"Bad request. The server could not understand the request because of malformed syntax or invalid parameters.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"404-not-found":{"description":"Not found. The requested resource does not exist or is not visible to the caller.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/recycleBinTTL/{_resourceType}/{_id}":{"delete":{"operationId":"deleteRecycleBinResource","tags":["Recycle Bin"],"summary":"Permanently delete a resource","description":"Permanently purges a resource from the recycle bin. This action\ncannot be undone — the resource data is irrecoverably removed.\nResources are auto-purged after 30 days.","parameters":[{"$ref":"#/components/parameters/ResourceType"},{"name":"_id","in":"path","required":true,"schema":{"type":"string","format":"objectId"},"description":"Identifies which deleted resource to purge."}],"responses":{"204":{"description":"Resource permanently deleted (no body returned)."},"400":{"$ref":"#/components/responses/400-bad-request"},"401":{"$ref":"#/components/responses/401-unauthorized"},"403":{"description":"The resource type is not supported by the recycle bin. Also\nreturned for `storageitems` — storage items cannot be purged\nthrough this endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/404-not-found"}}}}}}
```

## Cascade-restore a deleted resource

> Restores a resource from the recycle bin along with all of its\
> dependent resources (child flows, exports, imports, connections,\
> scripts, etc.). Any request body is ignored. Prefer this over\
> standalone restore when restoring integrations or flows.\
> \
> This path uses \`resourceType\` (no leading underscore), unlike\
> the other recycle bin paths which use \`\_resourceType\`.

```json
{"openapi":"3.2.0","info":{"title":"Recycle Bin","version":"1.0.0"},"tags":[{"name":"Recycle Bin","description":"The recycle bin holds soft-deleted resources for 30 days before\nautomatic permanent purge. During this window, resources can be\ninspected, restored individually or with dependents (cascade\nrestore), or permanently deleted ahead of the 30-day deadline.\n\n## Recycle bin schema\n\n{% openapi-schemas spec=\"recyclebin\" schemas=\"RecycleBin\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"CascadeResourceType":{"name":"resourceType","in":"path","required":true,"description":"Resource type to cascade-restore. Uses `resourceType` (no leading underscore), unlike the other recycle bin paths.","schema":{"type":"string","enum":["connections","flows","exports","imports","scripts","integrations","stacks","filedefinitions","asynchelpers","lookupcaches","tools","apis","mcpservers","ediprofiles","agents"]}}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"404-not-found":{"description":"Not found. The requested resource does not exist or is not visible to the caller.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/recycleBinTTL/{resourceType}/{_id}/doCascadeRestore":{"post":{"operationId":"cascadeRestoreRecycleBinResource","tags":["Recycle Bin"],"summary":"Cascade-restore a deleted resource","description":"Restores a resource from the recycle bin along with all of its\ndependent resources (child flows, exports, imports, connections,\nscripts, etc.). Any request body is ignored. Prefer this over\nstandalone restore when restoring integrations or flows.\n\nThis path uses `resourceType` (no leading underscore), unlike\nthe other recycle bin paths which use `_resourceType`.","parameters":[{"$ref":"#/components/parameters/CascadeResourceType"},{"name":"_id","in":"path","required":true,"schema":{"type":"string","format":"objectId"},"description":"Identifies which deleted resource to cascade-restore."}],"responses":{"204":{"description":"Resource and all dependents restored successfully (no body returned)."},"401":{"$ref":"#/components/responses/401-unauthorized"},"403":{"description":"The resource type does not support cascade restore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/404-not-found"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.celigo.com/api/api-reference/recycle-bin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
