> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fynapse.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fynapse.app/_mcp/server.

# Get all Namespaces

GET https://api.fynapse.com/api/v1/namespaces

This endpoint retrieves a list of all Namespaces created in Fynapse.
A `namespace` is a logical set used to group `entities`.
They allow you to more easily identify an Entity, as all Entities within a namespace are unique.

Reference: https://docs.fynapse.app/api-reference/api-reference/data-model/namespaces-entities/list

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Response

### 200

OK

- `data` (list of SchemaNamespacesDataItems, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `args` (map from string to string, required)
- `detail` (string, required)
- `errors` (list of schema.ErrorItem, required)
- `instance` (string, required)
- `path` (string, required)
- `reference` (string, required)
- `status` (integer, required)
- `timestamp` (string, required)
- `title` (string, required)
- `type` (string, required)

### 401 Unauthorized Error

Authentication Error

- `args` (map from string to string, required)
- `detail` (string, required)
- `errors` (list of schema.ErrorItem, required)
- `instance` (string, required)
- `path` (string, required)
- `reference` (string, required)
- `status` (integer, required)
- `timestamp` (string, required)
- `title` (string, required)
- `type` (string, required)

### 404 Not Found Error

Not Found

- `args` (map from string to string, required)
- `detail` (string, required)
- `errors` (list of schema.ErrorItem, required)
- `instance` (string, required)
- `path` (string, required)
- `reference` (string, required)
- `status` (integer, required)
- `timestamp` (string, required)
- `title` (string, required)
- `type` (string, required)

### 429 Too Many Requests Error

Too many requests. Rate limit exceeded.

- `args` (map from string to string, required)
- `detail` (string, required)
- `errors` (list of schema.ErrorItem, required)
- `instance` (string, required)
- `path` (string, required)
- `reference` (string, required)
- `status` (integer, required)
- `timestamp` (string, required)
- `title` (string, required)
- `type` (string, required)

### 500 Server Error

Internal Server Error

- `args` (map from string to string, required)
- `detail` (string, required)
- `errors` (list of schema.ErrorItem, required)
- `instance` (string, required)
- `path` (string, required)
- `reference` (string, required)
- `status` (integer, required)
- `timestamp` (string, required)
- `title` (string, required)
- `type` (string, required)

## Types

### SchemaNamespacesDataItems

- `name` (string, required) — Name of the Namespace

### schema.ErrorItem

- `title` (string, required)
- `detail` (string, required)
- `type` (string, required)
- `path` (string, required)
- `args` (map from string to string, required)

## Examples

**Response**

```json
{
  "data": [
    {
      "name": "fynapse"
    },
    {
      "name": "custom-namespace"
    }
  ]
}
```

**SDK Code**

```python Example Namespaces
import requests

url = "https://api.fynapse.com/api/v1/namespaces"

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Example Namespaces
const url = 'https://api.fynapse.com/api/v1/namespaces';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example Namespaces
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fynapse.com/api/v1/namespaces"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example Namespaces
require 'uri'
require 'net/http'

url = URI("https://api.fynapse.com/api/v1/namespaces")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

```java Example Namespaces
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fynapse.com/api/v1/namespaces")
  .header("Authorization", "<token>.")
  .asString();
```

```php Example Namespaces
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fynapse.com/api/v1/namespaces', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

```csharp Example Namespaces
using RestSharp;

var client = new RestClient("https://api.fynapse.com/api/v1/namespaces");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift Example Namespaces
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fynapse.com/api/v1/namespaces")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```