Releases Index
Publish a batch of releases
View .md

Publish a batch of releases

POST
/sources/{slug}/releases/batch

Inserts or updates releases for one source, identified by slug or src_… ID on the bare path, or by the org-scoped slug pair. Releases are matched on url: a new URL inserts, a known URL fills empty fields, or, with mode: "upsert-content", overwrites content and media. Re-posting the same batch is safe. Requires a write token, or a publish token bound to this source. A source's first write with its owner's publish token marks it push-fed, so it is no longer polled.

Authorization

bearerAuth
headerAuthorizationBearer <relk_… | relu_… | OAuth JWT>

Machine/operator tokens use the relk_ prefix; self-serve read-only user keys use relu_; Sign in with Releases supplies an OAuth access token. Required scope depends on the endpoint.

Path Parameters

slug*string

Request Body

application/json
  1. body
mode?string
releases*array<>

Response Body

Batch result: inserted count, the source's new release total, and the new IDs

application/json
  1. response
inserted*integer
Range0 <= value <= 9007199254740991
total*integer
Range0 <= value <= 9007199254740991
insertedIds*array<string>
Example Request
curl -X POST 'https://api.releases.sh/v1/sources/string/releases/batch' \  -H 'Content-Type: application/json' \  -d '{  "releases": [    {      "title": "string",      "content": "string"    }  ]}'
Example Response
{  "inserted": 0,  "total": 0,  "insertedIds": [    "string"  ]}
POST
/orgs/{orgSlug}/sources/{sourceSlug}/releases/batch

Inserts or updates releases for one source, identified by slug or src_… ID on the bare path, or by the org-scoped slug pair. Releases are matched on url: a new URL inserts, a known URL fills empty fields, or, with mode: "upsert-content", overwrites content and media. Re-posting the same batch is safe. Requires a write token, or a publish token bound to this source. A source's first write with its owner's publish token marks it push-fed, so it is no longer polled.

Authorization

bearerAuth
headerAuthorizationBearer <relk_… | relu_… | OAuth JWT>

Machine/operator tokens use the relk_ prefix; self-serve read-only user keys use relu_; Sign in with Releases supplies an OAuth access token. Required scope depends on the endpoint.

Path Parameters

orgSlug*string
sourceSlug*string

Request Body

application/json
  1. body
mode?string
releases*array<>

Response Body

Batch result: inserted count, the source's new release total, and the new IDs

application/json
  1. response
inserted*integer
Range0 <= value <= 9007199254740991
total*integer
Range0 <= value <= 9007199254740991
insertedIds*array<string>
Example Request
curl -X POST 'https://api.releases.sh/v1/orgs/string/sources/string/releases/batch' \  -H 'Content-Type: application/json' \  -d '{  "releases": [    {      "title": "string",      "content": "string"    }  ]}'
Example Response
{  "inserted": 0,  "total": 0,  "insertedIds": [    "string"  ]}