---
title: "Connect your own database"
method: POST
path: "/api/v1/waitlists/{id}/database"
tags: ["Integrations"]
---

# Connect your own database

`POST /api/v1/waitlists/{id}/database`

## Request

- Base URL: `https://usewait.com`
- URL: `https://usewait.com/api/v1/waitlists/{id}/database`
- Auth: HTTP bearer

Creates the waitlist_{slug} table in the given Postgres or MySQL database and stores signups there. Use testOnly to verify connectivity without persisting anything.

## Request body

- object
  - `dbType` 'postgres' | 'mysql', required
  - `connectionString` string, required
  - `testOnly` boolean

## Response `200`

Connected, or the test succeeded.

- object

## Other responses

- `400`: Validation failed. `details` names the offending fields.
- `401`: Missing, malformed or revoked API key.
- `403`: The key is valid but lacks the scope this operation requires.
- `404`: No such resource, or it belongs to another account.
- `422`: Could not connect; `error` explains why.
- `429`: Rate limit exceeded (120 requests/minute per account).
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/usewait/apis/usewait-api.md) · [All operations](https://skmtc.dev/usewait/apis/usewait-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usewait/apis/usewait-api/revisions/d95e74897fbd?raw)
