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

# Notiz anlegen

POST https://api.trackleads.io/api/v1/lead-notes/create
Content-Type: application/json

Hängt eine Notiz an einen bestehenden Lead. Der Lead wird über `email`, `phone` oder `custom_id` gefunden.

Reference: https://docs.trackleads.io/api/referenz/lead-notizen/create-lead-note

## Authentication

- `X-API-Key` header (required) — API-Key des Business. Alternativ als `Authorization: Bearer <key>`.

## Request

### Body (application/json)

This endpoint expects an object.

- `note_description` (string, required) — Text der Notiz.
- `email` (StringOrStringList, optional) — E-Mail-Adresse oder Liste von E-Mail-Adressen.
- `phone` (StringOrStringList, optional) — Telefonnummer oder Liste von Telefonnummern.
- `custom_id` (string, optional) — Trackleads-Lead-ID aus einer früheren API-Antwort.

## Response

### 200

Die Notiz wurde angelegt.

- `success` (boolean, optional)
- `lead_note_id` (integer, optional)
- `lead_id` (integer, optional) — Interne ID des Leads.

## Errors

### 401 Unauthorized Error

API-Key fehlt oder ist ungültig.

- `ok` (boolean, optional)
- `error` (enum, optional)
  - Allowed values: `API_KEY_MISSING`, `API_KEY_INVALID`

### 404 Not Found Error

Zu den Kennungen wurde kein Lead gefunden.

- `message` (string, optional)
- `errors` (map from string to list of string, optional)

### 422 Unprocessable Entity Error

Validierung fehlgeschlagen, zum Beispiel "Lead not found", eine doppelte `transaction_id` oder ein unbekannter Status.

- `message` (string, optional)
- `errors` (map from string to list of string, optional)

### 429 Too Many Requests Error

Rate-Limit überschritten. Warte die Sekunden aus dem Header `Retry-After` ab.

- `any`

## Types

### StringOrStringList

- string
- list of string

## Examples

**Request**

```json
{
  "note_description": "Rückruf am Donnerstag vereinbart.",
  "email": {
    "0": "jane@example.com"
  }
}
```

**Response**

```json
{
  "success": true,
  "lead_note_id": 9012,
  "lead_id": 345224
}
```

**SDK Code**

```python Lead-Notizen_createLeadNote_example
import requests

url = "https://api.trackleads.io/api/v1/lead-notes/create"

payload = {
    "note_description": "Rückruf am Donnerstag vereinbart.",
    "email": { "0": "jane@example.com" }
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Lead-Notizen_createLeadNote_example
const url = 'https://api.trackleads.io/api/v1/lead-notes/create';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"note_description":"Rückruf am Donnerstag vereinbart.","email":{"0":"jane@example.com"}}'
};

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

```go Lead-Notizen_createLeadNote_example
package main

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

func main() {

	url := "https://api.trackleads.io/api/v1/lead-notes/create"

	payload := strings.NewReader("{\n  \"note_description\": \"Rückruf am Donnerstag vereinbart.\",\n  \"email\": {\n    \"0\": \"jane@example.com\"\n  }\n}")

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

	req.Header.Add("X-API-Key", "<apiKey>")
	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 Lead-Notizen_createLeadNote_example
require 'uri'
require 'net/http'

url = URI("https://api.trackleads.io/api/v1/lead-notes/create")

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

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"note_description\": \"Rückruf am Donnerstag vereinbart.\",\n  \"email\": {\n    \"0\": \"jane@example.com\"\n  }\n}"

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

```java Lead-Notizen_createLeadNote_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.trackleads.io/api/v1/lead-notes/create")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"note_description\": \"Rückruf am Donnerstag vereinbart.\",\n  \"email\": {\n    \"0\": \"jane@example.com\"\n  }\n}")
  .asString();
```

```php Lead-Notizen_createLeadNote_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.trackleads.io/api/v1/lead-notes/create', [
  'body' => '{
  "note_description": "Rückruf am Donnerstag vereinbart.",
  "email": {
    "0": "jane@example.com"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

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

```csharp Lead-Notizen_createLeadNote_example
using RestSharp;

var client = new RestClient("https://api.trackleads.io/api/v1/lead-notes/create");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"note_description\": \"Rückruf am Donnerstag vereinbart.\",\n  \"email\": {\n    \"0\": \"jane@example.com\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Lead-Notizen_createLeadNote_example
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "note_description": "Rückruf am Donnerstag vereinbart.",
  "email": ["0": "jane@example.com"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.trackleads.io/api/v1/lead-notes/create")! 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()
```