The Pillar Leases API
The Leases API from The Pillar — 3 operation(s) for leases.
Operations 3
GET
/leases/{leaseId}
Where a lease stands: awaiting payment, in review, live, refunded and so on…
#
The Leases API from The Pillar — 3 operation(s) for leases.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/thepillar-io:thepillar-io-leases-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Pillar Leases API
version: 1.0.0
description: 'Find, price and lease the ad windows and city billboards on The Pillar (thepillar.io), a 3D tower in a free browser game. A window is a licensed monthly ad pane, not property. No key or account needed: a lease returns a Stripe checkout link for the person to pay. With an OAuth token from agent sign-in, a lease is paid on the account''s saved card instead, within its monthly limit. Or pay with USDC on Base through x402 (POST /leases/x402): no account, one month per payment. Docs: https://thepillar.io/developers'
contact:
email: contact@extensionsmarket.com
servers:
- url: https://thepillar.io/api/v1
tags:
- name: Leases
paths:
/leases:
post:
operationId: startLease
summary: 'Start a lease: the ad is checked, then you get a Stripe checkout link for the…'
security:
- {}
- oauth2:
- lease
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
windowId:
description: Slot id from /windows, e.g. "F47-S3" or "B-1234"
type: string
brandUrl:
description: The brand's website (https; a bare domain gets https:// added)
type: string
maxLength: 400
brandName:
description: Shown on the window; taken from the website when left out
type: string
maxLength: 40
pitch:
description: One line under the name; taken from the website when left out
type: string
maxLength: 140
pricingText:
description: Optional, e.g. "Free plan, Pro from $19/mo"
type: string
maxLength: 80
logoUrl:
description: A logo or banner image (https); the website's share image is used when left out
type: string
maxLength: 400
banner:
type: object
properties:
fit:
description: 'Billboards only: "cover" fills the board edge to edge'
type: string
enum:
- contain
- cover
focusX:
type: number
minimum: 0
maximum: 1
focusY:
type: number
minimum: 0
maximum: 1
additionalProperties: false
email:
description: Prefills Stripe; the window belongs to the email the person pays with
type: string
maxLength: 200
required:
- windowId
- brandUrl
additionalProperties: false
responses:
'201':
description: 'Checked. Without a token: give checkoutUrl to the person to pay. With a token: paid on the saved card (or checkoutUrl when the bank wants the person to confirm)'
content:
application/json:
schema:
oneOf:
- type: object
properties:
leaseId:
description: Check progress at /leases/{leaseId}
type: string
checkoutUrl:
description: 'Give this to the person: they pay the monthly price on Stripe'
type: string
expiresAt:
description: The checkout link stops working after this time (60 minutes)
type: string
priceCents:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
status:
type: string
const: awaiting_payment
review:
description: True when a person reviews the ad after payment, before it goes up
type: boolean
message:
type: string
required:
- leaseId
- checkoutUrl
- expiresAt
- priceCents
- status
- review
- message
additionalProperties: false
- type: object
properties:
leaseId:
type: string
windowId:
type: string
status:
type: string
enum:
- live
- in_review
- awaiting_payment
paid:
description: 'true: charged on the saved card; false: give checkoutUrl to the person'
type: boolean
priceCents:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
pageUrl:
type: string
undoUntil:
description: Until then, the person (or cancel_lease) can undo it with a full refund
type: string
checkoutUrl:
type: string
expiresAt:
type: string
review:
type: boolean
message:
type: string
required:
- leaseId
- windowId
- status
- paid
- priceCents
- message
additionalProperties: false
'400':
description: Bad input; the message says which
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'401':
description: 'invalid_token: the access token is invalid, expired, or for another resource'
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'402':
description: 'With a token: agent_off (limit $0), no_card, or over_cap (over the monthly limit)'
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'404':
description: No slot has that id
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'409':
description: 'The slot isn''t free: taken, reserved, paused, prize or crown'
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'422':
description: 'content_refused: the ad isn''t allowed on The Pillar; nothing was charged'
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'429':
description: More than 10 lease starts an hour from this IP
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
tags:
- Leases
/leases/{leaseId}:
get:
operationId: getLease
summary: 'Where a lease stands: awaiting payment, in review, live, refunded and so on…'
security:
- {}
- oauth2:
- lease
parameters:
- name: leaseId
in: path
required: true
schema:
type: string
responses:
'200':
description: The lease
content:
application/json:
schema:
type: object
properties:
leaseId:
type: string
windowId:
type: string
status:
description: live = lit; in_review = paid, a person checks it first; refunded / rejected_refunded = money returned; renewed = a month added (x402); refund_due = a person sends the USDC back (x402)
type: string
enum:
- awaiting_payment
- in_review
- live
- refused
- rejected_refunded
- refunded
- expired
- ended
- undone
- renewed
- refund_due
pageUrl:
type: string
message:
type: string
stats:
description: Only with a token from the account that owns the lease, while it's live
type: object
properties:
since:
description: 'Counting starts here: when this lease lit the window'
anyOf:
- type: string
- type: 'null'
views:
description: Times someone opened the window's panel in the 3D tower
type: object
properties:
last7Days:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
last30Days:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
total:
description: Since `since`
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
required:
- last7Days
- last30Days
- total
additionalProperties: false
clicks:
description: 'Clicks on the brand''s link: the Visit site button, the directories and the window''s page'
type: object
properties:
last7Days:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
last30Days:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
total:
description: Since `since`
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
required:
- last7Days
- last30Days
- total
additionalProperties: false
required:
- since
- views
- clicks
additionalProperties: false
required:
- leaseId
- windowId
- status
- pageUrl
- message
additionalProperties: false
'404':
description: No lease has that id
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'429':
description: Too many requests from this IP (120 a minute); wait a minute
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
tags:
- Leases
/leases/x402:
post:
operationId: startX402Lease
summary: 'Lease a slot for one month with USDC on Base through x402: no account, card or…'
description: 'Without PAYMENT-SIGNATURE: 402 with the terms in PAYMENT-REQUIRED (x402 version 2, scheme exact, USDC on eip155:8453, the slot''s monthly price). Sign them with an x402 client and send the same request with PAYMENT-SIGNATURE: the ad is checked, the slot is held, the payment settles and the window lights for 30 days. Paying again for the same window, website and owner adds a month. Ads that need a person''s review use POST /leases.'
parameters:
- name: PAYMENT-SIGNATURE
in: header
required: false
description: The signed x402 payment (base64 JSON)
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
windowId:
description: Slot id from /windows, e.g. "F47-S3" or "B-1234"
type: string
brandUrl:
description: The brand's website (https; a bare domain gets https:// added)
type: string
maxLength: 400
brandName:
description: Shown on the window; taken from the website when left out
type: string
maxLength: 40
pitch:
description: One line under the name; taken from the website when left out
type: string
maxLength: 140
pricingText:
description: Optional, e.g. "Free plan, Pro from $19/mo"
type: string
maxLength: 80
logoUrl:
description: A logo or banner image (https); the website's share image is used when left out
type: string
maxLength: 400
banner:
type: object
properties:
fit:
description: 'Billboards only: "cover" fills the board edge to edge'
type: string
enum:
- contain
- cover
focusX:
type: number
minimum: 0
maximum: 1
focusY:
type: number
minimum: 0
maximum: 1
additionalProperties: false
email:
description: 'The window belongs to this email: it gets the lease emails and can end the lease at thepillar.io/desk. Without it, the paying wallet owns the window and gets no email.'
type: string
maxLength: 200
required:
- windowId
- brandUrl
additionalProperties: false
responses:
'201':
description: 'Paid and live, or a month added (renewed: true)'
headers:
PAYMENT-RESPONSE:
description: 'The settlement (base64 JSON: success, transaction, network, payer)'
schema:
type: string
content:
application/json:
schema:
type: object
properties:
leaseId:
description: Follow it at /leases/{leaseId}; a renewal returns the lease it extended
type: string
windowId:
type: string
status:
type: string
const: live
paid:
type: boolean
const: true
renewed:
description: true when this payment added a month to a live x402 lease
type: boolean
priceCents:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
pageUrl:
type: string
endsAt:
description: The window frees itself after this time (within a day) unless the same owner pays again
type: string
payer:
description: The paying wallet, lowercase
type: string
transaction:
description: The payment's transaction on Base
type: string
message:
type: string
required:
- leaseId
- windowId
- status
- paid
- renewed
- priceCents
- pageUrl
- endsAt
- payer
- transaction
- message
additionalProperties: false
'400':
description: Bad input; the message says which
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'402':
description: 'Payment required: none yet, one that doesn''t match the current price, or one the payment service turned down (the reason is in error.code). Nothing was charged'
headers:
PAYMENT-REQUIRED:
description: The terms to sign (base64 JSON x402 PaymentRequired)
schema:
type: string
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'404':
description: No slot has that id
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'409':
description: 'Nothing charged: taken (or reserved, paused, prize, crown), needs_review (use POST /leases), or payment_used'
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'422':
description: 'content_refused: the ad isn''t allowed on The Pillar; nothing was charged'
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'429':
description: Too many paid requests from this IP (10 an hour)
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'500':
description: 'refund_due: the payment went through but the window couldn''t be placed; a person sends the USDC back'
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
'503':
description: x402_off or facilitator_unavailable (nothing charged), or refund_due when the payment couldn't be confirmed
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
tags:
- Leases
components:
securitySchemes:
oauth2:
type: oauth2
description: Agent sign-in (OAuth 2.1 with PKCE). The person signs in with an email code, saves a card and sets a monthly limit.
flows:
authorizationCode:
authorizationUrl: https://thepillar.io/oauth/authorize
tokenUrl: https://thepillar.io/oauth/token
refreshUrl: https://thepillar.io/oauth/token
scopes:
lease: Lease windows on the account's saved card, up to its monthly limit