---
title: حذف ملف | RunAPI
description: حذف ملف منطقيًا وجدولة محتواه المخزَّن للتنظيف.
url: https://runapi.ai/ar/docs/api/protocol/files/delete.md
canonical: https://runapi.ai/ar/docs/api/protocol/files/delete
locale: ar
---

> نسخة HTML: https://runapi.ai/ar/docs/api/protocol/files/delete
> فهرس الموقع للوكلاء: https://runapi.ai/llms.txt

# حذف ملف

حذف ملف منطقيًا وجدولة محتواه المخزَّن للتنظيف.

## نقطة النهاية

DELETE /v1/files/:file_id

عنوان URL الأساسي: https://runapi.ai

إصدار API: v1

المصادقة: Authorization: Bearer YOUR_API_KEY

## الطلب

أرسل القيم فقط في موقع الطلب المُدرج.

### معاملات المسار

```json
{
  "file_id": {
    "description": "معرّف ملف RunAPI.",
    "required": true,
    "type": "string"
  }
}
```

## استجابة النجاح

HTTP 200 - DELETE /v1/files/:file_id

```json
{
  "deleted": true,
  "id": "file_abc123",
  "object": "file"
}
```

## استجابة الخطأ (401)

HTTP 401

### مخطط الاستجابة

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### مثال على الاستجابة

```json
{
  "error": {
    "code": "authentication_error",
    "message": "Missing API key",
    "param": null,
    "type": "authentication_error"
  }
}
```

## استجابة الخطأ (404)

HTTP 404

### مخطط الاستجابة

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### مثال على الاستجابة

```json
{
  "error": {
    "code": "not_found",
    "message": "File not found",
    "param": null,
    "type": "invalid_request_error"
  }
}
```

## استجابة الخطأ (502)

HTTP 502

### مخطط الاستجابة

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### مثال على الاستجابة

```json
{
  "error": {
    "code": "storage_write_failed",
    "message": "File storage failed",
    "param": null,
    "type": "server_error"
  }
}
```

## مثال cURL



### curl

```curl
curl -X DELETE https://runapi.ai/v1/files/file_abc123 \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

## المرجع ذو الصلة

- [الملفات الدائمة](https://runapi.ai/ar/docs/api/protocol/files.md)
- [كائن الملف](https://runapi.ai/ar/docs/api/protocol/files/object.md)

---

## المزيد من RunAPI

- [الرئيسية](https://runapi.ai/ar/.md)
- [كتالوج النماذج](https://runapi.ai/ar/models.md)
- [الأسعار](https://runapi.ai/ar/pricing.md)
- [مزودو الخدمة](https://runapi.ai/ar/models)
- [التوثيق](https://runapi.ai/ar/docs/guides)
- [حزم SDK](https://runapi.ai/ar/sdk.md)
- [CLI](https://runapi.ai/ar/cli.md)
- [خادم MCP](https://runapi.ai/ar/mcp.md)
- [Claude Code مقابل Cursor](https://runapi.ai/ar/claude-code-vs-cursor.md)
- [إعداد Cursor API](https://runapi.ai/ar/cursor-api-setup.md)
- [RunAPI مقابل OpenRouter](https://runapi.ai/ar/openrouter-alternative.md)
- [المؤسسات](https://runapi.ai/ar/contact.md)
- [اتصل بنا](https://runapi.ai/ar/contact.md)
- [الشروط](https://runapi.ai/ar/terms.md)
- [الخصوصية](https://runapi.ai/ar/privacy.md)
- [فهرس الموقع للوكلاء](https://runapi.ai/llms.txt)

التواصل: contact@runapi.ai

## البيانات المنظمة

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "ar",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/ar",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/ar/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "ar",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/ar",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/aricon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "ar",
    "@type": "TechArticle",
    "headline": "حذف ملف",
    "description": "حذف ملف منطقيًا وجدولة محتواه المخزَّن للتنظيف.",
    "url": "https://runapi.ai/ar/docs/api/protocol/files/delete",
    "mainEntityOfPage": "https://runapi.ai/ar/docs/api/protocol/files/delete"
  }
]
```
