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

# Create an Object Folder

POST https://api.amniscient.com/folder/detection-item
Content-Type: application/json

Create a new object folder. This folder will appear in your organization's library.

Reference: https://docs.amniscient.com/api/api-reference/create-object-folder

## Request

### Headers

- `x-api-key` (string, required) — Your organization's active API Key.

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — A descriptive title for the object folder you'd like to create.
- `organization_id` (string, required) — Your organization's unique identifier.
- `created_by` (string, optional) — The email of the user creating the folder. If this parameter is left empty, the value will default to 'API'.

## Response

### 201

201 - Folder creation successful

- `detection_item_collection_map` (DetectionItemPostResponsesContentApplicationJsonSchemaDetectionItemCollectionMap, optional) — A summary of how many objects in the folder returned are collected or uncollected.
- `id` (string, optional) — The folder id of the newly created folder within your organization's library.
- `name` (string, optional) — The folder name of the nrely created folder within your organization's library.
- `organization_id` (string, optional) — Your organization's unique identifier.
- `created_at` (datetime, optional) — The date and time at which this folder was originally created within your organization's library.
- `updated_at` (datetime, optional) — The date and time at which this folder was last updated within your organization's library.
- `deleted_at` (datetime, optional) — The date and time at which this folder was deleted within your organization's library. This value will always be null for newly created folders.
- `created_by` (string, optional) — The email of the user that originally created this folder within your organization's library. If this parameter is left empty, the value will default to 'API'.

## Errors

### 400 Bad Request Error

Invalid request

- `status` (string, optional) — A status code denoting success or failure.
- `message` (string, optional) — A message describing the successful action or error state.

### 401 Unauthorized Error

Unauthorized

- `status` (string, optional) — A status code denoting success or failure.
- `message` (string, optional) — A message describing the successful action or error state.

### 409 Conflict Error

Conflict

- `status` (string, optional) — A status code denoting success or failure.
- `message` (string, optional) — A message describing the successful action or error state.

## Types

### DetectionItemPostResponsesContentApplicationJsonSchemaDetectionItemCollectionMap

A summary of how many objects in the folder returned are collected or uncollected.

- `collected` (integer, optional) — The total number of collected objects within this folder.
- `uncollected` (integer, optional) — The total number of uncollected objects within this folder.

## Examples

**Request**

```json
{
  "name": "string",
  "organization_id": "string"
}
```

**Response**

```json
{
  "detection_item_collection_map": {
    "collected": 0,
    "uncollected": 0
  },
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "New Object Folder",
  "organization_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "created_at": "2026-01-22T17:18:24.876Z",
  "updated_at": "2026-01-22T17:18:24.876Z"
}
```

**SDK Code**

```python Object creation successful
import requests

url = "https://api.amniscient.com/folder/detection-item"

payload = {
    "name": "string",
    "organization_id": "string"
}
headers = {
    "x-api-key": "x-api-key",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Object creation successful
const url = 'https://api.amniscient.com/folder/detection-item';
const options = {
  method: 'POST',
  headers: {'x-api-key': 'x-api-key', 'Content-Type': 'application/json'},
  body: '{"name":"string","organization_id":"string"}'
};

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

```go Object creation successful
package main

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

func main() {

	url := "https://api.amniscient.com/folder/detection-item"

	payload := strings.NewReader("{\n  \"name\": \"string\",\n  \"organization_id\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "x-api-key")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Object creation successful
require 'uri'
require 'net/http'

url = URI("https://api.amniscient.com/folder/detection-item")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = 'x-api-key'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"string\",\n  \"organization_id\": \"string\"\n}"

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

```java Object creation successful
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.amniscient.com/folder/detection-item")
  .header("x-api-key", "x-api-key")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"string\",\n  \"organization_id\": \"string\"\n}")
  .asString();
```

```php Object creation successful
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.amniscient.com/folder/detection-item', [
  'body' => '{
  "name": "string",
  "organization_id": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => 'x-api-key',
  ],
]);

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

```csharp Object creation successful
using RestSharp;

var client = new RestClient("https://api.amniscient.com/folder/detection-item");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "x-api-key");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"string\",\n  \"organization_id\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Object creation successful
import Foundation

let headers = [
  "x-api-key": "x-api-key",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "string",
  "organization_id": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.amniscient.com/folder/detection-item")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```