Skip to main content

API Documentation

Quick Start Examples

plain
curl -X GET https://api.platform.dev/v1/users \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
plain
import requests headers = { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } response = requests.get( 'https://api.platform.dev/v1/users', headers=headers ) print(response.json())
plain
const response = await fetch('https://api.platform.dev/v1/users', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } }); const data = await response.json(); console.log(data);
plain
require 'net/http' require 'json' uri = URI('https://api.platform.dev/v1/users') request = Net::HTTP::Get.new(uri) request['Authorization'] = 'Bearer YOUR_API_KEY' request['Content-Type'] = 'application/json' response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request) end puts JSON.parse(response.body)
plain
package main import ( "fmt" "io" "net/http" ) func main() { client := &http.Client{} req, _ := http.NewRequest("GET", "https://api.platform.dev/v1/users", nil) req.Header.Add("Authorization", "Bearer YOUR_API_KEY") req.Header.Add("Content-Type", "application/json") resp, _ := client.Do(req) body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) }
plain
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.platform.dev/v1/users'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); $response = curl_exec($ch); curl_close($ch); echo $response; ?>
plain
// Express.js webhook handler const express = require('express'); const crypto = require('crypto'); app.post('/webhooks/api-platform', (req, res) => { const signature = req.headers['x-webhook-signature']; const payload = JSON.stringify(req.body); // Verify webhook signature const hash = crypto .createHmac('sha256', process.env.WEBHOOK_SECRET) .update(payload) .digest('hex'); if (hash !== signature) { return res.status(401).send('Invalid signature'); } // Process the event const { event_type, data } = req.body; switch(event_type) { case 'user.created': console.log('New user:', data.user_id); break; case 'rate_limit.exceeded': console.log('Rate limit hit:', data.endpoint); break; default: console.log('Unknown event:', event_type); } res.status(200).send('OK'); });

Common Integration Questions

How do I authenticate API requests?

All API requests require authentication using Bearer tokens. Include your API key in the Authorization header of every request. You can generate and manage API keys from your dashboard at /app/api-keys. Each key can be scoped with specific permissions and rate limits for security.

What are the rate limits?

Rate limits vary by plan tier. Free accounts receive 1,000 requests per hour, Pro accounts get 10,000 requests per hour, and Enterprise plans offer custom limits. Rate limit headers are included in every response showing your current usage, limit, and reset time. Monitor your usage in real-time at /app/usage.

How do I handle errors and status codes?

The API uses standard HTTP status codes. 2xx indicates success, 4xx indicates client errors (invalid request, authentication failure), and 5xx indicates server errors. All error responses include a JSON body with an error code, message, and documentation link to help you resolve the issue quickly.

Can I test API calls without writing code?

Yes! Our interactive OpenAPI documentation provides a built-in API explorer where you can test endpoints directly in your browser. Simply authenticate with your API key, select an endpoint, fill in parameters, and execute requests to see live responses. Perfect for prototyping and debugging.

What response formats are supported?

All endpoints return JSON by default with UTF-8 encoding. Responses follow a consistent structure with data, metadata, and pagination information where applicable. You can request pretty-printed JSON for debugging by adding the ?pretty=true query parameter to any endpoint.

How do I paginate through large result sets?

Use the limit and offset query parameters to paginate results. The default page size is 50 items with a maximum of 100. Each paginated response includes next and previous links in the metadata, plus total count information. Cursor-based pagination is also available for high-volume endpoints.

Are there SDK libraries available?

Official SDKs are available for Python, JavaScript/Node.js, Ruby, Go, PHP, and Java. Each library provides typed interfaces, automatic authentication, retry logic, and built-in error handling. Install via your language's package manager and check our GitHub organization for source code and examples.

How can I monitor API usage and logs?

Access detailed request logs and analytics at /app/logs. View request timestamps, endpoints called, response times, status codes, and error details. Set up alerts for unusual patterns, export logs for compliance, and analyze usage trends to optimize your integration and plan usage.