Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mufi.app/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through setting up your Mufi account, creating an organization and project, getting your API key, and making your first API calls. By the end, you’ll have created a user with a wallet, set up an event, and issued a product.

Prerequisites

Step 1: Get Your API Key

1

Log in to the Mufi Dashboard

Go to my.mufi.app and sign in with your email. You’ll receive a one-time code to authenticate.
2

Create an organization

Once logged in, create a new organization. Organizations are the top-level entity that groups your projects, team members, and fans.
3

Create a project

Inside your organization, create a new project. Each project has its own set of users, events, products, and API keys.
4

Generate an API key

Navigate to the API Keys section in your project settings and generate a new key. Copy it — you’ll need it for all API requests.
Your API key does not expire automatically. Store it securely in an environment variable — never hardcode it in your application or commit it to version control.

Step 2: Set Up Your Environment

Store your API key as an environment variable:
export MUFI_API_KEY="your-api-key-here"
Verify your connection by checking the API version:
curl -H "Authorization: Bearer $MUFI_API_KEY" \
  https://api.mufi.app/v1/version
Response
{ "version": "2.72.0" }
Using the staging environment? Replace api.mufi.app with dev.api.mufi.app for testing. All API Playground examples in these docs point to the staging URL.

Step 3: Create Your First User

Create a user — Mufi automatically provisions a custodial Polkadot wallet for them in the background.
curl -X POST https://api.mufi.app/v1/users/create \
  -H "Authorization: Bearer $MUFI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{
    "email": "fan@example.com",
    "firstName": "Alex",
    "lastName": "Rivera",
    "referenceId": "your-internal-id-123"
  }]'
Response
{ "message": "Created" }
Batch creation: You can create up to 1,500 users in a single request by adding more objects to the array. Wallets are provisioned asynchronously — users are available immediately while wallets generate in the background.

Step 4: Activate the User

Users must be activated before they can hold assets, redeem products, or attend events.
curl -X POST https://api.mufi.app/v1/users/activate \
  -H "Authorization: Bearer $MUFI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "email": "fan@example.com" }'
Response
{
  "isActivated": true,
  "activatedOn": "2025-03-17T12:00:00.000Z"
}

Step 5: Create an Event

Events are the parent entity for products. Create one to start issuing tickets, vouchers, and perks.
curl -X POST https://api.mufi.app/v1/events/create \
  -H "Authorization: Bearer $MUFI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Summer Music Festival",
    "description": "An unforgettable weekend of live music",
    "location": "Miami, FL",
    "address": "123 Ocean Drive, Miami, FL 33139",
    "start_date": 1756684800,
    "end_date": 1756857600,
    "reference_id": "festival-2025"
  }'
Response
{
  "id": "event-uuid",
  "name": "Summer Music Festival",
  "description": "An unforgettable weekend of live music",
  "reference_id": "festival-2025",
  "location": "Miami, FL",
  "address": "123 Ocean Drive, Miami, FL 33139",
  "start_date": 1756684800,
  "end_date": 1756857600
}

Step 6: Create a Product and Issue Items

Create a ticket product for your event, then issue it to your user.
curl -X POST https://api.mufi.app/v1/products \
  -H "Authorization: Bearer $MUFI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "admission",
    "name": "General Admission",
    "description": "2-day festival access",
    "price": "49.99",
    "stock": 500,
    "max_per_account": 2,
    "is_transferable": true,
    "event_id": "EVENT_ID_FROM_STEP_5"
  }'
Then issue the ticket to your user:
curl -X POST https://api.mufi.app/v1/products/PRODUCT_ID/items \
  -H "Authorization: Bearer $MUFI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "PRODUCT_ID",
    "emails": ["fan@example.com"]
  }'
Response
{
  "items": [{
    "id": "item-uuid",
    "created_at": "2025-03-17T12:05:00.000Z",
    "updated_at": "2025-03-17T12:05:00.000Z",
    "product_id": "product-uuid",
    "item_id": 1,
    "redemption_count": 0,
    "redemption_quantity": 1,
    "is_fully_redeemed": false,
    "redeemed_at": null,
    "user": {
      "id": "user-uuid",
      "email": "fan@example.com",
      "first_name": "Alex",
      "last_name": "Rivera"
    },
    "product": {
      "id": "product-uuid",
      "name": "General Admission",
      "type": "admission",
      "redemption_quantity": 1
    }
  }]
}

What You’ve Built

In just a few steps, you’ve completed the core Mufi integration flow:
  1. Set up your organization and project with an API key
  2. Created a user with an automatic custodial Polkadot wallet
  3. Activated them for full platform access
  4. Created an event with location and dates
  5. Created a product (admission ticket) linked to your event
  6. Issued the ticket to your user
From here, you can:

Next Steps

Users API

Deep dive into user management, batch operations, and wallet provisioning.

Events API

Learn about the full event lifecycle and attendee management.

Products API

Explore product types, NFT minting, redemptions, and transfers.

Security

Understand how Mufi protects wallet secrets at scale.