---
title: "Stars a published source, or takes the star back"
method: POST
path: "/sources/{publicKey}/star"
tags: ["Open source"]
---

# Stars a published source, or takes the star back

`POST /sources/{publicKey}/star`

## Request

- Base URL: `https://genhttp.dev/api/v1`
- URL: `https://genhttp.dev/api/v1/sources/{publicKey}/star`
- Auth: none declared

With the `starTicket` the source was read with, which is good from a second after it was handed out for a day.
Each address stars a source once - starring it again changes nothing, and `counted` says so - and an address may
star only so many sources in a while.

## Path parameters

- `publicKey` string, required

## Request body

- StarRequest: A star given, or taken back.
  - `Ticket` string, nullable: The `starTicket` the source was read with
  - `Starred` boolean, nullable: `true`, or left out, to star it; `false` to take the star back

## Response `200`

How it is starred now

- StarResponse: How a source is starred now.
  - `Stars` integer: How many stars it has now
  - `Starred` boolean: Whether this address stars it now
  - `Counted` boolean: Whether this request changed the count - it does not where the same was done from here before

## Other responses

- `204`: A response containing no body
- `400`: The ticket is missing, too fresh or too old. Read the source again and star it then.
- `404`: There is no published source at this public key - it does not exist, or its owner has not published it, which are answered alike.
- `429`: This address starred a lot in a short while. Try again in a few minutes.

---

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