---
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

## Changes

- **2025-12-01** `c9fac12336ea` — 3 info
  - api tag `Study Integration` added
  - api tag `Tables` removed
  - added the non-success response with the status `400`
- **2023-12-21** `1451f79c7f04` — 3 info
  - api tag `Tables` added
  - api tag `Study Integration` removed
  - removed the non-success response with the status `400`

[Change history](https://skmtc.dev/ihsn/apis/data-tables/changes/tables/attach_to_study/post.md)

---

[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/c9fac12336ea/schema)
