expo-api-routes

Create and manage secure Expo Router API routes for EAS Hosting.

Updated Jan 19, 2026
One-click install
npx skills add https://github.com/dcoon/kbms --skill expo-api-routes-dcoon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-api-routes
Source: https://github.com/dcoon/kbms/tree/main/.gemini/skills/expo-api-routes
Command: npx skills add https://github.com/dcoon/kbms --skill expo-api-routes-dcoon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guideline helps developers build secure, well-structured API routes for Expo Router using EAS Hosting, reducing the risk of exposed secrets and misconfigurations in server-side logic.

Core Features & Use Cases

  • File Structure: API routes live in the app directory with +api.ts suffix and support for dynamic routes.
  • Basic API Route patterns: GET, POST, PUT, DELETE with example collections and responses.
  • Request Handling & Environment: Guidance on query parameters, headers, JSON bodies, and managing environment variables securely.
  • Deployment & Runtime: Instructions for local testing and deploying API routes to EAS Hosting (Cloudflare Workers) with best practices.
  • Client Integration: How to call these routes from client code and handle responses.

Quick Start

Create a new API route under app/api with the +api.ts suffix and test it locally.

Frequently Asked Questions about expo-api-routes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create secure API routes in Expo Router?

To create secure API routes in Expo Router, you add files with the +api.ts suffix within the app directory. This structure supports dynamic routing and enforces secure key handling, input validation, and proper HTTP status codes for your server-side logic.

Can I use Expo Router API routes for database operations and webhooks?

Yes, Expo Router API routes support database operations and webhook endpoints. They handle request processing including query parameters, headers, and JSON bodies, while securely managing environment variables for your server-side application logic.

How do I test Expo Router API routes locally before deploying?

You can test Expo Router API routes locally before deploying by running the local development server. This allows you to verify request handling, validate client integration, and ensure environment variables are configured correctly prior to EAS Hosting deployment.

Does EAS Hosting support server-side secrets for Expo API routes?

Yes, EAS Hosting supports server-side secrets for Expo API routes. It enforces secure key handling and environment configuration, ensuring sensitive data and database operations remain protected within the Cloudflare Workers runtime.

What is the best way to handle HTTP requests in Expo Router?

The best way to handle HTTP requests in Expo Router is by implementing GET, POST, PUT, and DELETE patterns within your +api.ts files. This approach ensures proper request parsing, input validation, and correct HTTP status codes for client integration.

Why am I getting misconfiguration errors with my Expo API routes?

Misconfiguration errors with Expo API routes often stem from exposed secrets or improper environment variable setup. Following structured guidelines for secure key handling, input validation, and proper environment configuration reduces these server-side logic risks.