Netlify's API goes far beyond deployment — it gives you serverless functions, edge functions, forms, identity, and blobs.
The Deploy API
# Create a deploy
curl -X POST "https://api.netlify.com/api/v1/sites/SITE_ID/deploys" \
-H "Authorization: Bearer $NETLIFY_TOKEN" \
-H "Content-Type: application/zip" \
--data-binary @deploy.zip
# List deploys
curl "https://api.netlify.com/api/v1/sites/SITE_ID/deploys" \
-H "Authorization: Bearer $NETLIFY_TOKEN"
# Rollback to previous deploy
curl -X POST "https://api.netlify.com/api/v1/sites/SITE_ID/rollback" \
-H "Authorization: Bearer $NETLIFY_TOKEN"
Netlify Functions (Serverless)
// netlify/functions/users.ts
import type { Handler } from '@netlify/functions'
export const handler: Handler = async (event) => {
if (event.httpMethod === 'GET') {
const users = await db.user.findMany()
return { statusCode: 200, body: JSON.stringify(users) }
}
if (event.httpMethod === 'POST') {
const data = JSON.parse(event.body!)
const user = await db.user.create({ data })
return { statusCode: 201, body: JSON.stringify(user) }
}
}
Edge Functions
// netlify/edge-functions/geo.ts
export default async (request: Request, context: Context) => {
const { country, city } = context.geo
if (country === 'DE') {
return new Response('Willkommen!', {
headers: { 'Content-Type': 'text/plain' }
})
}
return context.next()
}
export const config = { path: '/welcome' }
Netlify Blobs — Key-Value + File Storage
import { getStore } from '@netlify/blobs'
const store = getStore('user-data')
// Store JSON
await store.setJSON('user:123', { name: 'John', preferences: { theme: 'dark' } })
// Read
const user = await store.get('user:123', { type: 'json' })
// Store files
await store.set('avatars/user-123', imageBuffer, {
metadata: { contentType: 'image/png' }
})
Forms API — Zero-Backend Forms
<form name="contact" netlify>
<input name="email" type="email" required>
<textarea name="message"></textarea>
<button type="submit">Send</button>
</form>
# Read submissions via API
curl "https://api.netlify.com/api/v1/forms/FORM_ID/submissions" \
-H "Authorization: Bearer $NETLIFY_TOKEN"
Real-World Use Case
A freelancer was paying for 4 separate services: hosting (Vercel), forms (Typeform), auth (Auth0), file storage (S3). They moved everything to Netlify: hosting + functions + forms + blobs + identity. One platform, one bill, one dashboard. Monthly cost went from $85 to $0 (free tier).
Netlify quietly became a full backend platform.
Build Smarter Data Pipelines
Need to scrape websites, extract APIs, or automate data collection? Check out my ready-to-use scrapers on Apify — no coding required.
Custom scraping solution? Email me at spinov001@gmail.com — fast turnaround, fair prices.
Top comments (0)