Home / Blog / VaultCord API Guide: How to Build Discord Bots, Manage Servers, Pull Members, and Automate Backups

← Back to Blog

VaultCord API Guide: How to Build Discord Bots, Manage Servers, Pull Members, and Automate Backups

VaultCord TeamHow we write11 min read
VaultCord API Guide: How to Build Discord Bots, Manage Servers, Pull Members, and Automate Backups

Discover the VaultCord Developers API – your ultimate tool for Discord bot development, server verification, member management, and marketplace integration. This beginner-friendly guide covers everything from authentication to advanced features like webhooks and stats, helping you create secure, efficient Discord bots and servers. Keywords: VaultCord API tutorial, Discord bot API endpoints, how to pull Discord members, server backup API, Discord verification bot setup.

What is the VaultCord API? A Simple Overview for Discord Developers

The VaultCord API is a powerful OpenAPI 3.0.0 tool designed for developers to handle Discord server management, custom bots, member pulling, backups, alerts, and more. It uses the base URL https://api.vaultcord.com for all requests, making it easy to integrate into your Discord bot projects. Whether you're building a verification bot, automating member imports, or buying from the member marketplace, this API provides secure, real-time features with bearer authentication.

This guide explains each endpoint with simple examples, so even average users can get started without coding expertise. You'll learn how to list servers, create bots, import OAuth2 tokens, set up webhooks for notifications, and track stats for growth. Perfect for Discord server owners searching for "easy Discord API integration" or "best bot for server security".

Authentication: Secure Your API Requests

Authentication is the first step to access any VaultCord endpoint – it protects your Discord data with a simple bearer token. Use your API key (generated from the VaultCord dashboard) to authorize requests, preventing unauthorized access to servers, members, or backups.

Add this header to every API call:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Without it, you'll get a 401 Unauthorized error, meaning "invalid key – regenerate from dashboard". This setup ensures secure operations like pulling members or updating server settings, ideal for "Discord bot security best practices".

Servers: Add, List, and Customize Your Discord Servers

Manage Discord guilds (servers) with these endpoints – add new servers, fetch settings, or update verification pages for anti-alt protection and custom branding. This section covers listing all your servers, adding one with bot integration, and patching settings like fonts, banners, and security toggles (e.g., VPN blocking or minimum account age). Great for users asking "how to set up Discord server verification API".

List Servers

Get a list of all servers linked to your account, including IDs and names for quick management.

GET https://api.vaultcord.com/servers

Response: Array of server objects with id, name, guildid, and created_at.

Add Server

Connect a Discord server to VaultCord – provide details like name, bot ID (from bots endpoint), guild snowflake ID, optional role for verification, image link (Imgur or VaultCord CDN), and custom URL for the verification page. This enables features like member pulling and backups.

PUT https://api.vaultcord.com/servers

Body example:

{
  "name": "My Gaming Server",
  "botId": 2475,
  "serverId": "1218273540147646535",
  "roleId": "1218273540147646535",
  "pic": "https://cdn.vaultcord.com/logo.png",
  "url": "mylink"
}

Success: Returns server ID and confirmation message.

Get and Update Server Settings

Fetch current settings (e.g., logs channel, social links) or update them for customization – change fonts (like Minecraftia or Poppins), colors, description, banner (Imgur GIF), cursor, redirect URL after verification, and toggles like ipLogging (0=off,1=on), vpncheck, altban, captcha, or email collection. Use for "custom Discord verification page API".

GET https://api.vaultcord.com/servers/{id}
PATCH https://api.vaultcord.com/servers/{id}

Body example (for update):

{
  "name": "Updated Server",
  "font": "Minecraftia",
  "backgroundColor": "#151515",
  "textColor": "#FFF",
  "description": "Verify to join!",
  "banner": "https://i.imgur.com/LpttueJ.gif",
  "minAge": 7,
  "vpncheck": 1,
  "captcha": 1
}

Response: Success message and updated server ID.

Member Pulls and Passwords

View pull history (successful joins, bans, etc.) or add passwords for extra verification security – create invite codes or lock pages to prevent raids.

GET https://api.vaultcord.com/servers/{serverId}/pulls
PUT https://api.vaultcord.com/servers/{serverId}/passwords

Password body:

{
  "password": "SecurePass123!"
}

Useful for "Discord server password protection API".

Members: Pull, Import, and Manage Discord Users

Handle user data with these endpoints – list verified members, pull them to your server, import via OAuth2 tokens, or ban/delete for security. Ideal for "how to import Discord members API" or migrating after a ban. This includes pagination for large servers and options like skipping duplicates during pulls.

List and Get Members

Paginate through members (with details like email, IP) or fetch one by user ID for profile checks.

GET https://api.vaultcord.com/members/servers/{serverId}/pages/{pageNum}
GET https://api.vaultcord.com/members/{userId}

Response: Array of member objects (id, userid, created_at, etc.).

Pull Members

Start pulling verified members to your Discord server – specify guild ID, optional role/user/limit (e.g., 100 members), and skip duplicates for clean imports. Great for server growth or recovery.

PUT https://api.vaultcord.com/members/pull/{serverId}

Body:

{
  "guildid": "1218273540147646535",
  "roleid": "1022118100830802004",
  "limit": 100,
  "skipDuplicate": true
}

Response: Pull started confirmation; check email or stats for status.

Import Members

Import users using Discord OAuth2 tokens (access/refresh) – provide server ID, user ID, username, and tokens from Discord's authorization flow. See YouTube tutorial for token conversion tools.

POST https://api.vaultcord.com/members/import

Body:

{
  "serverId": 62567,
  "userId": "720820224877789204",
  "username": "notexttospeech",
  "accessToken": "MTYxNjYwNTE3OTE0NTA5MzEy.6qrZcUqja7812RVdnEKjpzOL4CvHBFG",
  "refreshToken": "D43f5y0ahjqew82jZ4NViEr2YafMKhue"
}

Response: Import success message.

Ban or Delete Member

Add to blocklist (ban) or remove a member entirely for moderation.

PUT https://api.vaultcord.com/members/{id}/ban
DELETE https://api.vaultcord.com/members/{id}

Response: Ban/delete confirmation.

Bots: Create and Configure Custom Discord Bots

Set up and manage custom bots for your servers – list them, create with Discord tokens/secrets, or update for ongoing use. Note: Can't switch bots mid-member transfer due to Discord limits; use cloning for duplicates. Essential for "custom Discord bot API setup".

List and Get Bots

View all bots with IDs and creation dates, or fetch details for one.

GET https://api.vaultcord.com/bots
GET https://api.vaultcord.com/bots/{id}

Response: Array or single bot object (name, clientId, token, etc.). Warning: Keep tokens secret!

Create or Update Bot

Add a new bot or modify an existing one with name, OAuth2 client secret, and Discord token.

PUT https://api.vaultcord.com/bots
PATCH https://api.vaultcord.com/bots/{id}

Body:

{
  "name": "My Custom Bot",
  "clientSecret": "JFcVvRVdnZb2QRa6DpY3LPwPMTpDi5X6",
  "token": "MTIxODI3MzA5MzI5ODk0NjA0OA.nt02aR.e7Uyh_D3GggylpuFFwbt2E5NR4c-lUoqFrM9fK"
}

Response: Bot ID and success message.

Backups: Automate and Restore Discord Server Data

Schedule and manage backups to protect your server from bans or data loss – list saved backups, view schedules, or delete old ones. Perfect for "Discord server backup API tutorial".

List and Schedule Backups

Get all backups (with guild names and dates) or scheduled ones (interval in seconds, last run).

GET https://api.vaultcord.com/backups/list
GET https://api.vaultcord.com/backups/scheduled
DELETE https://api.vaultcord.com/backups/{id}

Response: Array of backup objects.

Marketplace: Buy and Pull Discord Members Easily

Access the member marketplace – buy from sellers, pull orders to your server, refund, or update invites. Fetch sellers filtered by price or recency (cached 2 hours; use webhooks for updates). Ideal for "Discord member marketplace API guide".

Buy and Pull Members

Place an order with seller ID, invite link, email, and amount; then pull to start delivery. Optional budget cap in cents.

POST https://api.vaultcord.com/market/buy
POST https://api.vaultcord.com/market/pull

Buy body:

{
  "marketId": 618,
  "inviteLink": "dyno",
  "userEmail": "buyer@email.com",
  "amount": 100,
  "budget": 2000
}

Pull body:

{
  "orderId": "HR-a59c162b-a7c6-47bb-9322-10651eeeae68"
}

Response: Order details or pull confirmation.

Refund, Update Invite, and Fetch Sellers

Refund post-pull or change invite before starting; list sellers with filters (e.g., ?filter=price-low).

POST https://api.vaultcord.com/market/refund/{orderId}
POST https://api.vaultcord.com/market/update-invite
GET https://api.vaultcord.com/market/fetch

Update body:

{
  "ref": "c444b1c9fa354ffcbf3b6c99300fc0d9",
  "invite": "newcode"
}

Response: Success or seller array (name, cost per 100, etc.).

Blocklists and Allowlists: Enhance Server Security

Block unwanted users/IPs or allow trusted ones to bypass checks – add by user ID, IP, fingerprint, region, country, or ASN. Tags cover blacklists for blocking and whitelists (allowlists) for exemptions, including email domains. Search-friendly for "Discord blocklist API security".

Blocklist Operations

List, add (multiple types), or delete blocks.

GET https://api.vaultcord.com/blocklist
PUT https://api.vaultcord.com/blocklist
DELETE https://api.vaultcord.com/blocklist/{id}

Add body:

{
  "userid": "1215624435520897090",
  "ip": "1.1.1.1",
  "fingerprint": "782c2b71aef697c83284ef3ab4cb593c",
  "region": "ENG",
  "country": "DZ",
  "asn": 13335
}

Response: List or creation/deletion success.

Allowlist Operations

Similar to blocklist but for whitelisting (add domain too).

GET https://api.vaultcord.com/allowlist
PUT https://api.vaultcord.com/allowlist
DELETE https://api.vaultcord.com/allowlist/{id}

Add body example:

{
  "userid": "1215624435520897090",
  "domain": "gmail.com"
}

Response: Whitelist array or success.

Alerts: Get Notified of Server Issues

Set up email alerts for events like server terminations (Discord bans) – auto-pull members via dashboard edits. Covers listing, adding (invite + email), and deleting. Useful for "Discord termination alert API".

GET https://api.vaultcord.com/alerts
PUT https://api.vaultcord.com/alerts
DELETE https://api.vaultcord.com/alerts/{id}

Add body:

{
  "invite": "openai",
  "email": "alerts@email.com"
}

Response: Alert list or creation success.

Webhooks: Real-Time Notifications for Your Discord Bot

Receive instant updates via webhooks for events like member verifications, pulls, marketplace orders, refunds, donations, or new sellers. Use bitwise flags (1=orders, 2=verified, 4=pull started, etc.) and verify with HMAC secret. Key for "Discord webhook API integration".

GET https://api.vaultcord.com/developers/webhooks
PUT https://api.vaultcord.com/developers/webhooks
DELETE https://api.vaultcord.com/developers/webhooks/{id}

Add body:

{
  "url": "https://webhook.site/db95dcd7-8b4b-42a9-9d3b-bcb81e7f91c4",
  "events": 6  // Orders + Verified + Pull
}

Response: Webhook list or creation.

Stats: Track Growth and Performance

Monitor your Discord bot and server metrics – account info, global totals (backups/bots/members), charts for daily joins, browser/visitor data, and pull history. Parameters like date ranges for charts; great for "Discord server analytics API".

Account and Global Stats

Get user role (free/premium), expiry, and totals.

GET https://api.vaultcord.com/accounts/settings
GET https://api.vaultcord.com/stats/dashboard

Chart, Browser, and Visitor Stats

Visualize growth (start/end dates), top browsers/OS, sources (state/device/referrer/region).

GET https://api.vaultcord.com/stats/chart?startDate=2025-01-01&endDate=2025-10-28
GET https://api.vaultcord.com/stats/browsers
GET https://api.vaultcord.com/stats/visitors

Member and Pull Stats

Server-specific pullable members or recent pulls (success/fail counts).

GET https://api.vaultcord.com/stats/members/{serverId}
GET https://api.vaultcord.com/stats/pulls

Response: Stats objects with data arrays.

Error Handling: Common Issues and Fixes

VaultCord API returns standard HTTP errors – handle them to keep your bot running smoothly. 401 for auth fails, 402 for low balance (top up dashboard), 400 for bad data, 429 for rate limits. Essential for "Discord API error troubleshooting".

Example in Python:

import requests
response = requests.get("https://api.vaultcord.com/servers", headers={"Authorization": "Bearer YOUR_API_KEY"})
if response.status_code == 401:
    print("Invalid API key – check dashboard!")
elif response.status_code == 402:
    print("Add funds for marketplace buys.")

Always log errors for debugging.

FAQ: Common Questions on VaultCord Discord API

What is the VaultCord API base URL for Discord bots? All endpoints start with https://api.vaultcord.com – add paths like /servers for management.

How do I pull members with the Discord member pull API? Use PUT /members/pull/{serverId} with guildid and limit – skips duplicates for safe imports.

How to create a custom verification bot for Discord servers? Add a server via PUT /servers, update settings for captcha/VPN checks, and use bots endpoint for token setup.

What does the Discord marketplace API do in VaultCord? Buy members via POST /market/buy, pull with /market/pull, and fetch sellers – secure and filtered by price.

How to set up webhooks for Discord bot notifications? PUT /developers/webhooks with URL and events flag (e.g., 2 for verifications) – get real-time alerts.

Can I automate Discord backups with this API? Yes, list/schedule via /backups endpoints – restore quickly after issues.

How secure is the VaultCord API for member imports? Bearer auth + OAuth2 tokens ensure privacy; use blocklists for extra protection.

This guide is based solely on the official VaultCord OpenAPI spec – no external assumptions. For full details, visit the dashboard or API reference. Start building your Discord bot today!