Back to Documentation
Marketplace API
Browse, search, and install contract templates from the FinalTX Template Marketplace. Create and publish your own templates with versioning, reviews, and usage analytics.
Base URL
https://api.finaltx.io/v1/marketplaceGET
/templatesList all published templates with filtering and pagination.
Query Parameters
category: string - Filter by category (http, artifact, code, etc.)
search: string - Full-text search query
sort: string - Sort by: popular, recent, rating (default: popular)
limit: number - Results per page (default: 20, max: 100)
offset: number - Pagination offset
GET
/templates/featuredGet featured and trending templates curated by the FinalTX team.
Response
{
"featured": [...], // Hand-picked by FinalTX
"trending": [...], // Most installs this week
"new": [...], // Recently published
"top_rated": [...] // Highest average rating
}GET
/templates/:idGet full template details including versions, reviews, and usage statistics.
POST
/templates/:id/installInstall a template to your workspace. Increments install count and adds to your installed templates.
POST
/templatesPublish a new template to the marketplace.
Request Body
{
"name": "API Health Check",
"slug": "api-health-check",
"description": "Verify API endpoint returns 200 OK",
"category": "http",
"version": "1.0.0",
"schema": {
"checks": [...],
"variables": [...]
},
"visibility": "public" // or "private", "unlisted"
}POST
/templates/:id/reviewsSubmit a review for a template. One review per user per template.
Request Body
{
"rating": 5, // 1-5 stars
"title": "Great template!",
"comment": "Works perfectly for my use case."
}GET
/categoriesList all template categories with counts.
Template Model
{
"id": "uuid",
"name": "API Health Check",
"slug": "api-health-check",
"description": "Verify API endpoint returns expected status",
"category": "http",
"author": {
"id": "uuid",
"name": "FinalTX Team",
"verified": true
},
"version": "1.2.0",
"versions": [...],
"schema": {
"checks": [...],
"variables": [...]
},
"stats": {
"installs": 1250,
"rating_avg": 4.8,
"rating_count": 42,
"contracts_created": 8500
},
"visibility": "public",
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-03-01T14:20:00Z"
}SDK Example
import { FinalTX } from '@finaltx/sdk';
const ftx = new FinalTX({ apiKey: process.env.FINALTX_API_KEY });
// Browse featured templates
const { featured, trending } = await ftx.marketplace.featured();
// Search for templates
const results = await ftx.marketplace.search({
query: 'api verification',
category: 'http'
});
// Get template details
const template = await ftx.marketplace.get('api-health-check');
// Install to workspace
await ftx.marketplace.install(template.id);
// Create contract from template
const contract = await ftx.templates.instantiate(template.id, {
variables: { api_url: 'https://api.example.com' },
amount_cents: 1000,
});
// Submit review
await ftx.marketplace.review(template.id, {
rating: 5,
comment: 'Works great!'
});