Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mbnoimi's avatar

Can I use Jetstream with RESTful API?

Hi,

This is my first post as I'm still a newbie in Laravel (forgive my silly questions)

Jetstream offers marvelous potentials for fullstack projects, but the docs don't mention anything about RESTful API. I want to create my webapp with mobile app too.

Can I build my webapp using Jetstream as a boilerplate with RESTful API support?

I can see already-built punch of controllers but api.php practically is empty! Do I've to reconstruct all the controllers from scratch for enabling RESTful API in Jetstream project?

0 likes
4 replies
jlrdw's avatar
jlrdw
Best Answer
Level 75

Please study the documentation on Jetstream and Sanctum, it's all over the documentation about an API.

Also there seems to be plenty of tutorials, one is:

https://www.twilio.com/blog/build-restful-api-php-laravel-sanctum

Plenty of others on web.

Also the introduction page of jetstream states:

API via Laravel Sanctum

Jetstream is not a language, it scaffolds this stuff, like livewire, Inertia, etc.

2 likes
mbnoimi's avatar

Jetstream states:

Laravel Jetstream is a beautifully designed application starter kit for Laravel and provides the perfect starting point for your next Laravel application. Jetstream provides the implementation for your application's login, registration, email verification, two-factor authentication, session management, API via Laravel Sanctum , and optional team management features.

Does it mean I can use it as a starter kit for building my RESTful API because it's already uses Sanctum ? Instead of creating a new Laravel project from scratch

Jetstream is not a language,

I never said that! I said:

Can I build my webapp using Jetstream as a boilerplate with RESTful API support?

mbnoimi's avatar

I read more about Laravel Breeze and I wonder; Which one is the best choice for webapp with RESTful API support?

Jetstream comes with Sanctum and Breeze comes with minimal authentication both of them are starter kits!

martinbean's avatar

@mbnoimi Jetstream is a UI starter kit. It doesn’t have API endpoints as it’s not meant to be used as an API.

If you want API authentication, then use a more appropriate package such as Sanctum or Passport.

Please or to participate in this conversation.