API referenceFilesDelete a file

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

HeaderRequiredValue
AuthorizationYesBearer <key>: a private inference key (sk_live_...). See Authentication.

Path parameters

ParameterTypeDescription
file_idstringThe 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:

StatustypecodeWhen
404not_found_errorfile_not_foundUnknown, already deleted, or another workspace’s file.
401authentication_errorinvalid_api_keyThe key is missing, unknown, revoked or expired.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?