---
title: "Create Or Update Organization"
method: POST
path: "/api/v2/organizations/create_or_update"
tags: ["Organizations"]
---

# Create Or Update Organization

`POST /api/v2/organizations/create_or_update`

Creates an organization if it doesn't already exist, or updates
an existing organization. Using this method means one less call
to check if an organization exists before creating it. You need
to specify the id or external id when updating
an organization to avoid a duplicate error response. Name is
not available as a matching criteria.

#### Allowed For

* Agents, with restrictions on certain actions

## Response `200`

Success response

- OrganizationResponse
  - `organization` OrganizationObject
    - `created_at` string — The time the organization was created
    - `details` string, nullable — Any details obout the organization, such as the address
    - `domain_names` string[] — An array of domain names associated with this organization
    - `external_id` string, nullable — A unique external id to associate organizations to an external record. The id is case-insensitive. For example, "company1" and "Company1" are considered the same
    - `group_id` integer, nullable — New tickets from users in this organization are automatically put in this group
    - `id` integer — Automatically assigned when the organization is created
    - `name` string, required — A unique name for the organization
    - `notes` string, nullable — Any notes you have about the organization
    - `organization_fields` object, nullable — Custom fields for this organization. See [Custom organization fields](/api-reference/ticketing/organizations/organizations/#custom-organization-fields)
    - `shared_comments` boolean — End users in this organization are able to comment on each other's tickets
    - `shared_tickets` boolean — End users in this organization are able to see each other's tickets
    - `tags` string[] — The tags of the organization
    - `updated_at` string — The time of the last update of the organization
    - `url` string — The API url of this organization

## Other responses

- `201` — Created response

---

[API](https://skmtc.dev/botbrains-io/apis/support-api.md) · [All operations](https://skmtc.dev/botbrains-io/apis/support-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/botbrains-io/support-api/revisions/d53eac07ba68/schema)
