Delete a file
⚠️
Preview — this feature is being built; the design below is the spec.
DELETE https://app.syntic.ai/v1/files/{file_id}Delete a file before it expires. Requests already using the file keep their copy until they finish; new requests that reference the id fail with 404.
For how this fits into a full workflow, see Files API.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <key>: a private inference key (sk_live_...). See Authentication. |
Path parameters
| Parameter | Type | Description |
|---|---|---|
file_id | string | The file’s id. |
Response
200 OK, Content-Type: application/json
{
"id": "file_01JBW9Q6RZ",
"object": "file",
"deleted": true
}Examples
curl -sS -X DELETE https://app.syntic.ai/v1/files/file_01JBW9Q6RZ \
-H "Authorization: Bearer $SYNTIC_API_KEY"Errors
Errors use the error envelope and carry a request_id. Codes specific to this operation:
| Status | type | code | When |
|---|---|---|---|
| 404 | not_found_error | file_not_found | Unknown, already deleted, or another workspace’s file. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown, revoked or expired. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Related
Was this page helpful?