---
title: "Save Project Links"
method: POST
path: "/api/app-auto-gtm/projects/{project_id}/save-links"
tags: ["AppAutoGtm"]
---

# Save Project Links

`POST /api/app-auto-gtm/projects/{project_id}/save-links`

Save booking links for a project.

Accepts EITHER a shared_url (applied to every segment) OR a per_segment
mapping (segment_id → url). Validates each non-empty url with
_gate_target_url (format + LLM scam gate) and 422s on the first invalid
value (input order).

Three phases, in a fixed order (T-1526):
1. authz reads in a short session — ownership 404s BEFORE any external
   call, so a stranger can't burn Scrapfly/LLM against a project they
   don't own;
2. the gates, OUTSIDE any transaction — the fetch+LLM gate runs up to
   ~45s per URL (GATE_DEADLINE_SECONDS), and the old single-transaction shape held segment row
   locks and an idle-in-transaction connection across that I/O;
3. a write-only transaction with the UPDATEs (re-checks the project so a
   concurrently-deleted one isn't resurrected by a blind write).

## Path parameters

- `project_id` integer, required

## Cookies

- `ex_access` string, nullable
- `ex_org` string, nullable

## Request body

- SaveLinksRequest — Exactly one of shared_url / per_segment must be provided.
  - `shared_url` string, nullable
  - `per_segment` object, nullable

## Response `200`

Successful Response

- SaveOkResponse
  - `ok` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/explee/apis/explee-api.md) · [All operations](https://skmtc.dev/explee/apis/explee-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/explee/explee-api/revisions/f169bc6e9447/schema)
