> For the complete documentation index, see [llms.txt](https://knowledgebase.fabricdata.com/studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.fabricdata.com/studio/integrations-and-apis/origin-studio-production-api/media.md).

# Media

This API provides a way to manage Media (images and files) in the context of a Record.

## Get media storage for tenant

> Get the media storage information for a tenant, including committed bytes and limit.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2264"},"tags":[{"name":"Media","description":"This API provides a way to manage Media (images and files) in the context of a Record."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"MediaStorageFindOneResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaStorageFindOneResponse","description":"Returns the media storage information for a tenant","type":"object","additionalProperties":false,"required":["data","links"],"properties":{"data":{"type":"object","required":["id","type","attributes"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["mediaStorage"]},"attributes":{"type":"object","additionalProperties":false,"required":["committedBytes","limitBytes"],"properties":{"committedBytes":{"type":"integer","description":"The number of bytes currently committed/used by the tenant"},"limitBytes":{"type":"integer","description":"The maximum number of bytes allowed for the tenant"},"availableBytes":{"type":"integer","description":"The number of bytes available for the tenant (limitBytes - committedBytes)"},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"}}}}},"links":{"$ref":"#/components/schemas/LinksSelf"}}},"LinksSelf":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinksSelf","description":"A JSON:API links object with an absolute or relative 'self' link","type":"object","required":["self"],"properties":{"self":{"type":"string"}},"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"Standard JSON:API error response returned when a request fails. Contains an `errors` array with one or more error objects (status, title, and optional detail).","type":"object","required":["errors"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"A single JSON:API error object. `status` is the HTTP status code as a string. `title` is a short, human-readable summary. `detail` provides optional context. `meta` may include structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error (e.g. `/data/attributes/title`).","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"Error stack trace. Only present in non-production environments."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/media/storage":{"get":{"summary":"Get media storage for tenant","operationId":"mediaStorageFindOne","description":"Get the media storage information for a tenant, including committed bytes and limit.","tags":["Media"],"parameters":[{"name":"tenantId","description":"The ID of the tenant to get storage info for. If not provided, the tenant ID is extracted from the token.","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved media storage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaStorageFindOneResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Create a media storage for tenant

> Create a media storage for tenant.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2264"},"tags":[{"name":"Media","description":"This API provides a way to manage Media (images and files) in the context of a Record."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"Standard JSON:API error response returned when a request fails. Contains an `errors` array with one or more error objects (status, title, and optional detail).","type":"object","required":["errors"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"A single JSON:API error object. `status` is the HTTP status code as a string. `title` is a short, human-readable summary. `detail` provides optional context. `meta` may include structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error (e.g. `/data/attributes/title`).","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"Error stack trace. Only present in non-production environments."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/media/storage":{"post":{"summary":"Create a media storage for tenant","operationId":"mediaStorageCreateOne","description":"Create a media storage for tenant.","tags":["Media"],"parameters":[{"name":"tenantId","description":"The ID of the tenant to provision storage for.","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Get many media for a record

> Get many media for a record.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2264"},"tags":[{"name":"Media","description":"This API provides a way to manage Media (images and files) in the context of a Record."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"MediaAttributeMediaType":{"$id":"media_attribute_media_type","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributeMediaType","description":"High-level media category. `image` is a raster image (JPEG, PNG, etc.). `file` is a document or other non-image file (PDF, Office document, CSV). `archive` is a compressed collection of files.","type":"string","enum":["image","file","archive"]},"MediaFindManyResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaFindManyResponse","description":"Returns the media for a given record. You have to filter by mediaType","type":"object","additionalProperties":false,"required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","type","attributes","relationships","meta"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]},"attributes":{"allOf":[{"$ref":"#/components/schemas/BaseResourceAttributes"},{"$ref":"#/components/schemas/MediaAttributes"}]},"relationships":{"$ref":"#/components/schemas/MediaRelationships"},"links":{"$ref":"#/components/schemas/LinksRelated"}}}},"meta":{"type":"object","required":["filters","expiresAt"],"properties":{"filters":{"type":"object","required":["mediaType"],"properties":{"mediaType":{"$ref":"#/components/schemas/MediaAttributeMediaType"},"imageType":{"$ref":"#/components/schemas/MediaAttributeImageType"}},"additionalProperties":false},"expiresAt":{"type":"string"}},"additionalProperties":false},"links":{"$ref":"#/components/schemas/LinksSelf"}}},"BaseResourceAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IBaseResourceAttributes","description":"Common timestamps present on all resource attribute objects. `created` is the ISO 8601 date-time when the resource was first created; `updated` is the date-time of the most recent modification.","type":"object","additionalProperties":false,"required":["created","updated"],"properties":{"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"}}},"MediaAttributes":{"$id":"media_attributes","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributes","description":"Attributes of a media file attached to a record. Covers file identity (`fileName`, `originalFileName`, `fileExtension`, `fileSize`, `fileUrl`), content classification (`mediaType`, `mimeType`), image-specific metadata (`imageType`, `imageWidth`, `imageHeight`), and tags for organization. `source` distinguishes user-uploaded files from those imported from Origin.","type":"object","required":["mimeType","fileName","originalFileName"],"additionalProperties":false,"properties":{"mediaType":{"$ref":"#/components/schemas/MediaAttributeMediaType"},"mimeType":{"$ref":"#/components/schemas/MediaAttributeMimeType"},"originalFileName":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"fileExtension":{"type":"string","minLength":1},"fileSize":{"type":"number","minimum":0},"fileUrl":{"type":"string"},"key":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"imageType":{"$ref":"#/components/schemas/MediaAttributeImageType"},"imageWidth":{"type":"number","minimum":0},"imageHeight":{"type":"number","minimum":0},"source":{"$ref":"#/components/schemas/MediaAttributeSource"}}},"MediaAttributeMimeType":{"$id":"media_attribute_mime_type","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributeMimeType","description":"MIME type of the uploaded file. Only types in this enum are accepted by the platform. Supported formats include common image formats (JPEG, PNG, GIF, WebP, TIFF, AVIF, PSD), PDF, illustration and design formats (AI, INDD), and Office/spreadsheet documents.","type":"string","enum":["image/jpeg","image/png","image/vnd.adobe.photoshop","image/gif","image/avif","image/webp","image/tiff","application/pdf","text/csv","application/illustrator","application/x-indesign","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},"MediaAttributeImageType":{"$id":"media_attribute_image_type","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributeImageType","description":"Editorial classification for an image asset associated with a record. Used to distinguish between general photos, talent portraits, theatrical marketing posters, and tile/thumbnail formats.","type":"string","enum":["Photo","Portrait","Poster","Theatrical Poster","Tile"]},"MediaAttributeSource":{"$id":"media_attribute_source","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributeSource","description":"Origin of a media file. `UserUpload` means the file was uploaded directly by a tenant user. `OriginImport` means the file was imported from the Origin metadata provider during a data sync.","type":"string","enum":["UserUpload","OriginImport"]},"MediaRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaRelationships","description":"JSON:API relationship links for a media resource. Contains relationships to both the owning tenant and the record this media file is attached to.","type":"object","properties":{"tenant":{"$ref":"#/components/schemas/TenantRelationship"},"record":{"$ref":"#/components/schemas/RecordRelationship"}},"required":["tenant","record"],"additionalProperties":false},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksSelf":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinksSelf","description":"A JSON:API links object with an absolute or relative 'self' link","type":"object","required":["self"],"properties":{"self":{"type":"string"}},"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"Standard JSON:API error response returned when a request fails. Contains an `errors` array with one or more error objects (status, title, and optional detail).","type":"object","required":["errors"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"A single JSON:API error object. `status` is the HTTP status code as a string. `title` is a short, human-readable summary. `detail` provides optional context. `meta` may include structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error (e.g. `/data/attributes/title`).","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"Error stack trace. Only present in non-production environments."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/media":{"get":{"summary":"Get many media for a record","operationId":"mediaFindMany","description":"Get many media for a record.","tags":["Media"],"parameters":[{"name":"recordId","description":"The ID of the record to get the media for","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter.mediaType","in":"query","required":true,"schema":{"$ref":"#/components/schemas/MediaAttributeMediaType"},"description":"Filter media by mediaType. Example: filter.mediaType=image"}],"responses":{"200":{"description":"Successfully retrieved media","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFindManyResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported Media Type. The media type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Get poster image for a record

> Get the poster image for a record. Returns only media items with imageType=Poster.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2264"},"tags":[{"name":"Media","description":"This API provides a way to manage Media (images and files) in the context of a Record."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"MediaFindManyResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaFindManyResponse","description":"Returns the media for a given record. You have to filter by mediaType","type":"object","additionalProperties":false,"required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","type","attributes","relationships","meta"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]},"attributes":{"allOf":[{"$ref":"#/components/schemas/BaseResourceAttributes"},{"$ref":"#/components/schemas/MediaAttributes"}]},"relationships":{"$ref":"#/components/schemas/MediaRelationships"},"links":{"$ref":"#/components/schemas/LinksRelated"}}}},"meta":{"type":"object","required":["filters","expiresAt"],"properties":{"filters":{"type":"object","required":["mediaType"],"properties":{"mediaType":{"$ref":"#/components/schemas/MediaAttributeMediaType"},"imageType":{"$ref":"#/components/schemas/MediaAttributeImageType"}},"additionalProperties":false},"expiresAt":{"type":"string"}},"additionalProperties":false},"links":{"$ref":"#/components/schemas/LinksSelf"}}},"BaseResourceAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IBaseResourceAttributes","description":"Common timestamps present on all resource attribute objects. `created` is the ISO 8601 date-time when the resource was first created; `updated` is the date-time of the most recent modification.","type":"object","additionalProperties":false,"required":["created","updated"],"properties":{"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"}}},"MediaAttributes":{"$id":"media_attributes","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributes","description":"Attributes of a media file attached to a record. Covers file identity (`fileName`, `originalFileName`, `fileExtension`, `fileSize`, `fileUrl`), content classification (`mediaType`, `mimeType`), image-specific metadata (`imageType`, `imageWidth`, `imageHeight`), and tags for organization. `source` distinguishes user-uploaded files from those imported from Origin.","type":"object","required":["mimeType","fileName","originalFileName"],"additionalProperties":false,"properties":{"mediaType":{"$ref":"#/components/schemas/MediaAttributeMediaType"},"mimeType":{"$ref":"#/components/schemas/MediaAttributeMimeType"},"originalFileName":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"fileExtension":{"type":"string","minLength":1},"fileSize":{"type":"number","minimum":0},"fileUrl":{"type":"string"},"key":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"imageType":{"$ref":"#/components/schemas/MediaAttributeImageType"},"imageWidth":{"type":"number","minimum":0},"imageHeight":{"type":"number","minimum":0},"source":{"$ref":"#/components/schemas/MediaAttributeSource"}}},"MediaAttributeMediaType":{"$id":"media_attribute_media_type","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributeMediaType","description":"High-level media category. `image` is a raster image (JPEG, PNG, etc.). `file` is a document or other non-image file (PDF, Office document, CSV). `archive` is a compressed collection of files.","type":"string","enum":["image","file","archive"]},"MediaAttributeMimeType":{"$id":"media_attribute_mime_type","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributeMimeType","description":"MIME type of the uploaded file. Only types in this enum are accepted by the platform. Supported formats include common image formats (JPEG, PNG, GIF, WebP, TIFF, AVIF, PSD), PDF, illustration and design formats (AI, INDD), and Office/spreadsheet documents.","type":"string","enum":["image/jpeg","image/png","image/vnd.adobe.photoshop","image/gif","image/avif","image/webp","image/tiff","application/pdf","text/csv","application/illustrator","application/x-indesign","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},"MediaAttributeImageType":{"$id":"media_attribute_image_type","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributeImageType","description":"Editorial classification for an image asset associated with a record. Used to distinguish between general photos, talent portraits, theatrical marketing posters, and tile/thumbnail formats.","type":"string","enum":["Photo","Portrait","Poster","Theatrical Poster","Tile"]},"MediaAttributeSource":{"$id":"media_attribute_source","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributeSource","description":"Origin of a media file. `UserUpload` means the file was uploaded directly by a tenant user. `OriginImport` means the file was imported from the Origin metadata provider during a data sync.","type":"string","enum":["UserUpload","OriginImport"]},"MediaRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaRelationships","description":"JSON:API relationship links for a media resource. Contains relationships to both the owning tenant and the record this media file is attached to.","type":"object","properties":{"tenant":{"$ref":"#/components/schemas/TenantRelationship"},"record":{"$ref":"#/components/schemas/RecordRelationship"}},"required":["tenant","record"],"additionalProperties":false},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksSelf":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinksSelf","description":"A JSON:API links object with an absolute or relative 'self' link","type":"object","required":["self"],"properties":{"self":{"type":"string"}},"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"Standard JSON:API error response returned when a request fails. Contains an `errors` array with one or more error objects (status, title, and optional detail).","type":"object","required":["errors"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"A single JSON:API error object. `status` is the HTTP status code as a string. `title` is a short, human-readable summary. `detail` provides optional context. `meta` may include structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error (e.g. `/data/attributes/title`).","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"Error stack trace. Only present in non-production environments."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/media/poster":{"get":{"summary":"Get poster image for a record","operationId":"mediaFindPoster","description":"Get the poster image for a record. Returns only media items with imageType=Poster.","tags":["Media"],"parameters":[{"name":"recordId","description":"The ID of the record to get the poster for","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved poster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFindManyResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Archive many media

> Archive multiple media items. Provide a list of media IDs. The service validates each item and ensures the combined size does not exceed 2 GB. It then downloads all media, creates a ZIP, and returns a presigned URL to download it. The ZIP file is named tenantId\_recordId\_uuid.zip.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2264"},"tags":[{"name":"Media","description":"This API provides a way to manage Media (images and files) in the context of a Record."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"MediaArchiveManyRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaArchiveManyRequest","description":"Request body for archiving multiple media files in a single operation. Specifies the media resource IDs to be archived via the `relationships.media` linkage array. Archived media are soft-deleted and no longer accessible via normal media endpoints.","type":"object","properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"data":{"type":"object","required":["type","attributes"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["archives"]},"relationships":{"$ref":"#/components/schemas/MediaArchiveRelationships"}}}},"required":["data"],"additionalProperties":false},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Optional audit metadata for a write request. `audit.source` is the issuing surface/channel (e.g. studio-web, mcp, api, system); `audit.reason` is a free-text justification. Both are optional and length-capped.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"MediaArchiveRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaArchiveRelationships","description":"Relationships for a media archive operation. Contains the list of media resource IDs that should be included in the archive.","type":"object","properties":{"media":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","id"],"properties":{"type":{"type":"string","enum":["media"]},"id":{"type":"string"}}}}}}},"required":["media"],"additionalProperties":false},"MediaArchiveManyResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaArchiveManyResponse","description":"The response for a media download many zip request.","type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"object","required":["type","id","attributes","relationships"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["archives"]},"id":{"type":"string"},"attributes":{"type":"object","required":["url","expiresAt"],"properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"additionalProperties":false},"relationships":{"allOf":[{"$ref":"#/components/schemas/MediaRelationships"},{"$ref":"#/components/schemas/MediaArchiveRelationships"}]}}}}},"MediaRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaRelationships","description":"JSON:API relationship links for a media resource. Contains relationships to both the owning tenant and the record this media file is attached to.","type":"object","properties":{"tenant":{"$ref":"#/components/schemas/TenantRelationship"},"record":{"$ref":"#/components/schemas/RecordRelationship"}},"required":["tenant","record"],"additionalProperties":false},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"Standard JSON:API error response returned when a request fails. Contains an `errors` array with one or more error objects (status, title, and optional detail).","type":"object","required":["errors"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"A single JSON:API error object. `status` is the HTTP status code as a string. `title` is a short, human-readable summary. `detail` provides optional context. `meta` may include structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error (e.g. `/data/attributes/title`).","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"Error stack trace. Only present in non-production environments."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/media/archives":{"post":{"summary":"Archive many media","operationId":"mediaArchiveMany","description":"Archive multiple media items. Provide a list of media IDs. The service validates each item and ensures the combined size does not exceed 2 GB. It then downloads all media, creates a ZIP, and returns a presigned URL to download it. The ZIP file is named tenantId_recordId_uuid.zip.","tags":["Media"],"parameters":[{"name":"recordId","description":"The ID of the record to archive the media for","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaArchiveManyRequest"}}}},"responses":{"201":{"description":"Created OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaArchiveManyResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Execute an atomic operation on a media

> Execute an atomic operation on a media.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2264"},"tags":[{"name":"Media","description":"This API provides a way to manage Media (images and files) in the context of a Record."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"MediaAtomicOperationsRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAtomicOperationsRequest","description":"JSON:API Atomic Operations request for managing media attached to a record. Supports `add` (register a new media file for upload), `update` (modify metadata of an existing media file), and `remove` (delete a media file) operations in a single request. Operations are applied sequentially.","type":"object","properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"atomic:operations":{"type":"array","items":{"type":"object","oneOf":[{"properties":{"op":{"const":"add"},"data":{"$ref":"#/components/schemas/dataObjectMediaAdd"}},"required":["op","data"],"additionalProperties":false},{"properties":{"op":{"const":"update"},"ref":{"$ref":"#/components/schemas/updateRefObjectMedia"},"data":{"$ref":"#/components/schemas/dataObjectMediaUpdate"}},"required":["op","data"],"additionalProperties":false},{"properties":{"op":{"const":"remove"},"ref":{"$ref":"#/components/schemas/removeRefObjectMedia"}},"required":["op","ref"],"additionalProperties":false}]}}},"required":["atomic:operations"],"additionalProperties":false,"definitions":{"dataObjectMediaAdd":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]},"attributes":{"type":"object","required":["originalFileName"],"additionalProperties":false,"properties":{"languages":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"imageType":{"type":"string","enum":["Photo","Portrait","Poster","Theatrical Poster","Tile"]},"originalFileName":{"type":"string"}}}},"required":["type","attributes"],"additionalProperties":false},"dataObjectMediaUpdate":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]},"attributes":{"type":"object","required":[],"additionalProperties":false,"properties":{"languages":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"imageType":{"type":"string","enum":["Photo","Portrait","Poster","Theatrical Poster","Tile"]},"fileName":{"type":"string"}}}},"required":["type","attributes"],"additionalProperties":false},"updateRefObjectMedia":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]}},"required":["id","type"],"additionalProperties":false},"removeRefObjectMedia":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]}},"required":["id","type"],"additionalProperties":false}}},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Optional audit metadata for a write request. `audit.source` is the issuing surface/channel (e.g. studio-web, mcp, api, system); `audit.reason` is a free-text justification. Both are optional and length-capped.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"dataObjectMediaAdd":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]},"attributes":{"type":"object","required":["originalFileName"],"additionalProperties":false,"properties":{"languages":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"imageType":{"type":"string","enum":["Photo","Portrait","Poster","Theatrical Poster","Tile"]},"originalFileName":{"type":"string"}}}},"required":["type","attributes"],"additionalProperties":false},"updateRefObjectMedia":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]}},"required":["id","type"],"additionalProperties":false},"dataObjectMediaUpdate":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]},"attributes":{"type":"object","required":[],"additionalProperties":false,"properties":{"languages":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"imageType":{"type":"string","enum":["Photo","Portrait","Poster","Theatrical Poster","Tile"]},"fileName":{"type":"string"}}}},"required":["type","attributes"],"additionalProperties":false},"removeRefObjectMedia":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["media"]}},"required":["id","type"],"additionalProperties":false},"MediaAtomicOperationsResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAtomicOperationsResponse","description":"Response to a media atomic operations request. Each result in `atomic:results` corresponds to one operation. For `add` operations, the result includes a pre-signed S3 upload URL (`fileUrl`) and its expiration time — the client must upload the file bytes to this URL directly before the URL expires.","type":"object","properties":{"atomic:results":{"type":"array","items":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"const":"uploads"},"id":{"type":"string"},"attributes":{"type":"object","properties":{"originalFileName":{"type":"string"},"fileUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["originalFileName","fileUrl","expiresAt"],"additionalProperties":false}},"required":["type","id","attributes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}},"required":["atomic:results"],"additionalProperties":true},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"Standard JSON:API error response returned when a request fails. Contains an `errors` array with one or more error objects (status, title, and optional detail).","type":"object","required":["errors"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"A single JSON:API error object. `status` is the HTTP status code as a string. `title` is a short, human-readable summary. `detail` provides optional context. `meta` may include structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error (e.g. `/data/attributes/title`).","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"Error stack trace. Only present in non-production environments."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/media/operations":{"post":{"summary":"Execute an atomic operation on a media","operationId":"mediaAtomicOperations","description":"Execute an atomic operation on a media.","tags":["Media"],"parameters":[{"name":"recordId","description":"The ID of the record to execute the operation on","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaAtomicOperationsRequest"}}},"required":true},"responses":{"200":{"description":"Successfully executed the atomic operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaAtomicOperationsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
