Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. API & Developers
  6. /
  7. Api Quickstart
GUIDEAPI & Developers

API Quickstart — Your First API Call

3 min read

This quickstart guide gets you from zero to a working API call in just a few minutes. By the end, you will have authenticated with the API and retrieved your server list.

Prerequisites

  • A Data Mammoth account with at least one server (or the intent to create one).
  • An API key. See API Authentication if you do not have one yet.
  • A tool for making HTTP requests: curl (command line), Postman (GUI), or a programming language.

Step 1 — Get Your API Key

  • Log in to your Data Mammoth dashboard.
  • Navigate to Account Settings > API.
  • Click Generate API Key.
  • Copy the key. For this guide, we will use the placeholder dm_key_abc123def456.
  • Step 2 — Make Your First Request

    Using cURL

    Open your terminal and run:

    bash
    curl -X GET "https://api.datamammoth.com/v1/account" \
      -H "Authorization: Bearer dm_key_abc123def456" \
      -H "Content-Type: application/json"

    Expected Response

    json
    {
      "data": {
        "id": "acc_12345",
        "email": "[email protected]",
        "name": "Jane Doe",
        "company": "Acme Inc",
        "created_at": "2025-06-15T10:00:00Z"
      }
    }

    If you see your account details, your API key is working correctly.

    Step 3 — List Your Servers

    bash
    curl -X GET "https://api.datamammoth.com/v1/servers" \
      -H "Authorization: Bearer dm_key_abc123def456" \
      -H "Content-Type: application/json"

    Response:

    json
    {
      "data": [
        {
          "id": "srv_abc123",
          "name": "web-production",
          "status": "running",
          "ip": "203.0.113.10",
          "plan": "vps-standard",
          "region": "us-east",
          "os": "ubuntu-24.04"
        }
      ],
      "meta": {
        "total": 1,
        "page": 1,
        "per_page": 25
      }
    }

    Step 4 — Get Server Details

    Use a server ID from the list to get full details:

    bash
    curl -X GET "https://api.datamammoth.com/v1/servers/srv_abc123" \
      -H "Authorization: Bearer dm_key_abc123def456" \
      -H "Content-Type: application/json"

    Response:

    json
    {
      "data": {
        "id": "srv_abc123",
        "name": "web-production",
        "status": "running",
        "ip": "203.0.113.10",
        "ipv6": "2001:0db8:85a3::1",
        "plan": "vps-standard",
        "region": "us-east",
        "os": "ubuntu-24.04",
        "vcpus": 4,
        "ram_mb": 8192,
        "disk_gb": 160,
        "bandwidth_tb": 5,
        "created_at": "2026-01-15T10:30:00Z",
        "tags": ["production", "web"]
      }
    }

    Step 5 — Perform a Server Action

    Restart a server:

    bash
    curl -X POST "https://api.datamammoth.com/v1/servers/srv_abc123/actions" \
      -H "Authorization: Bearer dm_key_abc123def456" \
      -H "Content-Type: application/json" \
      -d '{
        "action": "restart"
      }'

    Response:

    json
    {
      "data": {
        "action_id": "act_xyz789",
        "action": "restart",
        "status": "in_progress",
        "started_at": "2026-03-17T14:30:00Z"
      }
    }

    Common API Patterns

    Filtering Results

    Add query parameters to filter:

    bash
    curl -X GET "https://api.datamammoth.com/v1/servers?status=running&region=us-east" \
      -H "Authorization: Bearer dm_key_abc123def456"

    Pagination

    Navigate large result sets:

    bash
    curl -X GET "https://api.datamammoth.com/v1/servers?page=2&per_page=10" \
      -H "Authorization: Bearer dm_key_abc123def456"

    See API Pagination & Filtering for details.

    Error Handling

    If something goes wrong, the API returns an error:

    json
    {
      "error": {
        "code": "not_found",
        "message": "Server 'srv_invalid' not found.",
        "status": 404
      }
    }

    See API Error Codes & Handling for a complete reference.

    Next Steps with the API

    Now that you have made your first API calls, explore these capabilities:

    TaskEndpointMethod
    Create a server/v1/serversPOST
    Delete a server/v1/servers/{id}DELETE
    List invoices/v1/billing/invoicesGET
    Create a support ticket/v1/support/ticketsPOST
    Set up a webhook/v1/webhooksPOST

    Code Examples

    For implementation in your preferred programming language:

    • Python Examples
    • JavaScript/Node.js Examples
    • PHP Examples
    • cURL Examples

    What to Do Next

    • Server Management API — Full server API reference.
    • Billing API — Automate billing operations.
    • API Rate Limits & Best Practices — Optimize your usage.
    • Webhooks — Receive real-time event notifications.

    Was this article helpful?

    ← Back to API & DevelopersBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket