Versions
Every publish is a version. Release one to make it live, or roll the live pointer back.
bearerAuthAuthorizationBearer <token>A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.
artifact_id*Artifact Iduuidapplication/json- body
Move live_version_id forward to a specific ready version.
version_id*Version IduuidSuccessful Response
application/json- response
A successful publish, release or rollback. version is the human-facing sequence number; version_id is the opaque id used in URLs and in later API calls.
artifact_id*Artifact Iduuidcode*CodeThe artifact's short code, which is its live host label: the live URL is <code>.pl4m.site. Permanent and immutable, and not a credential — every request to it is still authorised. It sits next to url so a caller that needs the label does not have to take a URL apart to get it.
draft_host*Draft HostThe draft host label for this version. Always present, because a released version still has a draft host — that is how an owner previews exactly those bytes after the live pointer has moved on.
ok?Oktruepreview_url?|Set when the publish created a draft instead of releasing.
released*ReleasedTrue if live_version_id now points at this version.
url*UrlContent URL serving the live version.
version*Version1 <= valueversion_id*Version Iduuidwarnings?array<>curl -X POST 'https://app.pl4m.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08/release' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c"}'{ "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12", "code": "string", "draft_host": "string", "ok": true, "preview_url": "string", "released": true, "url": "string", "version": 1, "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c", "warnings": [ { "code": "UNSUPPORTED_IMPORT", "column": 1, "file": "string", "hint": "string", "line": 1, "message": "string" } ]}bearerAuthAuthorizationBearer <token>A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.
artifact_id*Artifact Iduuidapplication/json- body
Move live_version_id back.
With no to_version_id, rolls back to the previous live version. Free
owners keep the live version plus one previous, so exactly one step back
is available to them.
to_version_id?|nullSuccessful Response
application/json- response
A successful publish, release or rollback. version is the human-facing sequence number; version_id is the opaque id used in URLs and in later API calls.
artifact_id*Artifact Iduuidcode*CodeThe artifact's short code, which is its live host label: the live URL is <code>.pl4m.site. Permanent and immutable, and not a credential — every request to it is still authorised. It sits next to url so a caller that needs the label does not have to take a URL apart to get it.
draft_host*Draft HostThe draft host label for this version. Always present, because a released version still has a draft host — that is how an owner previews exactly those bytes after the live pointer has moved on.
ok?Oktruepreview_url?|Set when the publish created a draft instead of releasing.
released*ReleasedTrue if live_version_id now points at this version.
url*UrlContent URL serving the live version.
version*Version1 <= valueversion_id*Version Iduuidwarnings?array<>curl -X POST 'https://app.pl4m.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08/rollback' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{}'{ "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12", "code": "string", "draft_host": "string", "ok": true, "preview_url": "string", "released": true, "url": "string", "version": 1, "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c", "warnings": [ { "code": "UNSUPPORTED_IMPORT", "column": 1, "file": "string", "hint": "string", "line": 1, "message": "string" } ]}bearerAuthAuthorizationBearer <token>A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.
artifact_id*Artifact Iduuidlimit?Limit1 <= value <= 20050cursor?string|nullSuccessful Response
application/json- response
A page of an artifact's versions, newest first.
artifact_id*Artifact Iduuidpage*Cursor pagination envelope metadata.
versions*array<>curl -X GET 'https://app.pl4m.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions' \ -H 'Authorization: Bearer '{ "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12", "page": { "limit": 1, "next_cursor": "string" }, "versions": [ { "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12", "created_at": "2019-08-24T14:15:22Z", "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4", "draft_host": "string", "file_count": 0, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "is_live": true, "preview_url": "string", "ready_at": "2019-08-24T14:15:22Z", "runtime": "string", "seq": 1, "size_bytes": 0, "status": "pending" } ]}bearerAuthAuthorizationBearer <token>A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.
artifact_id*Artifact Iduuidversion_id*Version IduuidSuccessful Response
application/json- response
One version of an artifact.
artifact_id*Artifact Iduuidcreated_at*Created Atdate-timecreated_by?|nulldraft_host?|The draft host label for this version. Absent while the version is pending: there are no bytes behind it yet.
file_count*File Count0 <= valueid*Iduuidis_live*Is Livepreview_url?|Owner-only draft host <version_uuid>--draft, one subdomain level deep so Universal SSL covers it, and 43 octets so it fits a DNS label. Always authenticated, never publicly cached. Absent while the version is pending.
ready_at?|nullruntime?string|nullseq*Seq1 <= valuesize_bytes*Size Bytes0 <= valuestatus*VersionStatusA version is pending while its bytes are on their way and ready once they have been validated and stored. Only a ready version can be released.
"pending""ready"curl -X GET 'https://app.pl4m.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Authorization: Bearer '{ "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12", "created_at": "2019-08-24T14:15:22Z", "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4", "draft_host": "string", "file_count": 0, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "is_live": true, "preview_url": "string", "ready_at": "2019-08-24T14:15:22Z", "runtime": "string", "seq": 1, "size_bytes": 0, "status": "pending"}