Developers

API reference

Everything you can do in the studio, from code: build products, plans, courses, downloads, videos and livestreams, read members and payments, check whether someone has access, and get a webhook the moment a member joins, pays or leaves.

The API is REST over HTTPS with JSON bodies. Field names are snake_case, timestamps are ISO 8601 in UTC, and money is an integer number of cents with a currency (so 2900 is $29.00). Every key only sees the products of the creator who made it.

Write requests are validated strictly: an unknown field is a 400 that names it, so a typo like price instead of amount fails loudly instead of being ignored. PATCH changes only the fields you send. POST requests aren't idempotent, so retrying one creates a duplicate: keep the IDs you get back and use PATCH for changes.

Base URL
https://yoob.app/api/v1

Building an interactive simulator for courses? See the Blocks developer guide.

Authentication

Create keys in Creator studio → Developers. Send the key as a bearer token on every request. Keys start with yoob_sk_ and are shown once, when you create them.

Full-access keys can do everything here. Read-only keys can only make GET requests, and never see livestream keys. Keep keys on your server. Never ship one in a browser, mobile app or public repo. If a key leaks, revoke it in the studio and create a new one.

curl https://yoob.app/api/v1/me \
  -H "Authorization: Bearer yoob_sk_…"

Errors

Errors use standard HTTP status codes and always have the same body:

{
  "error": {
    "type": "invalid_request_error",
    "message": "product_id is required."
  }
}
400
invalid_request_error
A parameter is missing or invalid.
401
authentication_error
No key, or the key is wrong or revoked.
403
permission_error
Read-only key on a write, or the account is suspended.
404
not_found_error
The object doesn't exist, or isn't yours.
409
invalid_request_error
Conflicts with existing data: a slug that's taken, or deleting a product with payment history.
429
rate_limit_error
Too many requests. Wait for Retry-After seconds.
503
api_error
Video hosting or cloud storage isn't set up on this server. Retrying won't help.
5xx
api_error
Something went wrong on our side (or with Stripe or Cloudflare). Safe to retry.

Pagination

List endpoints return newest first, 25 at a time (up to 100 with limit). When has_more is true, pass next_cursor as cursor to get the next page.

{
  "object": "list",
  "data": [
    "…"
  ],
  "has_more": true,
  "next_cursor": "cm3mem0000000001"
}

Rate limits

Each key can make 120 requests per minute. Over that you get a 429 with a Retry-After header. If you need to sync every member, page through /memberships once and then keep up to date with webhooks rather than polling. Publishing announcements, which emails your members, is limited to 5 per minute.

Build a product

A whole product, from logo to launch, in a handful of calls. Each step returns IDs the next one uses. Everything here can also be changed later with PATCH, and shows up in the studio like anything you made there.

1. Upload your logo

Images go up as a plain multipart upload. You get a url back.

export YOOB_API_KEY=yoob_sk_…

curl -X POST https://yoob.app/api/v1/uploads \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -F [email protected]

# → { "object": "upload", "kind": "image", "url": "https://cdn…/logo.png" }

2. Create the product and its plans

One call sets up the landing page and pricing. Save id and the plan IDs in plans.

curl -X POST https://yoob.app/api/v1/products \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Options Lab",
    "tagline": "Learn to trade options, step by step",
    "slug": "options-lab",
    "template": "course",
    "logo_url": "https://cdn…/logo.png",
    "plans": [
      {
        "name": "Free",
        "amount": 0,
        "perks": [
          "Weekly market notes"
        ]
      },
      {
        "name": "Pro",
        "amount": 2900,
        "trial_days": 7,
        "perks": [
          "Every lesson",
          "Live sessions"
        ],
        "is_default": true
      }
    ]
  }'

3. Add a course

Create a collection, add lessons to it, and host each lesson's video. Lessons gated to tier are only for the plans you list. Videos process in the background; video_status turns ready when they can be watched.

curl -X POST https://yoob.app/api/v1/collections \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "PRODUCT_ID",
    "title": "Options 101"
  }'

curl -X POST https://yoob.app/api/v1/content \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "PRODUCT_ID",
    "collection_id": "COLLECTION_ID",
    "type": "video",
    "title": "Calls and puts",
    "access": "tier",
    "required_plan_ids": [
      "PRO_PLAN_ID"
    ]
  }'

curl -X POST https://yoob.app/api/v1/content/LESSON_ID/video \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "url",
    "url": "https://files.example.com/lesson-1.mp4"
  }'

4. Sell a download

Private files go straight to storage with a presigned URL. Attach the storage_key to a file item and only members with access can download it.

curl -X POST https://yoob.app/api/v1/uploads \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "workbook.pdf",
    "content_type": "application/pdf",
    "size": 4831022,
    "visibility": "private"
  }'

curl -X PUT "$UPLOAD_URL" -H "Content-Type: application/pdf" --data-binary @workbook.pdf

curl -X POST https://yoob.app/api/v1/content \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "PRODUCT_ID",
    "type": "file",
    "title": "Options workbook",
    "storage_key": "STORAGE_KEY",
    "download_limit": 5
  }'

5. Schedule a livestream

Create the item, then set up its ingest. Put ingest.url and ingest.stream_key into OBS; the stream goes live for members when you start broadcasting.

curl -X POST https://yoob.app/api/v1/content \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "PRODUCT_ID",
    "type": "livestream",
    "title": "Live Q&A",
    "scheduled_at": "2026-11-10T18:00:00Z"
  }'

curl -X POST https://yoob.app/api/v1/content/STREAM_ID/live \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "standard"
  }'

6. Launch

A launch coupon and an announcement, which emails your members.

curl -X POST https://yoob.app/api/v1/coupons \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "LAUNCH20",
    "product_id": "PRODUCT_ID",
    "percent_off": 20,
    "expires_at": "2026-11-10T00:00:00Z"
  }'

curl -X POST https://yoob.app/api/v1/announcements \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "PRODUCT_ID",
    "title": "Options Lab is open",
    "content": "Use LAUNCH20 for 20% off this week.",
    "is_published": true
  }'

Templates

Each template is a different landing page layout, not a color swap. You can switch any time; content and plans carry over.

classic
Classic. Communities with a few plans and a lot to explain.
editorial
Editorial. Writers, newsletters, research, analysis.
bold
Bold. Personal brands and coaches with a single clear offer.
minimal
Minimal. Tools, utilities, small focused groups.
showcase
Showcase. Designers, artists, photographers, portfolios.
course
Course. Educators selling structured learning.
studio
Studio. Streamers, filmmakers, podcasters.
community
Community. Discord servers and groups where the members are the product.
launch
Launch. Pre-sales, drops, limited cohorts.
noir
Noir. Trading, gaming, nightlife, premium brands.

Retrieve your account

GET/api/v1/me

The creator account that owns the key, plus details about the key itself. Handy for checking a key works.

Request

curl https://yoob.app/api/v1/me \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "account",
  "id": "cm3crt0000000001",
  "name": "Maya Chen",
  "discord_username": "mayachen",
  "payouts_enabled": true,
  "product_count": 2,
  "created_at": "2026-09-01T09:00:00.000Z",
  "api_key": {
    "id": "cm3key0000000001",
    "name": "Discord bot",
    "prefix": "yoob_sk_3f9a",
    "read_only": false,
    "created_at": "2026-11-02T12:00:00.000Z"
  }
}

List products

GET/api/v1/products

Every product you own, newest first.

Query parameters

limitinteger
1–100. Defaults to 25.
cursorstring
The next_cursor from the previous page.

Request

curl https://yoob.app/api/v1/products \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "object": "product",
      "id": "cm3prd0000000001",
      "slug": "maya-trades",
      "name": "Maya Trades",
      "tagline": "Daily setups and a calm trading room",
      "description": "…",
      "url": "https://your-yoob-domain/c/maya-trades",
      "is_active": true,
      "discoverable": true,
      "category": "trading",
      "member_count": 182,
      "template": "classic",
      "accent_color": "#5b36ec",
      "logo_url": "https://cdn.your-yoob-domain/images/…/logo.png",
      "banner_url": null,
      "banner_type": null,
      "banner_style": "gradient",
      "gallery_images": [],
      "creator_bio": "Ex-prop trader. Ten years on the ES.",
      "cta_text": "Join the room",
      "page_background": null,
      "page_background_color": null,
      "section_order": [
        "perks",
        "faq",
        "creator-bio"
      ],
      "faq": [
        {
          "question": "Do I need experience?",
          "answer": "No. Start with the basics course."
        }
      ],
      "custom_sections": [],
      "social_links": [
        {
          "label": "X",
          "url": "https://x.com/mayatrades"
        }
      ],
      "show_team": true,
      "content_enabled": true,
      "support_enabled": true,
      "support": {
        "enabled": true,
        "title": "Tip jar",
        "message": null,
        "preset_amounts": [
          500,
          1000,
          2500
        ],
        "min_amount": 100,
        "currency": "usd"
      },
      "welcome": {
        "enabled": true,
        "title": "Welcome in",
        "message": "Start with the pinned post.",
        "discord_invite_url": null,
        "links": []
      },
      "affiliates": {
        "enabled": false,
        "commission_rate": 10,
        "commission_type": "recurring"
      },
      "discord": {
        "guild_id": "1200000000000000000",
        "role_id": "1200000000000000001",
        "invite_url": "https://discord.gg/…"
      },
      "created_at": "2026-09-14T10:02:11.000Z",
      "updated_at": "2026-10-30T18:44:05.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create a product

POST/api/v1/products

Creates a product, its landing page and its plans in one call, and returns it with plans. Every plan is checked before anything is saved, so a bad plan leaves nothing behind. The product goes live on its page (and on Discover unless discoverable is false) as soon as it's created.

Body (JSON)

namestringrequired
Up to 100 characters.
taglinestringrequired
One line under the name.
plansobject[]required
1–20 plans. Each takes the fields from Create a plan.
slugstring
The page address (/c/<slug>): 3–60 lowercase letters, numbers and dashes. Made from the name if you leave it out; 409 if taken.
descriptionstring
Up to 5,000 characters.
categorystring
Discover category, like trading or fitness.
templateenum
Storefront layout. See the template list in Build a product.
accent_colorstring
Hex color, like #5b36ec.
logo_url / banner_urlstring
Image URLs. Upload them with POST /uploads first.
banner_typeenum
image or video.
banner_styleenum
Fallback when there's no banner: gradient, pattern or solid. null for a color bar.
gallery_imagesstring[]
Up to 10 image URLs.
creator_biostring
About you. Up to 2,000 characters.
cta_textstring
Custom join button text. Up to 50 characters.
page_backgroundenum
gradient, pattern, solid, or color (uses page_background_color). null for plain.
section_orderstring[]
Landing page sections in order: perks, gallery, creator-bio, custom-sections, discord, faq, reviews.
faqobject[]
[{ question, answer }], up to 20.
custom_sectionsobject[]
[{ title, content }], up to 10.
social_linksobject[]
[{ label, url }], up to 10.
show_team / content_enabled / discoverableboolean
Show your team on the page, turn the content hub on, list the product on Discover. All default to true.
supportobject
Voluntary support: { enabled, title, message, preset_amounts, min_amount }. Amounts in cents; presets must be whole dollars.
welcomeobject
Shown to new members: { enabled, title, message, discord_invite_url, links: [{ label, url }] }.
affiliatesobject
{ enabled, commission_rate (1–100), commission_type: recurring or first_purchase }.
discordobject
{ guild_id, role_id, invite_url }. Members get role_id when they join.

Request

curl -X POST https://yoob.app/api/v1/products \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Options Lab",
    "tagline": "Learn to trade options, step by step",
    "template": "course",
    "category": "trading",
    "logo_url": "https://cdn.your-yoob-domain/images/…/logo.png",
    "faq": [
      {
        "question": "Is there a refund?",
        "answer": "Yes, within 7 days."
      }
    ],
    "support": {
      "enabled": true,
      "preset_amounts": [
        500,
        1500
      ]
    },
    "plans": [
      {
        "name": "Free",
        "amount": 0
      },
      {
        "name": "Pro",
        "amount": 2900,
        "interval": "month",
        "trial_days": 7,
        "annual_amount": 29000,
        "is_default": true
      }
    ]
  }'

Response

{
  "object": "product",
  "id": "cm3prd0000000001",
  "slug": "maya-trades",
  "name": "Maya Trades",
  "tagline": "Daily setups and a calm trading room",
  "description": "…",
  "url": "https://your-yoob-domain/c/maya-trades",
  "is_active": true,
  "discoverable": true,
  "category": "trading",
  "member_count": 182,
  "template": "classic",
  "accent_color": "#5b36ec",
  "logo_url": "https://cdn.your-yoob-domain/images/…/logo.png",
  "banner_url": null,
  "banner_type": null,
  "banner_style": "gradient",
  "gallery_images": [],
  "creator_bio": "Ex-prop trader. Ten years on the ES.",
  "cta_text": "Join the room",
  "page_background": null,
  "page_background_color": null,
  "section_order": [
    "perks",
    "faq",
    "creator-bio"
  ],
  "faq": [
    {
      "question": "Do I need experience?",
      "answer": "No. Start with the basics course."
    }
  ],
  "custom_sections": [],
  "social_links": [
    {
      "label": "X",
      "url": "https://x.com/mayatrades"
    }
  ],
  "show_team": true,
  "content_enabled": true,
  "support_enabled": true,
  "support": {
    "enabled": true,
    "title": "Tip jar",
    "message": null,
    "preset_amounts": [
      500,
      1000,
      2500
    ],
    "min_amount": 100,
    "currency": "usd"
  },
  "welcome": {
    "enabled": true,
    "title": "Welcome in",
    "message": "Start with the pinned post.",
    "discord_invite_url": null,
    "links": []
  },
  "affiliates": {
    "enabled": false,
    "commission_rate": 10,
    "commission_type": "recurring"
  },
  "discord": {
    "guild_id": "1200000000000000000",
    "role_id": "1200000000000000001",
    "invite_url": "https://discord.gg/…"
  },
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-10-30T18:44:05.000Z",
  "plans": [
    {
      "object": "plan",
      "id": "cm3pln0000000001",
      "product_id": "cm3prd0000000001",
      "name": "Pro",
      "amount": 2900,
      "currency": "usd",
      "is_free": false,
      "custom_amount": false,
      "min_amount": null,
      "max_amount": null,
      "billing_type": "recurring",
      "interval": "month",
      "trial_days": 7,
      "perks": [
        "Live trading room",
        "Weekly review call"
      ],
      "discord_role_id": "1200000000000000002",
      "is_default": true,
      "status": "active",
      "sort_order": 1,
      "annual_amount": 29000,
      "installment_count": null,
      "max_members": null,
      "waitlist_enabled": true,
      "upsell_plan_id": null,
      "issues_license_key": false,
      "license_max_activations": null,
      "affiliate_commission_rate": null,
      "created_at": "2026-09-14T10:02:11.000Z",
      "updated_at": "2026-09-14T10:02:11.000Z"
    }
  ]
}

Retrieve a product

GET/api/v1/products/:id

One product, with its plans (cancelled plans excluded).

Request

curl https://yoob.app/api/v1/products/cm3prd0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "product",
  "id": "cm3prd0000000001",
  "slug": "maya-trades",
  "name": "Maya Trades",
  "tagline": "Daily setups and a calm trading room",
  "description": "…",
  "url": "https://your-yoob-domain/c/maya-trades",
  "is_active": true,
  "discoverable": true,
  "category": "trading",
  "member_count": 182,
  "template": "classic",
  "accent_color": "#5b36ec",
  "logo_url": "https://cdn.your-yoob-domain/images/…/logo.png",
  "banner_url": null,
  "banner_type": null,
  "banner_style": "gradient",
  "gallery_images": [],
  "creator_bio": "Ex-prop trader. Ten years on the ES.",
  "cta_text": "Join the room",
  "page_background": null,
  "page_background_color": null,
  "section_order": [
    "perks",
    "faq",
    "creator-bio"
  ],
  "faq": [
    {
      "question": "Do I need experience?",
      "answer": "No. Start with the basics course."
    }
  ],
  "custom_sections": [],
  "social_links": [
    {
      "label": "X",
      "url": "https://x.com/mayatrades"
    }
  ],
  "show_team": true,
  "content_enabled": true,
  "support_enabled": true,
  "support": {
    "enabled": true,
    "title": "Tip jar",
    "message": null,
    "preset_amounts": [
      500,
      1000,
      2500
    ],
    "min_amount": 100,
    "currency": "usd"
  },
  "welcome": {
    "enabled": true,
    "title": "Welcome in",
    "message": "Start with the pinned post.",
    "discord_invite_url": null,
    "links": []
  },
  "affiliates": {
    "enabled": false,
    "commission_rate": 10,
    "commission_type": "recurring"
  },
  "discord": {
    "guild_id": "1200000000000000000",
    "role_id": "1200000000000000001",
    "invite_url": "https://discord.gg/…"
  },
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-10-30T18:44:05.000Z",
  "plans": [
    {
      "object": "plan",
      "id": "cm3pln0000000001",
      "product_id": "cm3prd0000000001",
      "name": "Pro",
      "amount": 2900,
      "currency": "usd",
      "is_free": false,
      "custom_amount": false,
      "min_amount": null,
      "max_amount": null,
      "billing_type": "recurring",
      "interval": "month",
      "trial_days": 7,
      "perks": [
        "Live trading room",
        "Weekly review call"
      ],
      "discord_role_id": "1200000000000000002",
      "is_default": true,
      "status": "active",
      "sort_order": 1,
      "annual_amount": 29000,
      "installment_count": null,
      "max_members": null,
      "waitlist_enabled": true,
      "upsell_plan_id": null,
      "issues_license_key": false,
      "license_max_activations": null,
      "affiliate_commission_rate": null,
      "created_at": "2026-09-14T10:02:11.000Z",
      "updated_at": "2026-09-14T10:02:11.000Z"
    }
  ]
}

Update a product

PATCH/api/v1/products/:id

Change any landing page, branding, welcome, support, affiliate or Discord setting. Send only what changes. The nested objects (support, welcome, affiliates, discord) are merged, so {"support": {"title": "Tip jar"}} leaves the other support settings alone. Send null to clear a field. The slug can't be changed.

Body (JSON)

namestring
Up to 100 characters.
taglinestring
One line under the name. Up to 300 characters.
descriptionstring
Up to 5,000 characters.
categorystring
Discover category, like trading or fitness.
templateenum
Storefront layout. See the template list in Build a product.
accent_colorstring
Hex color, like #5b36ec.
logo_url / banner_urlstring
Image URLs. Upload them with POST /uploads first.
banner_typeenum
image or video.
banner_styleenum
Fallback when there's no banner: gradient, pattern or solid. null for a color bar.
gallery_imagesstring[]
Up to 10 image URLs.
creator_biostring
About you. Up to 2,000 characters.
cta_textstring
Custom join button text. Up to 50 characters.
page_backgroundenum
gradient, pattern, solid, or color (uses page_background_color). null for plain.
section_orderstring[]
Landing page sections in order: perks, gallery, creator-bio, custom-sections, discord, faq, reviews.
faqobject[]
[{ question, answer }], up to 20.
custom_sectionsobject[]
[{ title, content }], up to 10.
social_linksobject[]
[{ label, url }], up to 10.
show_team / content_enabled / discoverableboolean
Show your team on the page, turn the content hub on, list the product on Discover. All default to true.
supportobject
Voluntary support: { enabled, title, message, preset_amounts, min_amount }. Amounts in cents; presets must be whole dollars.
welcomeobject
Shown to new members: { enabled, title, message, discord_invite_url, links: [{ label, url }] }.
affiliatesobject
{ enabled, commission_rate (1–100), commission_type: recurring or first_purchase }.
discordobject
{ guild_id, role_id, invite_url }. Members get role_id when they join.

Request

curl -X PATCH https://yoob.app/api/v1/products/cm3prd0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tagline": "Options, demystified",
    "template": "editorial",
    "welcome": {
      "message": "Start with lesson 1."
    }
  }'

Response

{
  "object": "product",
  "id": "cm3prd0000000001",
  "slug": "maya-trades",
  "name": "Maya Trades",
  "tagline": "Daily setups and a calm trading room",
  "description": "…",
  "url": "https://your-yoob-domain/c/maya-trades",
  "is_active": true,
  "discoverable": true,
  "category": "trading",
  "member_count": 182,
  "template": "classic",
  "accent_color": "#5b36ec",
  "logo_url": "https://cdn.your-yoob-domain/images/…/logo.png",
  "banner_url": null,
  "banner_type": null,
  "banner_style": "gradient",
  "gallery_images": [],
  "creator_bio": "Ex-prop trader. Ten years on the ES.",
  "cta_text": "Join the room",
  "page_background": null,
  "page_background_color": null,
  "section_order": [
    "perks",
    "faq",
    "creator-bio"
  ],
  "faq": [
    {
      "question": "Do I need experience?",
      "answer": "No. Start with the basics course."
    }
  ],
  "custom_sections": [],
  "social_links": [
    {
      "label": "X",
      "url": "https://x.com/mayatrades"
    }
  ],
  "show_team": true,
  "content_enabled": true,
  "support_enabled": true,
  "support": {
    "enabled": true,
    "title": "Tip jar",
    "message": null,
    "preset_amounts": [
      500,
      1000,
      2500
    ],
    "min_amount": 100,
    "currency": "usd"
  },
  "welcome": {
    "enabled": true,
    "title": "Welcome in",
    "message": "Start with the pinned post.",
    "discord_invite_url": null,
    "links": []
  },
  "affiliates": {
    "enabled": false,
    "commission_rate": 10,
    "commission_type": "recurring"
  },
  "discord": {
    "guild_id": "1200000000000000000",
    "role_id": "1200000000000000001",
    "invite_url": "https://discord.gg/…"
  },
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-10-30T18:44:05.000Z",
  "plans": [
    {
      "object": "plan",
      "id": "cm3pln0000000001",
      "product_id": "cm3prd0000000001",
      "name": "Pro",
      "amount": 2900,
      "currency": "usd",
      "is_free": false,
      "custom_amount": false,
      "min_amount": null,
      "max_amount": null,
      "billing_type": "recurring",
      "interval": "month",
      "trial_days": 7,
      "perks": [
        "Live trading room",
        "Weekly review call"
      ],
      "discord_role_id": "1200000000000000002",
      "is_default": true,
      "status": "active",
      "sort_order": 1,
      "annual_amount": 29000,
      "installment_count": null,
      "max_members": null,
      "waitlist_enabled": true,
      "upsell_plan_id": null,
      "issues_license_key": false,
      "license_max_activations": null,
      "affiliate_commission_rate": null,
      "created_at": "2026-09-14T10:02:11.000Z",
      "updated_at": "2026-09-14T10:02:11.000Z"
    }
  ]
}

Delete a product

DELETE/api/v1/products/:id

Deletes the product with its plans, content, courses, coupons and announcements. Only works when nobody has an active membership and there's no payment history; otherwise you get a 400 or 409 and nothing is deleted. To retire a product people have paid for, set discoverable to false and cancel its plans.

Request

curl -X DELETE https://yoob.app/api/v1/products/cm3prd0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "product",
  "id": "cm3prd0000000001",
  "deleted": true
}

List plans

GET/api/v1/products/:id/plans

A product's pricing plans in display order. Free plans have amount 0.

Query parameters

include_cancelledboolean
Include plans you've retired. Defaults to false.

Request

curl https://yoob.app/api/v1/products/cm3prd0000000001/plans \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "object": "plan",
      "id": "cm3pln0000000001",
      "product_id": "cm3prd0000000001",
      "name": "Pro",
      "amount": 2900,
      "currency": "usd",
      "is_free": false,
      "custom_amount": false,
      "min_amount": null,
      "max_amount": null,
      "billing_type": "recurring",
      "interval": "month",
      "trial_days": 7,
      "perks": [
        "Live trading room",
        "Weekly review call"
      ],
      "discord_role_id": "1200000000000000002",
      "is_default": true,
      "status": "active",
      "sort_order": 1,
      "annual_amount": 29000,
      "installment_count": null,
      "max_members": null,
      "waitlist_enabled": true,
      "upsell_plan_id": null,
      "issues_license_key": false,
      "license_max_activations": null,
      "affiliate_commission_rate": null,
      "created_at": "2026-09-14T10:02:11.000Z",
      "updated_at": "2026-09-14T10:02:11.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create a plan

POST/api/v1/products/:id/plans

Adds a plan. Leave out billing_type and interval for a monthly subscription. Options that don't fit the plan's shape are dropped rather than rejected: an annual_amount on a one-time plan is ignored, for example.

Body (JSON)

namestringrequired
Up to 100 characters.
amountinteger
Price in cents. 0 makes a free plan. Required unless custom_amount is true.
billing_typeenum
recurring (default) or one_time.
intervalenum
month (default), year or week. Recurring plans only.
trial_daysinteger
Free trial length, 0–365. Recurring plans only.
perksstring[]
Bullet points shown on the plan card. Up to 20.
is_defaultboolean
The highlighted plan. A product's first plan is the default automatically.
sort_orderinteger
Display position. New plans go last.
custom_amountboolean
Pay what you want. Always one-time; amount becomes the suggested price.
min_amount / max_amountinteger
Pay-what-you-want range in cents. Minimum at least 100; max may be null for no limit.
annual_amountinteger
Monthly plans only: also sell a yearly option at this price.
installment_countinteger
Fixed-price one-time plans only: let buyers pay in 2–24 monthly payments.
max_membersinteger
Limited spots. null for unlimited.
waitlist_enabledboolean
When spots run out, let people join a waitlist. Defaults to true.
upsell_plan_idstring
A fixed-price one-time plan of another of your products, offered at checkout.
issues_license_keyboolean
Give each buyer a license key (see Licenses).
license_max_activationsinteger
Device limit per license key. null for unlimited.
discord_role_idstring
Discord role granted to members on this plan.
affiliate_commission_ratenumber
Override the product's affiliate rate for this plan (percent).

Request

curl -X POST https://yoob.app/api/v1/products/cm3prd0000000001/plans \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lifetime",
    "amount": 19900,
    "billing_type": "one_time",
    "installment_count": 3,
    "max_members": 50
  }'

Response

{
  "object": "plan",
  "id": "cm3pln0000000002",
  "product_id": "cm3prd0000000001",
  "name": "Lifetime",
  "amount": 19900,
  "currency": "usd",
  "is_free": false,
  "custom_amount": false,
  "min_amount": null,
  "max_amount": null,
  "billing_type": "one_time",
  "interval": null,
  "trial_days": null,
  "perks": [
    "Live trading room",
    "Weekly review call"
  ],
  "discord_role_id": "1200000000000000002",
  "is_default": false,
  "status": "active",
  "sort_order": 2,
  "annual_amount": null,
  "installment_count": 3,
  "max_members": 50,
  "waitlist_enabled": true,
  "upsell_plan_id": null,
  "issues_license_key": false,
  "license_max_activations": null,
  "affiliate_commission_rate": null,
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-09-14T10:02:11.000Z"
}

Retrieve a plan

GET/api/v1/plans/:id

One plan, including cancelled ones.

Request

curl https://yoob.app/api/v1/plans/cm3pln0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "plan",
  "id": "cm3pln0000000001",
  "product_id": "cm3prd0000000001",
  "name": "Pro",
  "amount": 2900,
  "currency": "usd",
  "is_free": false,
  "custom_amount": false,
  "min_amount": null,
  "max_amount": null,
  "billing_type": "recurring",
  "interval": "month",
  "trial_days": 7,
  "perks": [
    "Live trading room",
    "Weekly review call"
  ],
  "discord_role_id": "1200000000000000002",
  "is_default": true,
  "status": "active",
  "sort_order": 1,
  "annual_amount": 29000,
  "installment_count": null,
  "max_members": null,
  "waitlist_enabled": true,
  "upsell_plan_id": null,
  "issues_license_key": false,
  "license_max_activations": null,
  "affiliate_commission_rate": null,
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-09-14T10:02:11.000Z"
}

Update a plan

PATCH/api/v1/plans/:id

Change any plan field. Price changes apply to new buyers; people already subscribed keep paying what they signed up for. Cancelled plans can't be edited.

Body (JSON)

namestring
Up to 100 characters.
amountinteger
Price in cents. 0 makes a free plan. Required unless custom_amount is true.
billing_typeenum
recurring (default) or one_time.
intervalenum
month (default), year or week. Recurring plans only.
trial_daysinteger
Free trial length, 0–365. Recurring plans only.
perksstring[]
Bullet points shown on the plan card. Up to 20.
is_defaultboolean
The highlighted plan. A product's first plan is the default automatically.
sort_orderinteger
Display position. New plans go last.
custom_amountboolean
Pay what you want. Always one-time; amount becomes the suggested price.
min_amount / max_amountinteger
Pay-what-you-want range in cents. Minimum at least 100; max may be null for no limit.
annual_amountinteger
Monthly plans only: also sell a yearly option at this price.
installment_countinteger
Fixed-price one-time plans only: let buyers pay in 2–24 monthly payments.
max_membersinteger
Limited spots. null for unlimited.
waitlist_enabledboolean
When spots run out, let people join a waitlist. Defaults to true.
upsell_plan_idstring
A fixed-price one-time plan of another of your products, offered at checkout.
issues_license_keyboolean
Give each buyer a license key (see Licenses).
license_max_activationsinteger
Device limit per license key. null for unlimited.
discord_role_idstring
Discord role granted to members on this plan.
affiliate_commission_ratenumber
Override the product's affiliate rate for this plan (percent).

Request

curl -X PATCH https://yoob.app/api/v1/plans/cm3pln0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 3400,
    "perks": [
      "Live trading room",
      "Weekly review call",
      "Trade journal template"
    ]
  }'

Response

{
  "object": "plan",
  "id": "cm3pln0000000001",
  "product_id": "cm3prd0000000001",
  "name": "Pro",
  "amount": 3400,
  "currency": "usd",
  "is_free": false,
  "custom_amount": false,
  "min_amount": null,
  "max_amount": null,
  "billing_type": "recurring",
  "interval": "month",
  "trial_days": 7,
  "perks": [
    "Live trading room",
    "Weekly review call",
    "Trade journal template"
  ],
  "discord_role_id": "1200000000000000002",
  "is_default": true,
  "status": "active",
  "sort_order": 1,
  "annual_amount": 29000,
  "installment_count": null,
  "max_members": null,
  "waitlist_enabled": true,
  "upsell_plan_id": null,
  "issues_license_key": false,
  "license_max_activations": null,
  "affiliate_commission_rate": null,
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-09-14T10:02:11.000Z"
}

Suspend a plan

POST/api/v1/plans/:id/suspend

Stops new signups. Current members keep access and keep renewing. Undo with POST /plans/:id/resume.

Request

curl -X POST https://yoob.app/api/v1/plans/cm3pln0000000001/suspend \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "plan",
  "id": "cm3pln0000000001",
  "product_id": "cm3prd0000000001",
  "name": "Pro",
  "amount": 2900,
  "currency": "usd",
  "is_free": false,
  "custom_amount": false,
  "min_amount": null,
  "max_amount": null,
  "billing_type": "recurring",
  "interval": "month",
  "trial_days": 7,
  "perks": [
    "Live trading room",
    "Weekly review call"
  ],
  "discord_role_id": "1200000000000000002",
  "is_default": true,
  "status": "suspended",
  "sort_order": 1,
  "annual_amount": 29000,
  "installment_count": null,
  "max_members": null,
  "waitlist_enabled": true,
  "upsell_plan_id": null,
  "issues_license_key": false,
  "license_max_activations": null,
  "affiliate_commission_rate": null,
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-09-14T10:02:11.000Z"
}

Resume a plan

POST/api/v1/plans/:id/resume

Reopens a suspended plan to new signups.

Request

curl -X POST https://yoob.app/api/v1/plans/cm3pln0000000001/resume \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "plan",
  "id": "cm3pln0000000001",
  "product_id": "cm3prd0000000001",
  "name": "Pro",
  "amount": 2900,
  "currency": "usd",
  "is_free": false,
  "custom_amount": false,
  "min_amount": null,
  "max_amount": null,
  "billing_type": "recurring",
  "interval": "month",
  "trial_days": 7,
  "perks": [
    "Live trading room",
    "Weekly review call"
  ],
  "discord_role_id": "1200000000000000002",
  "is_default": true,
  "status": "active",
  "sort_order": 1,
  "annual_amount": 29000,
  "installment_count": null,
  "max_members": null,
  "waitlist_enabled": true,
  "upsell_plan_id": null,
  "issues_license_key": false,
  "license_max_activations": null,
  "affiliate_commission_rate": null,
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-09-14T10:02:11.000Z"
}

Cancel a plan

POST/api/v1/plans/:id/cancel

Retires the plan for good: no new signups, and every subscription on it is set to end when its current period ends, so nobody loses time they paid for. affected_memberships says how many were scheduled to end. This can't be undone.

Request

curl -X POST https://yoob.app/api/v1/plans/cm3pln0000000001/cancel \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "plan",
  "id": "cm3pln0000000001",
  "product_id": "cm3prd0000000001",
  "name": "Pro",
  "amount": 2900,
  "currency": "usd",
  "is_free": false,
  "custom_amount": false,
  "min_amount": null,
  "max_amount": null,
  "billing_type": "recurring",
  "interval": "month",
  "trial_days": 7,
  "perks": [
    "Live trading room",
    "Weekly review call"
  ],
  "discord_role_id": "1200000000000000002",
  "is_default": true,
  "status": "cancelled",
  "sort_order": 1,
  "annual_amount": 29000,
  "installment_count": null,
  "max_members": null,
  "waitlist_enabled": true,
  "upsell_plan_id": null,
  "issues_license_key": false,
  "license_max_activations": null,
  "affiliate_commission_rate": null,
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-09-14T10:02:11.000Z",
  "affected_memberships": 41
}

Delete a plan

DELETE/api/v1/plans/:id

For plans nobody is on. Fails with a 400 if the plan has active members (cancel it instead). Deleted plans are kept with status cancelled because past payments refer to them.

Request

curl -X DELETE https://yoob.app/api/v1/plans/cm3pln0000000002 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "plan",
  "id": "cm3pln0000000002",
  "product_id": "cm3prd0000000001",
  "name": "Pro",
  "amount": 2900,
  "currency": "usd",
  "is_free": false,
  "custom_amount": false,
  "min_amount": null,
  "max_amount": null,
  "billing_type": "recurring",
  "interval": "month",
  "trial_days": 7,
  "perks": [
    "Live trading room",
    "Weekly review call"
  ],
  "discord_role_id": "1200000000000000002",
  "is_default": true,
  "status": "cancelled",
  "sort_order": 1,
  "annual_amount": 29000,
  "installment_count": null,
  "max_members": null,
  "waitlist_enabled": true,
  "upsell_plan_id": null,
  "issues_license_key": false,
  "license_max_activations": null,
  "affiliate_commission_rate": null,
  "created_at": "2026-09-14T10:02:11.000Z",
  "updated_at": "2026-09-14T10:02:11.000Z",
  "deleted": true
}

Check access

GET/api/v1/access

The one call most integrations need: does this person have access to this product right now? has_access is true for active and trialing memberships. Someone who cancelled keeps active status (with cancel_at_period_end: true) until their period ends.

Query parameters

product_idstringrequired
The product to check.
discord_idstring
The person's Discord user ID. Pass this or user_id.
user_idstring
The person's YooB user ID.

Request

curl "https://yoob.app/api/v1/access?product_id=cm3prd0000000001&discord_id=100000000000000002" \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "access_check",
  "product_id": "cm3prd0000000001",
  "has_access": true,
  "membership": {
    "object": "membership",
    "id": "cm3mem0000000001",
    "product_id": "cm3prd0000000001",
    "user_id": "cm3usr0000000001",
    "status": "active",
    "has_access": true,
    "plan_id": "cm3pln0000000001",
    "plan_name": "Pro",
    "amount": 2900,
    "currency": "usd",
    "billing_type": "recurring",
    "billing_interval": "month",
    "started_at": "2026-10-02T14:11:09.000Z",
    "current_period_end": "2026-12-02T14:11:09.000Z",
    "cancel_at_period_end": false,
    "cancelled_at": null,
    "cancelled_by": null,
    "trial_ends_at": null,
    "paused_at": null,
    "resumes_at": null,
    "coupon_code": null,
    "affiliate_code": null,
    "created_at": "2026-10-02T14:11:09.000Z",
    "updated_at": "2026-11-02T14:11:12.000Z",
    "user": {
      "object": "user",
      "id": "cm3usr0000000001",
      "discord_id": "100000000000000002",
      "discord_username": "jordanlee",
      "name": "Jordan Lee"
    }
  },
  "plan": {
    "object": "plan",
    "id": "cm3pln0000000001",
    "product_id": "cm3prd0000000001",
    "name": "Pro",
    "amount": 2900,
    "currency": "usd",
    "is_free": false,
    "custom_amount": false,
    "min_amount": null,
    "max_amount": null,
    "billing_type": "recurring",
    "interval": "month",
    "trial_days": 7,
    "perks": [
      "Live trading room",
      "Weekly review call"
    ],
    "discord_role_id": "1200000000000000002",
    "is_default": true,
    "status": "active",
    "sort_order": 1,
    "annual_amount": 29000,
    "installment_count": null,
    "max_members": null,
    "waitlist_enabled": true,
    "upsell_plan_id": null,
    "issues_license_key": false,
    "license_max_activations": null,
    "affiliate_commission_rate": null,
    "created_at": "2026-09-14T10:02:11.000Z",
    "updated_at": "2026-09-14T10:02:11.000Z"
  }
}

List memberships

GET/api/v1/memberships

Members across your products, newest first. Each includes the member's user.

Query parameters

product_idstring
Only this product.
statusenum
active, trialing, past_due, paused or cancelled.
discord_idstring
Only this Discord user.
user_idstring
Only this YooB user.
limitinteger
1–100. Defaults to 25.
cursorstring
The next_cursor from the previous page.

Request

curl "https://yoob.app/api/v1/memberships?product_id=cm3prd0000000001&status=active&limit=50" \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "object": "membership",
      "id": "cm3mem0000000001",
      "product_id": "cm3prd0000000001",
      "user_id": "cm3usr0000000001",
      "status": "active",
      "has_access": true,
      "plan_id": "cm3pln0000000001",
      "plan_name": "Pro",
      "amount": 2900,
      "currency": "usd",
      "billing_type": "recurring",
      "billing_interval": "month",
      "started_at": "2026-10-02T14:11:09.000Z",
      "current_period_end": "2026-12-02T14:11:09.000Z",
      "cancel_at_period_end": false,
      "cancelled_at": null,
      "cancelled_by": null,
      "trial_ends_at": null,
      "paused_at": null,
      "resumes_at": null,
      "coupon_code": null,
      "affiliate_code": null,
      "created_at": "2026-10-02T14:11:09.000Z",
      "updated_at": "2026-11-02T14:11:12.000Z",
      "user": {
        "object": "user",
        "id": "cm3usr0000000001",
        "discord_id": "100000000000000002",
        "discord_username": "jordanlee",
        "name": "Jordan Lee"
      }
    }
  ],
  "has_more": true,
  "next_cursor": "cm3mem0000000001"
}

Retrieve a membership

GET/api/v1/memberships/:id

One membership, with its user.

Request

curl https://yoob.app/api/v1/memberships/cm3mem0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "membership",
  "id": "cm3mem0000000001",
  "product_id": "cm3prd0000000001",
  "user_id": "cm3usr0000000001",
  "status": "active",
  "has_access": true,
  "plan_id": "cm3pln0000000001",
  "plan_name": "Pro",
  "amount": 2900,
  "currency": "usd",
  "billing_type": "recurring",
  "billing_interval": "month",
  "started_at": "2026-10-02T14:11:09.000Z",
  "current_period_end": "2026-12-02T14:11:09.000Z",
  "cancel_at_period_end": false,
  "cancelled_at": null,
  "cancelled_by": null,
  "trial_ends_at": null,
  "paused_at": null,
  "resumes_at": null,
  "coupon_code": null,
  "affiliate_code": null,
  "created_at": "2026-10-02T14:11:09.000Z",
  "updated_at": "2026-11-02T14:11:12.000Z",
  "user": {
    "object": "user",
    "id": "cm3usr0000000001",
    "discord_id": "100000000000000002",
    "discord_username": "jordanlee",
    "name": "Jordan Lee"
  }
}

Cancel a membership

POST/api/v1/memberships/:id/cancel

Ends a membership now, or at the end of the current billing period. Immediate cancellation stops the subscription, removes Discord roles and emails the member. Needs a full-access key.

Body (JSON)

at_period_endboolean
Keep access until the period ends instead of ending now. Only for renewing plans. Defaults to false.
reasonstring
Shown to the member in their cancellation email. Max 500 characters.

Request

curl -X POST https://yoob.app/api/v1/memberships/cm3mem0000000001/cancel \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"at_period_end": true, "reason": "Moving to the annual plan"}'

Response

{
  "object": "membership",
  "id": "cm3mem0000000001",
  "product_id": "cm3prd0000000001",
  "user_id": "cm3usr0000000001",
  "status": "active",
  "has_access": true,
  "plan_id": "cm3pln0000000001",
  "plan_name": "Pro",
  "amount": 2900,
  "currency": "usd",
  "billing_type": "recurring",
  "billing_interval": "month",
  "started_at": "2026-10-02T14:11:09.000Z",
  "current_period_end": "2026-12-02T14:11:09.000Z",
  "cancel_at_period_end": true,
  "cancelled_at": null,
  "cancelled_by": "creator",
  "trial_ends_at": null,
  "paused_at": null,
  "resumes_at": null,
  "coupon_code": null,
  "affiliate_code": null,
  "created_at": "2026-10-02T14:11:09.000Z",
  "updated_at": "2026-11-02T14:11:12.000Z",
  "user": {
    "object": "user",
    "id": "cm3usr0000000001",
    "discord_id": "100000000000000002",
    "discord_username": "jordanlee",
    "name": "Jordan Lee"
  }
}

List payments

GET/api/v1/payments

Purchases and renewals, including failed and refunded ones.

Query parameters

product_idstring
Only this product.
membership_idstring
Only this membership.
user_idstring
Only this YooB user.
statusenum
paid, failed or refunded.
limitinteger
1–100. Defaults to 25.
cursorstring
The next_cursor from the previous page.

Request

curl "https://yoob.app/api/v1/payments?product_id=cm3prd0000000001" \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "object": "payment",
      "id": "cm3pay0000000001",
      "product_id": "cm3prd0000000001",
      "membership_id": "cm3mem0000000001",
      "user_id": "cm3usr0000000001",
      "amount": 2900,
      "currency": "usd",
      "status": "paid",
      "description": "Maya Trades (Pro) — November 2026",
      "created_at": "2026-11-02T14:11:10.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

List contributions

GET/api/v1/contributions

Voluntary support (pay what you want) sent to your products.

Query parameters

product_idstring
Only this product.
limitinteger
1–100. Defaults to 25.
cursorstring
The next_cursor from the previous page.

Request

curl https://yoob.app/api/v1/contributions \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "object": "contribution",
      "id": "cm3con0000000001",
      "product_id": "cm3prd0000000001",
      "user_id": "cm3usr0000000001",
      "amount": 1000,
      "currency": "usd",
      "message": "Thanks for the NFP breakdown!",
      "is_public": true,
      "status": "paid",
      "created_at": "2026-11-01T21:03:44.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

List coupons

GET/api/v1/coupons

Your discount codes, newest first.

Query parameters

product_idstring
Only coupons for this product.
limitinteger
1–100. Defaults to 25.
cursorstring
The next_cursor from the previous page.

Request

curl https://yoob.app/api/v1/coupons \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "object": "coupon",
      "id": "cm3cpn0000000001",
      "code": "LAUNCH20",
      "product_id": "cm3prd0000000001",
      "percent_off": 20,
      "amount_off": null,
      "currency": "usd",
      "duration": "repeating",
      "duration_in_months": 3,
      "max_redemptions": 100,
      "times_redeemed": 0,
      "expires_at": "2026-11-10T00:00:00.000Z",
      "is_active": true,
      "created_at": "2026-11-03T15:00:00.000Z",
      "updated_at": "2026-11-03T15:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create a coupon

POST/api/v1/coupons

A discount code buyers enter at checkout. Codes are case-insensitive, stored uppercase, and unique across your products.

Body (JSON)

codestringrequired
Letters, numbers, dashes and underscores. Up to 50 characters.
product_idstring
Only works on this product. Leave out (or null) for every product.
percent_offnumber
Percentage off, above 0 and up to 100. Pass this or amount_off.
amount_offinteger
Fixed discount in cents.
durationenum
For subscriptions: once (first payment, default), repeating or forever.
duration_in_monthsinteger
How many months a repeating discount lasts, 1–36.
max_redemptionsinteger
Total uses allowed. null for unlimited.
expires_atdatetime
Stops working after this time.

Request

curl -X POST https://yoob.app/api/v1/coupons \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "LAUNCH20",
    "product_id": "cm3prd0000000001",
    "percent_off": 20,
    "duration": "repeating",
    "duration_in_months": 3,
    "max_redemptions": 100,
    "expires_at": "2026-11-10T00:00:00Z"
  }'

Response

{
  "object": "coupon",
  "id": "cm3cpn0000000001",
  "code": "LAUNCH20",
  "product_id": "cm3prd0000000001",
  "percent_off": 20,
  "amount_off": null,
  "currency": "usd",
  "duration": "repeating",
  "duration_in_months": 3,
  "max_redemptions": 100,
  "times_redeemed": 0,
  "expires_at": "2026-11-10T00:00:00.000Z",
  "is_active": true,
  "created_at": "2026-11-03T15:00:00.000Z",
  "updated_at": "2026-11-03T15:00:00.000Z"
}

Retrieve a coupon

GET/api/v1/coupons/:id

One coupon, with how many times it's been used.

Request

curl https://yoob.app/api/v1/coupons/cm3cpn0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "coupon",
  "id": "cm3cpn0000000001",
  "code": "LAUNCH20",
  "product_id": "cm3prd0000000001",
  "percent_off": 20,
  "amount_off": null,
  "currency": "usd",
  "duration": "repeating",
  "duration_in_months": 3,
  "max_redemptions": 100,
  "times_redeemed": 0,
  "expires_at": "2026-11-10T00:00:00.000Z",
  "is_active": true,
  "created_at": "2026-11-03T15:00:00.000Z",
  "updated_at": "2026-11-03T15:00:00.000Z"
}

Update a coupon

PATCH/api/v1/coupons/:id

Change the discount or its limits, or turn it off with is_active: false. Changes apply to future checkouts; people who already used it keep the discount they got. The code itself can't change.

Body (JSON)

percent_offnumber
Percentage off, above 0 and up to 100. Pass this or amount_off.
amount_offinteger
Fixed discount in cents.
durationenum
For subscriptions: once (first payment, default), repeating or forever.
duration_in_monthsinteger
How many months a repeating discount lasts, 1–36.
max_redemptionsinteger
Total uses allowed. null for unlimited.
expires_atdatetime
Stops working after this time.
is_activeboolean
false stops the code working without deleting it.

Request

curl -X PATCH https://yoob.app/api/v1/coupons/cm3cpn0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "is_active": false
  }'

Response

{
  "object": "coupon",
  "id": "cm3cpn0000000001",
  "code": "LAUNCH20",
  "product_id": "cm3prd0000000001",
  "percent_off": 20,
  "amount_off": null,
  "currency": "usd",
  "duration": "repeating",
  "duration_in_months": 3,
  "max_redemptions": 100,
  "times_redeemed": 0,
  "expires_at": "2026-11-10T00:00:00.000Z",
  "is_active": false,
  "created_at": "2026-11-03T15:00:00.000Z",
  "updated_at": "2026-11-03T15:00:00.000Z"
}

Delete a coupon

DELETE/api/v1/coupons/:id

Deletes the code. Subscriptions already discounted by it keep their discount.

Request

curl -X DELETE https://yoob.app/api/v1/coupons/cm3cpn0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "coupon",
  "id": "cm3cpn0000000001",
  "deleted": true
}

List content

GET/api/v1/content

Posts, videos, audio, files, links and livestreams, newest first. Drafts included.

Query parameters

product_idstring
Only this product.
collection_idstring
Only items in this course or series.
typeenum
post, video, audio, file, link or livestream.
publishedboolean
true for published only, false for drafts only.
limitinteger
1–100. Defaults to 25.
cursorstring
The next_cursor from the previous page.

Request

curl "https://yoob.app/api/v1/content?product_id=cm3prd0000000001&published=true" \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "object": "content",
      "id": "cm3cnt0000000001",
      "product_id": "cm3prd0000000001",
      "collection_id": null,
      "type": "post",
      "title": "ES long above 5,980",
      "body": "Entry 5,982 · stop 5,968 · target 6,010",
      "media_url": null,
      "thumbnail_url": null,
      "external_url": null,
      "duration_seconds": null,
      "access": "members",
      "required_plan_ids": [],
      "is_published": true,
      "is_pinned": false,
      "sort_order": 0,
      "storage_key": null,
      "download_limit": null,
      "video_status": null,
      "live": null,
      "published_at": "2026-11-02T13:30:00.000Z",
      "scheduled_at": null,
      "created_at": "2026-11-02T13:30:00.000Z",
      "updated_at": "2026-11-02T13:30:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create content

POST/api/v1/content

Post to a product's hub: an update, a lesson, a download, a link or a livestream. Published right away unless you set is_published to false. To host a video with us, create a video item and then attach the file with Attach a video.

Body (JSON)

product_idstringrequired
The product to post to.
titlestringrequired
Up to 200 characters.
typeenum
post (default), video, audio, file, link or livestream.
bodystring
Text body. Up to 50,000 characters.
accessenum
public (anyone), members (default, any plan) or tier (only required_plan_ids).
required_plan_idsstring[]
Plans that can see it. Required when access is tier; must be plans on this product.
collection_idstring
Put it in a course or series. null removes it.
sort_orderinteger
Position inside its collection.
media_urlstring
A video or audio URL you host elsewhere (YouTube, Vimeo, MP4).
storage_keystring
A private file from POST /uploads (visibility private). Members with access can download it.
download_limitinteger
Max downloads per member for files. null for unlimited.
external_urlstring
For links, and livestreams hosted elsewhere.
thumbnail_urlstring
Cover image.
duration_secondsinteger
For video and audio. Hosted videos fill this in themselves.
is_publishedboolean
Visible to members.
is_pinnedboolean
Pin to the top of the feed.
scheduled_atdatetime
Livestream start time (ISO 8601).

Request

curl -X POST https://yoob.app/api/v1/content \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "cm3prd0000000001",
    "title": "ES long above 5,980",
    "body": "Entry 5,982 · stop 5,968 · target 6,010"
  }'

Response

{
  "object": "content",
  "id": "cm3cnt0000000001",
  "product_id": "cm3prd0000000001",
  "collection_id": null,
  "type": "post",
  "title": "ES long above 5,980",
  "body": "Entry 5,982 · stop 5,968 · target 6,010",
  "media_url": null,
  "thumbnail_url": null,
  "external_url": null,
  "duration_seconds": null,
  "access": "members",
  "required_plan_ids": [],
  "is_published": true,
  "is_pinned": false,
  "sort_order": 0,
  "storage_key": null,
  "download_limit": null,
  "video_status": null,
  "live": null,
  "published_at": "2026-11-02T13:30:00.000Z",
  "scheduled_at": null,
  "created_at": "2026-11-02T13:30:00.000Z",
  "updated_at": "2026-11-02T13:30:00.000Z"
}

Retrieve content

GET/api/v1/content/:id

One item. For hosted videos, video_status goes from pendingupload through processing to ready (or error).

Request

curl https://yoob.app/api/v1/content/cm3cnt0000000002 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "content",
  "id": "cm3cnt0000000002",
  "product_id": "cm3prd0000000001",
  "collection_id": "cm3col0000000001",
  "type": "video",
  "title": "Calls and puts",
  "body": null,
  "media_url": null,
  "thumbnail_url": "/api/content/cm3cnt0000000002/playback?thumbnail=1",
  "external_url": null,
  "duration_seconds": 742,
  "access": "tier",
  "required_plan_ids": [
    "cm3pln0000000001"
  ],
  "is_published": true,
  "is_pinned": false,
  "sort_order": 0,
  "storage_key": null,
  "download_limit": null,
  "video_status": "ready",
  "live": null,
  "published_at": "2026-11-02T13:30:00.000Z",
  "scheduled_at": null,
  "created_at": "2026-11-02T13:30:00.000Z",
  "updated_at": "2026-11-02T13:30:00.000Z"
}

Update content

PATCH/api/v1/content/:id

Edit, publish, unpublish, pin, move between collections or change who can see an item. Switching access away from tier clears required_plan_ids. Replacing storage_key deletes the old file.

Body (JSON)

titlestring
Up to 200 characters.
typeenum
post (default), video, audio, file, link or livestream.
bodystring
Text body. Up to 50,000 characters.
accessenum
public (anyone), members (default, any plan) or tier (only required_plan_ids).
required_plan_idsstring[]
Plans that can see it. Required when access is tier; must be plans on this product.
collection_idstring
Put it in a course or series. null removes it.
sort_orderinteger
Position inside its collection.
media_urlstring
A video or audio URL you host elsewhere (YouTube, Vimeo, MP4).
storage_keystring
A private file from POST /uploads (visibility private). Members with access can download it.
download_limitinteger
Max downloads per member for files. null for unlimited.
external_urlstring
For links, and livestreams hosted elsewhere.
thumbnail_urlstring
Cover image.
duration_secondsinteger
For video and audio. Hosted videos fill this in themselves.
is_publishedboolean
Visible to members.
is_pinnedboolean
Pin to the top of the feed.
scheduled_atdatetime
Livestream start time (ISO 8601).

Request

curl -X PATCH https://yoob.app/api/v1/content/cm3cnt0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "is_published": true,
    "is_pinned": true
  }'

Response

{
  "object": "content",
  "id": "cm3cnt0000000001",
  "product_id": "cm3prd0000000001",
  "collection_id": null,
  "type": "post",
  "title": "ES long above 5,980",
  "body": "Entry 5,982 · stop 5,968 · target 6,010",
  "media_url": null,
  "thumbnail_url": null,
  "external_url": null,
  "duration_seconds": null,
  "access": "members",
  "required_plan_ids": [],
  "is_published": true,
  "is_pinned": true,
  "sort_order": 0,
  "storage_key": null,
  "download_limit": null,
  "video_status": null,
  "live": null,
  "published_at": "2026-11-02T13:30:00.000Z",
  "scheduled_at": null,
  "created_at": "2026-11-02T13:30:00.000Z",
  "updated_at": "2026-11-02T13:30:00.000Z"
}

Delete content

DELETE/api/v1/content/:id

Deletes the item along with its hosted file, video and live input.

Request

curl -X DELETE https://yoob.app/api/v1/content/cm3cnt0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "content",
  "id": "cm3cnt0000000001",
  "deleted": true
}

Attach a video

POST/api/v1/content/:id/video

Hosts a video on a video item. Members watch it through signed links, so only people with access can play it. Pick a source: url and we fetch the file for you; upload returns a one-time URL you POST the file to as multipart field file (up to 200MB, the URL lasts 30 minutes); tus returns a resumable upload URL for anything up to 30GB (any tus client works). Processing takes a few minutes: poll Retrieve content until video_status is ready. Attaching a new video replaces and deletes the old one. Returns 503 if video hosting isn't set up on this server.

Body (JSON)

sourceenumrequired
url, upload or tus.
urlstring
With source url: a public http(s) link to the video file.
sizeinteger
With source tus: the file size in bytes.

Request

curl -X POST https://yoob.app/api/v1/content/cm3cnt0000000002/video \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "upload"
  }'

# then send the file
curl -X POST "$UPLOAD_URL" -F [email protected]

Response

{
  "object": "video_upload",
  "source": "upload",
  "upload_url": "https://upload.videodelivery.net/…",
  "method": "POST",
  "form_field": "file",
  "max_bytes": 209715200,
  "expires_at": "2026-11-03T16:30:00.000Z",
  "content": {
    "object": "content",
    "id": "cm3cnt0000000002",
    "product_id": "cm3prd0000000001",
    "collection_id": "cm3col0000000001",
    "type": "video",
    "title": "Calls and puts",
    "body": null,
    "media_url": null,
    "thumbnail_url": null,
    "external_url": null,
    "duration_seconds": null,
    "access": "tier",
    "required_plan_ids": [
      "cm3pln0000000001"
    ],
    "is_published": true,
    "is_pinned": false,
    "sort_order": 0,
    "storage_key": null,
    "download_limit": null,
    "video_status": "pendingupload",
    "live": null,
    "published_at": "2026-11-02T13:30:00.000Z",
    "scheduled_at": null,
    "created_at": "2026-11-02T13:30:00.000Z",
    "updated_at": "2026-11-02T13:30:00.000Z"
  }
}

Remove a video

DELETE/api/v1/content/:id/video

Detaches the hosted video and deletes it. The item stays.

Request

curl -X DELETE https://yoob.app/api/v1/content/cm3cnt0000000002/video \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "content",
  "id": "cm3cnt0000000002",
  "product_id": "cm3prd0000000001",
  "collection_id": "cm3col0000000001",
  "type": "video",
  "title": "Calls and puts",
  "body": null,
  "media_url": null,
  "thumbnail_url": null,
  "external_url": null,
  "duration_seconds": 742,
  "access": "tier",
  "required_plan_ids": [
    "cm3pln0000000001"
  ],
  "is_published": true,
  "is_pinned": false,
  "sort_order": 0,
  "storage_key": null,
  "download_limit": null,
  "video_status": null,
  "live": null,
  "published_at": "2026-11-02T13:30:00.000Z",
  "scheduled_at": null,
  "created_at": "2026-11-02T13:30:00.000Z",
  "updated_at": "2026-11-02T13:30:00.000Z"
}

List collections

GET/api/v1/collections

A product's courses and series in display order, with how many items each has.

Query parameters

product_idstringrequired
The product.

Request

curl "https://yoob.app/api/v1/collections?product_id=cm3prd0000000001" \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "object": "collection",
      "id": "cm3col0000000001",
      "product_id": "cm3prd0000000001",
      "title": "Options 101",
      "description": "Start here.",
      "cover_url": null,
      "sort_order": 0,
      "is_published": true,
      "created_at": "2026-11-01T09:00:00.000Z",
      "updated_at": "2026-11-01T09:00:00.000Z",
      "item_count": 12
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create a collection

POST/api/v1/collections

A course, module or series. Add lessons by creating content with its collection_id, then set their order with Reorder a collection.

Body (JSON)

product_idstringrequired
The product it belongs to.
titlestringrequired
Up to 200 characters.
descriptionstring
Up to 5,000 characters.
cover_urlstring
Cover image.
sort_orderinteger
Position among the product's collections. New ones go last.
is_publishedboolean
Defaults to true.

Request

curl -X POST https://yoob.app/api/v1/collections \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "cm3prd0000000001",
    "title": "Options 101",
    "description": "Start here."
  }'

Response

{
  "object": "collection",
  "id": "cm3col0000000001",
  "product_id": "cm3prd0000000001",
  "title": "Options 101",
  "description": "Start here.",
  "cover_url": null,
  "sort_order": 0,
  "is_published": true,
  "items": [],
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z"
}

Retrieve a collection

GET/api/v1/collections/:id

The collection with its items in lesson order.

Request

curl https://yoob.app/api/v1/collections/cm3col0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "collection",
  "id": "cm3col0000000001",
  "product_id": "cm3prd0000000001",
  "title": "Options 101",
  "description": "Start here.",
  "cover_url": null,
  "sort_order": 0,
  "is_published": true,
  "items": [
    {
      "object": "content",
      "id": "cm3cnt0000000002",
      "product_id": "cm3prd0000000001",
      "collection_id": "cm3col0000000001",
      "type": "video",
      "title": "Calls and puts",
      "body": null,
      "media_url": null,
      "thumbnail_url": "/api/content/cm3cnt0000000002/playback?thumbnail=1",
      "external_url": null,
      "duration_seconds": 742,
      "access": "tier",
      "required_plan_ids": [
        "cm3pln0000000001"
      ],
      "is_published": true,
      "is_pinned": false,
      "sort_order": 0,
      "storage_key": null,
      "download_limit": null,
      "video_status": "ready",
      "live": null,
      "published_at": "2026-11-02T13:30:00.000Z",
      "scheduled_at": null,
      "created_at": "2026-11-02T13:30:00.000Z",
      "updated_at": "2026-11-02T13:30:00.000Z"
    }
  ],
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z"
}

Update a collection

PATCH/api/v1/collections/:id

Change the title, description, cover, position or published state.

Body (JSON)

titlestring
Up to 200 characters.
descriptionstring
Up to 5,000 characters.
cover_urlstring
Cover image.
sort_orderinteger
Position among the product's collections.
is_publishedboolean
Hide or show the whole collection.

Request

curl -X PATCH https://yoob.app/api/v1/collections/cm3col0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "is_published": false
  }'

Response

{
  "object": "collection",
  "id": "cm3col0000000001",
  "product_id": "cm3prd0000000001",
  "title": "Options 101",
  "description": "Start here.",
  "cover_url": null,
  "sort_order": 0,
  "is_published": false,
  "items": [
    {
      "object": "content",
      "id": "cm3cnt0000000002",
      "product_id": "cm3prd0000000001",
      "collection_id": "cm3col0000000001",
      "type": "video",
      "title": "Calls and puts",
      "body": null,
      "media_url": null,
      "thumbnail_url": "/api/content/cm3cnt0000000002/playback?thumbnail=1",
      "external_url": null,
      "duration_seconds": 742,
      "access": "tier",
      "required_plan_ids": [
        "cm3pln0000000001"
      ],
      "is_published": true,
      "is_pinned": false,
      "sort_order": 0,
      "storage_key": null,
      "download_limit": null,
      "video_status": "ready",
      "live": null,
      "published_at": "2026-11-02T13:30:00.000Z",
      "scheduled_at": null,
      "created_at": "2026-11-02T13:30:00.000Z",
      "updated_at": "2026-11-02T13:30:00.000Z"
    }
  ],
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z"
}

Reorder a collection

POST/api/v1/collections/:id/reorder

Sets the lesson order in one call. Items from the same product that aren't in the collection yet are moved into it; items you leave out keep their order after the ones you list.

Body (JSON)

content_idsstring[]required
Content IDs in the order you want.

Request

curl -X POST https://yoob.app/api/v1/collections/cm3col0000000001/reorder \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_ids": [
      "cm3cnt0000000002",
      "cm3cnt0000000005",
      "cm3cnt0000000004"
    ]
  }'

Response

{
  "object": "collection",
  "id": "cm3col0000000001",
  "product_id": "cm3prd0000000001",
  "title": "Options 101",
  "description": "Start here.",
  "cover_url": null,
  "sort_order": 0,
  "is_published": true,
  "items": [
    {
      "object": "content",
      "id": "cm3cnt0000000002",
      "product_id": "cm3prd0000000001",
      "collection_id": "cm3col0000000001",
      "type": "video",
      "title": "Calls and puts",
      "body": null,
      "media_url": null,
      "thumbnail_url": "/api/content/cm3cnt0000000002/playback?thumbnail=1",
      "external_url": null,
      "duration_seconds": 742,
      "access": "tier",
      "required_plan_ids": [
        "cm3pln0000000001"
      ],
      "is_published": true,
      "is_pinned": false,
      "sort_order": 0,
      "storage_key": null,
      "download_limit": null,
      "video_status": "ready",
      "live": null,
      "published_at": "2026-11-02T13:30:00.000Z",
      "scheduled_at": null,
      "created_at": "2026-11-02T13:30:00.000Z",
      "updated_at": "2026-11-02T13:30:00.000Z"
    }
  ],
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z"
}

Delete a collection

DELETE/api/v1/collections/:id

Deletes the collection. Its items are kept and become standalone posts.

Request

curl -X DELETE https://yoob.app/api/v1/collections/cm3col0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "collection",
  "id": "cm3col0000000001",
  "deleted": true
}

Set up a livestream

POST/api/v1/content/:id/live

Creates the ingest for a livestream item and returns where to send video. standard takes RTMPS from OBS or any encoder (5–15 seconds of delay, recorded for replay). realtime takes WebRTC (WHIP) with under a second of delay and no recording. Calling it again replaces the input and invalidates the old key. The item goes live for members when video starts arriving.

Body (JSON)

modeenum
standard (default) or realtime.

Request

curl -X POST https://yoob.app/api/v1/content/cm3cnt0000000003/live \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "standard"
  }'

Response

{
  "object": "live_stream",
  "content_id": "cm3cnt0000000003",
  "configured": true,
  "mode": "standard",
  "status": "idle",
  "connection": "disconnected",
  "has_input": true,
  "has_recording": false,
  "signed_playback": true,
  "started_at": null,
  "ended_at": null,
  "ingest": {
    "protocol": "rtmps",
    "url": "rtmps://live.cloudflare.com:443/live/",
    "stream_key": "…"
  }
}

Retrieve a livestream

GET/api/v1/content/:id/live

Current status (idle, live or ended), whether the encoder is connected, and the ingest details. Read-only keys get ingest: null, since the stream key lets anyone broadcast to your members.

Request

curl https://yoob.app/api/v1/content/cm3cnt0000000003/live \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "live_stream",
  "content_id": "cm3cnt0000000003",
  "configured": true,
  "mode": "standard",
  "status": "live",
  "connection": "connected",
  "has_input": true,
  "has_recording": false,
  "signed_playback": true,
  "started_at": "2026-11-10T18:00:04.000Z",
  "ended_at": null,
  "ingest": {
    "protocol": "rtmps",
    "url": "rtmps://live.cloudflare.com:443/live/",
    "stream_key": "…"
  }
}

End a livestream

POST/api/v1/content/:id/live/end

Marks the stream over now; viewers switch to the replay. Also available: POST /content/:id/live/reset to get ready for another session on the same item, and POST /content/:id/live/rotate_key for a new stream key.

Request

curl -X POST https://yoob.app/api/v1/content/cm3cnt0000000003/live/end \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "live_stream",
  "content_id": "cm3cnt0000000003",
  "configured": true,
  "mode": "standard",
  "status": "ended",
  "connection": "disconnected",
  "has_input": true,
  "has_recording": true,
  "signed_playback": true,
  "started_at": "2026-11-10T18:00:04.000Z",
  "ended_at": "2026-11-10T19:02:40.000Z",
  "ingest": {
    "protocol": "rtmps",
    "url": "rtmps://live.cloudflare.com:443/live/",
    "stream_key": "…"
  }
}

Remove a livestream input

DELETE/api/v1/content/:id/live

Deletes the ingest. The item falls back to its external_url, if it has one.

Request

curl -X DELETE https://yoob.app/api/v1/content/cm3cnt0000000003/live \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "live_stream",
  "content_id": "cm3cnt0000000003",
  "configured": true,
  "mode": null,
  "status": "idle",
  "connection": null,
  "has_input": false,
  "has_recording": false,
  "signed_playback": true,
  "started_at": null,
  "ended_at": null,
  "ingest": null
}

Upload a file

POST/api/v1/uploads

Two ways in. For images (logo, banner, thumbnails, gallery), send the file as multipart/form-data in a field named file: JPEG, PNG, WebP or GIF up to 15MB, or MP4/WebM up to 32MB. You get back a url to use in any *_url field. For anything bigger, send JSON and you get a presigned upload_url; PUT the bytes to it with the returned headers within 30 minutes. Public uploads return a url. Private uploads (paid downloads and audio, up to 2GB) return a storage_key: put it on a file or audio content item and only members with access can download it. Presigned uploads return 503 if cloud storage isn't set up on this server.

Body (JSON)

filefile
Multipart only: the image or short video.
filenamestring
JSON only: the file's name, used for its extension.
content_typestring
JSON only: the MIME type. Must match the PUT.
sizeinteger
JSON only: size in bytes. Must match the PUT.
visibilityenum
JSON only: public (default) or private.

Request

# An image, in one step
curl -X POST https://yoob.app/api/v1/uploads \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -F [email protected]

# A paid download, in two
curl -X POST https://yoob.app/api/v1/uploads \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "workbook.pdf",
    "content_type": "application/pdf",
    "size": 4831022,
    "visibility": "private"
  }'

curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/pdf" \
  --data-binary @workbook.pdf

Response

{
  "object": "upload",
  "kind": "file",
  "visibility": "private",
  "upload_url": "https://….r2.cloudflarestorage.com/…",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/pdf"
  },
  "expires_at": "2026-11-03T16:30:00.000Z",
  "storage_key": "files/cm3crt0000000001/6b1f…e2.pdf"
}

List announcements

GET/api/v1/announcements

Drafts and published announcements, newest first.

Query parameters

product_idstring
Only this product.
limitinteger
1–100. Defaults to 25.
cursorstring
The next_cursor from the previous page.

Request

curl "https://yoob.app/api/v1/announcements?product_id=cm3prd0000000001" \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "object": "announcement",
      "id": "cm3ann0000000001",
      "product_id": "cm3prd0000000001",
      "title": "Launch week",
      "content": "Everything is 20% off with LAUNCH20 until Sunday.",
      "type": "promo",
      "is_published": true,
      "published_at": "2026-11-03T15:00:00.000Z",
      "expires_at": "2026-11-10T00:00:00.000Z",
      "created_at": "2026-11-03T15:00:00.000Z",
      "updated_at": "2026-11-03T15:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create an announcement

POST/api/v1/announcements

A banner on your hub. Publishing emails every active member once, so you can publish at most 5 per minute. Saved as a draft unless is_published is true.

Body (JSON)

titlestringrequired
Up to 200 characters.
contentstringrequired
Up to 10,000 characters.
product_idstring
Leave out (or null) to post on every product.
typeenum
info (default), update, alert or promo.
is_publishedboolean
Publish and email members now. Defaults to false.
expires_atdatetime
Hide it after this time.

Request

curl -X POST https://yoob.app/api/v1/announcements \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "cm3prd0000000001",
    "title": "Launch week",
    "content": "Everything is 20% off with LAUNCH20 until Sunday.",
    "type": "promo",
    "is_published": true,
    "expires_at": "2026-11-10T00:00:00Z"
  }'

Response

{
  "object": "announcement",
  "id": "cm3ann0000000001",
  "product_id": "cm3prd0000000001",
  "title": "Launch week",
  "content": "Everything is 20% off with LAUNCH20 until Sunday.",
  "type": "promo",
  "is_published": true,
  "published_at": "2026-11-03T15:00:00.000Z",
  "expires_at": "2026-11-10T00:00:00.000Z",
  "created_at": "2026-11-03T15:00:00.000Z",
  "updated_at": "2026-11-03T15:00:00.000Z"
}

Retrieve an announcement

GET/api/v1/announcements/:id

One announcement.

Request

curl https://yoob.app/api/v1/announcements/cm3ann0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "announcement",
  "id": "cm3ann0000000001",
  "product_id": "cm3prd0000000001",
  "title": "Launch week",
  "content": "Everything is 20% off with LAUNCH20 until Sunday.",
  "type": "promo",
  "is_published": true,
  "published_at": "2026-11-03T15:00:00.000Z",
  "expires_at": "2026-11-10T00:00:00.000Z",
  "created_at": "2026-11-03T15:00:00.000Z",
  "updated_at": "2026-11-03T15:00:00.000Z"
}

Update an announcement

PATCH/api/v1/announcements/:id

Edit it, or set is_published to true to publish a draft. Members are emailed the first time it's published, never again.

Body (JSON)

titlestring
Up to 200 characters.
contentstring
Up to 10,000 characters.
typeenum
info, update, alert or promo.
is_publishedboolean
Publish or unpublish.
expires_atdatetime
Hide it after this time. null to keep it up.

Request

curl -X PATCH https://yoob.app/api/v1/announcements/cm3ann0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "expires_at": null
  }'

Response

{
  "object": "announcement",
  "id": "cm3ann0000000001",
  "product_id": "cm3prd0000000001",
  "title": "Launch week",
  "content": "Everything is 20% off with LAUNCH20 until Sunday.",
  "type": "promo",
  "is_published": true,
  "published_at": "2026-11-03T15:00:00.000Z",
  "expires_at": null,
  "created_at": "2026-11-03T15:00:00.000Z",
  "updated_at": "2026-11-03T15:00:00.000Z"
}

Delete an announcement

DELETE/api/v1/announcements/:id

Removes it from your hub.

Request

curl -X DELETE https://yoob.app/api/v1/announcements/cm3ann0000000001 \
  -H "Authorization: Bearer $YOOB_API_KEY"

Response

{
  "object": "announcement",
  "id": "cm3ann0000000001",
  "deleted": true
}

Verify a license key

POST/api/v1/licenses/verify

For plans with Issue license keys turned on, each member gets a key like YOOB-XXXXX-XXXXX-XXXXX-XXXXX, shown in their member hub. Call this from your server to check one. valid is true only when the key is active and its membership still has access, so lapsed subscriptions stop validating on their own. status is active, inactive (membership lapsed), revoked, or product_mismatch when you pass a product_id the key doesn't belong to. Unknown keys return 404. Read-only keys can call this.

Body (JSON)

keystringrequired
The license key. Case and missing dashes are tolerated.
product_idstring
Fail with status product_mismatch unless the key is for this product.
instancestring
A machine or install ID. Adds instance_activated to the response.

Request

curl -X POST https://yoob.app/api/v1/licenses/verify \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key": "YOOB-7KQ2M-X9FHT-3RWPA-N6CJD", "product_id": "cm3prd0000000001"}'

Response

{
  "object": "license",
  "key": "YOOB-7KQ2M-X9FHT-3RWPA-N6CJD",
  "valid": true,
  "status": "active",
  "product_id": "cm3prd0000000001",
  "plan_id": "cm3pln0000000001",
  "membership_id": "cm3mem0000000001",
  "user": {
    "id": "cm3usr0000000001",
    "discord_id": "100000000000000002",
    "discord_username": "jordanlee"
  },
  "activations": [
    {
      "instance": "a1b2c3d4-machine-id",
      "label": "Jordan's MacBook",
      "activated_at": "2026-11-02T14:20:00.000Z"
    }
  ],
  "activation_count": 1,
  "max_activations": 3,
  "created_at": "2026-11-02T14:11:10.000Z",
  "revoked_at": null
}

Activate a license

POST/api/v1/licenses/activate

Registers a device or install against the key. Activating the same instance again is a no-op (it returns already_activated: true), so it's safe to call on every launch. When the plan caps devices and the key is full, you get a 403 with error.code set to activation_limit; revoked or lapsed keys return license_revoked or license_inactive. Members can free a slot from their hub, and you can reset devices from the product's Members page.

Body (JSON)

keystringrequired
The license key.
instancestringrequired
A stable ID for this device or install, up to 200 characters.
labelstring
A name the member will recognize, like the computer name.

Request

curl -X POST https://yoob.app/api/v1/licenses/activate \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key": "YOOB-7KQ2M-X9FHT-3RWPA-N6CJD", "instance": "a1b2c3d4-machine-id", "label": "Studio PC"}'

Response

{
  "object": "license",
  "key": "YOOB-7KQ2M-X9FHT-3RWPA-N6CJD",
  "valid": true,
  "status": "active",
  "product_id": "cm3prd0000000001",
  "plan_id": "cm3pln0000000001",
  "membership_id": "cm3mem0000000001",
  "user": {
    "id": "cm3usr0000000001",
    "discord_id": "100000000000000002",
    "discord_username": "jordanlee"
  },
  "activations": [
    {
      "instance": "a1b2c3d4-machine-id",
      "label": "Jordan's MacBook",
      "activated_at": "2026-11-02T14:20:00.000Z"
    }
  ],
  "activation_count": 1,
  "max_activations": 3,
  "created_at": "2026-11-02T14:11:10.000Z",
  "revoked_at": null,
  "instance": "a1b2c3d4-machine-id",
  "instance_activated": true,
  "already_activated": false
}

Deactivate a license

POST/api/v1/licenses/deactivate

Frees a device slot, for example when someone signs out of your app. Succeeds even if that instance wasn't active (deactivated is then false).

Body (JSON)

keystringrequired
The license key.
instancestringrequired
The instance to remove.

Request

curl -X POST https://yoob.app/api/v1/licenses/deactivate \
  -H "Authorization: Bearer $YOOB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key": "YOOB-7KQ2M-X9FHT-3RWPA-N6CJD", "instance": "a1b2c3d4-machine-id"}'

Response

{
  "object": "license",
  "key": "YOOB-7KQ2M-X9FHT-3RWPA-N6CJD",
  "valid": true,
  "status": "active",
  "product_id": "cm3prd0000000001",
  "plan_id": "cm3pln0000000001",
  "membership_id": "cm3mem0000000001",
  "user": {
    "id": "cm3usr0000000001",
    "discord_id": "100000000000000002",
    "discord_username": "jordanlee"
  },
  "activations": [],
  "activation_count": 0,
  "max_activations": 3,
  "created_at": "2026-11-02T14:11:10.000Z",
  "revoked_at": null,
  "instance": "a1b2c3d4-machine-id",
  "instance_activated": false,
  "deactivated": true
}

Webhooks

Add an endpoint in Creator studio → Developers (or from a product's Integrations page), pick the events you want, and optionally limit it to one product. We POST each event as JSON:

{
  "id": "evt_6f1c2a9e0b7d4c3a8e5f1b2c",
  "type": "membership.created",
  "created": 1793628670,
  "data": {
    "object": "membership",
    "id": "cm3mem0000000001",
    "product_id": "cm3prd0000000001",
    "user_id": "cm3usr0000000001",
    "status": "active",
    "has_access": true,
    "plan_id": "cm3pln0000000001",
    "plan_name": "Pro",
    "amount": 2900,
    "currency": "usd",
    "billing_type": "recurring",
    "billing_interval": "month",
    "started_at": "2026-10-02T14:11:09.000Z",
    "current_period_end": "2026-12-02T14:11:09.000Z",
    "cancel_at_period_end": false,
    "cancelled_at": null,
    "cancelled_by": null,
    "trial_ends_at": null,
    "paused_at": null,
    "resumes_at": null,
    "coupon_code": null,
    "affiliate_code": null,
    "created_at": "2026-10-02T14:11:09.000Z",
    "updated_at": "2026-11-02T14:11:12.000Z",
    "user": {
      "object": "user",
      "id": "cm3usr0000000001",
      "discord_id": "100000000000000002",
      "discord_username": "jordanlee",
      "name": "Jordan Lee"
    }
  }
}

data is the same object the API returns. Every request also carries YooB-Event (the event type), YooB-Delivery (unique per delivery, use it to ignore duplicates) and YooB-Signature. Respond with any 2xx within 10 seconds; do slow work after responding.

To keep access in sync, listen to all three membership.* events and use data.has_access rather than the event name. A member coming back after cancelling arrives as membership.updated, not membership.created.

Event types

membership.created
Someone joined a product for the first time (free or paid). · data: membership
membership.updated
Status, plan, renewal date, pause or scheduled cancellation changed. · data: membership
membership.cancelled
A membership ended and access was removed. · data: membership
payment.succeeded
A purchase or renewal was paid. · data: payment
payment.failed
A renewal payment failed. The membership is now past due. · data: payment
payment.refunded
A payment was refunded. · data: payment
contribution.created
Someone sent voluntary support (pay what you want). · data: contribution

payment.* payloads include the paying user. The Send test event button sends a ping event, which isn't retried.

Verify signatures

Each endpoint has a signing secret (whsec_…). The YooB-Signature header looks like t=1793628670,v1=5257a8…: t is when we signed it and v1 is the hex HMAC-SHA256 of `${t}.${raw body}` using your secret. Compute it yourself, compare in constant time, and reject old timestamps to stop replays.

import crypto from "node:crypto";
import express from "express";

const app = express();

// Use the raw body: the signature covers the exact bytes we sent.
app.post("/webhooks/yoob", express.raw({ type: "application/json" }), (req, res) => {
  const header = req.get("YooB-Signature") ?? "";
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const timestamp = Number(parts.t);
  const expected = crypto
    .createHmac("sha256", process.env.YOOB_WEBHOOK_SECRET)
    .update(`${timestamp}.${req.body}`)
    .digest("hex");

  const valid =
    parts.v1?.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
  const fresh = Math.abs(Date.now() / 1000 - timestamp) < 300; // 5 minutes

  if (!valid || !fresh) return res.status(400).send("Bad signature");

  const event = JSON.parse(req.body);
  if (event.type === "membership.created" || event.type === "membership.updated" || event.type === "membership.cancelled") {
    const m = event.data;
    // Grant or revoke access based on m.has_access
  }
  res.sendStatus(200);
});

Retries

If your endpoint times out or returns anything other than 2xx, we try again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours: six attempts over about 9 hours. Events can arrive more than once and out of order, so dedupe on YooB-Delivery or the event id, and compare updated_at before overwriting newer data. You can see every delivery and resend it from the studio for 30 days.