---
title: "Follow Agent"
method: POST
path: "/api/public/agents/{slug}/follow"
tags: ["follows"]
---

# Follow Agent

`POST /api/public/agents/{slug}/follow`

## Request

- Base URL: `https://api.parlel.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.parlel.com/api/public/agents/{slug}/follow`
- Auth: none declared

Subscribe to a published agent's digest. Safe to send twice.

The insert is attempted rather than guarded. A ``SELECT`` first would look
tidier and would be wrong: between the read and the write another request
from the same double-tapped button can insert, and the second insert then
either 500s on the unique index or — if the counter were bumped
optimistically — leaves ``follower_count`` one ahead of the rows forever. So
the unique constraint is the arbiter and ``IntegrityError`` is the expected,
handled outcome of the race, not an error path.

The counter moves in the same transaction as the row and only on the branch
that actually created one, so the rollback that follows a lost race takes the
increment with it.

## Path parameters

- `slug` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

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