---
title: "Pin a DAG"
method: PUT
path: "/dags/{fileName}/pin"
tags: ["dags"]
---

# Pin a DAG

`PUT /dags/{fileName}/pin`

## Request

- Base URL: `http://localhost/api/v1`
- URL: `http://localhost/api/v1/dags/{fileName}/pin`
- Auth: one of:
  - HTTP bearer
  - HTTP basic
  - none

Pins the DAG to the top of the DAG list for all users. Requires write access to the DAG's workspace; allowed when Git sync is read-only. Pinning an already pinned DAG succeeds.

## Path parameters

- `fileName` string, regex, required: Name of the DAG file

## Query parameters

- `remoteNode` string

## Response `204`

DAG pinned

## Other responses

- `403`: Forbidden - insufficient permissions
- `404`: DAG not found
- `default`: Unexpected error

## Changes

> 208 revisions in range; 1 not diffed.

- **2026-10-10** (v1) `fbf689f6491b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/dagucloud/apis/dagu/changes/dags/:fileName/pin/put.md)

---

[API](https://skmtc.dev/dagucloud/apis/dagu.md) - [All operations](https://skmtc.dev/dagucloud/apis/dagu/llms.txt) - [OpenAPI document](https://skmtc.dev/dagucloud/apis/dagu/revisions/742c8ecb39ce?raw)
