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

# Update a business avatar

`POST /organizations/{id}/update-avatar`

## Request

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

Replaces the business's avatar. Send a file, `avatar_url`, or
`avatar_base64`. Needs edit rights on the business.

## Path parameters

- `id` string, required

## Query parameters

- `include` string

## Request body

- object: Provide either avatar_url or avatar_base64.
  - `avatar_url` string, uri: Publicly reachable http(s) URL of the logo image to fetch and attach. Prefer this when the image already lives somewhere addressable.
  - `avatar_base64` string: Base64-encoded image bytes (optionally a "data:...;base64," URI). Use when you hold raw bytes and have no URL.

## Response `200`

Success. 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`: Unauthorized
- `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/06540345bbbc?raw)
