Artifacts
The things you publish. List, read, rename and delete them.
bearerAuthAuthorizationBearer <token>A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.
owner_id?|Which of your owners to list.
limit?Limit1 <= value <= 20050cursor?string|nullkind?|Filter by artifact kind.
Successful Response
application/json- response
A page of the caller's owner's artifacts.
artifacts*array<>page*Cursor pagination envelope metadata.
curl -X GET 'https://app.pl4m.com/api/v1/artifacts' \ -H 'Authorization: Bearer '{ "artifacts": [ { "access": "member", "code": "stringstri", "created_at": "2019-08-24T14:15:22Z", "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "html", "live_version_id": "94fda5ab-a776-479a-85d1-7f981090a9fd", "live_version_seq": 1, "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "slug": "string", "title": "string", "toolbar_enabled": true, "updated_at": "2019-08-24T14:15:22Z", "url": "string", "version_count": 0 } ], "page": { "limit": 1, "next_cursor": "string" }}bearerAuthAuthorizationBearer <token>A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.
application/json- body
Create an empty artifact. Versions are added separately.
description?|One-paragraph summary. Shown in the built-in site index and used as the OG description fallback.
kind*ArtifactKindWhat was published: a single HTML file (html), a single JSX or TSX component (jsx), or a prebuilt directory (vite).
"html""jsx""vite"owner_id?|Which of your owners to act as. Defaults to your personal owner. Checked against your memberships before use: an owner you do not belong to returns FORBIDDEN, and a personal API token may only act as the owner it was minted for.
slug?|Unique per owner. A path on your site can be mapped to it.
title?|nullSuccessful Response
application/json- response
An artifact as the API returns it.
access*ArtifactAccessHow the caller reaches this artifact: member of its owner, or a user_share or org_share naming them. A grantee gets a reduced response — no created_by, and version_count counts only what they may see — and GET /v1/artifacts/{id}/shares, .../link-tokens and .../versions answer NOT_FOUND for them, because those are the owner's view of the artifact.
"member""user_share""org_share"code*CodeThe artifact's content-host label: <code>.pl4m.site. Immutable, unique, and not a secret — every request to it is still authorised, so a guessed code buys a 403. It stands in for the artifact's id in the host, which was 36 characters of noise in every share and every screenshot.
^[0-9a-hjkmnp-tv-z]{10,12}$10 <= length <= 12created_at*Created Atdate-timecreated_by?|Null for a share grantee: who published it is the owner's.
description?|One-paragraph summary. Shown in the built-in site index and used as the OG description fallback.
id*Iduuidkind*ArtifactKindWhat was published: a single HTML file (html), a single JSX or TSX component (jsx), or a prebuilt directory (vite).
"html""jsx""vite"live_version_id?|The version viewers see. Always a ready version of this artifact.
live_version_seq?|Human-facing number of the live version.
owner_id*Owner Iduuidslug?string|nulltitle?string|nulltoolbar_enabled?Toolbar EnabledWhether the pl4m button may appear on this artifact's pages. Default true. It is shown to owners and editors; on a public page it waits for phase 3's comments. A site has the same switch, and off on either hides it.
trueupdated_at*Updated Atdate-timeurl*UrlCanonical content URL of the live version, https://<code>.pl4m.site/. Private by default: opening it needs a viewer token, a share or a link.
version_count*Version CountVersions the CALLER may see. For a member of the owner that is every version; for a share grantee it is the live one or nothing, because version history beyond live is owner-only — an unreleased draft is owner-only work, and version_count > live_version_seq is exactly the fact that one exists.
0 <= valuecurl -X POST 'https://app.pl4m.com/api/v1/artifacts' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "kind": "html"}'{ "access": "member", "code": "stringstri", "created_at": "2019-08-24T14:15:22Z", "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "html", "live_version_id": "94fda5ab-a776-479a-85d1-7f981090a9fd", "live_version_seq": 1, "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "slug": "string", "title": "string", "toolbar_enabled": true, "updated_at": "2019-08-24T14:15:22Z", "url": "string", "version_count": 0}bearerAuthAuthorizationBearer <token>A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.
artifact_id*Artifact IduuidSuccessful Response
application/json- response
An artifact as the API returns it.
access*ArtifactAccessHow the caller reaches this artifact: member of its owner, or a user_share or org_share naming them. A grantee gets a reduced response — no created_by, and version_count counts only what they may see — and GET /v1/artifacts/{id}/shares, .../link-tokens and .../versions answer NOT_FOUND for them, because those are the owner's view of the artifact.
"member""user_share""org_share"code*CodeThe artifact's content-host label: <code>.pl4m.site. Immutable, unique, and not a secret — every request to it is still authorised, so a guessed code buys a 403. It stands in for the artifact's id in the host, which was 36 characters of noise in every share and every screenshot.
^[0-9a-hjkmnp-tv-z]{10,12}$10 <= length <= 12created_at*Created Atdate-timecreated_by?|Null for a share grantee: who published it is the owner's.
description?|One-paragraph summary. Shown in the built-in site index and used as the OG description fallback.
id*Iduuidkind*ArtifactKindWhat was published: a single HTML file (html), a single JSX or TSX component (jsx), or a prebuilt directory (vite).
"html""jsx""vite"live_version_id?|The version viewers see. Always a ready version of this artifact.
live_version_seq?|Human-facing number of the live version.
owner_id*Owner Iduuidslug?string|nulltitle?string|nulltoolbar_enabled?Toolbar EnabledWhether the pl4m button may appear on this artifact's pages. Default true. It is shown to owners and editors; on a public page it waits for phase 3's comments. A site has the same switch, and off on either hides it.
trueupdated_at*Updated Atdate-timeurl*UrlCanonical content URL of the live version, https://<code>.pl4m.site/. Private by default: opening it needs a viewer token, a share or a link.
version_count*Version CountVersions the CALLER may see. For a member of the owner that is every version; for a share grantee it is the live one or nothing, because version history beyond live is owner-only — an unreleased draft is owner-only work, and version_count > live_version_seq is exactly the fact that one exists.
0 <= valuecurl -X GET 'https://app.pl4m.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Authorization: Bearer '{ "access": "member", "code": "stringstri", "created_at": "2019-08-24T14:15:22Z", "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "html", "live_version_id": "94fda5ab-a776-479a-85d1-7f981090a9fd", "live_version_seq": 1, "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "slug": "string", "title": "string", "toolbar_enabled": true, "updated_at": "2019-08-24T14:15:22Z", "url": "string", "version_count": 0}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
Rename an artifact, or switch its toolbar off.
Kind is immutable: it decides how bytes are built.
Every field here means "leave this alone" when absent — the route uses
exclude_unset, so {"slug": null} clears the slug and an absent slug
does not. toolbar_enabled has no null to clear, so absent is the only
way it can mean "leave it".
description?|One-paragraph summary. Shown in the built-in site index and used as the OG description fallback.
slug?|nulltitle?|nulltoolbar_enabled?|Whether the pl4m button may appear on this artifact's pages. Default true. It is shown to owners and editors; on a public page it waits for phase 3's comments. A site has the same switch, and off on either hides it.
Successful Response
application/json- response
An artifact as the API returns it.
access*ArtifactAccessHow the caller reaches this artifact: member of its owner, or a user_share or org_share naming them. A grantee gets a reduced response — no created_by, and version_count counts only what they may see — and GET /v1/artifacts/{id}/shares, .../link-tokens and .../versions answer NOT_FOUND for them, because those are the owner's view of the artifact.
"member""user_share""org_share"code*CodeThe artifact's content-host label: <code>.pl4m.site. Immutable, unique, and not a secret — every request to it is still authorised, so a guessed code buys a 403. It stands in for the artifact's id in the host, which was 36 characters of noise in every share and every screenshot.
^[0-9a-hjkmnp-tv-z]{10,12}$10 <= length <= 12created_at*Created Atdate-timecreated_by?|Null for a share grantee: who published it is the owner's.
description?|One-paragraph summary. Shown in the built-in site index and used as the OG description fallback.
id*Iduuidkind*ArtifactKindWhat was published: a single HTML file (html), a single JSX or TSX component (jsx), or a prebuilt directory (vite).
"html""jsx""vite"live_version_id?|The version viewers see. Always a ready version of this artifact.
live_version_seq?|Human-facing number of the live version.
owner_id*Owner Iduuidslug?string|nulltitle?string|nulltoolbar_enabled?Toolbar EnabledWhether the pl4m button may appear on this artifact's pages. Default true. It is shown to owners and editors; on a public page it waits for phase 3's comments. A site has the same switch, and off on either hides it.
trueupdated_at*Updated Atdate-timeurl*UrlCanonical content URL of the live version, https://<code>.pl4m.site/. Private by default: opening it needs a viewer token, a share or a link.
version_count*Version CountVersions the CALLER may see. For a member of the owner that is every version; for a share grantee it is the live one or nothing, because version history beyond live is owner-only — an unreleased draft is owner-only work, and version_count > live_version_seq is exactly the fact that one exists.
0 <= valuecurl -X PATCH 'https://app.pl4m.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{}'{ "access": "member", "code": "stringstri", "created_at": "2019-08-24T14:15:22Z", "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "html", "live_version_id": "94fda5ab-a776-479a-85d1-7f981090a9fd", "live_version_seq": 1, "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "slug": "string", "title": "string", "toolbar_enabled": true, "updated_at": "2019-08-24T14:15:22Z", "url": "string", "version_count": 0}bearerAuthAuthorizationBearer <token>A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.
artifact_id*Artifact IduuidSuccessful Response
application/json- response
A delete / revoke that succeeded.
deleted_at*Deleted Atdate-timeid*Iduuidok?Oktruecurl -X DELETE 'https://app.pl4m.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Authorization: Bearer '{ "deleted_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "ok": true}