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

# Create Opportunity Note

POST https://api.coperniq.io/v1/opportunities/{opportunity_id}/notes
Content-Type: application/json

Add a new note on an opportunity

**Note:** The `/requests/{request_id}/comments` path will continue to work until users are notified and migrated to the new naming.

Reference: https://docs.coperniq.io/api-reference/notes/create-opportunity-note

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `opportunity_id` (integer, required) — Opportunity identifier

### Body (application/json)

This endpoint expects a NoteCreate.

- `body` (string, required) — Note text content. To mention (@) a user, team, or AI agent, embed a mention token directly in the body string using the format `[Display Name|~id:USER_ID]`. The display-name portion is cosmetic; the trailing token is what drives the mention. A valid mention creates a feed notification (and downstream channels) for the mentioned recipient(s). Supported tokens: - User: `[Display Name|~id:USER_ID]` — e.g. `Please review [Nicolaus Copernicus|~id:99001]` - Team: `[Team Name|~team:TEAM_ID]` — notifies all team members - AI agent: `[Name|~agent:slug]` Note: the author is excluded from their own mention notifications, so mentioning the same user the API key authenticates as will not fire a notification. Mention a different user to test.
- `replyToId` (integer, optional) — ID of the parent note to reply to. When provided, the new note is created as a threaded reply under the specified note.
- `isPinned` (boolean, optional, default: false) — Pin the note so it stays at the top of the record's notes in the app. Defaults to `false`.

## Response

### 201

Note created successfully

- `id` (integer, required) — Note identifier
- `note` (string, required) — Note text content
- `createdAt` (string, required) — Creation timestamp
- `updatedAt` (string, required) — Last update timestamp
- `isPinned` (boolean, required) — Whether the note is pinned.
- `pinnedAt` (string, required, nullable) — When the note was pinned. `null` when the note is not pinned.

## Examples

**Request**

```json
{
  "body": "Please review [Nicolaus Copernicus|~id:99001]"
}
```

**Response**

```json
{
  "id": 1,
  "note": "string",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "isPinned": true,
  "pinnedAt": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.coperniq.io/v1/opportunities/1/notes"

payload = { "body": "Please review [Nicolaus Copernicus|~id:99001]" }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.coperniq.io/v1/opportunities/1/notes';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"body":"Please review [Nicolaus Copernicus|~id:99001]"}'
};

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

```go
package main

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

func main() {

	url := "https://api.coperniq.io/v1/opportunities/1/notes"

	payload := strings.NewReader("{\n  \"body\": \"Please review [Nicolaus Copernicus|~id:99001]\"\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
require 'uri'
require 'net/http'

url = URI("https://api.coperniq.io/v1/opportunities/1/notes")

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  \"body\": \"Please review [Nicolaus Copernicus|~id:99001]\"\n}"

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.coperniq.io/v1/opportunities/1/notes")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": \"Please review [Nicolaus Copernicus|~id:99001]\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.coperniq.io/v1/opportunities/1/notes', [
  'body' => '{
  "body": "Please review [Nicolaus Copernicus|~id:99001]"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.coperniq.io/v1/opportunities/1/notes");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": \"Please review [Nicolaus Copernicus|~id:99001]\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["body": "Please review [Nicolaus Copernicus|~id:99001]"] as [String : Any]

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

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