Documentation Index
Fetch the complete documentation index at: https://docs.propal.io/llms.txt
Use this file to discover all available pages before exploring further.
The Propal API uses standard REST conventions, so you can call it from any language with an HTTP client. Below are recommended approaches for common languages.
Official API
The Propal API follows the OpenAPI 3.0 specification. You can use this spec to generate a typed client in any language.
Import the OpenAPI spec into tools like Postman, Insomnia, or Bruno to explore the API interactively.
Code examples
Node.js / TypeScript
Use the built-in fetch API (Node 18+) or any HTTP client:
const PROPAL_API_KEY = process.env.PROPAL_API_KEY;
async function propal(path: string, options?: RequestInit) {
const response = await fetch(`https://api.propal.io/v1${path}`, {
...options,
headers: {
Authorization: `Bearer ${PROPAL_API_KEY}`,
"Content-Type": "application/json",
...options?.headers,
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`Propal API error: ${error.message}`);
}
return response.json();
}
// List proposals
const { data } = await propal("/proposals?limit=10");
Python
import os
import requests
PROPAL_API_KEY = os.environ["PROPAL_API_KEY"]
BASE_URL = "https://api.propal.io/v1"
def propal(path, method="GET", json=None):
response = requests.request(
method,
f"{BASE_URL}{path}",
headers={"Authorization": f"Bearer {PROPAL_API_KEY}"},
json=json,
)
response.raise_for_status()
return response.json()
# List proposals
data = propal("/proposals?limit=10")
cURL
export PROPAL_API_KEY="pp_live_YOUR_KEY"
# List proposals
curl https://api.propal.io/v1/proposals \
-H "Authorization: Bearer $PROPAL_API_KEY"
# Create a lead
curl -X POST https://api.propal.io/v1/leads \
-H "Authorization: Bearer $PROPAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corp", "email": "contact@acme.com"}'
Generate a typed client
You can generate a typed SDK from the OpenAPI spec using open-source tools:
| Language | Tool | Command |
|---|
| TypeScript | openapi-typescript | npx openapi-typescript https://api.propal.io/v1/openapi.json -o propal.d.ts |
| Python | openapi-python-client | openapi-python-client generate --url https://api.propal.io/v1/openapi.json |
| Go | oapi-codegen | oapi-codegen -package propal https://api.propal.io/v1/openapi.json > propal.go |
| Any | OpenAPI Generator | Supports 50+ languages |
These are community tools, not maintained by Propal. Generated clients are based on our OpenAPI spec and should work with any valid Propal API endpoint.
Postman collection
Import the OpenAPI spec directly into Postman:
Open Postman
Click Import in the top-left corner.
Paste the spec URL
Enter https://api.propal.io/v1/openapi.json and click Import.
Set your API key
In the collection settings, set the Authorization header to Bearer pp_live_YOUR_KEY.