Skip to Content
API reference

Owners

Who you can act as. Orgs, their handles, their members and their invites.

GET
/v1/owners

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Header Parameters

authorization?string|null

Response Body

Successful Response

application/json
  1. response

Every owner the caller belongs to, personal first.

owners*array<>
Example Request
curl -X GET 'https://app.pl4m.com/api/v1/owners' \  -H 'Authorization: Bearer '
Example Response
{  "owners": [    {      "display_name": "string",      "handle": "string",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "is_personal": true,      "kind": "user",      "plan": "free",      "releases_on_publish": true,      "role": "owner"    }  ]}

Create an org

POST
/v1/owners

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Header Parameters

authorization?string|null

Request Body

application/json
  1. body

Create an org. The caller becomes its first owner.

There is no field for who the first owner is, and that is not an omission: an org created with somebody else as its owner would be one the creator cannot administer, and "an org must always keep at least one owner" means they could not fix it afterwards either.

display_name?|null
handle?|

Reserved for the phase 3 public root at <handle>.pl4m.site, so it is claimed per owner from day 1. Globally unique. May not be a reserved label, and may not have an artifact code's shape (10-12 characters including a digit) -- the two share one namespace, because they share one set of hosts.

Response Body

Successful Response

application/json
  1. response

An owner the caller belongs to, with the caller's role in it.

display_name?string|null
handle?string|null
id*Id
Formatuuid
is_personal*Is Personal

True for the owner that backs this user's personal account.

kind*OwnerKind

Whether an owner is a person (user) or an org (org).

Value in"user""org"
plan*OwnerPlan

Free: a publish goes live. Pro: a publish is a draft until it is released.

Value in"free""pro"
releases_on_publish*Releases On Publish

Free: publish = release. Pro: publish creates a draft which must be released. This is what release: null means on a publish.

role*OwnerRole

The CALLER's role in this owner.

Value in"owner""admin""member"
Example Request
curl -X POST 'https://app.pl4m.com/api/v1/owners' \  -H 'Authorization: Bearer ' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "display_name": "string",  "handle": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "is_personal": true,  "kind": "user",  "plan": "free",  "releases_on_publish": true,  "role": "owner"}
GET
/v1/owners/{owner_id}/handle

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Path Parameters

owner_id*Owner Id
Formatuuid

Header Parameters

authorization?string|null

Response Body

Successful Response

application/json
  1. response

An owner's handle, and the ones it still holds in reserve.

handle?|

Null once the owner has given it up without replacing it.

owner_id*Owner Id
Formatuuid
reserved?array<>

Handles this owner released that still redirect here. They are unavailable to everyone else until they expire, and this owner can reclaim any of them.

url?|

The site's canonical URL, https://<handle>.pl4m.site/. Null without a handle.

Example Request
curl -X GET 'https://app.pl4m.com/api/v1/owners/497f6eca-6276-4993-bfeb-53cbbbba6f08/handle' \  -H 'Authorization: Bearer '
Example Response
{  "handle": "string",  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",  "reserved": [    {      "expires_at": "2019-08-24T14:15:22Z",      "handle": "string",      "released_at": "2019-08-24T14:15:22Z"    }  ],  "url": "string"}
DELETE
/v1/owners/{owner_id}/handle

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Path Parameters

owner_id*Owner Id
Formatuuid

Header Parameters

authorization?string|null

Response Body

Successful Response

application/json
  1. response

An owner's handle, and the ones it still holds in reserve.

handle?|

Null once the owner has given it up without replacing it.

owner_id*Owner Id
Formatuuid
reserved?array<>

Handles this owner released that still redirect here. They are unavailable to everyone else until they expire, and this owner can reclaim any of them.

url?|

The site's canonical URL, https://<handle>.pl4m.site/. Null without a handle.

Example Request
curl -X DELETE 'https://app.pl4m.com/api/v1/owners/497f6eca-6276-4993-bfeb-53cbbbba6f08/handle' \  -H 'Authorization: Bearer '
Example Response
{  "handle": "string",  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",  "reserved": [    {      "expires_at": "2019-08-24T14:15:22Z",      "handle": "string",      "released_at": "2019-08-24T14:15:22Z"    }  ],  "url": "string"}
PUT
/v1/owners/{owner_id}/handle

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Path Parameters

owner_id*Owner Id
Formatuuid

Header Parameters

authorization?string|null

Request Body

application/json
  1. body

Claim or change an owner's handle. Lowercase letters, digits and hyphens; at most 32 characters; never a reserved label; and never the shape of an artifact code, because handles and codes share one namespace of hostnames. A handle that breaks a rule is a VALIDATION_ERROR naming which.

handle*Handle
Match^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$
Length1 <= length <= 32

Response Body

Successful Response

application/json
  1. response

An owner's handle, and the ones it still holds in reserve.

handle?|

Null once the owner has given it up without replacing it.

owner_id*Owner Id
Formatuuid
reserved?array<>

Handles this owner released that still redirect here. They are unavailable to everyone else until they expire, and this owner can reclaim any of them.

url?|

The site's canonical URL, https://<handle>.pl4m.site/. Null without a handle.

Example Request
curl -X PUT 'https://app.pl4m.com/api/v1/owners/497f6eca-6276-4993-bfeb-53cbbbba6f08/handle' \  -H 'Authorization: Bearer ' \  -H 'Content-Type: application/json' \  -d '{  "handle": "string"}'
Example Response
{  "handle": "string",  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",  "reserved": [    {      "expires_at": "2019-08-24T14:15:22Z",      "handle": "string",      "released_at": "2019-08-24T14:15:22Z"    }  ],  "url": "string"}
GET
/v1/owners/{owner_id}/invites

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Path Parameters

owner_id*Owner Id
Formatuuid

Query Parameters

include_settled?Include Settled
Defaulttrue

Header Parameters

authorization?string|null

Response Body

Successful Response

application/json
  1. response
invites*array<>
owner_id*Owner Id
Formatuuid
Example Request
curl -X GET 'https://app.pl4m.com/api/v1/owners/497f6eca-6276-4993-bfeb-53cbbbba6f08/invites' \  -H 'Authorization: Bearer '
Example Response
{  "invites": [    {      "active": true,      "claimed_at": "2019-08-24T14:15:22Z",      "claimed_by": "3d3d6561-fe9e-41f6-a4c0-112890b143c5",      "created_at": "2019-08-24T14:15:22Z",      "email": "string",      "expires_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "invited_by": "0fdabe0c-eb7c-440a-96d2-2c65906c3777",      "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",      "revoked_at": "2019-08-24T14:15:22Z",      "role": "owner"    }  ],  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05"}
DELETE
/v1/owners/{owner_id}/invites/{invite_id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Path Parameters

owner_id*Owner Id
Formatuuid
invite_id*Invite Id
Formatuuid

Header Parameters

authorization?string|null

Response Body

Successful Response

application/json
  1. response

A delete / revoke that succeeded.

deleted_at*Deleted At
Formatdate-time
id*Id
Formatuuid
ok?Ok
Defaulttrue
Example Request
curl -X DELETE 'https://app.pl4m.com/api/v1/owners/497f6eca-6276-4993-bfeb-53cbbbba6f08/invites/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Authorization: Bearer '
Example Response
{  "deleted_at": "2019-08-24T14:15:22Z",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "ok": true}

List an owner's members

GET
/v1/owners/{owner_id}/members

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Path Parameters

owner_id*Owner Id
Formatuuid

Header Parameters

authorization?string|null

Response Body

Successful Response

application/json
  1. response
members*array<>
owner_id*Owner Id
Formatuuid
Example Request
curl -X GET 'https://app.pl4m.com/api/v1/owners/497f6eca-6276-4993-bfeb-53cbbbba6f08/members' \  -H 'Authorization: Bearer '
Example Response
{  "members": [    {      "created_at": "2019-08-24T14:15:22Z",      "email": "string",      "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",      "role": "owner",      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"    }  ],  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05"}

Invite a member

POST
/v1/owners/{owner_id}/members

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Path Parameters

owner_id*Owner Id
Formatuuid

Header Parameters

authorization?string|null

Request Body

application/json
  1. body

Invite someone to an owner, by user id or by email. By user id when the account is known; by email otherwise, which creates a pending invite that grants nothing until it is claimed on a first sign-in with that address verified. An email that already belongs to a confirmed account is resolved to that person and added directly.

email?|null
role*OwnerRole

No default: a role is always an explicit decision. An admin may not grant owner.

Value in"owner""admin""member"
user_id?|null

Response Body

Successful Response

application/json
  1. response

One membership.

created_at*Created At
Formatdate-time
email?|

The address the account signed up with, if any.

owner_id*Owner Id
Formatuuid
role*OwnerRole

A member's role in an owner.

Value in"owner""admin""member"
user_id*User Id
Formatuuid
Example Request
curl -X POST 'https://app.pl4m.com/api/v1/owners/497f6eca-6276-4993-bfeb-53cbbbba6f08/members' \  -H 'Authorization: Bearer ' \  -H 'Content-Type: application/json' \  -d '{  "role": "owner"}'
Example Response
{  "created_at": "2019-08-24T14:15:22Z",  "email": "string",  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",  "role": "owner",  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"}

Change a member's role

PATCH
/v1/owners/{owner_id}/members/{user_id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Path Parameters

owner_id*Owner Id
Formatuuid
user_id*User Id
Formatuuid

Header Parameters

authorization?string|null

Request Body

application/json
  1. body

Change a member's role. An org must always keep at least one owner, so demoting the last one is refused.

role*OwnerRole

A member's role in an owner.

Value in"owner""admin""member"

Response Body

Successful Response

application/json
  1. response

One membership.

created_at*Created At
Formatdate-time
email?|

The address the account signed up with, if any.

owner_id*Owner Id
Formatuuid
role*OwnerRole

A member's role in an owner.

Value in"owner""admin""member"
user_id*User Id
Formatuuid
Example Request
curl -X PATCH 'https://app.pl4m.com/api/v1/owners/497f6eca-6276-4993-bfeb-53cbbbba6f08/members/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Authorization: Bearer ' \  -H 'Content-Type: application/json' \  -d '{  "role": "owner"}'
Example Response
{  "created_at": "2019-08-24T14:15:22Z",  "email": "string",  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",  "role": "owner",  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"}

Remove a member

DELETE
/v1/owners/{owner_id}/members/{user_id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token (pl4m_pat_…). The owner is resolved from the credential, never claimed by the caller.

Path Parameters

owner_id*Owner Id
Formatuuid
user_id*User Id
Formatuuid

Header Parameters

authorization?string|null

Response Body

Successful Response

application/json
  1. response

A delete / revoke that succeeded.

deleted_at*Deleted At
Formatdate-time
id*Id
Formatuuid
ok?Ok
Defaulttrue
Example Request
curl -X DELETE 'https://app.pl4m.com/api/v1/owners/497f6eca-6276-4993-bfeb-53cbbbba6f08/members/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Authorization: Bearer '
Example Response
{  "deleted_at": "2019-08-24T14:15:22Z",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "ok": true}