> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.konfidant.app/llms.txt.
> For full documentation content, see https://docs.konfidant.app/llms-full.txt.

# List organization shares

GET https://api/v1/shares

Reference: https://docs.konfidant.app/konfidant-api/list-organization-shares

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/shares:
    get:
      operationId: list-organization-shares
      summary: List organization shares
      tags:
        - ''
      parameters:
        - name: type
          in: query
          description: file or text
          required: false
          schema:
            type: string
        - name: status
          in: query
          description: active or accessed
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: string
        - name: offset
          in: query
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List organization shares_Response_200'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1SharesRequestUnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1SharesRequestForbiddenError'
servers:
  - url: https:/
  - url: https://foo.bar.com
components:
  schemas:
    ApiV1SharesGetResponsesContentApplicationJsonSchemaSharesItems:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        file_name:
          type: string
        created_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
        accessed_at:
          description: Any type
        file_size_bytes:
          type: integer
        created_by_user_id:
          type: string
      required:
        - id
        - type
        - file_name
        - created_at
        - expires_at
        - file_size_bytes
        - created_by_user_id
      title: ApiV1SharesGetResponsesContentApplicationJsonSchemaSharesItems
    ApiV1SharesGetResponsesContentApplicationJsonSchemaPagination:
      type: object
      properties:
        limit:
          type: integer
        total:
          type: integer
        offset:
          type: integer
        has_more:
          type: boolean
      required:
        - limit
        - total
        - offset
        - has_more
      title: ApiV1SharesGetResponsesContentApplicationJsonSchemaPagination
    List organization shares_Response_200:
      type: object
      properties:
        shares:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiV1SharesGetResponsesContentApplicationJsonSchemaSharesItems
        pagination:
          $ref: >-
            #/components/schemas/ApiV1SharesGetResponsesContentApplicationJsonSchemaPagination
      required:
        - shares
        - pagination
      title: List organization shares_Response_200
    GetApiV1SharesRequestUnauthorizedError:
      type: object
      properties:
        error:
          type: string
      required:
        - error
      title: GetApiV1SharesRequestUnauthorizedError
    GetApiV1SharesRequestForbiddenError:
      type: object
      properties:
        error:
          type: string
        required_scope:
          type: string
        available_scopes:
          type: array
          items:
            type: string
      required:
        - error
        - required_scope
        - available_scopes
      title: GetApiV1SharesRequestForbiddenError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## SDK Code Examples

```python List organization shares_example
import requests

url = "https://https/api/v1/shares"

querystring = {"type":"file","status":"active"}

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

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

print(response.json())
```

```javascript List organization shares_example
const url = 'https://https/api/v1/shares?type=file&status=active';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go List organization shares_example
package main

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

func main() {

	url := "https://https/api/v1/shares?type=file&status=active"

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

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

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

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

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

}
```

```ruby List organization shares_example
require 'uri'
require 'net/http'

url = URI("https://https/api/v1/shares?type=file&status=active")

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

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

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

```java List organization shares_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/api/v1/shares?type=file&status=active")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php List organization shares_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/api/v1/shares?type=file&status=active', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp List organization shares_example
using RestSharp;

var client = new RestClient("https://https/api/v1/shares?type=file&status=active");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift List organization shares_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://https/api/v1/shares?type=file&status=active")! 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()
```