---
title: "Set a DAM file's focal point"
method: PATCH
path: "/dam/files/{file_id}/focal-point"
tags: ["DAM: Files"]
---

# Set a DAM file's focal point

`PATCH /dam/files/{file_id}/focal-point`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/dam/files/{file_id}/focal-point`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/dam/files/:file_id/focal-point/patch.ts> (a function with typed inputs; its response is checked against the schema)

Sets the focal point of a file, which crops made by download templates and the CDN are centred on. Both coordinates are pixels in the full-size image as it is displayed, with the top left corner at 0,0 and EXIF rotation already applied, and must fall within the width and height of that image. The width and height attributes of a file are its stored pixels, so swap them when its rotation is 90 or 270. Cached crops of the file are invalidated so the next delivery re-renders around the new focal point. Requires write access to the file.

## Path parameters

- `file_id` string, required

## Request body

- FocalPointUpdateRequest
  - `data` object, required
    - `type` string, required
    - `attributes` object, required
      - `x_coordinate` integer, required
      - `y_coordinate` integer, required

## Response `200`

success

- FocalPointResponse
  - `data` FocalPoint
    - `id` string
    - `type` string
    - `attributes` FocalPointAttributes
      - `x_coordinate` integer
      - `y_coordinate` integer
      - `created_at` string
      - `updated_at` string

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: File not found
- `422`: A coordinate falls outside the image, or the file has no image dimensions

---

[API](https://skmtc.dev/kontainer/apis/kontainer-api-documentation.md) - [All operations](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/revisions/b80a5167e09a?raw)
