---
title: "Rename a block or change its paddocks"
method: PUT
path: "/properties/{property_id}/blocks/{id}"
tags: ["Blocks"]
---

# Rename a block or change its paddocks

`PUT /properties/{property_id}/blocks/{id}`

## Request

- Base URL: `https://api.purplegrain.com/api/v1`
- URL: `https://api.purplegrain.com/api/v1/properties/{property_id}/blocks/{id}`
- Auth: HTTP bearer

Renames a block, changes its kind or number, or (with `paddock_ids`) replaces its members: the listed live paddocks of the property move into it (out of any other block), and a member left out goes back to the home block (`block_id` null). Omitting `paddock_ids` leaves the members alone. Writes, moves or removes no record. To move one paddock, `updatePaddock` with `block_id` also works. Requires edit rights on the property.

## Path parameters

- `property_id` string, uuid, required
- `id` string, uuid, required

## Request body

- BlockUpdateModelAttributes: Flat attributes-adapter request body (Content-Type application/json). Every field is optional. Equivalent JSON:API shape: `BlockUpdateModel`.
  - `data` object, required
    - `name` string
    - `kind` 'outblock' | 'irrigation_farm' | 'management'
    - `block_number` string, nullable
    - `paddock_ids` string[]

## Response `200`

The updated block.

- BlockResponseAttributes: One block in attributes-adapter shape (Accept application/json).
  - `data` object: A block's fields, as the block write endpoints answer them.
    - `id` string, uuid
    - `type` string
    - `name` string
    - `kind` 'outblock' | 'irrigation_farm' | 'management'
    - `block_number` string, nullable
    - `property_id` string, uuid
    - `paddock_ids` string[]
    - `area_ha` number, nullable
    - `hull` object, nullable
      - `type` string
      - `coordinates` unknown[]
        - unknown
    - `archived_at` string, date-time, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `401`: Unauthorized — no session.
- `403`: Forbidden — the caller may not edit this property.
- `404`: No such property, or no live block with that id on it.
- `422`: A duplicate name, an unknown kind, or a `paddock_ids` entry that is not a live paddock of this property.

---

[API](https://skmtc.dev/purplegrain/apis/purple-grain-api.md) · [All operations](https://skmtc.dev/purplegrain/apis/purple-grain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/purplegrain/apis/purple-grain-api/revisions/06540345bbbc?raw)
