Skip to main content

Public API

Public API Why: The Public API allows you to integrate your app with external services, automate workflows, and manage member data seamlessly. This...

Written by Ken Truesdale

Platform 2 Guide — This article applies to the new platform. Looking for classic platform docs? Browse the Platform 1 collection.

Why: The Public API allows you to integrate your app with external services, automate workflows, and manage member data seamlessly. This empowers you to enhance your app's functionality and improve the experience for your subscribers.

Navigate: App Station > Settings > Integrations > Public API

Quick Start

  1. Click on Public API in the Integrations section of App Station.

  2. Generate a new mk_live_ token and note the plaintext value.

  3. Choose the desired scopes for your token (e.g., members:read, subscriptions:write).

  4. Create any outbound webhooks you need by selecting events from the picker.

  5. Access the live documentation at /developers for further reference.


Overview of the Public API

The Public API provides a RESTful interface that mirrors the actions and webhook events available through the Zapier integration. This means you can perform similar tasks directly using your mk_live_ token without needing to go through Zapier.

Authentication

To use the Public API, you'll need to generate an authentication token:

  • Generate a token: In the Public API section, click to create a new token. The plaintext value will only be shown once.

  • Token prefix: Each token begins with mk_live_.

  • Authorization header: Use the format Authorization: Bearer mk_live_... when making API calls.

Scopes

When generating your token, you can choose from the following scopes to control what actions the token can perform:

  • members:read

  • members:write

  • subscriptions:write

  • marketing_leads:read

  • marketing_leads:write

  • webhooks:manage

Tokens are stored securely, and you can revoke or delete them from the same page.

Outbound Webhooks

You can set up outbound webhooks to receive real-time notifications about various events in your app. Here’s the complete list of supported webhook events that you can subscribe to:

Event

When it fires

user.created

New member signed up

user.updated

Profile fields changed

user.email_changed

Email changed by member or admin

user.deleted

Member deleted

user.suspended

Member suspended

user.activated

Member unsuspended

user.paused

Admin paused the member

user.resumed

Admin resumed the member

user.status_changed

User status changed

user.role_changed

Role of the user changed

subscription.started

New Stripe subscription created

subscription.renewed

Recurring invoice paid

subscription.cancelled

Subscription cancelled (legacy spelling)

subscription.cancellation_requested

Cancel scheduled; access may still be active

subscription.ended

Subscription ended and access revoked

subscription.completed

Term-limited subscription reached its end

subscription.paused

Subscription paused by admin

subscription.resumed

Subscription resumed by admin

purchase.completed

One-time purchase completed

checkout.completed

Successful checkout event

access.granted

Access level activated

access.revoked

Active access level revoked

access.expired

Time-limited access grant expired

recipe.created

New recipe created

recipe.updated

Recipe updated

recipe.published

Recipe published

recipe.deleted

Recipe deleted

meal_plan.created

New meal plan created

meal_plan.updated

Meal plan updated

meal_plan.published

Meal plan published

meal_plan.deleted

Meal plan deleted

engagement.first_recipe_created

First member-created recipe

engagement.first_favorite

First favorite added

engagement.first_comment

First comment made

engagement.first_rating

First rating given

engagement.first_course_enrolled

First course enrollment

engagement.course_completed

Course completed by a member

engagement.streak_milestone

Streak milestone achieved

engagement.points_milestone

Points milestone achieved

engagement.content_milestone

Content completion milestone achieved

engagement.pdf_exported

PDF exported by a member

growth.checkout_abandoned

Stalled checkout event

marketing.lead_captured

New marketing lead submitted

marketing.lead_status_changed

Lead status changed

marketing.lead_deleted

Lead permanently removed

Important Notes

  • The subscription.cancelled event is a legacy spelling; the system emits subscription.canceled but aliases it for compatibility.

  • Engagement and growth events require specific triggers to function properly.

Accessing Live Documentation

For detailed information about the API endpoints and how to use them, you can access the live documentation at /developers. This resource provides comprehensive guidance on making API calls and handling responses.

Did this answer your question?