---
title: "POST /v1/organizations/{orgId}/database/query"
method: POST
path: "/v1/organizations/{orgId}/database/query"
---

# POST /v1/organizations/{orgId}/database/query

`POST /v1/organizations/{orgId}/database/query`

Execute SQL query against org's database

## Path parameters

- `orgId` string, required

## Request body

- union
  - object
  - ExecuteQueryParams
    - `params` unknown[]
      - unknown
    - `sql` string, required

## Response `200`

OK

- QueryResponse
  - `rows` object[]
  - `rowsAffected` integer

## Other responses

- `400` — Bad Request

---

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