---
title: "Update organization"
method: PUT
path: "/api/organizations/{id}/"
tags: ["organizations"]
---

# Update organization

`PUT /api/organizations/{id}/`

## Request

- Base URL: `https://docs.blindinsight.io` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.blindinsight.io/api/organizations/{id}/`
- Auth: one of:
  - API key in cookie `sessionid`
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/docs/api/organizations/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Replace an organization with the data provided in the request.

The response will be the updated organization object.

**On the command line:**

```bash
blind organizations update --id "<organization-id>" --data organization.json
```

## Path parameters

- `id` string, required

## Request body

- OrganizationUpdate: Update an Organization, allowing for the owner to be changed. Since an Owner is a 1:1 relationship, we can't use the default `NestedHyperlinkedRelatedField` and must change it to an `OrganizationUser` queryset limited to organization members. The `to_representation()` method is overloaded to return the correct URL for the owner.
  - `id` string, required
  - `url` string, uri, required
  - `owner` string, uri, required
  - `organization_users` string[], required
  - `slug` string: A unique ID used to identify this organization
  - `name` string, required: A human-readable name for this organization
  - `is_active` boolean
  - `created` string, date-time, required
  - `modified` string, date-time, required

## Response `200`

- OrganizationUpdate: Update an Organization, allowing for the owner to be changed. Since an Owner is a 1:1 relationship, we can't use the default `NestedHyperlinkedRelatedField` and must change it to an `OrganizationUser` queryset limited to organization members. The `to_representation()` method is overloaded to return the correct URL for the owner.
  - `id` string, required
  - `url` string, uri, required
  - `owner` string, uri, required
  - `organization_users` string[], required
  - `slug` string: A unique ID used to identify this organization
  - `name` string, required: A human-readable name for this organization
  - `is_active` boolean
  - `created` string, date-time, required
  - `modified` string, date-time, required

---

[API](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api.md) - [All operations](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/revisions/0ac902401cea?raw)
