curl -X PATCH https://api.chartdb.com/api/update_diagram/id_123456789 \
  -H "Authorization: Bearer ch_123456789" \
  -H "Content-Type: application/json" \
  -d '{
    "diagram_name": "Updated E-commerce Diagram",
    "json_metadata": {
      "fk_info": [],
      "pk_info": [],
      "columns": [],
      "indexes": [],
      "tables": [],
      "views": [],
      "database_name": "postgres"
    }
  }'
{
  "status": "success",
  "message": "Diagram updated successfully"
}

The Update Diagram endpoint allows you to modify an existing database diagram’s properties.

Path Parameters

diagram_id
string
required

The unique identifier of the diagram.

Request Body

diagram_name
string

New name for the diagram.

json_metadata
object

Updated diagram settings in JSON format. (See Examples for more information)

curl -X PATCH https://api.chartdb.com/api/update_diagram/id_123456789 \
  -H "Authorization: Bearer ch_123456789" \
  -H "Content-Type: application/json" \
  -d '{
    "diagram_name": "Updated E-commerce Diagram",
    "json_metadata": {
      "fk_info": [],
      "pk_info": [],
      "columns": [],
      "indexes": [],
      "tables": [],
      "views": [],
      "database_name": "postgres"
    }
  }'
{
  "status": "success",
  "message": "Diagram updated successfully"
}