Skip to main content
PATCH
/
organizations
/
{organization_id}
Update Organization
curl --request PATCH \
  --url https://playground.answeringagent.com/api/v1/organizations/{organization_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "Updated Acme Corporation",
  "description": "An updated description"
}
'
{
  "id": 1,
  "name": "Acme Corporation",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-20T14:45:00Z",
  "users": [
    {
      "id": 123,
      "external_id": "<string>",
      "email": "[email protected]",
      "name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "organizations": [
        {
          "id": 123,
          "name": "<string>",
          "role": "owner"
        }
      ]
    }
  ],
  "phone_numbers": [
    {
      "id": 123,
      "name": "<string>",
      "phone_number": "<string>",
      "status": "pending",
      "address": "<string>",
      "google_place_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

organization_id
integer
required

The ID of the organization

Body

application/json
name
string

Name of the organization

Example:

"Updated Acme Corporation"

description
string | null

Description of the organization

Example:

"An updated description"

Response

Organization updated successfully.

id
integer

Unique identifier for the organization

Example:

1

name
string

Name of the organization

Example:

"Acme Corporation"

created_at
string<date-time>

When the organization was created

Example:

"2024-01-15T10:30:00Z"

updated_at
string<date-time>

When the organization was last updated

Example:

"2024-01-20T14:45:00Z"

users
object[]

Users that are members of this organization

phone_numbers
object[]

Locations/phone numbers belonging to this organization