Skip to content

Hiraiship REST API

The API does over HTTP what the dashboard and the CLI do: create projects, deploy them, roll back, manage environment variables and domains, read usage. It's for CI pipelines, scripts and platforms that build on Hiraiship.

Base URL

Every route lives under one versioned base URL:

Base URL
https://api.hiraiship.com/api/v1

Requests and responses are JSON, except the deployment event stream. Within v1, a documented route only changes in compatible ways: new optional fields in a request, new fields in a response. Nothing documented is removed or renamed.

Your first request

Create an API key in the dashboard (Settings → API keys), then ask the API which key it is:

Terminal
export HIRAISHIP_TOKEN=hsk_…
 
curl https://api.hiraiship.com/api/v1/api-key/me \
  -H "Authorization: Bearer $HIRAISHIP_TOKEN"
200
{
  "id": "8f9a1b2c-3d4e-4f5a-b6c7-d8e9f0a1b297",
  "name": "Production CI",
  "prefix": "hsk_a1b2",
  "role": "developer",
  "expiresAt": "2027-01-01T00:00:00.000Z",
  "workspace": { "id": "7c0e5a9e-2f4b-4d6a-9b1e-3a8f2c6d1e40", "slug": "acme", "name": "Acme Labs" }
}

A key belongs to one workspace, so every request acts in that workspace: there's no workspace id in the URLs.

What's next

The reference is also available as an OpenAPI 3.1 document, for Postman, Insomnia or a client generator: openapi.json.