Integration

Integrate with the Jarvis API, and make your own applications with what Jarvis has to offer.

Getting Started

Welcome to the Jarvis Developer Platform. This guide will help you create an API token, authenticate requests, understand API responses and begin integrating Jarvis APIs into your applications.

Before you can access any Jarvis API endpoint, you must have an active API token associated with your account.
1. Creating an API Token

API tokens can be generated from your Jarvis profile page. Each token is linked to your account and rate limits are applied based on your subscription plan.

  1. Log in to your Jarvis with discord.
  2. Click your profile picture (located top right).
  3. Click on your name.
  4. Generate your token.
  5. Save your token securely.
Store your token securely and never expose it publicly in source code repositories or client-side applications.
2. Making Your First Request

Once you have an API token, include it in the request headers.

Example: Random Joke
GET /api/jokes/random
cURL Example
curl \
-H "Authorization: YOUR_API_TOKEN" \
https://jarvisbot.uk/api/jokes/random
JavaScript Example
fetch("https://jarvisbot.uk/api/jokes/random", {
    headers: {
        "Authorization": "YOUR_API_TOKEN"
    }
})
.then(response => response.json())
.then(console.log);
PHP Example
$ch = curl_init();

curl_setopt_array($ch, [
    CURLOPT_URL => "https://jarvisbot.uk/api/jokes/random",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: YOUR_API_TOKEN"
    ]
]);

$response = curl_exec($ch);
$data = json_decode($response, true);

curl_close($ch);
3. Understanding Responses

All API responses are returned as JSON.

Example Successful Response
{
    "id": 42,
    "setup": "Why do programmers prefer dark mode?",
    "punchline": "Because light attracts bugs."
}

Most endpoints will return a JSON object or a JSON array depending on the operation being performed.

Example Collection Response
[
    {
        "id": 1,
        "name": "Accio"
    },
    {
        "id": 2,
        "name": "Lumos"
    }
]
4. Authentication Overview

Every API request must include an API token.

Recommended Header
Authorization: YOUR_API_TOKEN
Alternative Header
X-API-Token: YOUR_API_TOKEN
Query String (Not Recommended)
GET /api/flags/random?token=YOUR_API_TOKEN
Always use the Authorization header in production environments. Tokens included in URLs may be logged by browsers, servers or proxy systems.
Account Plans & Rate Limits
Plan Daily Limit Access
Free 100 Requests Core APIs
Premium 10,000 Requests All APIs
Enterprise Unlimited All APIs + Priority Support
5. Common Error Codes

Jarvis APIs use consistent error formats to help identify issues quickly.

Error Description
invalidToken Missing or invalid API token.
rateLimit Request allowance has been exceeded.
notFound Requested resource could not be found.
forbidden Access denied by account permissions.
serverError An unexpected server-side error occurred.
Missing Token Example
{
    "success": false,
    "error": "invalidToken",
    "msg": "API token required"
}
Invalid Token Example
{
    "success": false,
    "error": "invalidToken",
    "msg": "Invalid API token"
}
Rate Limit Example
{
    "success": false,
    "error": "rateLimit",
    "msg": "API limit exceeded",
    "plan": "free",
    "limit": 100
}
Not Found Example
{
    "success": false,
    "error": "notFound",
    "msg": "Resource not found"
}
Available APIs
  • Flags API
  • Dictionary API
  • Questions API
  • Riddles API
  • Jokes API
  • Pickup Lines API
  • Truth Or Dare API
  • Harry Potter Spells API
  • Additional APIs Coming Soon
You're now ready to start integrating Jarvis APIs into your applications, Discord bots, websites and services. Browse the individual API documentation pages for endpoint details, examples and response formats.
feature-image

Harry Potter Spell Book

Access a complete spell database inspired by the wizarding world. Perfect for trivia apps, fan projects, or magical utilities.

Complete Spell Collection

Access a full catalogue of spells from across the entire film series, including names, types, and usage details.

Definitions & Origins

Each spell includes its meaning, background, and origin, giving developers rich lore to build immersive experiences.

Phonetic Pronunciation

Every spell comes with a phonetic guide so users can learn how to say it correctly — ideal for voice apps or educational tools.

Random Spell Sentences

Generate a unique example sentence for any spell, perfect for roleplay, games, or interactive storytelling features.

Check Documentation

Jokes API

Tap into a constantly growing collection of jokes ranging from dad jokes to one‑liners. Ideal for entertainment bots, social apps, or daily humor feeds.

Large Collection of Jokes

Access a huge library of jokes ranging from classic one‑liners to modern humour, perfect for bots, apps, and entertainment tools.

Category‑Based Search

Find jokes by category — dad jokes, dark humour, puns, knock‑knock, wholesome, and more — making it easy to tailor content.

Random Joke Generator

Instantly pull a random joke for “Joke of the Day”, chat interactions, or fun automated responses.

Setup + Punchline Structure

Each joke includes a clean setup and punchline format, ideal for timed reveals, embeds, and interactive delivery.

Check Documentation
feature-image
feature-image

Pickup lines API

A fun and diverse set of pickup lines — smooth, cheesy, bold, and everything in between. Great for dating apps, chatbots, or social features.

Huge Collection of Pickup Lines

Access a massive library of pickup lines ranging from smooth to silly, perfect for social apps, bots, and fun interactions.

Category‑Based Search

Browse pickup lines by category — cute, flirty, bold, cheesy, cringe, and more — making it easy to tailor content to your audience.

Random Line Generator

Pull a random pickup line instantly for games, chats, or “pickup of the day” features.

Engagement‑Focused Content

Every line is crafted to spark reactions, laughs, and interactions, ideal for boosting engagement in communities and apps.

Check Documentation

Questions API

Pull from a wide variety of thought‑provoking, funny, or conversation‑starting questions. Perfect for games, icebreakers, or community engagement tools.

Massive Question Library

Access a large and growing collection of conversation‑starting questions designed to spark engagement, interaction, and community activity.

Category‑Based Search

Browse or filter questions by category — fun, serious, personal, icebreakers, deep‑thought, and more — perfect for tailoring content to your audience.

Daily Rotation

Automatically pull a fresh question every day, ensuring your apps, bots, or communities always have new content without manual updates.

Interaction‑Focused Prompts

Every question is crafted to encourage replies, discussions, and participation, making it ideal for social apps, servers, and engagement tools.

Check Documentation
feature-image
feature-image

Flags API

Access global flag data including names, regions, and metadata. Useful for geography apps, educational tools, and international features.

Search by Country Code

Look up any flag instantly using its ISO country code, making it easy to integrate fast lookups into apps, bots, or tools.

High‑Quality Flag Images

Access multiple image sizes for every flag — perfect for dashboards, embeds, UI elements, or responsive designs.

Detailed Country Information

Retrieve country names, regions, and metadata alongside each flag, giving you rich context for educational or geographic applications.

Comprehensive Flag Database

Explore a complete and continually updated collection of global flags, ready to power anything from trivia apps to international utilities.

Check Documentation

Dictionary API

A full dictionary lookup service with definitions, examples, and word data. Ideal for language tools, learning apps, and smart assistants.

Filter Search

Filter words by any category: length, characters and more.

Word of the Day

Integrated Word of teh day lets you create fun apps your way.

Character Search

Search for words based on character set and count.

Over 360K+ Words

With a mass store of words and definitions that keeps growing each day.

Check Documentation
feature-image
feature-image

Riddles API

Access a growing collection of brain teasers, puzzles, and riddles complete with answer validation and reveal functionality. Perfect for Discord bots, games, educational tools, trivia systems, and community challenges.

Random Riddles

Instantly retrieve random riddles from the database, ideal for daily challenges, games, and interactive commands.

Answer Verification

Validate player answers through the API and determine whether a submitted response matches the correct solution.

Search & Discovery

Search the riddle collection to find specific riddles, themes, or keywords for custom games and experiences.

Perfect for Games

Power Discord events, trivia nights, classroom activities, quizzes, and puzzle-based competitions with ease.

Check Documentation

Truth or Dare API

Access a large collection of truth questions and dares across multiple difficulty levels ranging from family friendly prompts to mature challenges. Perfect for Discord bots, party games, community events and social apps.

Truth Questions

Generate random truth questions or filter by difficulty level to match your audience.

Interactive Dares

Retrieve fun, challenging and engaging dares complete with optional turn and timing requirements.

Difficulty Levels

Easily filter between Easy, Medium, Hard, Lewd, NSFW and NSFW+ content levels.

Party Ready

Build party games, Discord commands, event challenges and social experiences directly from the API.

Check Documentation
feature-image

Authentication & Rate Limits

All Jarvis APIs require a valid API token. Tokens are issued through the Jarvis Developer Portal and are associated with an account plan which determines access levels and request limits.

Authentication

Every request must include a valid API token. Requests made without a token or with an invalid token will be rejected.

Authorization Header (Recommended)
Authorization: YOUR_API_TOKEN
X-API-Token Header
X-API-Token: YOUR_API_TOKEN
Query String
GET /api/flags/random?token=YOUR_API_TOKEN
For security reasons, the Authorization header method is strongly recommended. Avoid exposing API tokens in URLs where possible.
Example Requests
cURL
curl \
-H "Authorization: YOUR_API_TOKEN" \
https://jarvisbot.uk/api/flags/random
JavaScript (Fetch)
fetch("https://jarvisbot.uk/api/jokes/random", {
    headers: {
        "Authorization": "YOUR_API_TOKEN"
    }
})
.then(r => r.json())
.then(console.log);
PHP
$response = file_get_contents(
    "https://jarvisbot.uk/api/questions/random",
    false,
    stream_context_create([
        'http' => [
            'header' => [
                'Authorization: YOUR_API_TOKEN'
            ]
        ]
    ])
);

$data = json_decode($response, true);
Account Plans
Plan Daily Requests API Access
Free 100 Requests Basic APIs
Premium 10,000 Requests All APIs
Enterprise Unlimited All APIs + Priority Support
Rate Limiting

API usage is automatically monitored based on your account type. Once your limit is reached, requests will be temporarily blocked until your allowance resets.

Plan Limit Window
Free 100 Requests 24 Hours
Premium 10,000 Requests 24 Hours
Enterprise Unlimited No Restriction
Authentication Error Response
{
    "success": false,
    "error": "invalidToken",
    "msg": "API token required"
}
Invalid Token Response
{
    "success": false,
    "error": "invalidToken",
    "msg": "Invalid API token"
}
Rate Limit Response
{
    "success": false,
    "error": "rateLimit",
    "msg": "API limit exceeded",
    "plan": "free",
    "limit": 100
}
Best Practices
  • Store API tokens securely and never expose them publicly.
  • Use the Authorization header whenever possible.
  • Cache responses where appropriate to reduce API calls.
  • Monitor your daily usage to avoid rate limiting.
  • Upgrade your account if your application requires higher throughput.
Supported APIs
  • Flags API
  • Dictionary API
  • Questions API
  • Riddles API
  • Jokes API
  • Pickup Lines API
  • Truth Or Dare API
  • Harry Potter Spells API
  • Future Jarvis APIs
Need additional capacity or custom limits? Contact the Jarvis team to discuss Premium and Enterprise API access.