---
title: 'Build an API route in less than 2 minutes.'
subtitle: 'Create your first API route by creating a table called `todos` to store tasks.'
breadcrumb: 'API Quickstart'
hideToc: true
---
Let's create our first REST route which we can query using `cURL` or the browser.
We'll create a database table called `todos` for storing tasks. This creates a corresponding API route `/rest/v1/todos` which can accept `GET`, `POST`, `PATCH`, & `DELETE` requests.
[Create a new project](/dashboard) in the Supabase Dashboard.
After your project is ready, create a table in your Supabase database. You can do this with either the Table interface or the [SQL Editor](/dashboard/project/_/sql).
```sql
-- Create a table called "todos"
-- with a column to store tasks.
create table todos (
id serial primary key,
task text
);
```
Let's turn on Row Level Security for this table and allow public access.
```sql
-- Turn on security
alter table "todos"
enable row level security;
-- Allow anonymous access
create policy "Allow public access"
on todos
for select
to anon
using (true);
```
Now we can add some data to our table which we can access through our API.
```sql
insert into todos (task)
values
('Create tables'),
('Enable security'),
('Add data'),
('Fetch data from the API');
```
Find your API URL and Keys in your Dashboard [API Settings](/dashboard/project/_/settings/api). You can now query your "todos" table by appending `/rest/v1/todos` to the API URL.
Copy this block of code, substitute `` and ``, then run it from a terminal.
```bash Terminal
curl 'https://.supabase.co/rest/v1/todos' \
-H "apikey: " \
-H "Authorization: Bearer "
```
## Bonus
There are several options for accessing your data:
### Browser
You can query the route in your browser, by appending the `anon` key as a query parameter:
`https://.supabase.co/rest/v1/todos?apikey=`
### Client libraries
We provide a number of [Client Libraries](https://github.com/supabase/supabase#client-libraries).
```js
const { data, error } = await supabase.from('todos').select()
```
<$Show if="sdk:dart">
```dart
final data = await supabase.from('todos').select('*');
```
$Show>
<$Show if="sdk:python">
```python
response = supabase.table('todos').select("*").execute()
```
$Show>
<$Show if="sdk:swift">
```swift
let response = try await supabase.from("todos").select()
```
$Show>