---
title: "Toggle short URL active state"
method: PATCH
path: "/short-url/{shortCode}/toggle-active-state"
tags: ["Short URLs"]
---

# Toggle short URL active state

`PATCH /short-url/{shortCode}/toggle-active-state`

## Request

- Base URL: `https://api.qrcodly.de/api/v1`
- URL: `https://api.qrcodly.de/api/v1/short-url/{shortCode}/toggle-active-state`
- Auth: HTTP bearer

Flips the active/inactive state of a short URL. When inactive, the short URL stops redirecting visitors. This also affects dynamic QR codes linked to this short URL.

## Path parameters

- `shortCode` string, required

## Response `200`

Default Response

- object
  - `id` string, uuid, required: Unique identifier (UUID v4)
  - `createdAt` string, date-time, required: Timestamp when the resource was created (ISO 8601)
  - `updatedAt` string, date-time, nullable, required: Timestamp when the resource was last updated (ISO 8601), or null if never updated
  - `shortCode` string, required: Unique 5-character short code (e.g. "Ab3xZ")
  - `name` string, nullable, required: User-defined name for the short URL (max 50 characters)
  - `destinationUrl` string, uri, nullable, required: The target URL that the short URL redirects to
  - `qrCodeId` string, uuid, nullable, required: ID of the linked QR code, or null for standalone short URLs
  - `isActive` boolean, required: Whether the short URL is currently active and redirecting
  - `createdBy` string, required: User ID of the short URL owner
  - `deletedAt` string, date-time, nullable, required: Soft-delete timestamp, or null if the short URL is active
  - `safetyStatus` 'unchecked' | 'clean' | 'blocked', required: Result of the destination safety screening. "blocked" means we disabled the link and the owner cannot re-enable it
  - `safetyBlockedAt` string, date-time, nullable, required: When the link was blocked for safety reasons, or null
  - `safetyThreatTypes` string, nullable, required: Comma-separated Google Web Risk threat types behind the block, or null
  - `customDomain` object, nullable, required: Custom domain details, or null if using the default domain
    - `id` string, uuid, required: Unique identifier (UUID v4)
    - `createdAt` string, date-time, required: Timestamp when the resource was created (ISO 8601)
    - `updatedAt` string, date-time, nullable, required: Timestamp when the resource was last updated (ISO 8601), or null if never updated
    - `domain` string, required
    - `isDefault` boolean, required
    - `isEnabled` boolean, required
    - `createdBy` string, required
    - `verificationPhase` 'dns_verification' | 'cloudflare_ssl', required
    - `ownershipTxtVerified` boolean, required
    - `cnameVerified` boolean, required
    - `cloudflareHostnameId` string, nullable
    - `sslStatus` 'initializing' | 'pending_validation' | 'pending_issuance' | 'pending_deployment' | 'active' | 'pending_expiration' | 'expired' | 'deleted' | 'validation_timed_out', required
    - `ownershipStatus` 'pending' | 'verified', required
    - `sslValidationRecord` object, nullable
      - `name` string, required
      - `value` string, required
    - `ownershipValidationRecord` object, nullable
      - `name` string, required
      - `value` string, required
    - `validationErrors` string[], nullable
  - `tags` object[], required: Tags assigned to this short URL
    - `id` string, uuid, required: Unique identifier (UUID v4)
    - `createdAt` string, date-time, required: Timestamp when the resource was created (ISO 8601)
    - `updatedAt` string, date-time, nullable, required: Timestamp when the resource was last updated (ISO 8601), or null if never updated
    - `name` string, required: Tag display name (max 32 characters)
    - `color` string, required: Tag color as hex code (e.g. "#FF5733")
    - `createdBy` string, required: User ID of the tag owner
    - `qrCodeCount` number: Number of QR codes assigned to this tag

## Other responses

- `401`: Unauthorized — missing or invalid Bearer token.
- `403`: Forbidden — you do not have permission to access this resource.
- `404`: Not Found — the requested resource does not exist.
- `429`: Too Many Requests — rate limit exceeded. Retry after the rate limit window resets.

---

[API](https://skmtc.dev/qrcodly/apis/qrcodly-api.md) · [All operations](https://skmtc.dev/qrcodly/apis/qrcodly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qrcodly/apis/qrcodly-api/revisions/b7e95eb68866?raw)
