Menu

Developers / Overview

Quick Start

Get up and running with the Topmast API in under 5 minutes.

Overview

The Topmast API enables you to programmatically manage AI optimization for WordPress sites. This guide will help you make your first API request.

Prerequisites

Before you begin, you'll need:

  • A Topmast account with an active subscription
  • A connected WordPress site with the Topmast plugin installed
  • Your API key (found in your dashboard settings)

Step 1: Get Your API Key

Navigate to your Topmast dashboard and go to Settings > API. Your API key will be displayed there. It starts with tm_sk_ followed by 64 characters.

Important: Keep your API key secure. Never expose it in client-side code or public repositories.

Step 2: Make Your First Request

Test your API key by checking your site's status:

Bash
curl -X GET "https://topmast.app/api/sites" \
  -H "Authorization: Bearer YOUR_API_KEY"

Step 3: Generate LLMs.txt

Once connected, generate an LLMs.txt file for your site:

Bash
curl -X GET "https://topmast.app/api/sites/{site_id}/llms-txt" \
  -H "Authorization: Bearer YOUR_API_KEY"

Next Steps

  • Learn about Authentication in detail
  • Explore the API Endpoints reference
  • Check out code examples for your preferred language