NEXIS
API Reference

NEXIS API

Complete API reference for integrating with the NEXIS Web3 Community OS platform.

Scroll
01

API Overview

The NEXIS API provides programmatic access to the Web3 Community OS platform. Build integrations for Discord management, NFT verification, prediction markets, and more using our RESTful API and webhooks.

Base URL

https://api.nexis.io/v1

Key Features

  • RESTful Design: Standard HTTP methods and status codes
  • JSON Responses: All responses in JSON format
  • OAuth 2.0: Secure authentication flow
  • Webhooks: Real-time event notifications
  • Rate Limiting: Fair usage controls
  • Sandbox Environment: Test API without affecting production

Quick Start

Make your first API call in minutes.

curl -X GET "https://api.nexis.io/v1/health" \
  -H "Authorization: Bearer YOUR_API_KEY"
02

Authentication

All NEXIS API requests require authentication using API keys or OAuth tokens. Choose the authentication method that best fits your use case.

API Key Authentication

Include your API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

OAuth 2.0

Use OAuth 2.0 for user authentication and delegated access.

  • Authorization Endpoint: https://api.nexis.io/oauth/authorize
  • Token Endpoint: https://api.nexis.io/oauth/token
  • Scopes: read write admin
03

API Endpoints

Explore all available API endpoints organized by category. Each endpoint includes HTTP method, URL, parameters, and response examples.

User Endpoints

  • GET /users - List all users
  • GET /users/:id - Get user details
  • POST /users - Create new user
  • PATCH /users/:id - Update user
  • DELETE /users/:id - Delete user

Bot Endpoints

  • GET /bots - List connected bots
  • POST /bots/install - Install bot to server
  • GET /bots/:id/status - Get bot status
  • POST /bots/:id/configure - Configure bot
  • DELETE /bots/:id - Remove bot

Wallet Endpoints

  • GET /wallets - List user wallets
  • POST /wallets/connect - Connect wallet
  • POST /wallets/verify - Verify wallet signature
  • DELETE /wallets/:id - Disconnect wallet

NFT Endpoints

  • GET /nft/holdings - Get NFT holdings
  • POST /nft/verify - Verify NFT ownership
  • GET /nft/tiers - Get holder tiers
  • POST /nft/sync-role - Sync Discord role
04

Webhooks

Configure webhooks to receive real-time notifications about NEXIS events. Webhooks enable your application to react to changes without polling.

Available Events

  • user.created - New user registered
  • user.updated - User profile updated
  • subscription.created - New subscription
  • subscription.updated - Subscription status changed
  • nft.verified - NFT ownership verified
  • tier.changed - Holder tier updated
  • prediction.created - New prediction market
  • prediction.settled - Prediction settled

Webhook Security

Verify webhook signatures to ensure requests are from NEXIS.

X-Nexis-Signature: sha256=HASH
05

Error Codes

NEXIS API uses standard HTTP status codes and custom error codes for detailed error reporting.

HTTP Status Codes

  • 200 OK - Request successful
  • 201 Created - Resource created
  • 400 Bad Request - Invalid request
  • 401 Unauthorized - Authentication failed
  • 403 Forbidden - Insufficient permissions
  • 404 Not Found - Resource not found
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Server error

Error Response Format

{ "error": { "code": "INVALID_API_KEY", "message": "Invalid or expired API key", "request_id": "req_1234567890" } }
06

Rate Limits

API rate limits ensure fair usage and system stability. Different tiers have different limits.

Rate Limit Tiers

  • Free: 100 requests/minute, 10,000 requests/day
  • Starter: 1,000 requests/minute, 100,000 requests/day
  • Pro: 10,000 requests/minute, 1,000,000 requests/day
  • Enterprise: Custom limits

Rate Limit Headers

Rate limit information is included in response headers.

  • X-RateLimit-Limit: Your rate limit
  • X-RateLimit-Remaining: Requests remaining
  • X-RateLimit-Reset: Unix timestamp of reset
  • Retry-After: Seconds until retry (on 429)
07

SDKs & Libraries

Use official NEXIS SDKs for quick integration in your preferred programming language.

JavaScript/TypeScript

npm install @nexis/sdk

Python

pip install nexis-python

Go

go get github.com/nexis/go-sdk
08

Testing & Sandbox

Use the NEXIS sandbox environment for testing without affecting production data. The sandbox provides full API functionality with test data.

Sandbox Environment

  • Base URL: https://sandbox-api.nexis.io/v1
  • Test Data: Pre-populated test users and data
  • No Cost: Free testing environment
  • Rate Limits: Generous limits for testing

Testing Best Practices

  • Mock Responses: Use mock responses for unit tests
  • Integration Tests: Test against sandbox
  • Error Scenarios: Test error handling
  • Rate Limiting: Test rate limit handling
09

Monitoring & Analytics

Monitor your API usage and performance through the NEXIS dashboard. Track request counts, error rates, latency, and more.

Available Metrics

  • Request Count: Total API requests
  • Error Rate: Percentage of failed requests
  • Average Latency: Response time metrics
  • Rate Limit Hits: Rate limit violations
  • Endpoint Usage: Most used endpoints

Alerts & Notifications

Set up alerts for critical metrics and receive notifications via email or webhooks.

  • Error Rate Alerts: Notify when error rate exceeds threshold
  • Latency Alerts: Notify when response time is slow
  • Usage Alerts: Notify when approaching rate limits
  • Custom Alerts: Create custom alert conditions
10

Changelog

Stay updated with the latest API changes, new features, and improvements.

Version 1.2.0 (Latest)

  • Added: NFT marketplace endpoints
  • Added: Advanced prediction analytics
  • Improved: Rate limit headers accuracy
  • Fixed: Webhook signature verification

Version 1.1.0

  • Added: Arena prediction endpoints
  • Added: XP system API
  • Improved: Error response consistency

Version 1.0.0

  • Initial Release: Core API endpoints
  • Features: Authentication, Users, Bots, Wallets
  • Webhooks: Basic webhook support
NEXIS · API Reference