---
title: "(Re)assign a project's detected vessels to its berths via spatial join."
method: POST
path: "/v1/detections/assign_berths"
tags: ["resource-facade"]
---

# (Re)assign a project's detected vessels to its berths via spatial join.

`POST /v1/detections/assign_berths`

## Headers

- `x-api-key` string, nullable

## Request body

- AssignBerthsInput
  - `project_id` string, required
  - `item_id` string, nullable

## Response `200`

Successful Response

- AssignBerthsOutput
  - `project_id` string, required
  - `updated` integer, required
  - `cleared` integer, required
  - `berth_count` integer, required
  - `by_berth` object, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.dev/geopera/apis/geopera-data-platform.md) · [All operations](https://skmtc.dev/geopera/apis/geopera-data-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/geopera/geopera-data-platform/revisions/cb0130b2a40a/schema)
