Athena
Insert

Insert a row into a table

Inserts one row (or server-normalized payload) into the target table selected by `X-Athena-Client`. The optional `X-Athena-Insert-Window` header can enable request-scoped batching for Postgres-backed inserts. Conflict responses (409) are typically raised for unique/constraint violations.

PUT
/gateway/insert

Header Parameters

X-User-Id?string
X-Company-Id*string
X-Organization-Id*string
X-Publish-Event?string
X-Athena-Insert-Window?integer

Optional Postgres insert batching window in milliseconds (1–60000). When non-zero, enables or overrides gateway.insert_execution_window_ms for this request. The handler blocks until the window elapses and the row is flushed; under load, connection hold time can increase by up to this value. Ignored when X-Athena-Deadpool-Enable requests deadpool, when update_body is present, or for non-Postgres clients.

Range1 <= value <= 60000
X-Athena-Client?string
apikey?string

Request Body

application/json

table_name*string
insert_body*object
update_body?object

Response Body

application/json

curl -X PUT "https://athena-cluster.com/gateway/insert" \  -H "X-Company-Id: string" \  -H "X-Organization-Id: string" \  -H "Content-Type: application/json" \  -d '{    "table_name": "app_events",    "insert_body": {      "event_type": "user_login",      "user_id": "u_123",      "source": "dashboard"    }  }'
{
  "status": "success",
  "message": "Row inserted",
  "data": {
    "table_name": "app_events"
  }
}
Empty
Empty
Empty