Getting started
Learn how to sign up, access the admin dashboard, and create your first API key to start integrating Snag loyalty rules
Using an AI coding assistant? Connect Cursor, Claude, or Copilot to Snag Docs for context-aware help. Learn how.
Welcome to Snag! This guide will walk you through the initial setup process to get your API key and start integrating loyalty rules into your application.
Sign Up and Access
Visit Snag Solutions and sign up for an account.
Once your account is verified, you can access the admin dashboard at admin.snagsolutions.io.
The admin dashboard is where you'll manage your loyalty programs, and configure your API keys.
Click the "Create New API Key" button to generate your first API key.
Copy your API key and store it in a secure location like an environment variable.
Using Your API Key
Your API key is the foundation for all Snag API interactions. Here's how to use it:
Use a Website API key to access loyalty APIs (rules, transactions, entries, users, and related endpoints). A Stratus API key is used to secure Stratus relayer and Stratus functions; these keys allow you to submit and start onchain transactions. Do not use Stratus keys with loyalty endpoints.
With Snag SDK
import SnagSolutions from '@snagsolutions/sdk'
const client = new SnagSolutions({
apiKey: 'your-api-key-here',
})
// Now you can use the client to interact with Snag APIs
const users = await client.users.get()
With HTTP Requests
For direct HTTP calls, include your API key in the x-api-key header:
curl -X GET 'https://admin.snagsolutions.io/api/users' \
-H 'x-api-key: your-api-key-here'
const response = await fetch('https://admin.snagsolutions.io/api/users', {
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json',
},
})
Keep your API key secure and never expose it in client-side code. Always use environment variables or secure configuration management.
Next Steps
Now that you have your API key, you're ready to:
- Create users - Learn how to add users to your Snag system
- Manage user groups - Understand how to handle multiple wallets per user
- Connect social accounts - Integrate social media platforms with your users