Motia makes building REST APIs simple with HTTP triggers. Every API endpoint is a Step with automatic request validation, type-safe responses, and built-in observability.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/motiadev/motia/llms.txt
Use this file to discover all available pages before exploring further.
Creating your first API endpoint
Create an API endpoint by defining a Step with an HTTP trigger:Building a REST API with validation
Here’s a complete example building a pet store API with request validation and multiple endpoints:Handling different HTTP methods
Create CRUD endpoints with different HTTP methods:Response schemas and validation
Define multiple response schemas for different status codes:Query parameters and path params
Access query parameters and path parameters from the request:Error handling
Handle errors gracefully with proper HTTP status codes:Related concepts
HTTP triggers
Learn about HTTP trigger configuration
Context API
Access request data and context
Background jobs
Process work asynchronously
State management
Store and retrieve data