Skip to main content

Get your API key

Before making your first API call, you’ll need to generate an API key:
1

Access Admin Dashboard

Log in to your SitePlot admin dashboard with Global Administrator privileges.
2

Navigate to API Keys

Go to OrganizationAPI Keys in the sidebar.
3

Create New Key

Click Create New API Key and provide a descriptive name.
4

Copy Your Key

Copy the generated API key immediately - it will only be shown once.

Make your first request

Let’s start by fetching a list of forms from your SitePlot instance:
curl -X GET "https://your-domain.com/api/v1/forms" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Expected Response

A successful request will return a JSON response with your forms data:
{
  "data": [
    {
      "id": "form_1234567890",
      "title": "Contact Form",
      "description": "Main website contact form"
    },
    {
      "id": "form_0987654321",
      "title": "Newsletter Signup",
      "description": "Email newsletter subscription form"
    }
  ],
  "meta": {
    "total": 2,
    "page": 1,
    "pageSize": 20,
    "totalPages": 1
  }
}

Next Steps

Now that you’ve made your first successful API call, explore these common use cases:

Get Form Submissions

Retrieve submissions for a specific form

List Pages

Access your published pages

Manage Redirects

View and manage URL redirects

Error Handling

Learn about error responses and status codes

Common Parameters

Most list endpoints support these query parameters:
ParameterTypeDefaultDescription
pageinteger1Page number for pagination
pageSizeinteger20Items per page (max: 100)
activeboolean-Filter for active items only
publishedboolean-Filter for published items only

Error Handling

Always handle potential errors in your API calls:
async function makeApiCall() {
  try {
    const response = await fetch(url, options);
    
    if (!response.ok) {
      const errorData = await response.json();
      throw new Error(`API Error: ${errorData.message}`);
    }
    
    return await response.json();
  } catch (error) {
    console.error('API call failed:', error.message);
    // Handle error appropriately
  }
}
You’re now ready to integrate the SitePlot API into your applications!