> ## Documentation Index
> Fetch the complete documentation index at: https://uselora.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Update shortcut

> All fields are optional. Omitted fields stay as-is. Renaming the slug runs the same reserved-word and uniqueness checks as create. `archived` is not editable here and will get its own endpoint.



## OpenAPI

````yaml /openapi.json patch /v1/shortcuts/{handle}
openapi: 3.1.0
info:
  title: Lora API
  version: 1.0.0
  description: Internal API for managing company short links
servers:
  - url: https://api.uselora.com
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/shortcuts/{handle}:
    patch:
      tags:
        - Shortcuts
      summary: Update shortcut
      description: >-
        All fields are optional. Omitted fields stay as-is. Renaming the slug
        runs the same reserved-word and uniqueness checks as create. `archived`
        is not editable here and will get its own endpoint.
      operationId: updateShortcut
      parameters:
        - name: handle
          in: path
          required: true
          schema:
            type: string
          description: The shortcut's slug or `id` (UUID).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  description: New unique short path. Omit to keep the existing slug.
                  examples:
                    - handbook
                  type: string
                  minLength: 1
                  maxLength: 50
                  pattern: ^[a-z0-9]([a-z0-9-_]*[a-z0-9])?$
                destination:
                  description: >-
                    New destination URL. Same scheme rules as create (no
                    javascript:/data:/file:).
                  examples:
                    - https://example.com/new-target
                  type: string
                  maxLength: 32000
                title:
                  description: New title. Pass null to clear.
                  type:
                    - string
                    - 'null'
                description:
                  description: New description. Pass null to clear.
                  type:
                    - string
                    - 'null'
                visibility:
                  description: >-
                    New visibility level. One of `PRIVATE`, `WORKSPACE`, or
                    `UNLISTED`.
                  type: string
                  enum:
                    - PRIVATE
                    - WORKSPACE
                    - UNLISTED
                masked:
                  type: boolean
                password:
                  description: >-
                    The password required to access the destination URL of the
                    shortcut.
                  format: password
                  writeOnly: true
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 256
                    - type: string
                      const: ''
                    - type: 'null'
                expiresAt:
                  description: The date and time when the short link will expire at.
                  format: date-time
                  type:
                    - string
                    - 'null'
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                ios:
                  description: >-
                    The iOS destination URL for the shortcut for iOS device
                    targeting.
                  anyOf:
                    - type: string
                      maxLength: 32000
                    - type: string
                      const: ''
                    - type: 'null'
                android:
                  description: >-
                    The Android destination URL for the shortcut for Android
                    device targeting.
                  anyOf:
                    - type: string
                      maxLength: 32000
                    - type: string
                      const: ''
                    - type: 'null'
                geo:
                  anyOf:
                    - $ref: '#/components/schemas/Geo'
                    - type: 'null'
                  description: >-
                    Geo targeting information for the short link in JSON format
                    {[COUNTRY]: https://example.com }
                folderId:
                  description: >-
                    Move the shortcut to a different folder, by its 8-character
                    ID. The caller must have access to the target folder.
                  type: string
                  pattern: ^[0-9abcdefghjkmnpqrstvwxyz]{8}$
                tagIds:
                  description: >-
                    Replace the tag set. Pass the full set you want — existing
                    tags not in this list are removed. Omit to leave tags
                    untouched. Pass `[]` to clear all tags.
                  examples:
                    - - a1b2c3d4
                  maxItems: 50
                  type: array
                  items:
                    type: string
                    pattern: ^[0-9abcdefghjkmnpqrstvwxyz]{8}$
                comments:
                  type:
                    - string
                    - 'null'
                  description: The comments for the short link.
                proxy:
                  type: boolean
              additionalProperties: false
              title: UpdateShortcutRequest
              description: Partial shortcut update — all fields optional (PATCH semantics).
      responses:
        '200':
          description: The updated shortcut.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The shortcut's unique ID.
                  slug:
                    type: string
                    description: The shortcut slug.
                  url:
                    type: string
                    description: >-
                      Workspace-scoped short link. Open this URL to record a
                      click and redirect to the destination.
                    examples:
                      - https://app.uselora.com/acme/short/handbook
                  destination:
                    type: string
                    description: The destination URL of the short link.
                  title:
                    type:
                      - string
                      - 'null'
                  description:
                    type:
                      - string
                      - 'null'
                  icon:
                    type:
                      - string
                      - 'null'
                  image:
                    type:
                      - string
                      - 'null'
                  video:
                    type:
                      - string
                      - 'null'
                  visibility:
                    type: string
                    enum:
                      - PRIVATE
                      - WORKSPACE
                      - UNLISTED
                      - PUBLIC
                  archived:
                    type: boolean
                    description: >-
                      Whether the short link is archived. Defaults to false if
                      not provided.
                  masked:
                    type: boolean
                  passwordProtected:
                    type: boolean
                    description: >-
                      Whether this shortcut requires a password before
                      redirecting. The password hash is never returned.
                  expiresAt:
                    type:
                      - string
                      - 'null'
                    description: The date and time when the short link will expire at.
                  ios:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The iOS destination URL for the shortcut for iOS device
                      targeting.
                  android:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The Android destination URL for the shortcut for Android
                      device targeting.
                  geo:
                    anyOf:
                      - $ref: '#/components/schemas/Geo'
                      - type: 'null'
                    description: >-
                      Geo targeting information for the short link in JSON
                      format {[COUNTRY]: https://example.com }
                  placeholders:
                    type: array
                    items:
                      $ref: '#/components/schemas/PlaceholderDescriptor'
                    description: >-
                      Dynamic placeholders parsed from the destination URL.
                      Empty for static destinations. See
                      docs/dynamic-placeholders.md.
                  folderId:
                    type: string
                    pattern: ^[0-9abcdefghjkmnpqrstvwxyz]{8}$
                    description: The 8-character ID of the folder this shortcut belongs to.
                    examples:
                      - a1b2c3d4
                  tagIds:
                    default: []
                    description: The unique IDs of the tags assigned to the shortcut.
                    examples:
                      - - a1b2c3d4
                    type: array
                    items:
                      type: string
                      pattern: ^[0-9abcdefghjkmnpqrstvwxyz]{8}$
                  externalId:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The ID of the link in your database. If set, it can be
                      used to identify the link in future API requests (the
                      `ext_` prefix is recommended on query parameters for
                      visual disambiguation but the server accepts both prefixed
                      and bare values). This key is unique across your
                      workspace.
                  tenantId:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The ID of the tenant that created the link inside your
                      system. If set, it can be used to fetch all links for a
                      tenant.
                  comments:
                    type:
                      - string
                      - 'null'
                    description: The comments for the short link.
                  workspaceId:
                    type: string
                    description: ID of the workspace the shortcut belongs to.
                  userId:
                    type: string
                    description: ID of the user who created the shortcut.
                  createdAt:
                    type: string
                    description: ISO 8601 creation timestamp.
                  updatedAt:
                    type: string
                    description: ISO 8601 timestamp of the last update.
                required:
                  - android
                  - archived
                  - comments
                  - createdAt
                  - description
                  - destination
                  - expiresAt
                  - externalId
                  - folderId
                  - geo
                  - icon
                  - id
                  - image
                  - ios
                  - masked
                  - slug
                  - tenantId
                  - title
                  - updatedAt
                  - userId
                  - video
                  - visibility
                  - workspaceId
                  - passwordProtected
                  - url
                  - placeholders
                  - tagIds
                additionalProperties: false
                title: Shortcut
                description: A shortcut.
        '400':
          description: >-
            The request body failed validation, or the new slug is reserved
            (`reserved_slug`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  fieldErrors:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '401':
          description: Missing, malformed, unknown, or workspace-unscoped Bearer token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '403':
          description: >-
            The caller is authenticated but not allowed to perform this action.
            Common codes: `insufficient_scope` (the key lacks the required
            scope; body sets `required_scope`) and `no_permission` (the caller
            is no longer a workspace member).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                  required_scope:
                    description: >-
                      Set when `code` is `insufficient_scope`. The exact scope
                      name the route required, e.g. `shortcuts.write`.
                    type: string
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '404':
          description: >-
            The shortcut wasn't found in this workspace (`not_found`), or the
            target `folderId` doesn't exist (`folder_not_found`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '409':
          description: >-
            Another shortcut in the workspace already uses this slug
            (`slug_conflict`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '429':
          description: Rate limit exceeded. Wait `Retry-After` seconds before retrying.
          headers:
            Retry-After:
              schema:
                type: integer
                minimum: 1
              description: Seconds until the rate-limit window resets.
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
        '500':
          description: >-
            An unexpected failure on the server. The body is `{ error:
            <message>, code: "internal_error", requestId: <id> }`, plus
            `traceId` when available. Idempotent operations (GET, DELETE) and
            writes that carry an `Idempotency-Key` header are safe to retry with
            exponential backoff. Other writes may have partially applied;
            surface the error to the caller instead of retrying blindly.
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    const: internal_error
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - code
                  - requestId
                additionalProperties: false
components:
  schemas:
    Geo:
      type: object
      propertyNames:
        type: string
        pattern: ^[A-Za-z]{2}$
      additionalProperties:
        type: string
        maxLength: 32000
      title: Geo
      description: >-
        Country-specific destination overrides keyed by ISO-3166-1 alpha-2
        country code.
    PlaceholderDescriptor:
      type: object
      properties:
        name:
          type: string
          description: Placeholder name (between curly braces).
        default:
          description: Default value substituted when no value is captured at click time.
          type:
            - string
            - 'null'
      required:
        - name
        - default
      additionalProperties: false
      title: PlaceholderDescriptor
      description: A dynamic placeholder declared in a shortcut's destination URL.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````