← API referenceOrganize · API access unavailable
API REFERENCE / ORGANIZE
POST /v1/items/{item_id}/restore
Restore a trashed item into an authorized parent.
Request fields
| Location | Field | Type | Required | Description |
|---|---|---|---|---|
| Header | Authorization | string | Yes | Credential scoped to the authorized resource. |
| Header | Content-Type | string (media type) | Yes | application/json. |
| Path | item_id | string | Yes | Stable file or folder ID. |
| Header | Idempotency-Key | string | Yes | Stable retry identity. |
| Body | parent_id | string | No | Replacement destination if the original parent is unavailable. |
Request example
Example request
POST /v1/items/file_789/restore
Authorization: Bearer <scoped token>
Idempotency-Key: restore-8427
Content-Type: application/json
{
"parent_id": "folder_123"
}HTTP status codes
| Status | Meaning |
|---|---|
202 Accepted | Success response shown below. |
401 Unauthorized | Missing, expired, or invalid credential. |
403 Forbidden | Credential is valid but lacks the required scope or role. |
404 Not Found | Trashed item is not visible. |
409 Conflict | Destination or retention state prevents restore. |
429 Too Many Requests | Rate limit reached; honor Retry-After when provided. |
503 Service Unavailable | Service temporarily unavailable; retry safely. |
Response fields
| Field | Type | Example |
|---|---|---|
operation_id | string | op_460 |
item_id | string | file_789 |
status | string | accepted |
Response example
Example response
202 Accepted
Content-Type: application/json
{
"operation_id": "op_460",
"item_id": "file_789",
"status": "accepted"
}How it works
If the original parent no longer exists, the caller may choose another authorized folder. Restoration may conflict with a replacement name or expired retention.
