{
  "openapi": "3.1.0",
  "info": {
    "title": "Gripz REST API",
    "version": "2026-09-01"
  },
  "servers": [
    {
      "url": "https://api.eu.gripz.example/v1"
    },
    {
      "url": "https://api.us.gripz.example/v1"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "paths": {
    "/conversations/{id}": {
      "get": {
        "operationId": "retrieveConversation",
        "summary": "Retrieve a conversation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand[]",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "contact",
                  "assignee",
                  "company"
                ]
              }
            }
          },
          {
            "name": "include_notes",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "parts_limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 200
            }
          },
          {
            "name": "parts_cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "421": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/workflows/{id}/runs": {
      "post": {
        "operationId": "startWorkflowRun",
        "summary": "Start a workflow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Run skipped"
          },
          "201": {
            "description": "Run started"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/workflow_runs/{id}": {
      "get": {
        "operationId": "retrieveWorkflowRun",
        "summary": "One run with its steps"
      }
    },
    "/workflow_runs": {
      "get": {
        "operationId": "listWorkflowRuns",
        "summary": "Runs of one workflow, newest first"
      }
    },
    "/data_tables/{id}/rows": {
      "get": {
        "operationId": "listDataTableRows",
        "summary": "Rows of a data table"
      },
      "post": {
        "operationId": "upsertDataTableRows",
        "summary": "Add or update rows"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "responses": {
      "Error": {
        "description": "Error with type, code, message and request_id"
      }
    }
  }
}