# get\_\_settings\_organization

`GET /settings/organization`

*Get Organization Settings*

Retrieve the current user's organization settings. The user must be authenticated and associated with an organization to access these settings.

#### TypeScript Client Library

```typescript
// Using the Flashback TypeScript client
import { FlashbackClient } from '@flashback/client';

const client = new FlashbackClient({ accessToken: 'your-access-token' });

// Get organization settings
try {
  const result = await client.settings.organization.get();
  console.log('Organization settings:', result);
} catch (error) {
  console.error('Failed to get organization settings:', error);
}
```

#### Code Samples

{% tabs %}
{% tab title="Shell" %}

```shell
# You can also use wget
curl -X GET https://backend.flashback.tech/settings/organization \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
```

{% endtab %}

{% tab title="HTTP" %}

```http
GET https://backend.flashback.tech/settings/organization HTTP/1.1
Host: localhost:3000
Accept: application/json
Authorization: Bearer {access-token}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://backend.flashback.tech/settings/organization',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://backend.flashback.tech/settings/organization',
  params: {
  }, headers: headers

p JSON.parse(result)
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://backend.flashback.tech/settings/organization', headers = headers)

print(r.json())
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

try {
    $response = $client->request('GET','https://backend.flashback.tech/settings/organization', array(
        'headers' => $headers,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }
```

{% endtab %}

{% tab title="Java" %}

```java
URL obj = new URL("https://backend.flashback.tech/settings/organization");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Authorization", "Bearer {access-token}");

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    req, err := http.NewRequest("GET", "https://backend.flashback.tech/settings/organization", nil)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
```

{% endtab %}
{% endtabs %}

> Example responses

> 200 Response

```json
{
  "success": true,
  "settings": {
    "defaultStorageType": "S3",
    "maxFileSize": "10GB",
    "retentionPolicy": {
      "enabled": true,
      "days": 365
    },
    "security": {
      "requireMFA": true,
      "sessionTimeout": 3600
    }
  }
}
```

> 404 Response

```json
{
  "success": false,
  "message": "User not associated with any organization"
}
```

> 500 Response

```json
{
  "success": false,
  "message": "Internal server error",
  "error": "Database connection failed"
}
```

#### Responses <a href="#get__settings_organization-responses" id="get__settings_organization-responses"></a>

| Status | Meaning                                                                    | Description                                  | Schema |
| ------ | -------------------------------------------------------------------------- | -------------------------------------------- | ------ |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)                    | Organization settings retrieved successfully | Inline |
| 404    | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)             | User not associated with organization        | Inline |
| 500    | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | Internal server error                        | Inline |

#### Response Schema <a href="#get__settings_organization-responseschema" id="get__settings_organization-responseschema"></a>

Status Code **200**

| Name       | Type    | Required | Restrictions | Description                                             |
| ---------- | ------- | -------- | ------------ | ------------------------------------------------------- |
| » success  | boolean | true     | none         | Indicates if the request was successful                 |
| » settings | object  | true     | none         | Organization settings object containing key-value pairs |

Status Code **404**

| Name      | Type    | Required | Restrictions | Description                        |
| --------- | ------- | -------- | ------------ | ---------------------------------- |
| » success | boolean | true     | none         | Always false for error responses   |
| » message | string  | true     | none         | Error message describing the issue |

Status Code **500**

| Name      | Type    | Required | Restrictions | Description                           |
| --------- | ------- | -------- | ------------ | ------------------------------------- |
| » success | boolean | true     | none         | Always false for error responses      |
| » message | string  | true     | none         | Error message describing the issue    |
| » error   | string  | false    | none         | Additional error details if available |

#### DTOs

**GetSettingsResponse**

```typescript
export interface GetSettingsResponse {
  success: boolean;
  // Using Record<string, any> for maximum flexibility - settings can contain any JSON-serializable data
  settings: Record<string, any>;
}
```

**SettingsErrorResponse**

```typescript
export interface SettingsErrorResponse {
  success: false;
  message: string;
  error?: string;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flashback.tech/support-reference/platform-api-reference/settings/get__settings_organization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
