## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.mem0.ai/llms.txt)

Use this file to discover all available pages before exploring further.

### Example API Calls

#### Python

```python
import requests

url = "https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/"

payload = {"name": "<string>"}
headers = {
    "Authorization": "Token <api-key>",
    "Content-Type": "application/json"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
```

#### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <api-key>', 'Content-Type': 'application/json'},
  body: '{"name":"<string>"}'
};

fetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
```

#### cURL

```bash
curl --request POST \
  --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/ \
  --header 'Authorization: Token <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>"
}'
```

#### Go

```go
package main

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

func main() {

url := "https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/"

payload := strings.NewReader("{\n  \"name\": \"<string>\"\}")

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

req.Header.Add("Authorization", "Token <api-key>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

#### PHP

```php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\
  \"name\": \"<string>\"\
}",
  CURLOPT_HTTPHEADER => [
    "Authorization: Token <api-key>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

#### Unirest (Java)

```java
HttpResponse<String> response = Unirest.post("https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/")
  .header("Authorization", "Token <api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"<string>\"}")
  .asString();
```

#### Ruby

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

url = URI("https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/")

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

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

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

### API Responses

- **200** - Project created successfully.
  ```json
  {
    "message": "Project created successfully.",
    "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
  ```

- **400** - Project could not be created.
  ```json
  {
    "message": "Project could not be created."
  }
  ```

- **403** - Unauthorized to create projects in this organization.
  ```json
  {
    "message": "Unauthorized to create projects in this organization."
  }
  ```

### Authorizations

**Authorization**
- Type: string
- Location: header
- Required: Yes

API key authentication. Prefix your Mem0 API key with 'Token '. Example: 'Token your_api_key'.

### Path Parameters

- **org_id**: string (required) - Unique identifier of the organization.

### Body

Content-Type: application/json
- **name**: string (required) - Name of the project to be created.

### Response

- **200** - application/json
- **Message** example: "Project created successfully."
- **project_id**: string<uuid> - Unique identifier for the project.
