Yondry Admin API
The admin API from Yondry, for admin.
The admin API from Yondry, for admin.
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/yondry-app:yondry-app-admin-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: Yondry Admin API
version: 0.1.0
tags:
- name: Admin
paths:
/api/v1/admin/tenants:
post:
tags:
- Admin
summary: Create Tenant
description: 'Provision a new B2B tenant and generate its API key.
The plaintext key is returned once — it cannot be recovered later.
Requires X-Admin-Key header matching ADMIN_SECRET_KEY.'
operationId: create_tenant_api_v1_admin_tenants_post
parameters:
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTenantRequest'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTenantResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/tenants/{slug}/usage:
get:
tags:
- Admin
summary: Get Tenant Usage
description: 'Return usage stats for a tenant: plans this month and all time.'
operationId: get_tenant_usage_api_v1_admin_tenants__slug__usage_get
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TenantUsageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/demo-stats:
get:
tags:
- Admin
summary: Demo Stats
description: 'Per-partner opens and plans for the public demo page.
`unique_visitors` counts distinct session ids, so one person reloading the
page — or you running the pre-demo checklist — collapses to 1 rather than
inflating the open count. Partners are ordered by views, so the link that
actually got traction sorts to the top.'
operationId: demo_stats_api_v1_admin_demo_stats_get
parameters:
- name: days
in: query
required: false
schema:
type: integer
maximum: 365
minimum: 1
description: Window size in days
default: 90
title: Days
description: Window size in days
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DemoStatsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/social-saves/extraction-stats:
get:
tags:
- Admin
summary: Social Save Extraction Stats
description: Counts of social saves grouped by extraction_layer over the last 30 days.
operationId: social_save_extraction_stats_api_v1_admin_social_saves_extraction_stats_get
parameters:
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SocialSaveExtractionStatsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/tenants/{slug}/apify-usage:
get:
tags:
- Admin
summary: Get Apify Usage
description: Apify scraping usage stats for a tenant over the last 30 days.
operationId: get_apify_usage_api_v1_admin_tenants__slug__apify_usage_get
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApifyUsageStatsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/tenants/{slug}/limit:
patch:
tags:
- Admin
summary: Update Tenant Limit
description: Update the monthly plan limit for a tenant. Set to null for unlimited.
operationId: update_tenant_limit_api_v1_admin_tenants__slug__limit_patch
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateTenantLimitRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TenantUsageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/tenants/{slug}/branding:
patch:
tags:
- Admin
summary: Update Tenant Branding
description: 'Set white-label branding for a tenant''s embeddable widget.
Per field: null = leave unchanged, "" = clear it, value = set it. Unset
fields are preserved. Fetched by the widget via GET /b2b/branding.'
operationId: update_tenant_branding_api_v1_admin_tenants__slug__branding_patch
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateTenantBrandingRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TenantBrandingResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/tenants/{slug}/apify:
patch:
tags:
- Admin
summary: Update Tenant Apify
description: 'Toggle the Apify Instagram-scraper extractor for a tenant and/or set its
per-day run cap. Per field: null (omitted) = leave unchanged.
This is the runtime replacement for what migrations 0035/0036
(`enable_apify_yondry_tenant` / `disable_apify_yondry_tenant`) did as
one-off data mutations — they exist only to flip `tenants.apify_enabled`
/`apify_daily_limit` for one hardcoded tenant row, which is config, not
schema; see docs/plan/2026-08-25-remediation-roadmap.md task 5.8 /
finding M9. Those two migrations are left as-is (already run in
production, never edit a landed migration) — this endpoint is the
intended path going forward. **Do not write another migration to flip a
tenant''s Apify flags; use this endpoint instead.**'
operationId: update_tenant_apify_api_v1_admin_tenants__slug__apify_patch
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateTenantApifyRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TenantApifyResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/guides/generate:
post:
tags:
- Admin
summary: Generate Neighbourhood Guide
description: 'Generate (or regenerate) a neighbourhood guide and persist it.
Offline content step only — never called from a live planner/MCP request path.
Google Places resolves each of `place_queries` for real coordinates/hours/rating
first; Claude is only given that verified list and writes copy about it, never
free-standing facts. Any query that doesn''t resolve, or that Claude doesn''t
write a "why" for, is dropped rather than guessed at.'
operationId: generate_neighbourhood_guide_api_v1_admin_guides_generate_post
parameters:
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateGuideRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateGuideResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/guides/{slug}/scenarios/generate:
post:
tags:
- Admin
summary: Generate Guide Scenarios
description: 'Generate (or regenerate) the three scenario plans for an existing guide:
classic_saturday, rainy_day, evening_out. Each is a real plan produced by
calling the live NL planner pipeline (Haiku + Sonnet + weather + Google
Places) anchored at the guide''s lat/lon — not hand-written content.
Offline content step only, like /guides/generate. Overwrites any
previously generated scenario_plans for this guide.'
operationId: generate_guide_scenarios_api_v1_admin_guides__slug__scenarios_generate_post
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateScenariosResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/metrics:
get:
tags:
- Admin
summary: Launch Metrics
description: 'Activation, usage, and monetisation-signal metrics for the consumer launch.
Requires X-Admin-Key. `totals` are state as-of-now (all-time); `window_summary`
and `daily` cover the last `days` days (e.g. days=1 for today, days=7 for the
last week). Consumer plans = GeneratedPlan rows with a non-null user_id
(anonymous MCP plan_day rows have user_id=None and are excluded). Per-day
buckets are computed in Python so the query is identical on Postgres + sqlite.'
operationId: launch_metrics_api_v1_admin_metrics_get
parameters:
- name: days
in: query
required: false
schema:
type: integer
maximum: 365
minimum: 1
description: Window size in days for the time series + summary
default: 30
title: Days
description: Window size in days for the time series + summary
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/LaunchMetricsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/admin/users/comp:
post:
tags:
- Admin
summary: Comp User
description: 'Grant/revoke free Plus for a user by email. Requires X-Admin-Key.
Fixes the "we keep gating ourselves / how do I comp someone" problem
without hand-editing production rows.'
operationId: comp_user_api_v1_admin_users_comp_post
parameters:
- name: X-Admin-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CompUserRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CompUserResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
DemoPartnerStats:
properties:
partner:
type: string
title: Partner
views:
type: integer
title: Views
unique_visitors:
type: integer
title: Unique Visitors
plans:
type: integer
title: Plans
first_seen:
anyOf:
- type: string
- type: 'null'
title: First Seen
last_seen:
anyOf:
- type: string
- type: 'null'
title: Last Seen
type: object
required:
- partner
- views
- unique_visitors
- plans
- first_seen
- last_seen
title: DemoPartnerStats
LaunchMetricsResponse:
properties:
generated_at:
type: string
title: Generated At
window:
additionalProperties: true
type: object
title: Window
totals:
additionalProperties: true
type: object
title: Totals
window_summary:
additionalProperties: true
type: object
title: Window Summary
this_month:
additionalProperties: true
type: object
title: This Month
first_plan:
additionalProperties: true
type: object
title: First Plan
saving:
additionalProperties: true
type: object
title: Saving
prompts:
additionalProperties: true
type: object
title: Prompts
pages:
additionalProperties: true
type: object
title: Pages
daily:
items:
additionalProperties: true
type: object
type: array
title: Daily
type: object
required:
- generated_at
- window
- totals
- window_summary
- this_month
- first_plan
- saving
- prompts
- pages
- daily
title: LaunchMetricsResponse
GenerateScenariosResponse:
properties:
slug:
type: string
title: Slug
scenarios_generated:
items:
type: string
type: array
title: Scenarios Generated
scenarios_failed:
items:
type: string
type: array
title: Scenarios Failed
type: object
required:
- slug
- scenarios_generated
- scenarios_failed
title: GenerateScenariosResponse
CreateTenantResponse:
properties:
tenant_id:
type: string
title: Tenant Id
name:
type: string
title: Name
slug:
type: string
title: Slug
api_key:
type: string
title: Api Key
plan_limit_per_month:
anyOf:
- type: integer
- type: 'null'
title: Plan Limit Per Month
type: object
required:
- tenant_id
- name
- slug
- api_key
- plan_limit_per_month
title: CreateTenantResponse
UpdateTenantBrandingRequest:
properties:
display_name:
anyOf:
- type: string
- type: 'null'
title: Display Name
logo_url:
anyOf:
- type: string
- type: 'null'
title: Logo Url
accent_color:
anyOf:
- type: string
pattern: ^(#[0-9A-Fa-f]{6})?$
- type: 'null'
title: Accent Color
type: object
title: UpdateTenantBrandingRequest
CompUserResponse:
properties:
user_id:
type: string
title: User Id
email:
type: string
title: Email
is_tester:
type: boolean
title: Is Tester
is_lifetime:
type: boolean
title: Is Lifetime
plus_until:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Plus Until
type: object
required:
- user_id
- email
- is_tester
- is_lifetime
- plus_until
title: CompUserResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
UpdateTenantLimitRequest:
properties:
plan_limit_per_month:
anyOf:
- type: integer
- type: 'null'
title: Plan Limit Per Month
type: object
required:
- plan_limit_per_month
title: UpdateTenantLimitRequest
TenantBrandingResponse:
properties:
tenant_id:
type: string
title: Tenant Id
slug:
type: string
title: Slug
branding:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Branding
type: object
required:
- tenant_id
- slug
- branding
title: TenantBrandingResponse
TenantUsageResponse:
properties:
tenant_id:
type: string
title: Tenant Id
slug:
type: string
title: Slug
plan_limit_per_month:
anyOf:
- type: integer
- type: 'null'
title: Plan Limit Per Month
plans_this_month:
type: integer
title: Plans This Month
all_time_plans:
type: integer
title: All Time Plans
type: object
required:
- tenant_id
- slug
- plan_limit_per_month
- plans_this_month
- all_time_plans
title: TenantUsageResponse
GenerateGuideRequest:
properties:
name:
type: string
title: Name
city:
type: string
title: City
lat:
type: number
title: Lat
lon:
type: number
title: Lon
place_queries:
items:
type: string
type: array
maxItems: 20
minItems: 1
title: Place Queries
radius_m:
type: number
maximum: 50000.0
exclusiveMinimum: 0.0
title: Radius M
default: 2000.0
type: object
required:
- name
- city
- lat
- lon
- place_queries
title: GenerateGuideRequest
TenantApifyResponse:
properties:
tenant_id:
type: string
title: Tenant Id
slug:
type: string
title: Slug
apify_enabled:
type: boolean
title: Apify Enabled
apify_daily_limit:
type: integer
title: Apify Daily Limit
type: object
required:
- tenant_id
- slug
- apify_enabled
- apify_daily_limit
title: TenantApifyResponse
GenerateGuideResponse:
properties:
slug:
type: string
title: Slug
name:
type: string
title: Name
city:
type: string
title: City
highlight_count:
type: integer
title: Highlight Count
dropped_count:
type: integer
title: Dropped Count
type: object
required:
- slug
- name
- city
- highlight_count
- dropped_count
title: GenerateGuideResponse
CreateTenantRequest:
properties:
name:
type: string
title: Name
slug:
type: string
title: Slug
plan_limit_per_month:
anyOf:
- type: integer
- type: 'null'
title: Plan Limit Per Month
type: object
required:
- name
- slug
title: CreateTenantRequest
DemoStatsResponse:
properties:
window_days:
type: integer
title: Window Days
since:
type: string
title: Since
totals:
additionalProperties: true
type: object
title: Totals
partners:
items:
$ref: '#/components/schemas/DemoPartnerStats'
type: array
title: Partners
type: object
required:
- window_days
- since
- totals
- partners
title: DemoStatsResponse
ExtractionLayerStat:
properties:
extraction_layer:
anyOf:
- type: string
- type: 'null'
title: Extraction Layer
count:
type: integer
title: Count
type: object
required:
- extraction_layer
- count
title: ExtractionLayerStat
ApifyUsageStatsResponse:
properties:
tenant_id:
type: string
title: Tenant Id
slug:
type: string
title: Slug
apify_enabled:
type: boolean
title: Apify Enabled
apify_daily_limit:
type: integer
title: Apify Daily Limit
period_days:
type: integer
title: Period Days
total_runs:
type: integer
title: Total Runs
successful_runs:
type: integer
title: Successful Runs
success_rate:
type: number
title: Success Rate
total_cost_usd:
type: string
title: Total Cost Usd
type: object
required:
- tenant_id
- slug
- apify_enabled
- apify_daily_limit
- period_days
- total_runs
- successful_runs
- success_rate
- total_cost_usd
title: ApifyUsageStatsResponse
SocialSaveExtractionStatsResponse:
properties:
period_days:
type: integer
title: Period Days
total:
type: integer
title: Total
by_layer:
items:
$ref: '#/components/schemas/ExtractionLayerStat'
type: array
title: By Layer
type: object
required:
- period_days
- total
- by_layer
title: SocialSaveExtractionStatsResponse
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
CompUserRequest:
properties:
email:
type: string
title: Email
mode:
type: string
enum:
- tester
- lifetime
- until
- revoke
title: Mode
days:
anyOf:
- type: integer
maximum: 3650.0
exclusiveMinimum: 0.0
- type: 'null'
title: Days
until:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Until
type: object
required:
- email
- mode
title: CompUserRequest
description: "Grant or revoke free Plus access for a user, by email.\n\nmodes:\n - \"tester\": is_tester=True — permanent free access (team / internal).\n - \"lifetime\": is_lifetime=True — gifted lifetime access.\n - \"until\": plus_until set to a future date — time-limited comp (e.g.\n a Product Hunt winner gets 1 year). Provide `days` OR `until`.\n - \"revoke\": clear all three (is_tester=False, is_lifetime=False,\n plus_until=None) — remove any comp granted here.\n\nNote: this sets Yondry's own entitlement flags directly. It does NOT create\na RevenueCat entitlement — for externally-visible comps that should show in\nthe RC dashboard, grant a promotional entitlement in RC instead. Both make\n`_is_plus()` return true; this is the fast in-house path."
UpdateTenantApifyRequest:
properties:
apify_enabled:
anyOf:
- type: boolean
- type: 'null'
title: Apify Enabled
apify_daily_limit:
anyOf:
- type: integer
exclusiveMinimum: 0.0
- type: 'null'
title: Apify Daily Limit
type: object
title: UpdateTenantApifyRequest
securitySchemes:
APIKeyHeader:
type: apiKey
in: header
name: X-API-Key
HTTPBearer:
type: http
scheme: bearer