The PageMarkets API
Read what is for sale from your own app: web pages and their slots, image boards and their blocks. Reading answers in JSON, needs no key, and any site may call it from the browser.
Writing is in closed beta. Reading needs no key and is open to anyone. To sign people in, buy, write or sell a page through the API, ask for an app key at onboard@pagemarkets.com.
On this page
Start here
Every address below starts with
https://pagemarkets.com
For example, every web page with space for sale:
curl https://pagemarkets.com/v1/pages
For TypeScript, generate types for every answer from the reference, which is also readable here as OpenAPI 3.1:
npx openapi-typescript https://pagemarkets.com/v1/openapi.json -o pagemarkets.d.ts
- Answers can be old. Each is reused for 30 seconds (web pages) or a minute (image boards), and the first one after a quiet spell can be older still: it is sent while a fresh one is read. There is no point asking more often. A buy or a write checks again for itself.
- Amounts are exact. Each is a Money: a string of base units, its decimals, and how PageMarkets prints it.
- Owners are never named. An answer says whether something is owned or rented, never by whom.
- Every field is always there. A field with nothing to say is
null, never missing.
Reading
Web pages
Pages with space for sale, and their slots.
- GET /v1/pagesWeb pages with space for sale
- GET /v1/pages/{site}One web page and its listed slots
- GET /v1/pages/{site}/slots/{key}One slot, as checkout sees it
GET /v1/pages
Web pages with space for sale.
What it takes and answers
| Parameter | In | About |
|---|---|---|
| q | query, optional | Search words. |
| category | query, optional | A category slug. |
| sort | query, optional | price or open. |
Answers with
| Field | Type | About |
|---|---|---|
| pages | PageSummary[] | |
| categories | list | Categories among the pages that match q. |
| categories[].slug | string | |
| categories[].label | string | |
| categories[].count | integer | Pages it would show. |
| total | integer | Every listed page, whatever the filters. |
Or refuses with
- 503 Could not read right now; try again.
GET /v1/pages/{site}
One web page and its listed slots.
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
Everything in PageSummary, plus:
| Field | Type | About |
|---|---|---|
| slots | Slot[] |
Or refuses with
- 400 Not an address.
- 404 Not listed.
- 503 Could not read right now; try again.
GET /v1/pages/{site}/slots/{key}
One slot, as checkout sees it.
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Answers with
| Field | Type | About |
|---|---|---|
| page | object | The page it is on. |
| page.site | string | |
| page.name | string | |
| page.domain | string | |
| page.url | string | |
| key | string | The slot's id within its page. |
| label | string or null | Its name. |
| holds | string or null | What a buyer puts in it. One of words, picture. |
| maxChars | integer or null | Words: the longest they may be. |
| size | object or null | The box the page keeps for it, in pixels. |
| size.width | integer | |
| size.height | integer | |
| format | Format or null | The shape a buyer's picture must be. Not the slot's box on the page, which may differ or be absent. |
| status | string | Its state on the chain. One of open, off-market, owned, rented, cooldown, unregistered. |
| claimed | boolean | Whether it has ever been bought. |
| price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| displacedOwnerGets | Money | An amount. Never a JSON number: token amounts outgrow one. |
| buy | object | Whether it can be bought now, and if not, why. |
| buy.open | boolean | Whether checkout would sell it now. |
| buy.refusal | object or null | Null when it can be bought. |
| buy.refusal.reason | string | Why checkout would refuse. One of unregistered, off-market, cooldown, paused, unverified, bot-paused, not-in-repo. |
| buy.refusal.until | date-time or null | For cooldown: when it opens again. |
| rent | object | Renting it, if its owner offers it. |
| rent.available | boolean | Whether it can be rented now. |
| rent.perDay | Money or null | An amount. Never a JSON number: token amounts outgrow one. |
| rent.maxSeconds | integer or null | The longest term the owner offers, in seconds; null when not offered. |
| rentedUntil | date-time or null | When the current term ends; null when nobody rents it. |
| escrow | Escrow or null | The publisher's cut of each sale is held this long, and goes to the slot's holders if the page stops showing it. |
| url | string | Where a person buys it on PageMarkets. |
Or refuses with
- 400 Bad address or key.
- 404 No such slot.
- 503 Could not read right now; try again.
Reading
Image boards
Image boards, their blocks and their newest sales.
- GET /v1/imagesImage boards
- GET /v1/images/{id}One image board with every block
- GET /v1/images/{id}/blocks/{block}One block of an image board
- GET /v1/images/{id}/activityAn image board's newest sales and price cuts
GET /v1/images
Image boards.
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| boards | ImageBoardSummary[] |
Or refuses with
- 404 Image boards are off here.
- 503 Could not read right now; try again.
GET /v1/images/{id}
One image board with every block.
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id, or the name in its address (/images/<name>). |
Answers with
| Field | Type | About |
|---|---|---|
| id | string | The board's id. |
| name | string | Its name. |
| description | string | Its creator's words; may be empty. |
| contract | string | The board's contract address. |
| picture | object | The board as it looks now. |
| picture.url | string | |
| picture.width | integer | |
| picture.height | integer | |
| grid | object | How the picture is cut into squares. |
| grid.cellSize | integer | A square's side, in pixels. |
| grid.cols | integer | |
| grid.rows | integer | |
| prices | object | A square now; square is null when squares outside every zone are not for sale. |
| prices.square | Money or null | An amount. Never a JSON number: token amounts outgrow one. |
| prices.zones | list | Areas priced apart, in squares; square null when not for sale. |
| prices.zones[].col | integer | Its left edge, in squares from the left. |
| prices.zones[].row | integer | Its top edge, in squares from the top. |
| prices.zones[].cols | integer | Its width, in squares. |
| prices.zones[].rows | integer | Its height, in squares. |
| prices.zones[].square | Money or null | An amount. Never a JSON number: token amounts outgrow one. |
| prices.priceBps | integer | The share of creation prices unsold squares cost now, in basis points. Only falls. |
| squares | object | How many squares, by state. |
| squares.forSale | integer | Squares it sells at all. |
| squares.free | integer | Of those, never bought. |
| blocks | Block[] | |
| url | string | The board on PageMarkets. |
| embed | string | An address to show the board in an iframe. |
Or refuses with
- 404 No such board.
- 503 Could not read right now; try again.
GET /v1/images/{id}/blocks/{block}
One block of an image board.
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Answers with
Everything in Block, plus:
| Field | Type | About |
|---|---|---|
| board | object | The board it is on. |
| board.id | string | |
| board.name | string | |
| board.url | string |
Or refuses with
- 400 Not a block number.
- 404 No such block.
- 503 Could not read right now; try again.
GET /v1/images/{id}/activity
An image board's newest sales and price cuts.
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
Answers with
| Field | Type | About |
|---|---|---|
| activity | list | Newest first. Never names a buyer. |
| activity[].kind | string | lowered: the board's prices were cut. One of bought, resold, lowered. |
| activity[].at | date-time | When it happened. |
| activity[].block | string or null | The block bought or resold. |
| activity[].area | object or null | Its area, in squares. |
| activity[].area.col | integer | Its left edge, in squares from the left. |
| activity[].area.row | integer | Its top edge, in squares from the top. |
| activity[].area.cols | integer | Its width, in squares. |
| activity[].area.rows | integer | Its height, in squares. |
| activity[].amount | Money or null | An amount. Never a JSON number: token amounts outgrow one. |
| activity[].priceBps | integer or null | For lowered: the new share of creation prices, in basis points. |
Or refuses with
- 404 No such board.
- 503 Could not read right now; try again.
Reading
GitHub repos
GitHub repos with parts for sale: README spaces, documents, pictures and code, each with its risk tier.
- GET /v1/reposEvery GitHub repo with parts for sale
- GET /v1/repos/{site}One repo board and every part of it
GET /v1/repos
Every GitHub repo with parts for sale.
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| repos | list | A GitHub repo with parts for sale. |
| repos[].site | string | The board address. |
| repos[].repo | string | owner/name on GitHub. |
| repos[].description | string or null | GitHub's one line about the repo. |
| repos[].tier | integer | Its riskiest part's tier. One of 1, 2, 3, 4, 5. |
| repos[].tierName | string | That tier's name. |
| repos[].forSale | integer | Parts that sell now, open or owned. |
| repos[].open | integer | Of those, parts nobody has bought yet. |
| repos[].cheapest | Money | An amount. Never a JSON number: token amounts outgrow one. |
| repos[].reach | object or null | What GitHub says of the repo; null when GitHub did not answer. |
| repos[].reach.stars | integer | Stars on GitHub. |
| repos[].reach.forks | integer | Forks. |
| repos[].reach.pushedAt | date-time or null | The last push. |
| repos[].reach.archived | boolean | Archived on GitHub. |
| repos[].href | string | This repo board, in full. |
Or refuses with
- 503 Could not read right now; try again.
GET /v1/repos/{site}
One repo board and every part of it.
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
| Field | Type | About |
|---|---|---|
| site | string | The board address. |
| repo | string | owner/name on GitHub. |
| url | string | The repo on GitHub. |
| tier | integer | Its riskiest part's tier. One of 1, 2, 3, 4, 5. |
| tierName | string | That tier's name. |
| reach | object or null | What GitHub says of the repo; null when GitHub did not answer. |
| reach.stars | integer | Stars on GitHub. |
| reach.forks | integer | Forks. |
| reach.pushedAt | date-time or null | The last push. |
| reach.archived | boolean | Archived on GitHub. |
| parts | list | One part of a repo, as its board page shows it. |
| parts[].key | string | The part's key. |
| parts[].label | string | What its owner calls it. |
| parts[].path | string | The file it is in. |
| parts[].whole | boolean | The whole file; otherwise a marked part of it. |
| parts[].holds | string | What a buyer puts in it. One of words, picture. |
| parts[].tier | integer | What its holder controls, 1 (README spaces, no scripts or styles anywhere) to 5 (anything goes). One of 1, 2, 3, 4, 5. |
| parts[].tierName | string | That tier's name. |
| parts[].status | string | Its state on the chain. One of open, off-market, owned, rented, cooldown, unregistered. |
| parts[].price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| parts[].forSale | boolean | It is in the repo where it should be, so it sells. |
| parts[].whyNot | string or null | Why it does not sell, when it does not. |
| parts[].consent | string or null | What the buyer agrees to before buying it (tiers 3–5), word for word: show it, and send consent: true to buy once they have. Null when nothing is asked. |
| parts[].shows | object or null | For code and config: where it shows, in its owner's words. |
| parts[].shows.where | string | Where it shows. One of site, package, elsewhere, nowhere. |
| parts[].shows.note | string or null | The owner's one line, for elsewhere. |
| parts[].written | boolean or null | Written by its holder and the repo shows exactly that. Null when nobody has written it. |
| sold | integer | Parts bought at least once. |
| total | integer | Every part. |
Or refuses with
- 400 Not a board address.
- 404 No repo board has that address.
- 503 Could not read right now; try again.
Reading
Bots
Bots whose minds are lines anyone can buy: a line’s words are read in price order.
GET /v1/bots/{site}
One bot: its lines and recent posts.
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
| Field | Type | About |
|---|---|---|
| site | string | The bot's address. |
| name | string | What it is called. |
| face | string or null | Its picture, when it has one. |
| quiet | string or null | Why it has not posted lately, when it has not. |
| lines | list | One line of the bot's mind. Price is influence: lines are read in price order. |
| lines[].key | string | The line's key. |
| lines[].kind | string | What it holds: text, link, brain (the model that writes) or face. |
| lines[].label | string | Its name. |
| lines[].open | boolean | An open line: its buyer names it. |
| lines[].words | string or null | What it says now, on chain or the bot's default. |
| lines[].link | string or null | For a link line, where it points. |
| lines[].model | string or null | For the brain line, the model it names. |
| lines[].price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| lines[].status | string | Its state on the chain. One of open, off-market, owned, rented, cooldown, unregistered. |
| posts | list | A recent post, newest first. |
| posts[].id | string | The post. |
| posts[].kind | string | On its own time, or because a line changed. One of scheduled, reaction. |
| posts[].text | string or null | What it said. |
| posts[].at | date-time | When. |
Or refuses with
- 400 Not an address.
- 404 No bot has that address.
- 503 Could not read right now; try again.
Writing
How a write works
Writes are for an app’s server, never a browser: every one needs the app’s key in x-api-key, and the answers carry no header a browser would let a page read. The user’s own wallet signs everything; PageMarkets never signs for them. For a user signed in through your Privy app, PageMarkets pays the gas.
- Sign the user in with a wallet. Ask
/v1/auth/nonce, have their wallet sign a sign-in message (EIP-4361) naming your domain, the chain and the nonce, and send it to/v1/auth/verifywith the challenge. The token that comes back acts for them for 30 days: send it asauthorization: Bearer <token>. - Or without one. Sign them in with your app’s own Privy app (email, Google, Apple) and send their Privy access token to
/v1/auth/privyfor the same token. Someone with no wallet gets one, made by Privy and owned by them, never seen by PageMarkets. Their wallet signs through Privy, in your page with its prompts turned off, or from your server: passsignerId, one of your Privy key quorums, the first time they sign in. - Their money.
/v1/megives their balance, what boards owe them and where to top up. For a user signed in through Privy, money owed after being outbid goes back into their wallet within fifteen minutes, and PageMarkets never emails them:/v1/me/notificationssays what happened, for you to tell them. - Buy.
…/buyanswers with the transactions their wallet sends, in order. Then send the last one’s hash to…/buy/confirm. - Write.
…/contenttakes words or a picture, checks them as the site does, and answers with the one transaction that puts them in the slot. - Image boards. A buy is one signature and one transaction:
…/buyanswers with the total and a permit for the wallet to sign,…/buy/transactionturns the signature into the transaction, and…/buy/confirmnames the blocks it made. A block’s picture is a WebP exactly its size; send its transaction, then…/picture/confirm. Its link needs no transaction. - Selling their page.
/v1/me/boardstakes the page and its slots and makes the board; PageMarkets pays for it and they sign nothing.…/installgives the tag and any markup to paste,…/install/checksays when the page is live. Prices, slots, what the directory says and the pictures waiting for them are theirs to change from there; a change the board itself must make comes back as one transaction for their wallet.
Writing
Signing in
A token that acts for one user, from their wallet or from your Privy app.
- POST /v1/auth/nonceStart signing a user in
- POST /v1/auth/verifyFinish signing a user in, for a token
- POST /v1/auth/sign-outEnd the user's token now
- POST /v1/auth/privySign in a user the app signed in with its own Privy app, for a token
POST /v1/auth/nonce
Start signing a user in.Needs the app key
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| nonce | string | Put it in the sign-in message. |
| challenge | string | Send it back with the signature. |
| expiresInSecs | integer | How long the challenge lasts. |
| chainId | integer | The chain the message must name. |
| statement | string | Suggested words for the message. |
| domains | string[] | The domains this app may name in the message. |
Or refuses with
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
POST /v1/auth/verify
Finish signing a user in, for a token.Needs the app key
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| message | string | The SIWE message the user signed, naming one of the app's domains, the chain and the nonce. |
| signature | string | The wallet's signature of it. |
| challenge | string | From /v1/auth/nonce. |
Answers with
| Field | Type | About |
|---|---|---|
| token | string | Send it as authorization: Bearer <token> to act for this user. |
| expiresAt | date-time | When it stops working, unless ended sooner. |
| account | object | The PageMarkets account: the same one the website gives this wallet. |
| account.id | string | |
| account.address | string | The wallet that signed. |
Or refuses with
- 400 Missing fields, or an expired challenge.
- 401 The message or signature did not check out, or was used before.
- 403 No app key, or one PageMarkets does not know.
- 409 The wallet is linked to another sign-in.
- 503 Could not do it right now; try again.
POST /v1/auth/sign-out
End the user's token now.Needs the app key and the user’s token
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| signedOut | boolean | Always true: the token no longer works. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
POST /v1/auth/privy
Sign in a user the app signed in with its own Privy app, for a token.Needs the app key
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| accessToken | string | The user's Privy access token, from the app's own Privy app. |
| signerId | string, optional | Optional. One of the app's Privy key quorums, added as a signer when the API makes the user's wallet, so the app's server can sign for them. |
Answers with
| Field | Type | About |
|---|---|---|
| token | string | Send it as authorization: Bearer <token> to act for this user. |
| expiresAt | date-time | When it stops working, unless ended sooner. |
| account | object | The PageMarkets account: the same one the website gives this wallet. |
| account.id | string | |
| account.address | string | The wallet that signed. |
Or refuses with
- 400 No access token, or a malformed signer id.
- 401 The access token is not one of this app's Privy app, or expired.
- 403 This app does not sign people in with Privy, or the key is unknown.
- 409 The person's account belongs to another app.
- 503 Could not do it right now; try again.
Writing
The user
Their balances, what they own, and what has happened to it.
- GET /v1/meWho the token is for: balances, money owed, where to top up
- POST /v1/me/cash-outPay out what one board owes the user: sent and paid for by PageMarkets, signed by nobody
- GET /v1/me/holdingsThe slots and blocks the user owns
- GET /v1/me/notificationsThe user's newest notices
- POST /v1/me/notifications/readMark notices read, up to the newest one shown
GET /v1/me
Who the token is for: balances, money owed, where to top up.Needs the app key and the user’s token
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| account | object | Who the token is for. |
| account.id | string | |
| account.address | string | Their wallet. |
| balances | list | What their wallet holds of one token a buy here is paid in. |
| balances[].token | string | The token's contract. |
| balances[].amount | Money | An amount. Never a JSON number: token amounts outgrow one. |
| owed | list | Money a board credited them (outbid, mostly) and has not paid out yet. For an app's user it is paid into their wallet within fifteen minutes. |
| owed[].kind | string | A web page board, or an image board. One of page, image. |
| owed[].board | string | The web page board's address, or the image board's id. |
| owed[].amount | Money | An amount. Never a JSON number: token amounts outgrow one. |
| topUp | object | Where to add money. |
| topUp.address | string | Their own wallet: money sent here adds to their balance. |
| topUp.chainId | integer | The chain to send it on. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
POST /v1/me/cash-out
Pay out what one board owes the user: sent and paid for by PageMarkets, signed by nobody.Needs the app key and the user’s token
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| kind | string | As /v1/me names it under owed. One of page, image. |
| board | string | As /v1/me names it under owed: a web page board's address, or an image board's id. |
Answers with
| Field | Type | About |
|---|---|---|
| moved | Money | An amount. Never a JSON number: token amounts outgrow one. |
Or refuses with
- 400 No `kind` or `board`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Nothing waiting, nothing past its holding period yet, or it did not go through; the message says which.
- 503 Could not do it right now; try again.
GET /v1/me/holdings
The slots and blocks the user owns.Needs the app key and the user’s token
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| slots | list | A web page slot they own. |
| slots[].site | string | The board address. |
| slots[].key | string | The slot key. |
| slots[].domain | string or null | The page's domain. |
| slots[].href | string | The slot's own page in this API. |
| blocks | list | An image board block they own, squares taken or not. |
| blocks[].board | string | The image board's id. |
| blocks[].block | string | The block's number. |
| blocks[].boardName | string | What the board is called. |
| blocks[].href | string | The block's own page in this API. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
GET /v1/me/notifications
The user's newest notices.Needs the app key and the user’s token
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| notifications | list | One notice, for the app to tell its user in its own words. |
| notifications[].id | string | |
| notifications[].kind | string | What happened. One of taken_over, board_dark, board_live, booking_ending, creative_held, creative_decided, editor_granted, price_dropped, slot_listed, image_block_sold, image_block_received, image_block_resold, image_block_royalty, image_board_sold_out, image_block_taken, image_block_rented, image_block_rent_ending, image_block_rent_refunded, repo_put_back, repo_stopped, repo_part_gone, repo_unreachable, repo_reachable, repo_committed, bot_sold, bot_received. |
| notifications[].createdAt | date-time | When. |
| notifications[].read | boolean | Whether it has been marked read. |
| notifications[].data | object | What it is about, by kind: the board, the slot or block, amounts. Never another person. |
| unread | integer | How many are unread. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
POST /v1/me/notifications/read
Mark notices read, up to the newest one shown.Needs the app key and the user’s token
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| upTo | date-time | The createdAt of the newest notice shown. |
Answers with
| Field | Type | About |
|---|---|---|
| marked | integer | How many this marked read. |
Or refuses with
- 400 No `upTo`, or not a time.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
Writing
Buying and writing slots
Buy a web page slot for the user, then put their words or picture in it.
- POST /v1/pages/{site}/slots/{key}/buyPrepare buying a slot for the user
- POST /v1/pages/{site}/slots/{key}/buy/confirmRecord a mined purchase
- POST /v1/pages/{site}/slots/{key}/contentStage what a slot shows, for the user to put there
POST /v1/pages/{site}/slots/{key}/buy
Prepare buying a slot for the user.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Answers with
| Field | Type | About |
|---|---|---|
| price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| maxPrice | Money | An amount. Never a JSON number: token amounts outgrow one. |
| expiresAt | date-time | The buy must be mined by then, or it fails and costs nothing but gas. |
| transactions | Transaction[] |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 Checkout refuses, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/pages/{site}/slots/{key}/buy/confirm
Record a mined purchase.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| txHash | string | The buy transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| recorded | boolean | Always true: the purchase is on the user's account. |
Or refuses with
- 400 No transaction hash.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 Not a mined purchase of this slot by this user.
- 503 Could not do it right now; try again.
POST /v1/pages/{site}/slots/{key}/content
Stage what a slot shows, for the user to put there.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send as application/json
| Field | Type | About |
|---|---|---|
| words | string | What the slot says. At most its maxChars. |
| link | string or null, optional | Where a click goes; a full https address. |
Send as multipart/form-data
| Field | Type | About |
|---|---|---|
| file | string | WebP, the slot's format's exact size, without metadata. |
| link | string, optional | Where a click goes; a full https address. |
Answers with
| Field | Type | About |
|---|---|---|
| contentHash | string | What the slot will show, by hash. |
| held | boolean | A picture waiting for the publisher's review: send the transaction anyway; the page shows it once allowed. |
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 Neither words nor a picture.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 Refused, for the reason given: not theirs to write, too long, the picture refused.
- 413 Too big.
- 503 Could not do it right now; try again.
Writing
Image board blocks
Buy areas of an image board for the user, then set a block’s picture and link.
- POST /v1/images/{id}/buyPrepare buying areas of an image board for the user
- POST /v1/images/{id}/buy/transactionBuild the buy from the signed permit
- POST /v1/images/{id}/buy/confirmRecord a mined block buy
- POST /v1/images/{id}/blocks/{block}/pictureStage a block's picture, for the user to put there
- POST /v1/images/{id}/blocks/{block}/picture/confirmRecord a block's mined picture, and redraw the board
- POST /v1/images/{id}/blocks/{block}/linkSet or remove where a click on a block goes
POST /v1/images/{id}/buy
Prepare buying areas of an image board for the user.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
Send
| Field | Type | About |
|---|---|---|
| areas | list | An area to buy, in squares. |
| areas[].col | integer | Its left edge, in squares from the left. |
| areas[].row | integer | Its top edge, in squares from the top. |
| areas[].cols | integer | Its width, in squares. |
| areas[].rows | integer | Its height, in squares. |
| shownTotal | string, optional | The total the user was shown, in base units: refused if the price rose. |
Answers with
| Field | Type | About |
|---|---|---|
| total | Money | An amount. Never a JSON number: token amounts outgrow one. |
| permit | object | An EIP-2612 permit for the user's wallet to sign with eth_signTypedData_v4. It lets the board take exactly the total, once. |
| permit.domain | object | EIP-712 domain. |
| permit.domain.name | string | The token's name. |
| permit.domain.version | string | Always 1. |
| permit.domain.chainId | integer | The chain. |
| permit.domain.verifyingContract | string | The token. |
| permit.types | object | EIP-712 types. |
| permit.types.Permit | list | A field of the permit. |
| permit.types.Permit[].name | string | The field's name. |
| permit.types.Permit[].type | string | Its Solidity type. |
| permit.primaryType | string | Always Permit. One of Permit. |
| permit.message | object | Amounts as decimal strings; most wallets take them so, viem wants them as bigints. |
| permit.message.owner | string | The user. |
| permit.message.spender | string | The board. |
| permit.message.value | string | The total, in base units. |
| permit.message.nonce | string | In base units. |
| permit.message.deadline | string | In seconds. |
| ticket | object | Hand it back to buy/transaction exactly as given. |
| ticket.board | string | The board's contract. |
| ticket.token | string | The token it is paid in. |
| ticket.tokenName | string | That token's name, as the permit names it. |
| ticket.chainId | integer | The chain. |
| ticket.buyer | string | The user: the payer and every new block's owner. |
| ticket.rects | list | An area bought, in squares. |
| ticket.rects[].col | integer | Its left edge, in squares from the left. |
| ticket.rects[].row | integer | Its top edge, in squares from the top. |
| ticket.rects[].cols | integer | Its width, in squares. |
| ticket.rects[].rows | integer | Its height, in squares. |
| ticket.total | string | The most the buy pays, in base units: the contract's own quote. |
| ticket.nonce | string | The permit's nonce. |
| ticket.deadline | string | The permit's deadline, in seconds. |
Or refuses with
- 400 No areas, or not shaped right.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 The board page would refuse this too, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/buy/transaction
Build the buy from the signed permit.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
Send
| Field | Type | About |
|---|---|---|
| ticket | object | Hand it back to buy/transaction exactly as given. |
| ticket.board | string | The board's contract. |
| ticket.token | string | The token it is paid in. |
| ticket.tokenName | string | That token's name, as the permit names it. |
| ticket.chainId | integer | The chain. |
| ticket.buyer | string | The user: the payer and every new block's owner. |
| ticket.rects | list | An area bought, in squares. |
| ticket.rects[].col | integer | Its left edge, in squares from the left. |
| ticket.rects[].row | integer | Its top edge, in squares from the top. |
| ticket.rects[].cols | integer | Its width, in squares. |
| ticket.rects[].rows | integer | Its height, in squares. |
| ticket.total | string | The most the buy pays, in base units: the contract's own quote. |
| ticket.nonce | string | The permit's nonce. |
| ticket.deadline | string | The permit's deadline, in seconds. |
| signature | string | The wallet's 65-byte signature of the permit. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 Not the ticket `buy` gave this user for this board, or no signature.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/buy/confirm
Record a mined block buy.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
Send
| Field | Type | About |
|---|---|---|
| txHash | string | The buy transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| blocks | string[] | A block the buy made, by number. |
Or refuses with
- 400 No transaction hash.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not a mined buy on this board for this user.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/picture
Stage a block's picture, for the user to put there.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| file | string | WebP, exactly the block's size in pixels (its squares times the board's square size), without metadata. |
Answers with
| Field | Type | About |
|---|---|---|
| contentHash | string | The picture, by hash: send it to picture/confirm once mined. |
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No picture, or not a block number.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Refused, for the reason given: not theirs, the wrong size, the picture refused.
- 413 Too big.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/picture/confirm
Record a block's mined picture, and redraw the board.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| contentHash | string | As picture gave it. |
Answers with
| Field | Type | About |
|---|---|---|
| confirmed | boolean | Always true: the board will be redrawn with it. |
Or refuses with
- 400 No hash, or not a block number.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 The block does not show that picture yet, or is not theirs.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/link
Set or remove where a click on a block goes.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| link | string or null | A full https address, or null to remove the link. |
Answers with
| Field | Type | About |
|---|---|---|
| link | string or null | The link as kept, or null for none. |
Or refuses with
- 400 Not a link or null, or not a block number.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not theirs to set, or not a link PageMarkets can use.
- 503 Could not do it right now; try again.
Writing
Selling a page
Put the user’s own page up for sale, then run it: the tag, prices, slots, the listing and pictures waiting for them.
- GET /v1/me/boardsThe web page boards the user publishes
- POST /v1/me/boardsPut a page's spaces up for sale: makes the board, which we pay for
- POST /v1/me/boards/checkCheck a page and its slots before making the board: the picker's rules, and whether our crawl finds each anchored slot
- GET /v1/me/boards/{site}One board the user publishes
- GET /v1/me/boards/{site}/installWhat the publisher pastes onto their page
- POST /v1/me/boards/{site}/install/checkLook at the page now: is the board live?
- POST /v1/me/boards/{site}/slotsPrepare adding slots to the board
- POST /v1/me/boards/{site}/slots/confirmRecord the added slots once mined
- POST /v1/me/boards/{site}/slots/{key}Change a slot's label or word limit (no transaction)
- POST /v1/me/boards/{site}/slots/{key}/pricePrepare a new price for a slot
- POST /v1/me/boards/{site}/slots/{key}/availabilityPrepare taking an unsold slot off sale, or back on
- POST /v1/me/boards/{site}/listingWhat the directory says about the page
- POST /v1/me/boards/{site}/listing/pictureThe picture the directory shows for the page
- POST /v1/me/boards/{site}/policyWhat the publisher accepts on their page
- GET /v1/me/boards/{site}/handoverWhether an address has asked for the board
- POST /v1/me/boards/{site}/handoverPrepare handing the board to an address that asked for it
- POST /v1/me/boards/{site}/handover/confirmRecord the handover once the chain has it
- GET /v1/me/boards/{site}/disconnectWhether the board can be disconnected
- POST /v1/me/boards/{site}/disconnectPrepare disconnecting the board: stop every sale
- POST /v1/me/boards/{site}/disconnect/confirmDisconnect the board once sales are stopped
- GET /v1/me/boards/{site}/reviewsPictures waiting for the publisher
- POST /v1/me/boards/{site}/reviews/{hash}Allow or refuse a held picture
- GET /v1/me/boards/{site}/reviews/{hash}/pictureA held picture itself
GET /v1/me/boards
The web page boards the user publishes.Needs the app key and the user’s token
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| boards | list | A web page board the user publishes. |
| boards[].site | string | The board address. |
| boards[].domain | string or null | The page's domain. |
| boards[].name | string | What the board is called. |
| boards[].live | boolean | Our tag has been seen on the page; until then nothing on it can be bought. |
| boards[].disconnectedAt | date-time or null | When the publisher disconnected it: nothing on it sells, and buyers cannot reach it. Null while it sells. |
| boards[].href | string | This board, in full. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
POST /v1/me/boards
Put a page's spaces up for sale: makes the board, which we pay for.Needs the app key and the user’s token
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| url | string | The page whose spaces are for sale. |
| slots | list | A slot to sell. |
| slots[].key | string | Its permanent name: lowercase letters and numbers joined by dots, like hero.headline. |
| slots[].label | string, optional | What the publisher calls it. The key, when left out. |
| slots[].price | string | What it first sells for, in dollars, like "10". Also the least it can ever be taken for. |
| slots[].holds | string, optional | What a buyer puts in it. Words, when left out. One of words, picture. |
| slots[].format | string, optional | For a picture: its ad format, which fixes its size (rectangle is 300×250). Read from the code's own list. One of leaderboard, rectangle, mobile-banner, super, billboard, rectangle-lg, half-page, skyscraper. |
| slots[].maxChars | integer, optional | For words: how long they can be. Suggested, when left out. |
| slots[].kind | string, optional | element: something already on the page that a buyer takes over. space: an empty box the publisher adds. element, when left out. One of element, space. |
| slots[].width | integer, optional | A space's width, in pixels. 300, when left out. |
| slots[].height | integer, optional | A space's height, in pixels. 250, when left out. |
| slots[].anchor | object, optional | Where on the page it is, as a picker records it; our tag then places it. Left out, the publisher pastes the markup install gives. |
| slots[].anchor.paths | string[] | A CSS path to the element, the surest first. |
| slots[].anchor.tag | string | The element's tag name, like div. |
| slots[].place | string, optional | For a space with an anchor: where it goes beside it. One of before, after, inside-start, inside-end. |
| profile | string, optional | How prices move after a sale. standard, when left out. One of standard, collector, rotating. |
Answers with
| Field | Type | About |
|---|---|---|
| site | string | The board address. |
| domain | string or null | The page's domain. |
| name | string | What the board is called. |
| live | boolean | Our tag has been seen on the page; until then nothing on it can be bought. |
| disconnectedAt | date-time or null | When the publisher disconnected it: nothing on it sells, and buyers cannot reach it. Null while it sells. |
| href | string | This board, in full. |
| liveSince | date-time or null | When the tag was first seen. |
| slots | list | One slot, as its publisher sees it. |
| slots[].key | string | The slot key. |
| slots[].label | string | What the publisher calls it. |
| slots[].holds | string | What a buyer puts in it. One of words, picture. |
| slots[].format | string or null | For a picture: its ad format. |
| slots[].maxChars | integer or null | For words: how long they can be. |
| slots[].price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| slots[].sold | boolean | Bought at least once. |
| slots[].onSale | boolean | Whether it can be bought while unsold. A sold slot can always be taken. |
| slots[].placed | boolean | Our tag places it; otherwise the publisher's markup does. |
| escrow | object or null | What escrow holds of the publisher's cut. When its window ends it is paid into their wallet. |
| escrow.window | string | How long each sale's cut is held. |
| escrow.held | Money | An amount. Never a JSON number: token amounts outgrow one. |
| reviews | integer | Pictures waiting for the publisher to allow or refuse. |
| policy | string or null | What the publisher accepts on their page, in their words. Null: our default applies. |
Or refuses with
- 400 No page, no slots, or a slot the picker's rules refuse; the message says which.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 No new boards right now, or this user has as many as one account may.
- 503 Could not do it right now; try again.
POST /v1/me/boards/check
Check a page and its slots before making the board: the picker's rules, and whether our crawl finds each anchored slot.Needs the app key and the user’s token
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| url | string | The page whose spaces are for sale. |
| slots | list | A slot to sell. |
| slots[].key | string | Its permanent name: lowercase letters and numbers joined by dots, like hero.headline. |
| slots[].label | string, optional | What the publisher calls it. The key, when left out. |
| slots[].price | string | What it first sells for, in dollars, like "10". Also the least it can ever be taken for. |
| slots[].holds | string, optional | What a buyer puts in it. Words, when left out. One of words, picture. |
| slots[].format | string, optional | For a picture: its ad format, which fixes its size (rectangle is 300×250). Read from the code's own list. One of leaderboard, rectangle, mobile-banner, super, billboard, rectangle-lg, half-page, skyscraper. |
| slots[].maxChars | integer, optional | For words: how long they can be. Suggested, when left out. |
| slots[].kind | string, optional | element: something already on the page that a buyer takes over. space: an empty box the publisher adds. element, when left out. One of element, space. |
| slots[].width | integer, optional | A space's width, in pixels. 300, when left out. |
| slots[].height | integer, optional | A space's height, in pixels. 250, when left out. |
| slots[].anchor | object, optional | Where on the page it is, as a picker records it; our tag then places it. Left out, the publisher pastes the markup install gives. |
| slots[].anchor.paths | string[] | A CSS path to the element, the surest first. |
| slots[].anchor.tag | string | The element's tag name, like div. |
| slots[].place | string, optional | For a space with an anchor: where it goes beside it. One of before, after, inside-start, inside-end. |
| profile | string, optional | How prices move after a sale. standard, when left out. One of standard, collector, rotating. |
Answers with
| Field | Type | About |
|---|---|---|
| problem | string or null | Why making the board would be refused, in the same words; null when it would be made. |
| read | boolean | Whether we could read the page. False says nothing about the slots: our request was refused or timed out. |
| unresolved | string[] or null | A slot key. |
Or refuses with
- 400 No JSON.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
GET /v1/me/boards/{site}
One board the user publishes.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
| Field | Type | About |
|---|---|---|
| site | string | The board address. |
| domain | string or null | The page's domain. |
| name | string | What the board is called. |
| live | boolean | Our tag has been seen on the page; until then nothing on it can be bought. |
| disconnectedAt | date-time or null | When the publisher disconnected it: nothing on it sells, and buyers cannot reach it. Null while it sells. |
| href | string | This board, in full. |
| liveSince | date-time or null | When the tag was first seen. |
| slots | list | One slot, as its publisher sees it. |
| slots[].key | string | The slot key. |
| slots[].label | string | What the publisher calls it. |
| slots[].holds | string | What a buyer puts in it. One of words, picture. |
| slots[].format | string or null | For a picture: its ad format. |
| slots[].maxChars | integer or null | For words: how long they can be. |
| slots[].price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| slots[].sold | boolean | Bought at least once. |
| slots[].onSale | boolean | Whether it can be bought while unsold. A sold slot can always be taken. |
| slots[].placed | boolean | Our tag places it; otherwise the publisher's markup does. |
| escrow | object or null | What escrow holds of the publisher's cut. When its window ends it is paid into their wallet. |
| escrow.window | string | How long each sale's cut is held. |
| escrow.held | Money | An amount. Never a JSON number: token amounts outgrow one. |
| reviews | integer | Pictures waiting for the publisher to allow or refuse. |
| policy | string or null | What the publisher accepts on their page, in their words. Null: our default applies. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 503 Could not do it right now; try again.
GET /v1/me/boards/{site}/install
What the publisher pastes onto their page.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
| Field | Type | About |
|---|---|---|
| tag | string | Goes in the page's <head>, once. When your app gave a buy page with its key, the tag carries it as data-buy, so a buyer who clicks a space on the page lands on <your buy page><site>/<key>, and a renter on the same with /rent/ in place of /buy/. |
| allPlaced | boolean | Our tag places every slot: there is nothing else to paste. |
| markup | list | What to paste for a slot our tag cannot place. |
| markup[].key | string | The slot key. |
| markup[].label | string | What the publisher calls it. |
| markup[].kind | string | element: add this to what is already there. space: paste this where the box goes. One of element, space. |
| markup[].html | string | The markup. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/install/check
Look at the page now: is the board live?.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
| Field | Type | About |
|---|---|---|
| live | boolean | Our tag was seen on the page: its slots can be bought. |
| found | integer | Slots found on the page. |
| total | integer | Slots the board sells. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 The page could not be read just now.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/slots
Prepare adding slots to the board.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Send
| Field | Type | About |
|---|---|---|
| slots | list | A slot to sell. |
| slots[].key | string | Its permanent name: lowercase letters and numbers joined by dots, like hero.headline. |
| slots[].label | string, optional | What the publisher calls it. The key, when left out. |
| slots[].price | string | What it first sells for, in dollars, like "10". Also the least it can ever be taken for. |
| slots[].holds | string, optional | What a buyer puts in it. Words, when left out. One of words, picture. |
| slots[].format | string, optional | For a picture: its ad format, which fixes its size (rectangle is 300×250). Read from the code's own list. One of leaderboard, rectangle, mobile-banner, super, billboard, rectangle-lg, half-page, skyscraper. |
| slots[].maxChars | integer, optional | For words: how long they can be. Suggested, when left out. |
| slots[].kind | string, optional | element: something already on the page that a buyer takes over. space: an empty box the publisher adds. element, when left out. One of element, space. |
| slots[].width | integer, optional | A space's width, in pixels. 300, when left out. |
| slots[].height | integer, optional | A space's height, in pixels. 250, when left out. |
| slots[].anchor | object, optional | Where on the page it is, as a picker records it; our tag then places it. Left out, the publisher pastes the markup install gives. |
| slots[].anchor.paths | string[] | A CSS path to the element, the surest first. |
| slots[].anchor.tag | string | The element's tag name, like div. |
| slots[].place | string, optional | For a space with an anchor: where it goes beside it. One of before, after, inside-start, inside-end. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 A slot the picker's rules refuse.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 The chain refuses one, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/slots/confirm
Record the added slots once mined.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Send
| Field | Type | About |
|---|---|---|
| slots | list | A slot to sell. |
| slots[].key | string | Its permanent name: lowercase letters and numbers joined by dots, like hero.headline. |
| slots[].label | string, optional | What the publisher calls it. The key, when left out. |
| slots[].price | string | What it first sells for, in dollars, like "10". Also the least it can ever be taken for. |
| slots[].holds | string, optional | What a buyer puts in it. Words, when left out. One of words, picture. |
| slots[].format | string, optional | For a picture: its ad format, which fixes its size (rectangle is 300×250). Read from the code's own list. One of leaderboard, rectangle, mobile-banner, super, billboard, rectangle-lg, half-page, skyscraper. |
| slots[].maxChars | integer, optional | For words: how long they can be. Suggested, when left out. |
| slots[].kind | string, optional | element: something already on the page that a buyer takes over. space: an empty box the publisher adds. element, when left out. One of element, space. |
| slots[].width | integer, optional | A space's width, in pixels. 300, when left out. |
| slots[].height | integer, optional | A space's height, in pixels. 250, when left out. |
| slots[].anchor | object, optional | Where on the page it is, as a picker records it; our tag then places it. Left out, the publisher pastes the markup install gives. |
| slots[].anchor.paths | string[] | A CSS path to the element, the surest first. |
| slots[].anchor.tag | string | The element's tag name, like div. |
| slots[].place | string, optional | For a space with an anchor: where it goes beside it. One of before, after, inside-start, inside-end. |
| txHash | string | The transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| added | string[] | A slot key now on the board. |
Or refuses with
- 400 No hash, or the slots differ.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 The chain does not have them.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/slots/{key}
Change a slot's label or word limit (no transaction).Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| label | string, optional | What the publisher calls it. |
| maxChars | integer, optional | For words, while it is unsold, or upward after. |
Answers with
| Field | Type | About |
|---|---|---|
| saved | boolean | Always true. |
Or refuses with
- 400 Neither field.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 Refused, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/slots/{key}/price
Prepare a new price for a slot.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| price | string | In dollars, like "12.50". |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No price.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 Too far, too soon, or not a slot; the message says which.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/slots/{key}/availability
Prepare taking an unsold slot off sale, or back on.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| onSale | boolean | Whether it can be bought while unsold. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No `onSale`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 Not their board, or no such slot.
- 409 Refused, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/listing
What the directory says about the page.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Send
| Field | Type | About |
|---|---|---|
| description | string or null, optional | What the page is, in the publisher's words. |
| category | string or null, optional | One of the directory's categories. |
| tags | string[], optional | Up to five, for search. |
| link | string or null, optional | One link, for advertisers. |
Answers with
| Field | Type | About |
|---|---|---|
| saved | boolean | Always true. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 A link that is not a web address.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/listing/picture
The picture the directory shows for the page.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Send
| Field | Type | About |
|---|---|---|
| image | string | A picture of the page. |
Answers with
| Field | Type | About |
|---|---|---|
| saved | boolean | Always true. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 Not a picture we take.
- 413 Too big.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/policy
What the publisher accepts on their page.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Send
| Field | Type | About |
|---|---|---|
| policy | string or null | What the publisher accepts on their page. Null or empty: our floor is enough. |
Answers with
| Field | Type | About |
|---|---|---|
| saved | boolean | Always true. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 503 Could not do it right now; try again.
GET /v1/me/boards/{site}/handover
Whether an address has asked for the board.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| to | query, optional | The address the board would go to. |
Answers with
| Field | Type | About |
|---|---|---|
| owner | string | The board's owner on chain right now. |
| ready | boolean | to has asked for the board and its request has not expired: the handover can be completed. |
| expiresAt | date-time or null | When to's request expires (48 hours after it was made); null when it has made none. |
Or refuses with
- 400 No `to`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 Not an address the board can go to.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/handover
Prepare handing the board to an address that asked for it.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Send
| Field | Type | About |
|---|---|---|
| to | string | The address the board goes to. It asks first, by sending requestOwnershipHandover() to the board from that address. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No `to`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 That address has not asked, its request expired, or the board already moved.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/handover/confirm
Record the handover once the chain has it.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Send
| Field | Type | About |
|---|---|---|
| to | string | The same address. |
| txHash | string | The transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| owner | string | The board's new owner, read back from the chain. |
Or refuses with
- 400 No `to` or `txHash`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 The transaction failed, or the board has not moved.
- 503 Could not do it right now; try again.
GET /v1/me/boards/{site}/disconnect
Whether the board can be disconnected.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
| Field | Type | About |
|---|---|---|
| possible | boolean | Nobody but the publisher owns or rents a slot, so it can be disconnected. |
| refusal | string or null | Why it cannot be, when it cannot. Taking the tag off the page is still the publisher's to do; escrow then covers the holders. |
| paused | boolean | Sales are already stopped on chain, so disconnecting needs no transaction. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 Already disconnected.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/disconnect
Prepare disconnecting the board: stop every sale.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction or null | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 Someone else owns or rents a slot, it is already disconnected, or the gas could not be paid.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/disconnect/confirm
Disconnect the board once sales are stopped.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
| Field | Type | About |
|---|---|---|
| disconnectedAt | date-time | When. The board is off the directory and this API for buyers; the publisher should take the tag off the page, which still marks the spaces until they do. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 Sales are not stopped yet, someone bought a slot in the same moment (start selling again or leave it paused), or it is already disconnected.
- 503 Could not do it right now; try again.
GET /v1/me/boards/{site}/reviews
Pictures waiting for the publisher.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Answers with
| Field | Type | About |
|---|---|---|
| reviews | list | A picture waiting for the publisher. |
| reviews[].contentHash | string | The picture, by hash. |
| reviews[].key | string | The slot it was bought for. |
| reviews[].link | string or null | Where a click would go. |
| reviews[].clause | string or null | The part of the publisher's policy it was held on, quoted. |
| reviews[].heldAt | date-time | When it was held. |
| reviews[].picture | string | The picture: fetch it with the app key and the user's token. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 503 Could not do it right now; try again.
POST /v1/me/boards/{site}/reviews/{hash}
Allow or refuse a held picture.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| hash | path | The picture's hash. |
Send
| Field | Type | About |
|---|---|---|
| allow | boolean | True shows it on the page; false never does. |
Answers with
| Field | Type | About |
|---|---|---|
| allowed | boolean | What was decided. |
Or refuses with
- 400 No `allow`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 The user publishes no board there.
- 409 Already decided, or one we cannot host.
- 503 Could not do it right now; try again.
GET /v1/me/boards/{site}/reviews/{hash}/picture
A held picture itself.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| hash | path | The picture's hash. |
Answers with
The picture itself, as image/webp.
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 Not their board, or no such picture.
- 503 Could not do it right now; try again.
Writing
Renting and pricing slots
Rent a web page slot for the user and extend the term; offer a slot they own for rent, and set the price it comes down from.
- POST /v1/pages/{site}/slots/{key}/rentPrepare renting a slot for the user
- POST /v1/pages/{site}/slots/{key}/rent/confirmRecord a mined booking
- POST /v1/pages/{site}/slots/{key}/rent/extendPrepare a longer term for the user while they rent the slot
- POST /v1/pages/{site}/slots/{key}/rent-listingPrepare offering the user's slot for rent
- DELETE /v1/pages/{site}/slots/{key}/rent-listingPrepare taking the slot off the rent market; a running term carries on
- POST /v1/pages/{site}/slots/{key}/askPrepare the user's ask: the price their slot's take price comes down from
- DELETE /v1/pages/{site}/slots/{key}/askPrepare clearing the ask: the price comes down from what they paid again
POST /v1/pages/{site}/slots/{key}/rent
Prepare renting a slot for the user.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| shownRate | string | The slot's rent.perDay the user was shown, in base units: refused if it is not the rate now. |
| seconds | integer | The term, from now: at least a day, at most the slot's rent.maxSeconds. An extension must be longer than what is left. |
Answers with
| Field | Type | About |
|---|---|---|
| cost | Money | An amount. Never a JSON number: token amounts outgrow one. |
| transactions | Transaction[] |
Or refuses with
- 400 No `shownRate` or `seconds`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 The booking screen would refuse this too, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/pages/{site}/slots/{key}/rent/confirm
Record a mined booking.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| txHash | string | The transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| recorded | boolean | Always true: the purchase is on the user's account. |
Or refuses with
- 400 No transaction hash.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 Not a mined booking of this slot for this user.
- 503 Could not do it right now; try again.
POST /v1/pages/{site}/slots/{key}/rent/extend
Prepare a longer term for the user while they rent the slot.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| shownRate | string | The slot's rent.perDay the user was shown, in base units: refused if it is not the rate now. |
| seconds | integer | The term, from now: at least a day, at most the slot's rent.maxSeconds. An extension must be longer than what is left. |
Answers with
| Field | Type | About |
|---|---|---|
| cost | Money | An amount. Never a JSON number: token amounts outgrow one. |
| transactions | Transaction[] |
Or refuses with
- 400 No `shownRate` or `seconds`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 Not their term, the offer ended or moved, or not a longer term offered.
- 503 Could not do it right now; try again.
POST /v1/pages/{site}/slots/{key}/rent-listing
Prepare offering the user's slot for rent.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| perDay | string | Dollars a day, like "2.50": at least the board's minimum for this slot. |
| days | integer | The longest term, in days: 1, 3, 7, 14, 30 or 90, within the board's longest. |
Answers with
| Field | Type | About |
|---|---|---|
| perDay | Money | An amount. Never a JSON number: token amounts outgrow one. |
| maxSeconds | integer | The longest term offered, in seconds. |
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No `perDay` or `days`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 Not their slot, or a rate or term the board refuses.
- 503 Could not do it right now; try again.
DELETE /v1/pages/{site}/slots/{key}/rent-listing
Prepare taking the slot off the rent market; a running term carries on.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 Not a slot.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 Not their slot.
- 503 Could not do it right now; try again.
POST /v1/pages/{site}/slots/{key}/ask
Prepare the user's ask: the price their slot's take price comes down from.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| price | string | In dollars, like "40": what the slot's take price comes down from, within the board's limits. |
Answers with
| Field | Type | About |
|---|---|---|
| price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No `price`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 Not their slot, or outside the board's limits.
- 503 Could not do it right now; try again.
DELETE /v1/pages/{site}/slots/{key}/ask
Prepare clearing the ask: the price comes down from what they paid again.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 Not a slot.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No web page slot there.
- 409 Not their slot, or no ask to clear.
- 503 Could not do it right now; try again.
Writing
Buying and writing repo parts
Buy a part of a GitHub repo for the user, then put their words or picture in it; our App commits it.
- POST /v1/repos/{site}/parts/{key}/buyPrepare buying a repo part for the user
- POST /v1/repos/{site}/parts/{key}/buy/confirmRecord the purchase once mined
- POST /v1/repos/{site}/parts/{key}/contentStage what the part will hold, for the user to put there
- POST /v1/repos/{site}/parts/{key}/content/checkWhether staging would take these words, as the user types
- POST /v1/repos/{site}/parts/{key}/content/commitCommit the part to the repo now, once its `edit` is mined
POST /v1/repos/{site}/parts/{key}/buy
Prepare buying a repo part for the user.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The part's key. |
Send
| Field | Type | About |
|---|---|---|
| consent | boolean, optional | The user agreed to the part's consent. Needed for tiers 3–5. |
Answers with
| Field | Type | About |
|---|---|---|
| price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| maxPrice | Money | An amount. Never a JSON number: token amounts outgrow one. |
| expiresAt | date-time | The buy must be mined by then, or it fails and costs nothing but gas. |
| transactions | Transaction[] |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No repo part there.
- 409 Checkout refuses it, for the reason given: off sale, a cooldown, more funds needed, or a `consent` not agreed to.
- 503 Could not do it right now; try again.
POST /v1/repos/{site}/parts/{key}/buy/confirm
Record the purchase once mined.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The part's key. |
Send
| Field | Type | About |
|---|---|---|
| txHash | string | The buy transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| recorded | boolean | Always true: the purchase is on the user's account. |
Or refuses with
- 400 No `txHash`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No repo part there.
- 409 Not a mined purchase of this part by this user.
- 503 Could not do it right now; try again.
POST /v1/repos/{site}/parts/{key}/content
Stage what the part will hold, for the user to put there.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The part's key. |
Send as application/json
| Field | Type | About |
|---|---|---|
| words | string | What the part will hold, committed exactly as sent. |
Send as multipart/form-data
| Field | Type | About |
|---|---|---|
| file | string | The picture, for a part that holds one. |
Answers with
| Field | Type | About |
|---|---|---|
| contentHash | string | What the part will hold, by hash. |
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No words or picture.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No repo part there.
- 409 The user may not write it, or the writer refuses what was sent; the message says why.
- 413 Too big.
- 503 Could not do it right now; try again.
POST /v1/repos/{site}/parts/{key}/content/check
Whether staging would take these words, as the user types.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The part's key. |
Send
| Field | Type | About |
|---|---|---|
| words | string | What the part will hold, committed exactly as sent. |
Answers with
| Field | Type | About |
|---|---|---|
| problem | string or null | Why staging would refuse these words; null when it would take them. |
Or refuses with
- 400 No `words`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No repo part there.
- 503 Could not do it right now; try again.
POST /v1/repos/{site}/parts/{key}/content/commit
Commit the part to the repo now, once its `edit` is mined.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The part's key. |
Answers with
| Field | Type | About |
|---|---|---|
| shown | boolean | The repo shows exactly what the holder wrote now. |
| commitUrl | string or null | The commit on GitHub, when one was made. |
| why | string or null | Why it is not shown yet, when it is not. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No repo part there.
- 409 The user may not write it.
- 503 Could not do it right now; try again.
Writing
Selling a repo
Connect the user’s GitHub through our App, choose the files and parts of a repo they run, and put them on sale.
- POST /v1/me/repos/connectStart connecting the user's GitHub, through our App
- GET /v1/me/reposThe repos the user proved they run
- GET /v1/me/repos/{repo}/filesWhat one file of the repo could be sold as
- POST /v1/me/repos/{repo}/consentsThe boxes the owner ticks before these parts can be sold
- POST /v1/me/repos/{repo}/boardPut the parts on sale: our App marks them, and we make the board and pay for it
POST /v1/me/repos/connect
Start connecting the user's GitHub, through our App.Needs the app key and the user’s token
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| returnTo | string | Where to send the user afterwards: an https address on one of your app's domains. It gets github=connected, requested (an organisation's owner must approve), refused or no-code. |
| go | string, optional | Our App's install screen (the default), or authorize only, for an owner who installed it already. One of install, authorize. |
Answers with
| Field | Type | About |
|---|---|---|
| url | string | Send the user here: GitHub's own screen, which shows our App's name. |
Or refuses with
- 400 No `returnTo` on one of your domains.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
GET /v1/me/repos
The repos the user proved they run.Needs the app key and the user’s token
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| repos | list | A repo the user proved they administer. |
| repos[].repoId | string | GitHub's id for the repo: what the next steps name it by. |
| repos[].repo | string | owner/name. |
| repos[].branch | string | The branch parts are written on. |
| repos[].fresh | boolean | Proved within a day, so a board can be made of it; otherwise connect again. |
| repos[].provedAt | date-time | When they last proved they run it. |
| repos[].allRepos | boolean | Our App is installed on every repo of the account: install it on selected repos only, then connect again. |
| repos[].board | string or null | Its live board, when it has one: one per repo. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
GET /v1/me/repos/{repo}/files
What one file of the repo could be sold as.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| repo | path | GitHub's id for the repo, as /v1/me/repos gives it. |
| path | query, optional | A file in the repo. |
Answers with
| Field | Type | About |
|---|---|---|
| path | string | The file. |
| accepts | string | What it holds. One of text, image. |
| wholeFile | object or null | Selling the whole file, when it can be. |
| wholeFile.key | string | A key proposed for selling the whole file. |
| wholeFile.tier | integer or null | Its tier, sold whole; null when it cannot be sold. One of 1, 2, 3, 4, 5. |
| marked | string[] | A part already marked in it, by key. |
| lines | string[] or null | One line. |
Or refuses with
- 400 No `path`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 Not a file we can sell, the proof is not fresh, or our App no longer reaches the repo; the message says which.
- 503 Could not do it right now; try again.
POST /v1/me/repos/{repo}/consents
The boxes the owner ticks before these parts can be sold.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| repo | path | GitHub's id for the repo, as /v1/me/repos gives it. |
Send
| Field | Type | About |
|---|---|---|
| parts | list | The parts to be sold, as board will take them. |
| parts[].key | string | The part's key, used once. |
| parts[].label | string, optional | What the owner calls it. The key, when left out. |
| parts[].path | string | The file. |
| parts[].price | string | In dollars, like "10". |
| parts[].whole | boolean, optional | Sell the whole file. Otherwise a part of it: one already marked by key, or the lines given. |
| parts[].lines | object, optional | A part chosen by line: our App commits its markers. |
| parts[].lines.from | integer | First line, from 1. |
| parts[].lines.to | integer | Last line, inclusive. |
| parts[].shows | object, optional | For a code or config part the board cannot place: where it shows. |
| parts[].shows.where | string | Where it shows. One of site, package, elsewhere, nowhere. |
| parts[].shows.note | string | For elsewhere, one line. |
Answers with
| Field | Type | About |
|---|---|---|
| consents | list | One box the owner ticks. |
| consents[].id | string | What to send in consent.ticked. |
| consents[].tier | integer | The tier it belongs to. One of 1, 2, 3, 4, 5. |
| consents[].text | string | The words the owner ticks. |
| nameNeeded | boolean | A part of tier 5: the owner also types the repo's name, as consent.typedName. |
Or refuses with
- 400 No `parts`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 The proof is not fresh, our App no longer reaches the repo, or GitHub could not be read.
- 503 Could not do it right now; try again.
POST /v1/me/repos/{repo}/board
Put the parts on sale: our App marks them, and we make the board and pay for it.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| repo | path | GitHub's id for the repo, as /v1/me/repos gives it. |
Send
| Field | Type | About |
|---|---|---|
| parts | list | Every part to sell, each a whole file or a part of one. |
| parts[].key | string | The part's key, used once. |
| parts[].label | string, optional | What the owner calls it. The key, when left out. |
| parts[].path | string | The file. |
| parts[].price | string | In dollars, like "10". |
| parts[].whole | boolean, optional | Sell the whole file. Otherwise a part of it: one already marked by key, or the lines given. |
| parts[].lines | object, optional | A part chosen by line: our App commits its markers. |
| parts[].lines.from | integer | First line, from 1. |
| parts[].lines.to | integer | Last line, inclusive. |
| parts[].shows | object, optional | For a code or config part the board cannot place: where it shows. |
| parts[].shows.where | string | Where it shows. One of site, package, elsewhere, nowhere. |
| parts[].shows.note | string | For elsewhere, one line. |
| profile | string | How prices move after a sale. One of standard, collector, rotating. |
| consent | object, optional | What the owner ticked and typed (consents). |
| consent.ticked | string[] | A consent id. |
| consent.typedName | string | The repo's name, for tier 5. |
| forSaleLines | boolean, optional | Add a line under each open marked part linking to where it is sold, removed once it sells. On unless false. |
Answers with
| Field | Type | About |
|---|---|---|
| site | string | The new board's address. |
Or refuses with
- 400 No `parts` or `profile`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 The set-up screen refuses it, for the reasons given: a part, a missing consent, a private repo, an App on every repo, or a board already made.
- 503 Could not do it right now; try again.
Writing
Buying and writing bot lines
Buy a line of a bot’s mind for the user, try words in it first, then put their words in it.
- POST /v1/bots/{site}/lines/{key}/buyPrepare buying a bot's line for the user
- POST /v1/bots/{site}/lines/{key}/buy/confirmRecord the purchase once mined
- POST /v1/bots/{site}/lines/{key}/contentStage what the line will say, or the brain line's model
- POST /v1/bots/{site}/lines/{key}/tryWhat the bot would post with these words in the line
POST /v1/bots/{site}/lines/{key}/buy
Prepare buying a bot's line for the user.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Answers with
| Field | Type | About |
|---|---|---|
| price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| maxPrice | Money | An amount. Never a JSON number: token amounts outgrow one. |
| expiresAt | date-time | The buy must be mined by then, or it fails and costs nothing but gas. |
| transactions | Transaction[] |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No bot line there.
- 409 Checkout refuses it, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/bots/{site}/lines/{key}/buy/confirm
Record the purchase once mined.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| txHash | string | The buy transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| recorded | boolean | Always true: the purchase is on the user's account. |
Or refuses with
- 400 No `txHash`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No bot line there.
- 409 Not a mined purchase of this line by this user.
- 503 Could not do it right now; try again.
POST /v1/bots/{site}/lines/{key}/content
Stage what the line will say, or the brain line's model.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| words | string, optional | What the line will say. |
| label | string, optional | For an open line: its name. |
| link | string, optional | For a link line: where it points. |
| provider | string, optional | For the brain line, with model: the provider, from the bot page's choices. |
| model | string, optional | For the brain line: the model that writes, no dearer than the bot allows. |
Answers with
| Field | Type | About |
|---|---|---|
| contentHash | string | What the slot will show, by hash. |
| held | boolean | A picture waiting for the publisher's review: send the transaction anyway; the page shows it once allowed. |
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 Neither words nor a model.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 The user may not write it, or the writer refuses it; the message says why.
- 503 Could not do it right now; try again.
POST /v1/bots/{site}/lines/{key}/try
What the bot would post with these words in the line.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
| key | path | The slot key. |
Send
| Field | Type | About |
|---|---|---|
| words | string | The words to try. |
| label | string, optional | For an open line: its name. |
| link | string, optional | For a link line: where it points. |
Answers with
| Field | Type | About |
|---|---|---|
| post | string | What the bot would post with these words. |
| model | string | The model that wrote it. |
| rank | object or null | Where the line would stand among the bot's lines, by price; null when it would not be read. |
| rank.rank | integer | Where the line would stand by price. |
| rank.of | integer | Of how many. |
Or refuses with
- 400 No `words`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 Refused, for the reason given: the words, a paused bot, or its allowance spent.
- 503 Could not do it right now; try again.
Writing
Making and running a bot
Make a bot from a draft, as the creation screen does, and use the holder’s powers.
- GET /v1/me/bots/draftThe user's bot in progress, or a new one
- POST /v1/me/bots/draft/{draft}Keep the draft as typed
- POST /v1/me/bots/draft/{draft}/faceIts face: a picture, decided and kept
- POST /v1/me/bots/draft/{draft}/tryWhat the bot would post on its first day
- POST /v1/me/bots/draft/{draft}/createMake the bot from the saved draft; we pay for it
- POST /v1/me/bots/{site}/powersPrepare one of the holder's powers
- POST /v1/me/bots/{site}/powers/confirmRecord a power once mined
GET /v1/me/bots/draft
The user's bot in progress, or a new one.Needs the app key and the user’s token
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| draft | string | The draft's id. |
| spec | object | The wizard's draft, as kept. |
| spec.name | string | The bot's name. |
| spec.frame | string | What it is told it is. |
| spec.seats | list | One line. |
| spec.seats[].open | boolean | An open line, named by its buyer. |
| spec.seats[].label | string | A named line's name. |
| spec.seats[].words | string | A named line's starting words. |
| spec.seats[].floor | string | Its starting price, in dollars. |
| spec.brain | string | The model that writes its posts, or empty for ours. |
| spec.brainFloor | string | The brain line's starting price. |
| spec.face | object | Its face. |
| spec.face.cid | string or null | Its picture, as face gave it. |
| spec.face.floor | string | The face line's starting price. |
| spec.terms | string | A pricing profile id, or empty until chosen. |
| spec.cadence_hours | integer | How often it posts: 1, 3, 6, 12 or 24. |
| left | string | What tries may still spend, in micro-dollars; the bot starts with it. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
POST /v1/me/bots/draft/{draft}
Keep the draft as typed.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| draft | path | The draft's id. |
Send
| Field | Type | About |
|---|---|---|
| spec | object | The whole draft, as BotDraft.spec. |
Answers with
| Field | Type | About |
|---|---|---|
| saved | boolean | Always true. |
Or refuses with
- 400 No `spec`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 Not the user's draft, or already a bot.
- 503 Could not do it right now; try again.
POST /v1/me/bots/draft/{draft}/face
Its face: a picture, decided and kept.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| draft | path | The draft's id. |
Send
| Field | Type | About |
|---|---|---|
| file | string | The picture, for a part that holds one. |
Answers with
| Field | Type | About |
|---|---|---|
| cid | string | Put this in the draft's face.cid. |
Or refuses with
- 400 No picture.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 Not the user's draft.
- 409 Not a picture we take, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/me/bots/draft/{draft}/try
What the bot would post on its first day.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| draft | path | The draft's id. |
Send
| Field | Type | About |
|---|---|---|
| spec | object | The whole draft, as BotDraft.spec. |
Answers with
| Field | Type | About |
|---|---|---|
| post | string | What it would post. |
| model | string | The model that wrote it. |
| left | string | What tries may still spend, in micro-dollars. |
Or refuses with
- 400 No `spec`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 Refused, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/me/bots/draft/{draft}/create
Make the bot from the saved draft; we pay for it.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| draft | path | The draft's id. |
Answers with
| Field | Type | About |
|---|---|---|
| site | string | The bot's address. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 The draft is not ready, for the reasons given.
- 503 Could not do it right now; try again.
POST /v1/me/bots/{site}/powers
Prepare one of the holder's powers.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Send
| Field | Type | About |
|---|---|---|
| power | string | Which power. One of seat-price, seat-on-sale, rental-terms, royalty, add-seats. |
| key | string, optional | For seat-price and seat-on-sale: the line. |
| price | string, optional | For seat-price: dollars. |
| onSale | boolean, optional | For seat-on-sale. |
| shareBps | string, optional | For rental-terms: the holder's share of rent, in basis points. |
| days | integer, optional | For rental-terms: the longest term. |
| bps | string, optional | For royalty: the line royalty, in basis points. |
| seats | list, optional | A line to add. |
| seats[].open | boolean | Open, or named. |
| seats[].label | string | Its name. |
| seats[].words | string | Its starting words. |
| seats[].floor | string | Its starting price. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No `power`, or its fields.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 Not the holder, or not allowed now, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/me/bots/{site}/powers/confirm
Record a power once mined.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| site | path | The board address. |
Send
| Field | Type | About |
|---|---|---|
| txHash | string | The transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| recorded | boolean | Always true: the purchase is on the user's account. |
Or refuses with
- 400 No `txHash`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
Writing
Image board selling and renting
Put the user’s picture or one of their NFTs up for sale as an image board and lower its prices; sell a block, buy one that is for sale, offer one for rent, rent it and extend the term.
- POST /v1/me/imagesTake the user's picture to sell as an image board
- GET /v1/me/nft-walletsThe wallets the user's NFTs are read from
- POST /v1/me/nft-walletsLink another wallet of the user's, by a message that wallet signs
- DELETE /v1/me/nft-wallets/{address}Stop reading a linked wallet
- GET /v1/me/nftsThe NFTs in the user's wallets
- POST /v1/me/nftsChoose one to sell space on: its picture becomes a draft, as an uploaded one does
- POST /v1/me/images/{draft}Put the draft up for sale: PageMarkets makes the board and pays for it
- POST /v1/images/{id}/pricesPrepare lowering every unsold square of a board the user holds
- POST /v1/images/{id}/prices/confirmConfirm the lowered prices once mined
- POST /v1/images/{id}/blocks/{block}/listingPrepare putting the user's block up for sale, or changing its price
- DELETE /v1/images/{id}/blocks/{block}/listingPrepare taking the user's block off sale
- POST /v1/images/{id}/blocks/{block}/listing/confirmRecord the block's price once mined
- POST /v1/images/{id}/blocks/{block}/buyPrepare buying a block that is for sale, for the user
- POST /v1/images/{id}/blocks/{block}/buy/transactionBuild the purchase from the signed permit
- POST /v1/images/{id}/blocks/{block}/buy/confirmRecord a mined purchase of a block
- POST /v1/images/{id}/blocks/{block}/rent-offerPrepare offering the user's block for rent
- DELETE /v1/images/{id}/blocks/{block}/rent-offerPrepare ending the rent offer; a running term carries on
- POST /v1/images/{id}/blocks/{block}/rent-offer/confirmRecord the rent offer once mined
- POST /v1/images/{id}/blocks/{block}/rentPrepare renting a block for the user
- POST /v1/images/{id}/blocks/{block}/rent/transactionBuild the rent from the signed permit
- POST /v1/images/{id}/blocks/{block}/rent/confirmRecord a mined rent
- POST /v1/images/{id}/blocks/{block}/rent/extendPrepare a longer term for the user while they rent the block
- POST /v1/images/{id}/blocks/{block}/rent/extend/transactionBuild the extension from the signed permit
- POST /v1/images/{id}/blocks/{block}/rent/extend/confirmRecord a mined extension
POST /v1/me/images
Take the user's picture to sell as an image board.Needs the app key and the user’s token
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| file | string | PNG, JPEG or WebP, up to 5 MB. |
Answers with
| Field | Type | About |
|---|---|---|
| draft | string | Send the set-up to /v1/me/images/{draft}. It becomes the board's id. |
| width | integer | The picture as it will be sold, in pixels. |
| height | integer | In pixels. |
| cellSizes | integer[] | A square size, in pixels, this picture can be cut into. |
Or refuses with
- 400 No picture in `file`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 Not a picture PageMarkets takes, or it could not be checked just now; the message says which.
- 413 Over 5 MB.
- 503 Could not do it right now; try again.
GET /v1/me/nft-wallets
The wallets the user's NFTs are read from.Needs the app key and the user’s token
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| wallets | list | A wallet whose NFTs are read for the user. |
| wallets[].address | string | The wallet. |
| wallets[].own | boolean | The wallet the user signs in with: always read, never removable. |
| wallets[].linkedAt | date-time or null | When it was linked; null for their own. |
| linkStatement | string | The statement a link message must carry, word for word. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
POST /v1/me/nft-wallets
Link another wallet of the user's, by a message that wallet signs.Needs the app key and the user’s token
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| message | string | The SIWE message the user signed, naming one of the app's domains, the chain and the nonce. |
| signature | string | The wallet's signature of it. |
| challenge | string | From /v1/auth/nonce. |
Answers with
| Field | Type | About |
|---|---|---|
| result | string | Linked now, or it already was. One of linked, already. |
Or refuses with
- 400 Missing fields, or an expired challenge.
- 401 No user token, or one expired, ended or another app's; or the message or signature is refused: another domain, another statement, or used before.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
DELETE /v1/me/nft-wallets/{address}
Stop reading a linked wallet.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| address | path | The linked wallet. |
Answers with
| Field | Type | About |
|---|---|---|
| removed | boolean | False when it was not a linked wallet of theirs. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 Could not do it right now; try again.
GET /v1/me/nfts
The NFTs in the user's wallets.Needs the app key and the user’s token
What it answers
Answers with
| Field | Type | About |
|---|---|---|
| collections | list | One collection, by contract. |
| collections[].contract | string | The collection's contract. |
| collections[].name | string | What it is called. |
| collections[].nfts | list | One NFT the user holds. |
| collections[].nfts[].contract | string | Its contract. |
| collections[].nfts[].tokenId | string | Its token id, as a decimal string. |
| collections[].nfts[].name | string | Its name, or a stand-in when it has none. |
| collections[].nfts[].picture | string or null | A picture for a card: a link for a browser to load, not one PageMarkets has checked. Null for none; a chosen NFT's picture is read and checked then. |
| collections[].nfts[].offer | string | picture: it can be chosen. video and no-picture: it cannot, and why. board: one has been made of it already. One of picture, video, no-picture, board. |
| collections[].nfts[].board | string or null | The image board made of it, when there is one: one per NFT. |
| spam | list | One NFT the user holds. |
| spam[].contract | string | Its contract. |
| spam[].tokenId | string | Its token id, as a decimal string. |
| spam[].name | string | Its name, or a stand-in when it has none. |
| spam[].picture | string or null | A picture for a card: a link for a browser to load, not one PageMarkets has checked. Null for none; a chosen NFT's picture is read and checked then. |
| spam[].offer | string | picture: it can be chosen. video and no-picture: it cannot, and why. board: one has been made of it already. One of picture, video, no-picture, board. |
| spam[].board | string or null | The image board made of it, when there is one: one per NFT. |
Or refuses with
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 503 The NFT index cannot be read just now, or something failed on our side.
POST /v1/me/nfts
Choose one to sell space on: its picture becomes a draft, as an uploaded one does.Needs the app key and the user’s token
What it takes and answers
Send
| Field | Type | About |
|---|---|---|
| contract | string | The NFT's contract. |
| tokenId | string | Its token id, as a decimal string. |
Answers with
| Field | Type | About |
|---|---|---|
| draft | string | Send the set-up to /v1/me/images/{draft}. It becomes the board's id. |
| width | integer | The picture as it will be sold, in pixels. |
| height | integer | In pixels. |
| cellSizes | integer[] | A square size, in pixels, this picture can be cut into. |
Or refuses with
- 400 No `contract` or `tokenId`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 409 Not an NFT of theirs we can offer, or its picture is not one we take; the message says which.
- 413 Its picture is over 5 MB.
- 503 The NFT index or its picture cannot be read just now, or something failed on our side.
POST /v1/me/images/{draft}
Put the draft up for sale: PageMarkets makes the board and pays for it.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| draft | path | As /v1/me/images answered it. |
Send
| Field | Type | About |
|---|---|---|
| cellSize | integer | One of the draft's cellSizes. |
| price | string | Each square's price in dollars, outside any zone; kept keeps those squares off sale for good. One of 0.0001, 0.001, 0.01, 0.02, 0.05, 0.10, 0.25, 0.50, 1, kept. |
| name | string | Up to 64 characters, fixed for good. |
| description | string, optional | Up to 1,000 characters, fixed for good. |
| terms | string | How a sold square can be bought from its owner. Fixed for good. One of standard, collector, rotating. |
| zones | list, optional | An area priced apart, in squares. |
| zones[].col | integer | Its left edge, in squares from the left. |
| zones[].row | integer | Its top edge, in squares from the top. |
| zones[].cols | integer | Its width, in squares. |
| zones[].rows | integer | Its height, in squares. |
| zones[].price | string | Each square's price in this area; kept keeps it off sale. One of 0.0001, 0.001, 0.01, 0.02, 0.05, 0.10, 0.25, 0.50, 1, kept. |
Answers with
| Field | Type | About |
|---|---|---|
| board | string | The board's id, in every other image board call. |
| contract | string | The board's contract. |
| href | string | The board, as anyone reads it. |
Or refuses with
- 400 A field missing or not shaped right.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 Not a draft of this user's.
- 409 The set-up screen would refuse it too, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/prices
Prepare lowering every unsold square of a board the user holds.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
Send
| Field | Type | About |
|---|---|---|
| priceBps | integer | What every unsold square will cost, as a share of its creation price in basis points: one of 9000, 8000, 7500, 6000, 5000, 4000, 2500, 1000, 500 or 100, below the board's priceBps now. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No `priceBps`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not the board's holder, not a step below where it is, or no gas.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/prices/confirm
Confirm the lowered prices once mined.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
Send
| Field | Type | About |
|---|---|---|
| priceBps | integer | What every unsold square will cost, as a share of its creation price in basis points: one of 9000, 8000, 7500, 6000, 5000, 4000, 2500, 1000, 500 or 100, below the board's priceBps now. |
Answers with
| Field | Type | About |
|---|---|---|
| confirmed | boolean | Always true. |
Or refuses with
- 400 No `priceBps`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 The chain does not show it yet.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/listing
Prepare putting the user's block up for sale, or changing its price.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| price | string | For the whole block, in dollars, like "12.50". |
Answers with
| Field | Type | About |
|---|---|---|
| price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No `price`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not their block, nothing left of it, the same price, or no gas.
- 503 Could not do it right now; try again.
DELETE /v1/images/{id}/blocks/{block}/listing
Prepare taking the user's block off sale.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 Not a block number.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not their block, not for sale, or no gas.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/listing/confirm
Record the block's price once mined.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| price | string | In base units, as listing answered it; "0" after taking the block off sale. |
Answers with
| Field | Type | About |
|---|---|---|
| confirmed | boolean | Always true. |
Or refuses with
- 400 No `price`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 The chain does not show that price yet.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/buy
Prepare buying a block that is for sale, for the user.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| shownPrice | string | The block's forSale price the user was shown, in base units: refused if it is not the price now. |
Answers with
| Field | Type | About |
|---|---|---|
| price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| permit | object | An EIP-2612 permit for the user's wallet to sign with eth_signTypedData_v4. It lets the board take exactly the total, once. |
| permit.domain | object | EIP-712 domain. |
| permit.domain.name | string | The token's name. |
| permit.domain.version | string | Always 1. |
| permit.domain.chainId | integer | The chain. |
| permit.domain.verifyingContract | string | The token. |
| permit.types | object | EIP-712 types. |
| permit.types.Permit | list | A field of the permit. |
| permit.types.Permit[].name | string | The field's name. |
| permit.types.Permit[].type | string | Its Solidity type. |
| permit.primaryType | string | Always Permit. One of Permit. |
| permit.message | object | Amounts as decimal strings; most wallets take them so, viem wants them as bigints. |
| permit.message.owner | string | The user. |
| permit.message.spender | string | The board. |
| permit.message.value | string | The total, in base units. |
| permit.message.nonce | string | In base units. |
| permit.message.deadline | string | In seconds. |
| ticket | object | Hand it back exactly as given. |
| ticket.board | string | The board's contract. |
| ticket.token | string | The token it is paid in. |
| ticket.tokenName | string | That token's name, as the permit names it. |
| ticket.chainId | integer | The chain. |
| ticket.buyer | string | The user: the payer and the block's new owner. |
| ticket.tokenId | string | The block, by number. |
| ticket.price | string | The price, in base units: what the permit allows and the contract must still ask. |
| ticket.nonce | string | The permit's nonce. |
| ticket.deadline | string | The permit's deadline, in seconds. |
Or refuses with
- 400 No `shownPrice`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 The board page would refuse this too, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/buy/transaction
Build the purchase from the signed permit.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| ticket | object | Hand it back exactly as given. |
| ticket.board | string | The board's contract. |
| ticket.token | string | The token it is paid in. |
| ticket.tokenName | string | That token's name, as the permit names it. |
| ticket.chainId | integer | The chain. |
| ticket.buyer | string | The user: the payer and the block's new owner. |
| ticket.tokenId | string | The block, by number. |
| ticket.price | string | The price, in base units: what the permit allows and the contract must still ask. |
| ticket.nonce | string | The permit's nonce. |
| ticket.deadline | string | The permit's deadline, in seconds. |
| signature | string | The wallet's 65-byte signature of the permit. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No ticket or signature, or a ticket for another board, block or user.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/buy/confirm
Record a mined purchase of a block.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| txHash | string | The transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| block | string | The block, by number: now the user's. |
Or refuses with
- 400 No transaction hash.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not a mined purchase of this block for this user.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/rent-offer
Prepare offering the user's block for rent.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| perDay | string | Dollars a day. One of 0.01, 0.05, 0.10, 0.25, 0.50, 1, 2, 5, 10, 25, 50, 100. |
| days | integer | The longest term, in days: 1, 3, 7, 14, 30 or 90. |
Answers with
| Field | Type | About |
|---|---|---|
| perDay | Money | An amount. Never a JSON number: token amounts outgrow one. |
| maxSeconds | integer | The longest term offered, in seconds. |
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No `perDay` or `days`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not their block, nothing left of it, not a rate or term offered, the same offer, or no gas.
- 503 Could not do it right now; try again.
DELETE /v1/images/{id}/blocks/{block}/rent-offer
Prepare ending the rent offer; a running term carries on.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 Not a block number.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not their block, not offered, or no gas.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/rent-offer/confirm
Record the rent offer once mined.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| perDay | string | In base units, as rent-offer answered it; "0" once ended. |
| maxSeconds | integer | As rent-offer answered it; 0 once ended. |
Answers with
| Field | Type | About |
|---|---|---|
| confirmed | boolean | Always true. |
Or refuses with
- 400 No `perDay` or `maxSeconds`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 The chain does not show that offer yet.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/rent
Prepare renting a block for the user.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| shownRate | string | The block's rent.perDay the user was shown, in base units: refused if it is not the rate now. |
| seconds | integer | The term, from now: 1, 3, 7, 14, 30 or 90 days in seconds, up to the block's rent.maxSeconds, or rent.maxSeconds itself. An extension must be longer than what is left. |
Answers with
| Field | Type | About |
|---|---|---|
| cost | Money | An amount. Never a JSON number: token amounts outgrow one. |
| permit | object | An EIP-2612 permit for the user's wallet to sign with eth_signTypedData_v4. It lets the board take exactly the total, once. |
| permit.domain | object | EIP-712 domain. |
| permit.domain.name | string | The token's name. |
| permit.domain.version | string | Always 1. |
| permit.domain.chainId | integer | The chain. |
| permit.domain.verifyingContract | string | The token. |
| permit.types | object | EIP-712 types. |
| permit.types.Permit | list | A field of the permit. |
| permit.types.Permit[].name | string | The field's name. |
| permit.types.Permit[].type | string | Its Solidity type. |
| permit.primaryType | string | Always Permit. One of Permit. |
| permit.message | object | Amounts as decimal strings; most wallets take them so, viem wants them as bigints. |
| permit.message.owner | string | The user. |
| permit.message.spender | string | The board. |
| permit.message.value | string | The total, in base units. |
| permit.message.nonce | string | In base units. |
| permit.message.deadline | string | In seconds. |
| ticket | object | Hand it back exactly as given. |
| ticket.board | string | The board's contract. |
| ticket.token | string | The token it is paid in. |
| ticket.tokenName | string | That token's name, as the permit names it. |
| ticket.chainId | integer | The chain. |
| ticket.tenant | string | The user: the payer and the tenant. |
| ticket.tokenId | string | The block, by number. |
| ticket.ratePerDay | string | The daily rate, in base units. |
| ticket.durationSecs | string | The term, in seconds. |
| ticket.cost | string | What the term costs, in base units: what the permit allows. |
| ticket.nonce | string | The permit's nonce. |
| ticket.deadline | string | The permit's deadline, in seconds. |
Or refuses with
- 400 No `shownRate` or `seconds`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 The board page would refuse this too, for the reason given.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/rent/transaction
Build the rent from the signed permit.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| ticket | object | Hand it back exactly as given. |
| ticket.board | string | The board's contract. |
| ticket.token | string | The token it is paid in. |
| ticket.tokenName | string | That token's name, as the permit names it. |
| ticket.chainId | integer | The chain. |
| ticket.tenant | string | The user: the payer and the tenant. |
| ticket.tokenId | string | The block, by number. |
| ticket.ratePerDay | string | The daily rate, in base units. |
| ticket.durationSecs | string | The term, in seconds. |
| ticket.cost | string | What the term costs, in base units: what the permit allows. |
| ticket.nonce | string | The permit's nonce. |
| ticket.deadline | string | The permit's deadline, in seconds. |
| signature | string | The wallet's 65-byte signature of the permit. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No ticket or signature, or a ticket for another board, block or user.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/rent/confirm
Record a mined rent.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| txHash | string | The transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| block | string | The block, by number. |
| rentedUntil | date-time | When the term ends. |
Or refuses with
- 400 No transaction hash.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not a mined term of this block for this user.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/rent/extend
Prepare a longer term for the user while they rent the block.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| shownRate | string | The block's rent.perDay the user was shown, in base units: refused if it is not the rate now. |
| seconds | integer | The term, from now: 1, 3, 7, 14, 30 or 90 days in seconds, up to the block's rent.maxSeconds, or rent.maxSeconds itself. An extension must be longer than what is left. |
Answers with
| Field | Type | About |
|---|---|---|
| cost | Money | An amount. Never a JSON number: token amounts outgrow one. |
| permit | object | An EIP-2612 permit for the user's wallet to sign with eth_signTypedData_v4. It lets the board take exactly the total, once. |
| permit.domain | object | EIP-712 domain. |
| permit.domain.name | string | The token's name. |
| permit.domain.version | string | Always 1. |
| permit.domain.chainId | integer | The chain. |
| permit.domain.verifyingContract | string | The token. |
| permit.types | object | EIP-712 types. |
| permit.types.Permit | list | A field of the permit. |
| permit.types.Permit[].name | string | The field's name. |
| permit.types.Permit[].type | string | Its Solidity type. |
| permit.primaryType | string | Always Permit. One of Permit. |
| permit.message | object | Amounts as decimal strings; most wallets take them so, viem wants them as bigints. |
| permit.message.owner | string | The user. |
| permit.message.spender | string | The board. |
| permit.message.value | string | The total, in base units. |
| permit.message.nonce | string | In base units. |
| permit.message.deadline | string | In seconds. |
| ticket | object | Hand it back exactly as given. |
| ticket.board | string | The board's contract. |
| ticket.token | string | The token it is paid in. |
| ticket.tokenName | string | That token's name, as the permit names it. |
| ticket.chainId | integer | The chain. |
| ticket.tenant | string | The user: the payer and the tenant. |
| ticket.tokenId | string | The block, by number. |
| ticket.ratePerDay | string | The daily rate, in base units. |
| ticket.durationSecs | string | The term, in seconds. |
| ticket.cost | string | What the term costs, in base units: what the permit allows. |
| ticket.nonce | string | The permit's nonce. |
| ticket.deadline | string | The permit's deadline, in seconds. |
Or refuses with
- 400 No `shownRate` or `seconds`.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not their term, the offer ended or moved, or not a longer term offered.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/rent/extend/transaction
Build the extension from the signed permit.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| ticket | object | Hand it back exactly as given. |
| ticket.board | string | The board's contract. |
| ticket.token | string | The token it is paid in. |
| ticket.tokenName | string | That token's name, as the permit names it. |
| ticket.chainId | integer | The chain. |
| ticket.tenant | string | The user: the payer and the tenant. |
| ticket.tokenId | string | The block, by number. |
| ticket.ratePerDay | string | The daily rate, in base units. |
| ticket.durationSecs | string | The term, in seconds. |
| ticket.cost | string | What the term costs, in base units: what the permit allows. |
| ticket.nonce | string | The permit's nonce. |
| ticket.deadline | string | The permit's deadline, in seconds. |
| signature | string | The wallet's 65-byte signature of the permit. |
Answers with
| Field | Type | About |
|---|---|---|
| transaction | Transaction | A transaction for the user's own wallet to send. Gas is the wallet's to estimate. |
Or refuses with
- 400 No ticket or signature, or a ticket for another board, block or user.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 503 Could not do it right now; try again.
POST /v1/images/{id}/blocks/{block}/rent/extend/confirm
Record a mined extension.Needs the app key and the user’s token
What it takes and answers
| Parameter | In | About |
|---|---|---|
| id | path | The board id or name. |
| block | path | The block number, from 1. |
Send
| Field | Type | About |
|---|---|---|
| txHash | string | The transaction's hash. |
Answers with
| Field | Type | About |
|---|---|---|
| block | string | The block, by number. |
| rentedUntil | date-time | When the term ends. |
Or refuses with
- 400 No transaction hash.
- 401 No user token, or one expired, ended or another app's.
- 403 No app key, or one PageMarkets does not know.
- 404 No such board.
- 409 Not a mined extension of this block for this user.
- 503 Could not do it right now; try again.
Writing
Webhooks
A new notice for one of your users, sent to your server instead of polling.
Give an address when you ask for your app’s key, and each new notice of a user of yours (one your app made, or one signed in through it) is sent there as a POST, with a secret to check it by. It is what /v1/me/notifications would show them, nothing more.
Sent to the address your app gave when it asked for its key, within fifteen minutes of the notice. Signed the Standard Webhooks way: webhook-id (the notice's id, the same on every retry), webhook-timestamp (unix seconds) and webhook-signature (v1, and the base64 HMAC-SHA256 of id.timestamp.body under your secret). Answer with any 2xx. Anything else, a redirect or no answer in ten seconds is tried again at the next run, oldest first, until the notice is a day old.
const signed = `${headers['webhook-id']}.${headers['webhook-timestamp']}.${rawBody}`;
const key = Buffer.from(secret.slice('whsec_'.length), 'base64');
const expected = 'v1,' + createHmac('sha256', key).update(signed).digest('base64');
// Compare with timingSafeEqual, and refuse a timestamp minutes away from now.| Field | Type | About |
|---|---|---|
| type | string | What this delivery carries. One of notification. |
| timestamp | date-time | When it was sent. |
| data | object | Who it is for, and what happened. |
| data.wallet | string | The user's wallet: which of your users this is about. |
| data.notification | object | The notice, as /v1/me/notifications gives it. The webhook-id header is its id. |
| data.notification.id | string | |
| data.notification.kind | string | What happened. One of taken_over, board_dark, board_live, booking_ending, creative_held, creative_decided, editor_granted, price_dropped, slot_listed, image_block_sold, image_block_received, image_block_resold, image_block_royalty, image_board_sold_out, image_block_taken, image_block_rented, image_block_rent_ending, image_block_rent_refunded, repo_put_back, repo_stopped, repo_part_gone, repo_unreachable, repo_reachable, repo_committed, bot_sold, bot_received. |
| data.notification.createdAt | date-time | When. |
| data.notification.read | boolean | Whether it has been marked read. |
| data.notification.data | object | What it is about, by kind: the board, the slot or block, amounts. Never another person. |
Reference
Types
Shapes that appear in more than one answer.
Money
An amount. Never a JSON number: token amounts outgrow one.
| Field | Type | About |
|---|---|---|
| units | string | Base units, as a decimal string. |
| decimals | integer | How many of units are below one whole unit: 6 for a dollar token. |
| currency | string | usd for dollar tokens, otherwise the chain's ticker. |
| display | string | As PageMarkets prints it, e.g. $10.00. Exact, so a sub-cent amount never reads as zero. |
Format
The shape a buyer's picture must be. Not the slot's box on the page, which may differ or be absent.
| Field | Type | About |
|---|---|---|
| id | string | The format's id, e.g. rectangle. |
| label | string | Its trade name, e.g. Medium Rectangle. |
| width | integer | In pixels. |
| height | integer | In pixels. |
Escrow
The publisher's cut of each sale is held this long, and goes to the slot's holders if the page stops showing it.
| Field | Type | About |
|---|---|---|
| window | string | How long, in words, e.g. 14 days. |
PageSummary
A web page with space for sale.
| Field | Type | About |
|---|---|---|
| site | string | The page's id in every other call (its board's contract address). |
| name | string | The page's name, as its publisher gave it. |
| domain | string | Where the page is. PageMarkets has found its tag serving there. |
| description | string or null | The publisher's own words about the page. |
| category | object or null | One of a fixed list, e.g. news. |
| category.slug | string | |
| category.label | string | |
| tags | string[] | The publisher's tags. |
| link | string or null | The publisher's one link. Render it rel="nofollow ugc". |
| screenshot | object or null | A picture of the whole page, at most 4000 pixels tall. |
| screenshot.url | string | |
| screenshot.width | integer | |
| screenshot.height | integer | |
| icon | string or null | The page's icon. |
| lastSeen | date-time or null | When PageMarkets last found its tag serving on the page. |
| escrow | Escrow or null | The publisher's cut of each sale is held this long, and goes to the slot's holders if the page stops showing it. |
| inventory | object | How many slots, by state. |
| inventory.listed | integer | For sale now, or once a recent sale's cooldown ends. |
| inventory.open | integer | Of those, never bought. |
| inventory.buyableNow | integer | Of those, what checkout would sell this second. |
| price | object | What the next buyer pays, cheapest and dearest slot. |
| price.low | Money | An amount. Never a JSON number: token amounts outgrow one. |
| price.high | Money | An amount. Never a JSON number: token amounts outgrow one. |
| url | string | The page on PageMarkets. |
Slot
A listed slot of a web page. price is what the next buyer pays: the floor for a first sale, more after.
| Field | Type | About |
|---|---|---|
| key | string | The slot's id within its page. Permanent. |
| label | string or null | Its name, as the publisher gave it. |
| holds | string or null | What a buyer puts in it. One of words, picture. |
| maxChars | integer or null | Words: the longest they may be. Longer words are cut with an ellipsis. |
| size | object or null | The box the page keeps for it, in pixels; null when the slot is part of the page's own layout. |
| size.width | integer | |
| size.height | integer | |
| format | Format or null | The shape a buyer's picture must be. Not the slot's box on the page, which may differ or be absent. |
| status | string | cooldown: just sold, buyable again soon. One of open, owned, rented, cooldown. |
| buyableNow | boolean | Whether checkout would sell it this second. |
| price | Money | An amount. Never a JSON number: token amounts outgrow one. |
| rent | object | Renting it, if its owner offers it. |
| rent.available | boolean | Whether it can be rented now. |
| rent.perDay | Money or null | An amount. Never a JSON number: token amounts outgrow one. |
| lastSeen | date-time or null | When PageMarkets last saw it on the page. |
| url | string | Where a person buys it on PageMarkets. |
ImageBoardSummary
An image board: a picture sold in squares.
| Field | Type | About |
|---|---|---|
| id | string | The board's id in every other call. |
| name | string | Its name, as its creator gave it. |
| picture | object | The board as it looks now, with every sold block drawn in. |
| picture.url | string | |
| picture.width | integer | |
| picture.height | integer | |
| price | object | The cheapest square for sale. |
| price.square | Money | An amount. Never a JSON number: token amounts outgrow one. |
| price.from | boolean | Some squares cost more. |
| squares | object | How many squares, by state. |
| squares.forSale | integer | Squares it sells at all. |
| squares.free | integer | Of those, never bought. |
| squares.resaleListed | integer | Blocks listed for resale. |
| loads | integer | Times the picture loaded in the last week. A floor: crawlers and PageMarkets' own pages don't count. |
| url | string | The board on PageMarkets. |
Block
A sold area of an image board. forSale is its owner's asking price, when they have listed it. Never names its owner.
| Field | Type | About |
|---|---|---|
| id | string | Its number on its board, from 1. |
| col | integer | Its left edge, in squares from the left. |
| row | integer | Its top edge, in squares from the top. |
| cols | integer | Its width, in squares. |
| rows | integer | Its height, in squares. |
| cellsLeft | integer | Of its squares, how many no later block has taken. |
| forSale | Money or null | An amount. Never a JSON number: token amounts outgrow one. |
| rent | object or null | Its owner's rent offer. |
| rent.perDay | Money | An amount. Never a JSON number: token amounts outgrow one. |
| rent.maxSeconds | integer | The longest term offered. |
| rentedUntil | date-time or null | When the current rental ends. |
| link | string or null | Where a click on it goes, as a host name. |
| url | string | The block on PageMarkets. |
Transaction
A transaction for the user's own wallet to send. Gas is the wallet's to estimate.
| Field | Type | About |
|---|---|---|
| name | string | What it does: approve, buy or edit. |
| chainId | integer | The chain to send it on. |
| to | string | The contract it calls. |
| data | string | The call, hex encoded. |
| value | string | Native currency it sends, in base units; 0 for token payments. |
Reference
When something is refused
A refusal is never cached, and its body says why. A write’s also carries depositUrl, set when a buy needs more funds:
{ "error": { "code": "not-found", "message": "No listed page has that address." } }- not-found (404) There is nothing listed there.
- bad-request (400) The address, key, number or body is not shaped right.
- unavailable (503) We could not do it just now. Try again shortly.
- forbidden (403) Writes: no app key, or one PageMarkets does not know.
- unauthorized (401) Writes: no user token, or one that expired, was ended, or is another app’s. Sign them in again.
- refused (409) Writes: the site would refuse this too, for the reason in the message.
- too-large (413) Writes: too big to be a slot’s content.