Skip to main content
POST
/
packages
/
{id}
/
versions
Create package version
curl --request POST \
  --url https://api.akua.dev/v1/packages/{id}/versions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "semver": "1.2.3",
  "ref": "<string>",
  "input_schema": {}
}
'
{
  "id": "<string>",
  "package_id": "<string>",
  "semver": "<string>",
  "ref": "<string>",
  "input_schema": {},
  "published_at": 1,
  "created_at": 1,
  "etag": "<string>"
}

Authorizations

Authorization
string
header
required

workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens

Headers

akua-context
string

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens — a workspace-owned token implies its workspace.

Required string length: 1 - 53
Example:

"ws_j572abc123def456"

Path Parameters

id
string
required

Package ID

Required string length: 1 - 54
Example:

"pkg_j572abc123def456"

Body

application/json
semver
string
required
Required string length: 1 - 128
Pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$
Example:

"1.2.3"

ref
string
required

Immutable package content reference. For OCI-backed packages this is normally the digest returned by akua publish.

Required string length: 1 - 512
input_schema
object
required

JSON Schema exported from the Akua package version. Used to render future install forms.

compatibility
object

Response

Package version created

id
string
required
Required string length: 1 - 55
package_id
string
required
Required string length: 1 - 54
semver
string
required
Required string length: 1 - 128
Pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$
ref
string
required
input_schema
object
required
published_at
integer
required

Unix timestamp (seconds)

Required range: x >= 0
created_at
integer
required

Unix timestamp (seconds)

Required range: x >= 0
etag
string