---
title: "Attach table to a study"
method: POST
path: "/tables/attach_to_study"
tags: ["Study Integration"]
---

# Attach table to a study

`POST /tables/attach_to_study`

Attach a table to a study. Accepts either 'idno' (study IDNO) or 'sid' (study ID).

## Request body

- object
  - `db_id` string, required — Database ID (alphanumeric, underscores only, lowercase)
  - `table_id` string, required — Table ID (alphanumeric, underscores only, lowercase)
  - `idno` string — Study IDNO (unique identifier). Either 'idno' or 'sid' must be provided.
  - `sid` integer — Study ID (internal ID). Either 'idno' or 'sid' must be provided.

## Response `200`

successful operation

- object
  - `status` string
  - `result` boolean — True if attachment was successful or already exists

## Other responses

- `400` — Bad request

---

[API](https://skmtc.dev/ihsn/apis/data-tables.md) · [All operations](https://skmtc.dev/ihsn/apis/data-tables/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ihsn/data-tables/revisions/6fb7730a430d/schema)
