Spindl
  • 👋Overview
    • Introduction
    • Attribution
    • Privacy
  • Your Spindl app setup
    • Managing team members
  • 🪄Features
    • 📈Onchain Attribution
      • 📉Plotting attribution
    • 📊Web3-native Analytics
      • Chart Builder
      • Event Selection and Filtering
      • Line Chart
      • Funnel
      • Cohort Retention
      • Sankey Diagram
      • Big Numbers
      • Pies and Donuts
    • 🧍‍♂️Audiences
      • Creating an audience
    • 🔗Short Links
      • 🖇️Custom Domains
    • 🤝Referrals
      • Management and reporting
      • ⏩Quick Start
      • ⛓️Technical Details
  • ⚙️Techncial
    • ⏩Start Here
    • Google GTM Guide
    • Javascript SDK / HTML Script Guide
      • ➡️Install
      • ➡️Wallet Connects
      • ➡️Page Views
      • ➡️Custom Events
      • ✅Verify That Events Are Sent Correctly
      • React, Next.js & Html Examples
      • Setup a Reverse Proxy
        • Using Next.js
        • Using Cloudflare Workers
        • Netlify
      • ➡️Referrals
      • Default vs Lite SDK Versions
      • Security
    • API
      • ➡️Short Links
      • ➡️Custom Events API
      • Data Exports
    • Android SDK
    • iOS (Swift) SDK
    • On-Chain
      • ➡️Rewards
  • Contact Spindl
  • Ads
    • ⏩Start Here
    • 📢Creative Specifications
      • Web Banner Ads
      • Discord Embeds
Powered by GitBook
On this page
  • API Key
  • Authentication
  • Errors
  1. Techncial

API

PreviousSecurityNextShort Links

Last updated 9 months ago

Spindl's Server-to-Server API provides access to campaign and attribution management, and allows easy exporting of data and reports.

API Key

If you don't already have an API key, you can generate one on the page in the Spindl app.

API keys are different from your SDK keys. Please be sure to keep your API access tokens secure and private! Do not share them in emails, client-side code or publicly accessible sites.

If you have accidentally shared an API access token publicly, you can revoke it in your by clicking the X button beside the token.

Authentication

API requests are authenticated using the X-API-Key header. With the API token from the previous step, calling the Spindl API is as simple as:

curl -H "X-API-Key: <your_api_key>" https://api.spindl.xyz/v1/links

Errors

Spindl uses HTTP response codes to indicate the success or failure of an API request.

  • Codes in the 2xx range indicate success

  • Codes in the 4xx range indicate incorrect or incomplete requests (e.g. a required parameter was omitted)

  • Codes in the 5xx range indicate an error on Spindl's servers.

On error responses, Spindl also provides error messages and code in the response body:

{
    "statusCode": 404,
    "message": "link not found"
}

⚙️
Settings
Settings