---
title: "Create a business"
method: POST
path: "/organizations"
tags: ["Organizations"]
---

# Create a business

`POST /organizations`

## Request

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

Creates a business and makes the signed-in person its owner. `name` is
required. The slug is generated from the name when it is missing or too
short.

## Query parameters

- `include` string

## Request body

- OrganizationCreateModelAttributes: 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: `OrganizationCreateModel` sent as application/vnd.api+json.
  - `data` object, required
    - `name` string, required
    - `slug` string, nullable
    - `contact_info` object, nullable: Free-form contact details (e.g. facebook, website, phone).
    - `place` object, nullable
      - `id` string, nullable
      - `type` 'city' | 'address', nullable

## Response `201`

Created. 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
- `422`: Invalid request

---

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