---
title: "Creates a new SpanGroup and returns it with the generated ID."
method: PUT
path: "/spangroup"
tags: ["spanGroup"]
---

# Creates a new SpanGroup and returns it with the generated ID.

`PUT /spangroup`

## Request body

- SpanGroupCreate
  - `name` string, required — Name of the SpanGroup
  - `sdoc_id` integer, required — SourceDocument the SpanGroup refers to

## Response `200`

Successful Response

- SpanGroupRead
  - `name` string, required — Name of the SpanGroup
  - `id` integer, required — ID of the SpanGroup
  - `user_id` integer, required — User that created the SpanGroup
  - `sdoc_id` integer, required — SourceDocument the SpanGroup refers to
  - `created` string, date-time, required — Created timestamp of the SpanGroup
  - `updated` string, date-time, required — Updated timestamp of the SpanGroup

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/uhh-lt/apis/discourse-analysis-tool-suite-api.md) · [All operations](https://skmtc.net/uhh-lt/apis/discourse-analysis-tool-suite-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uhh-lt/discourse-analysis-tool-suite-api/revisions/6b22366ce2d1/schema)
