---
title: "Create sanctions"
method: POST
path: "/sanctions"
tags: ["Sanctions"]
---

# Create sanctions

`POST /sanctions`

**Requires permission:** *SanctionsAccess*

Creates one or more sanctions and returns their new ids; may also trigger notification emails.

## Request body

- PostSanctionsRequest
  - `forms` SanctionDto[]
    - `id` integer
    - `student` SanctionStudentDto
      - `nameId` integer
      - `studentUpi` string, guid, nullable
      - `pupilId` integer
      - `preferredName` string, nullable
      - `surname` string, nullable
      - `house` string, nullable
      - `seniorHouse` string, nullable
      - `form` string, nullable
      - `emailAddress` string, nullable
      - `boarder` boolean
      - `leaver` boolean
    - `yearAtTimeOfSanction` integer, nullable
    - `staffMember` SanctionStaffDto
      - `nameId` integer
      - `preferredName` string, nullable
      - `surname` string, nullable
      - `email` string, nullable
    - `sanctionType` SanctionTypeDto
      - `id` integer, nullable
      - `order` integer
      - `value` string, nullable
      - `code` string, nullable
      - `cc` string, nullable
      - `messageBody` string, nullable
      - `messageSubject` string, nullable
      - `startTime` string, nullable
      - `endTime` string, nullable
      - `schoolSanction` boolean
      - `houseSanction` boolean
      - `boarderSanction` boolean
      - `daySanction` boolean
      - `createPermission` boolean
      - `editPermissions` integer
    - `subject` SanctionSubjectDto
      - `subjectId` integer, nullable
      - `code` string, nullable
      - `description` string, nullable
      - `category` string, nullable
      - `tutor` string, nullable
      - `department` string, nullable
      - `schoolReportPosition` integer, nullable
    - `reason` string, nullable
    - `studentNotified` boolean
    - `sanctionDate` string, date-time, nullable
    - `submitted` string, date-time, nullable
    - `attendanceCertified` boolean
    - `comments` string, nullable
    - `houseCode` string, nullable

## Response `200`

Success - sanctions created

- PostSanctionsResponse
  - `ids` integer[]

## Other responses

- `400` — An error occurred - could not create sanctions
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/tonbridge/apis/tonbridge-app-api.md) · [All operations](https://skmtc.net/tonbridge/apis/tonbridge-app-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tonbridge/tonbridge-app-api/versions/fab57bf5558a/schema)
