---
title: "Activate DTT template"
method: POST
path: "/dtt/templates/{id}"
tags: ["DTT Templates"]
---

# Activate DTT template

`POST /dtt/templates/{id}`

## Request

- Base URL: `https://dashboard.researchanddesire.com/api/v1`
- URL: `https://dashboard.researchanddesire.com/api/v1/dtt/templates/{id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `/oauth/authorize`
    - Token URL: `/oauth/token` scopes: `dtt:write`

Activates a training program template by ID. Only one template can be active at a time.

If your schedule type is "auto" or "weekly", it will be switched to "single" mode.
All other templates (owned and imported) will be deactivated.

## Path parameters

- `id` integer, required

## Request body

- ActivateTemplateRequest
  - `isActive` true, required: Must be true to activate

## Response `200`

Template activated

- ActivateDttTemplateResponse
  - `ok` true, required
  - `data` object, required
    - `id` integer: Template ID
    - `bubbleId` string: Unique public identifier
    - `ownerId` integer: Owner user ID
    - `name` string: Program name
    - `description` string: Program description
    - `tagline` string: Short tagline
    - `message` string: Welcome message
    - `isPublic` boolean: Whether publicly visible
    - `isActive` boolean: Whether currently active
    - `handsFreeMode` boolean: Hands-free mode enabled
    - `targetDepth` integer: Target depth percentage
    - `targetWindow` integer: Target window size
    - `toyId` integer, nullable: Associated toy ID
    - `createdDate` string, date-time: Creation date
    - `updatedAt` string, date-time: Last update time
    - `Segment` DttSegment[]
      - `id` integer
      - `type` 'repetition' | 'endurance' | 'freeform' | 'bounce': Segment type
      - `duration` integer: Duration (meaning varies by type)
      - `speed` number: Speed setting (1–1000)
      - `repeat` integer: Number of times to repeat
      - `order` integer: Position in the segment list (0-based)
      - `passFailEnabled` boolean: Whether pass/fail grading is enabled
      - `passGradeThreshold` integer: Minimum grade to pass (0–100)
      - `failureText` string, nullable: Message shown on failure
    - `scheduleTypeChanged` boolean: Whether schedule type was changed to single

## Other responses

- `400`: Invalid request
- `401`: Authentication required or token invalid
- `404`: Template not found or not owned

## Changes

- **2026-09-28** `cad555a1bf4b`: 1 breaking
  - the `data/allOf[#/components/schemas/DttTemplateDetail]/allOf[subschema #2]/Segment/items/speed` response's property type changed from `integer` to `number` for status `200`
- **2026-09-22** `2411203b3c10`: 2 info
  - the endpoint scheme security `bearerAuth` was added to the API
  - the endpoint scheme security `oauth2` was added to the API

[Operation history](https://skmtc.dev/researchanddesire/apis/research-and-desire-api/changes/dtt/templates/:id/post.md)

---

[API](https://skmtc.dev/researchanddesire/apis/research-and-desire-api.md) - [All operations](https://skmtc.dev/researchanddesire/apis/research-and-desire-api/llms.txt) - [OpenAPI document](https://skmtc.dev/researchanddesire/apis/research-and-desire-api/revisions/682fc4d7f6d5?raw)
