---
title: "Create consent"
method: POST
path: "/consents"
tags: ["Consents"]
---

# Create consent

`POST /consents`

Create a new consent record for a candidate. Requires consent details including purpose, legal basis, and validity period.

## Request body

- CreateConsentDto
  - `candidateId` string, required
  - `framework` 'GDPR' | 'PDPO', required
  - `legalBasis` 'CONSENT' | 'CONTRACT' | 'LEGAL_OBLIGATION' | 'VITAL_INTEREST' | 'PUBLIC_TASK' | 'LEGITIMATE_INTEREST', required
  - `purpose` union, required — The purpose of the consent
    - object
      - `type` 'system', required
      - `name` 'RECRUITING' | 'MARKETING_EMAIL' | 'MARKETING_SMS' | 'WHATSAPP_BUSINESS_UTILITY' | 'WHATSAPP_BUSINESS_MARKETING', required
    - object
      - `type` 'custom', required
      - `id` string, required
  - `comments` string, nullable, required — Free text field for additional comments
  - `receivedAt` string, date-time, required
  - `validUntil` string, date-time, required

## Response `201`

Consent created successfully. Returns the consent ID.

- CreateRecordResponseDto
  - `id` string, required

## Other responses

- `400` — Bad request - invalid consent data
- `401` — Unauthorized - invalid or missing authentication
- `500` — Error response

---

[API](https://skmtc.net/spott/apis/spott-webhooks.md) · [All operations](https://skmtc.net/spott/apis/spott-webhooks/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spott/spott-webhooks/revisions/ad1f8c51cf0a/schema)
