div h1 🏅 Appstle Memberships API Documentation p Build powerful membership and access control experiences for your Shopify store with our comprehensive, enterprise-grade REST APIs. ## Available APIs div div ### 🔧 [Admin APIs](/admin-api-swagger) Server-Side Production Ready Server-side API for managing memberships, access rules, member data, and billing. Perfect for backend integrations, mobile apps, and automated workflows. **Authentication:** API Key (X-API-Key header) **Use Cases:** - Backend integrations & workflows - Mobile applications (iOS, Android) - Admin dashboards & reporting - Bulk operations & automation - Third-party system integration div ### 👤 [Customer Portal APIs](/storefront-api-swagger) Storefront Production Ready Customer-facing APIs for membership self-service via Shopify App Proxy. Enable members to manage their membership, access gated content, and view benefits directly from your storefront. **Authentication:** Customer session (logged-in required) **Use Cases:** - Custom member portals - Storefront theme integration - Customer self-service features - Membership plan management - Gated content access control ## 📖 Overview div The Appstle Memberships APIs provide **programmatic access** to manage every aspect of your membership program. Whether you're building custom integrations, internal dashboards, automated workflows, or enhancing your customer experience, our APIs deliver the power and flexibility you need. div div #### 🏅 Membership Plans Create and manage tiered membership plans with flexible pricing and billing cycles div #### 👤 Member Management Retrieve and sync member data, plan status, and access entitlements div #### 🔒 Access Control Gate content, collections, and pricing based on membership status and tier div #### 💳 Billing & Contracts Manage membership contracts, renewals, and billing attempts div #### 🎁 Member Benefits Configure perks, discounts, and exclusive access rules per membership tier div #### 📧 Notifications Automate member communications for renewals, expirations, and upgrades div #### 📊 Analytics Access membership metrics, churn data, and revenue analytics div #### 🎨 Customization Flexible API for custom membership workflows and integrations ## 🎯 Which API Should I Use? div div ### 🔧 Use **Admin APIs** when: ✅ Building server-side integrations or workflows ✅ Managing memberships from your backend ✅ Creating admin dashboards or reporting tools ✅ Automating bulk operations ✅ Integrating with other business systems ✅ **Building mobile applications (iOS, Android)** ✅ **Any integration outside your storefront** div strong 🔑 Authentication: API Key (X-API-Key header) br strong 🌍 Access: Server-side only div ### 👤 Use **Customer Portal APIs** when: ✅ Building custom member-facing interfaces **on your storefront** ✅ Adding membership features to your theme ✅ **Leveraging Shopify App Proxy** for seamless integration ✅ Creating self-service membership management ✅ Customizing the customer portal experience div strong 🔑 Authentication: Customer session (must be logged in) br strong 🌍 Access: Storefront only (via App Proxy) div strong ⚠️ Important: Customer Portal APIs are designed specifically for storefront use via Shopify's App Proxy. If you need to call our APIs from anywhere outside your storefront (such as mobile apps, backend services, or external integrations), you strong must use Admin APIs with proper API key authentication. ## ⚡ Quick Start div ### 1️⃣ Get Your API Key Create and manage API keys from your Appstle dashboard: div 1. 🔐 Log in to your **Appstle admin panel** 2. ⚙️ Navigate to **Settings** → **API Key Management** 3. ✨ Click **Create New Key**, give it a descriptive name (e.g., "Zapier Integration", "Mobile App") 4. 📋 **Copy the key immediately** — it is only shown once and cannot be retrieved later 5. 🔒 **Store it securely** — treat it like a password You can create up to **10 active API keys** per store. Each key can be individually named, tracked, and revoked without affecting your other integrations. div strong 💡 Pro Tip: Create separate keys for each integration so you can revoke access independently. Never expose API keys in client-side code, public repositories, or browser applications. Always use them server-side only. div ### 2️⃣ Make Your First Request Test your API key by retrieving a customer's membership information: ```bash curl -X GET \ "https://membership-admin.appstle.com/api/external/v2/membership-contracts?shop=your-store.myshopify.com&customerId=12345" \ -H "X-API-Key: your-api-key-here" ``` div strong ✅ Success Response (200 OK): ```json { "content": [ { "id": 1001, "status": "ACTIVE", "membershipPlanName": "Gold Member", "nextBillingDate": "2026-03-01", "billingCycleType": "MONTHLY" } ], "totalElements": 1 } ``` ## 🔐 Authentication div strong 🔑 All Admin API requests require authentication using your API key. Include it in the request header for secure, server-side access. All Admin API requests require authentication using your API key. Include it in the request header: **Header-based authentication (Recommended):** ```bash X-API-Key: apst_your-api-key-here ``` **Example Request:** ```bash curl -H "X-API-Key: apst_your-api-key-here" \ "https://membership-admin.appstle.com/api/external/v2/membership-contracts?shop=your-store.myshopify.com" ``` **Query parameter (Supported):** ```bash ?api_key=apst_your-api-key-here ``` ### Key Management You can manage your API keys from **Settings → API Key Management** in the Appstle admin panel: - **Create** up to 10 active keys per store, each with a descriptive name - **Track** last-used timestamps to identify stale keys - **Revoke** individual keys instantly without affecting other integrations - **Rotate** keys safely by creating a new key before revoking the old one New keys use the `apst_` prefix. Existing legacy keys continue to work — no migration required. **Important:** Keep your API keys secure. Never expose them in client-side code or public repositories. API keys are only shown in full once at creation — store them immediately. ## API Reference Explore our comprehensive API endpoints. Use the sidebar to navigate between: - **Admin APIs** - Server-side operations for third-party integrations - **Customer Portal APIs** - Customer-facing operations via App Proxy Both API sections are collapsed by default - expand the one you need. ## 📋 Response Format div All API responses follow **standard HTTP status codes** for easy integration and error handling: | Status Code | Meaning | | --- | --- | | `200` | Success - Request completed successfully | | `201` | Created - Resource created successfully | | `400` | Bad Request - Invalid request parameters | | `401` | Unauthorized - Invalid or missing API key | | `403` | Forbidden - API key doesn't have required permissions | | `404` | Not Found - Resource doesn't exist | | `429` | Too Many Requests - Rate limit exceeded | | `500` | Server Error - Something went wrong on our end | **Error Response Example:** ```json { "error": "Unauthorized", "message": "Invalid API key provided", "status": 401 } ``` ## Support **Need help?** Contact our support team at support@appstle.com **Ready to start building?** Explore the complete API reference using the navigation menu → *Last updated: February 2026 | API Version: v2*