---
title: "Update a business"
method: PUT
path: "/organizations/{id}"
tags: ["Organizations"]
---

# Update a business

`PUT /organizations/{id}`

## Request

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

Updates the business's name, slug, place, contact details, or
`ai_format_enabled` ("Allow PurpleGrain AI to read my records"). Needs
edit rights on the business.

## Path parameters

- `id` string, required

## Query parameters

- `include` string

## Request body

- OrganizationUpdateModelAttributes: Flat attributes-adapter request body (Content-Type application/json). Attribute fields and relationships live directly under `data` (no nested `attributes` / `relationships` envelopes). Each relationship is a resource identifier object ({ id, type }). Equivalent JSON:API (nested) shape: `OrganizationUpdateModel` sent as application/vnd.api+json.
  - `data` object, required
    - `name` string
    - `slug` string, nullable
    - `contact_info` object, nullable: Free-form contact details (e.g. facebook, website, phone).
    - `ai_format_enabled` boolean: Allow PurpleGrain AI to read this organisation's records (default true). Off means the formatter's request carries no farm context for this organisation. Writable by whoever can update the organization; a null value is ignored.
    - `place` object, nullable
      - `id` string, nullable
      - `type` 'city' | 'address', nullable

## Response `200`

Update. When the `include` query parameter is used, the response may contain an `included` array (JSON:API) or inlined related resources (application/json).

- OrganizationsShowResponseAttributes
  - `data` OrganizationModelAttributes: Organization in attributes-adapter shape (Accept application/json); fields at top level.
    - `id` string
    - `type` string
    - `name` string
    - `slug` string, nullable
    - `avatar_url` string, nullable
    - `avatar_thumb_url` string, nullable
    - `free_trial_used` boolean: Whether the organization has used its free trial.
    - `ai_format_enabled` boolean: Allow PurpleGrain AI to read this organisation's records (default true). Only present for members. When false, the formatter's request carries no farm context for this organisation. Writable on update by whoever can update the organization.
    - `updated_at` string, date-time
    - `created_at` string, date-time
    - `city` object: Inlined when include=city
    - `place` object: Inlined when include=place
    - `services` unknown[], nullable: Inlined when include=services
      - unknown
    - `organization_roles` unknown[], nullable: Inlined when include=organization_roles
      - unknown

## Other responses

- `401`: Unauthenticated
- `403`: Forbidden
- `404`: Not Found

---

[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/4bedbc1c784c?raw)
