---
title: "Attach one or more external services to a backup schedule. Idempotent — services that are already attached are silently skipped (`ON CONFLICT DO NOTHING`). Returns the count of newly inserted rows + the total membership after the operation."
method: POST
path: "/backups/schedules/{id}/services"
tags: ["Backups"]
---

# Attach one or more external services to a backup schedule. Idempotent — services that are already attached are silently skipped (\`ON CONFLICT DO NOTHING\`). Returns the count of newly inserted rows + the total membership after the operation.

`POST /backups/schedules/{id}/services`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/backups/schedules/{id}/services`
- Auth: HTTP bearer

## Path parameters

- `id` integer, required

## Request body

- AttachScheduleServicesRequest: Body for `POST /api/backups/schedules/{id}/services` — attach external services to a backup schedule. Idempotent.
  - `service_ids` integer[], required: External service ids to attach. Duplicates are de-duplicated server-side.

## Response `200`

Services attached

- AttachScheduleServicesResponse: Response for `POST /api/backups/schedules/{id}/services`.
  - `inserted` integer, required: Number of rows actually inserted (excludes rows skipped by `ON CONFLICT DO NOTHING`).
  - `total_attached` integer, required: Total number of services now attached to the schedule.

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Schedule not found
- `500`: Internal server error

## Changes

- **2026-11-09** `12896146b193`: 5 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `404` status
  - …1 more
- **2026-10-05** `4b228ebed583`: 5 info
  - added the optional property `status` to the response with the `400` status
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status
  - added the optional property `status` to the response with the `404` status
  - …1 more
- **2026-10-05** `63a80791dc58`: 5 warning
  - removed the optional property `status` from the response with the `400` status
  - removed the optional property `status` from the response with the `401` status
  - removed the optional property `status` from the response with the `403` status
  - removed the optional property `status` from the response with the `404` status
  - …1 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/backups/schedules/:id/services/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
