Shares
Give a named person or an org access to one artifact.
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 shares, pending invites included.
Invites are listed on purpose: an owner has to be able to see that an address was offered access and has not taken it, which is the only visible difference between "shared" and "offered".
artifact_id*Artifact Iduuidpage*Cursor pagination envelope metadata.
shares*array<>curl -X GET 'https://app.pl4m.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08/shares' \ -H 'Authorization: Bearer '{ "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12", "page": { "limit": 1, "next_cursor": "string" }, "shares": [ { "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12", "claimed_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4", "expires_at": "2019-08-24T14:15:22Z", "grantee_email": "string", "grantee_owner_id": "0cd79b93-54b9-4172-ab55-f3665e28eb8b", "grantee_user_email": "string", "grantee_user_id": "391d8157-10cc-4b34-9fdd-904b6fd0a51c", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "pending": true, "permission": "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
Grant read access to exactly one target. By email is the usual call: an address that already belongs to a confirmed account is resolved to that person and shared directly, while an unknown or unconfirmed one becomes a pending invite. That is not an error, and it grants nothing until it is claimed on a first sign-in with that address verified.
owner_id is accepted but is only an assertion — an artifact already determines its own owner, so there is nothing for this field to select. It is here so an agent that passes it everywhere is not told it is unexpected. A value that disagrees with the artifact's owner is FORBIDDEN.
grantee_email?|Share with an address. Resolved to a user if it already has a confirmed account; otherwise a pending invite that expires (30 days by default), is revocable, and grants NOTHING until claimed.
grantee_owner_id?|Share with an owner: every member of it can read, whatever their role. Membership is checked live, so someone joining later gains access and someone leaving loses it.
grantee_user_id?|nullowner_id?|Optional assertion that the artifact belongs to this owner. The artifact already determines its owner, so this only ever confirms it; a mismatch returns FORBIDDEN. 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.
Successful Response
application/json- response
A share. All three target fields are optional and exactly one is set. A share that began as an email invite and was claimed has grantee_user_id set, grantee_email null and claimed_at stamped.
artifact_id*Artifact Iduuidclaimed_at?|When an email invite became this user share.
created_at*Created Atdate-timecreated_by?|nullexpires_at?|Always set on an email invite — the database requires it, because an invite that waits forever for a sign-up is an unbounded pending grant. It survives claiming, so the grant an invite produced is bounded too.
grantee_email?|Set only while this is a PENDING invite. It grants nothing yet.
grantee_owner_id?|Every member of this owner can read.
grantee_user_email?|Display only: the address of the account named by grantee_user_id.
grantee_user_id?|nullid*Iduuidpending*PendingTrue while this is an unclaimed email invite, which grants no access.
permission*PermissionPhase 1 shares are view-only.
curl -X POST 'https://app.pl4m.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08/shares' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{}'{ "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12", "claimed_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4", "expires_at": "2019-08-24T14:15:22Z", "grantee_email": "string", "grantee_owner_id": "0cd79b93-54b9-4172-ab55-f3665e28eb8b", "grantee_user_email": "string", "grantee_user_id": "391d8157-10cc-4b34-9fdd-904b6fd0a51c", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "pending": true, "permission": "string"}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/shares/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Authorization: Bearer '{ "deleted_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "ok": true}