For the complete documentation index, see llms.txt. This page is also available as Markdown.

Media Files

List Media Files

get

Retrieves a paginated list of media files.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Query parameters
filter[model_type]stringOptional

Filter results by model_type.

filter[model_id]stringOptional

Filter results by model_id.

filter[mime_type]stringOptional

Filter results by mime_type.

filter[is_downloadable_file]stringOptional

Filter results by is_downloadable_file.

filter[not_expired]stringOptional

Filter results by not_expired.

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/media-files
GET /api/v1/media-files HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": 1,
      "created_at": "2025-01-15T10:30:00.000000Z",
      "updated_at": "2025-01-15T10:30:00.000000Z",
      "model_type": "example_model_type",
      "model_id": 1,
      "file_name": "example_file_name",
      "mime_type": "example_mime_type",
      "expires_at": "2025-01-15T10:30:00.000000Z",
      "is_expired": true
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://api.example.com/api/v1/media-files",
    "per_page": 25,
    "to": 1,
    "total": 1
  },
  "links": {
    "first": "https://api.example.com/api/v1/media-files?page=1",
    "last": "https://api.example.com/api/v1/media-files?page=1",
    "prev": null,
    "next": null
  }
}

Download Media File

get

Downloads a specific media file.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
media_filestringRequired

The media file identifier.

Responses
200

Successful response

application/json
objectOptional
get/api/v1/media-files/{media_file}/download
GET /api/v1/media-files/{media_file}/download HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{}

Last updated

Was this helpful?