Author API
Tokens, permissions and the /api/v1 endpoints for listings, releases, sales and licences, with curl examples and a GitHub Actions upload on tag.
Tokens and permissions
Create a token in the author dashboard. You give it a name, the permissions it needs and, if you like, an end date. Peakstone shows the token once. It stores only a hash, so a lost token cannot be shown again: revoke it and create a new one. You can have up to 10 tokens. The dashboard lists when and from which address each token was last used, and keeps a history of tokens created and revoked.
releases:write: Upload a jar or start a build from a tag. The release waits for review like any other.listings:read: Read your listings and their releases.sales:read: Read your sales ledger.licences:read: Check the status of a licence key on one of your listings.
Authentication
Send the token in the Authorization header. Every endpoint lives under /api/v1 and answers in JSON.
curl https://peakstone.app/api/v1/listings \
-H "Authorization: Bearer $PEAKSTONE_TOKEN"Errors and limits
Errors have one shape. 401 means the token is missing, wrong, revoked or expired. 403 means the token lacks the permission, or your author account cannot post right now. 404 is also what you get for another author's listing or licence. 429 means you hit a limit and comes with a retry-after header in seconds.
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the permission releases:write."
}
}- Each token can make 120 requests a minute.
- Sales requests are limited to 20 a minute per token.
- Uploads share their hourly limit with uploads in the dashboard.
- Repeated wrong tokens from one address are blocked for a short while.
Listings
GET /api/v1/listings returns your listings (permission listings:read). Use the id in the other calls.
{
"listings": [
{
"id": "0b6f6f0e-0000-0000-0000-000000000000",
"slug": "my-plugin",
"name": "My Plugin",
"tagline": "…",
"category": "…",
"pricing": "subscription",
"status": "published",
"createdAt": "2026-09-01T10:00:00.000Z",
"updatedAt": "2026-09-20T08:30:00.000Z"
}
]
}Releases
GET /api/v1/listings/{id}/releases returns the releases of one listing with a status, the file name, size and SHA-256 (permission listings:read). It does not include scan details.
curl https://peakstone.app/api/v1/listings/$LISTING_ID/releases \
-H "Authorization: Bearer $PEAKSTONE_TOKEN"Upload a jar
POST /api/v1/listings/{id}/releases with a multipart form (permission releases:write). The jar goes through exactly the same checks as an upload in the dashboard: the automatic scan, the obfuscation rules, the platform check, the version rules and source verification. The release then waits for review. Fields:
file: the jar (required, up to 50 MB).version: optional. If you leave it out, the version in the jar is used.notes,channelandsecurity_fix=true: optional.
curl -X POST https://peakstone.app/api/v1/listings/$LISTING_ID/releases \
-H "Authorization: Bearer $PEAKSTONE_TOKEN" \
-F "file=@build/libs/my-plugin-1.4.2.jar" \
-F "version=1.4.2" \
-F "notes=Fixes a crash on startup."{
"release": { "id": "…", "version": "1.4.2", "status": "waiting_for_review" },
"versionFromJar": false,
"versionMismatch": null,
"message": "…"
}Free listings take builds only, so for them a jar upload is refused with 409. Use a build instead.
Build from a tag
Send JSON with tag, branch or commit to have Peakstone build that ref from the linked GitHub repository, like New release from commit in the dashboard. The answer is 202. The finished build is a draft that you publish in the dashboard.
curl -X POST https://peakstone.app/api/v1/listings/$LISTING_ID/releases \
-H "Authorization: Bearer $PEAKSTONE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"tag": "v1.4.2"}'Sales
GET /api/v1/sales returns the same rows as the sales ledger CSV in your dashboard (permission sales:read), oldest first. from and to are days in UTC, both included, up to 366 days. per_page goes up to 500. There are no buyer names or email addresses. If incomplete is true, Stripe could not be read in full, so try again later.
curl "https://peakstone.app/api/v1/sales?from=2026-09-01&to=2026-09-30&page=1&per_page=100" \
-H "Authorization: Bearer $PEAKSTONE_TOKEN"{
"from": "2026-09-01",
"to": "2026-09-30",
"page": 1,
"perPage": 100,
"total": 1,
"hasMore": false,
"incomplete": false,
"sales": [
{
"date": "2026-09-14",
"paidAt": "2026-09-14T12:03:11.000Z",
"listingId": "…",
"listing": "My Plugin",
"type": "…",
"buyerCountry": "DE",
"currency": "eur",
"grossCents": 500,
"refundedCents": 0,
"peakstoneFeeCents": 0,
"netCents": 0,
"gross": "5.00",
"net": "0.00",
"stripeId": "…"
}
]
}Licences
GET /api/v1/licences/{key} returns the status of a licence key on one of your listings (permission licences:read): status, kind, plan, dates and server activations. The key is shown masked and there is no buyer email.
curl https://peakstone.app/api/v1/licences/PS-XXXX-XXXX-XXXX-XXXX \
-H "Authorization: Bearer $PEAKSTONE_TOKEN"GitHub Actions
Save the token as the secret PEAKSTONE_TOKEN and your listing id as the variable PEAKSTONE_LISTING_ID. This workflow builds the plugin when you push a tag and uploads the jar. The release then waits for review like any other.
name: Release on Peakstone
on:
push:
tags: ["v*"]
jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Build
run: ./gradlew build
- name: Upload to Peakstone
env:
PEAKSTONE_TOKEN: ${{ secrets.PEAKSTONE_TOKEN }}
LISTING_ID: ${{ vars.PEAKSTONE_LISTING_ID }}
run: |
curl --fail-with-body -X POST "https://peakstone.app/api/v1/listings/$LISTING_ID/releases" \
-H "Authorization: Bearer $PEAKSTONE_TOKEN" \
-F "file=@$(ls build/libs/*.jar | grep -v -- '-plain' | head -n 1)" \
-F "version=${GITHUB_REF_NAME#v}"If you would rather have Peakstone build the tag from your repository, replace the upload step with this one:
- name: Ask Peakstone to build this tag
env:
PEAKSTONE_TOKEN: ${{ secrets.PEAKSTONE_TOKEN }}
LISTING_ID: ${{ vars.PEAKSTONE_LISTING_ID }}
run: |
curl --fail-with-body -X POST "https://peakstone.app/api/v1/listings/$LISTING_ID/releases" \
-H "Authorization: Bearer $PEAKSTONE_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag\": \"$GITHUB_REF_NAME\"}"More about checks and statuses is on Releases and review.
GitLab CI and other CI
The API is plain HTTPS, so any CI can publish: GitLab CI, Jenkins, Woodpecker, Forgejo Actions, TeamCity or a script on your own machine. Keep the token in the CI's secret store, never in the repository. This GitLab job uploads the jar when you push a tag:
# PEAKSTONE_TOKEN (masked) and PEAKSTONE_LISTING_ID are CI/CD variables of the project.
peakstone:
image: eclipse-temurin:21-jdk
rules:
- if: $CI_COMMIT_TAG =~ /^v/
script:
- ./gradlew build
- JAR=$(ls build/libs/*.jar | grep -v -- '-plain' | head -n 1)
- >
curl --fail-with-body -X POST "https://peakstone.app/api/v1/listings/$PEAKSTONE_LISTING_ID/releases"
-H "Authorization: Bearer $PEAKSTONE_TOKEN"
-F "file=@$JAR"
-F "version=${CI_COMMIT_TAG#v}"Easiest: our script does all of it in one line. It finds the jar in build/libs or target, takes the version from the tag (v1.2.3 becomes 1.2.3, -beta versions go to the beta channel) and fails the job if the release is refused. Read it first at peakstone.app/peakstone.sh; --help lists the options.
curl -fsSL https://peakstone.app/peakstone.sh | sh -s -- releaseOr the same request with plain curl:
# Any CI or a shell script: build, then send the jar.
VERSION="1.4.2"
JAR="build/libs/my-plugin-$VERSION.jar"
curl --fail-with-body -X POST "https://peakstone.app/api/v1/listings/$PEAKSTONE_LISTING_ID/releases" \
-H "Authorization: Bearer $PEAKSTONE_TOKEN" \
-F "file=@$JAR" \
-F "version=$VERSION"Uploaded jars get the same scan and review as uploads in the dashboard. Building from source on Peakstone (the build from a tag request and the Built by Peakstone badge) needs the repository on GitHub for now.