-
-
Notifications
You must be signed in to change notification settings - Fork 0
Notes
Create, update, list, and delete notes in Teamleader Focus.
The Notes resource lets you attach text notes to entities in Teamleader. Notes support pagination and optional user notifications on creation.
info() is not supported and throws a BadMethodCallException if called β use list() with a subject filter instead. Deletion is supported (since v1.2.8) via delete().
notes
| Capability | Supported |
|---|---|
| Pagination | β Supported |
| Filtering | β Supported (subject filter only) |
| Sorting | β Not supported |
| Sideloading | β Not supported |
| Creation | β Supported |
| Update | β Supported |
| Deletion | β Supported |
Note on
info(): ThrowsBadMethodCallException. Uselist()with a subject filter instead.
Returns notes for a specific subject. The subject filter is the only supported filter β it must include both type and id. An InvalidArgumentException is thrown for an unrecognised subject type.
use McoreServices\TeamleaderSDK\Facades\Teamleader;
// Notes for a company
$notes = Teamleader::notes()->list([
'subject' => ['type' => 'company', 'id' => 'company-uuid'],
]);
// With pagination
$notes = Teamleader::notes()->list(
['subject' => ['type' => 'deal', 'id' => 'deal-uuid']],
['page_size' => 50, 'page_number' => 1]
);Creates a note. Validates all fields before sending the request.
Required fields:
| Field | Type | Description |
|---|---|---|
subject |
array | Object with type and id
|
subject.type |
string | Subject type β see Subject Types |
subject.id |
string | Subject UUID |
content |
string | Note text β must not be empty |
Optional fields:
| Field | Type | Description |
|---|---|---|
notify |
array | Users to notify β each entry must be ['type' => 'user', 'id' => '...']
|
notifyonly supportstype: userβ passing any other type throwsInvalidArgumentException.
$note = Teamleader::notes()->create([
'subject' => ['type' => 'company', 'id' => 'company-uuid'],
'content' => 'Follow-up call scheduled for Friday.',
]);
// Attach a note to a meeting (subject type added in v1.2.8)
$note = Teamleader::notes()->create([
'subject' => ['type' => 'meeting', 'id' => 'meeting-uuid'],
'content' => 'Client confirmed budget.',
]);
// With user notifications
$note = Teamleader::notes()->create([
'subject' => ['type' => 'deal', 'id' => 'deal-uuid'],
'content' => 'Contract signed β moving to onboarding.',
'notify' => [
['type' => 'user', 'id' => 'user-uuid-1'],
['type' => 'user', 'id' => 'user-uuid-2'],
],
]);Updates an existing note. The ID is merged into the request body before posting to notes.update.
content is optional on update but must be non-empty if provided.
Teamleader::notes()->update('note-uuid', [
'content' => 'Updated note content.',
]);Deletes a note (notes.delete). Validates the UUID; returns an empty result (HTTP 204). Added in v1.2.8.
Teamleader::notes()->delete('note-uuid');| Method | Equivalent |
|---|---|
forSubject(string $type, string $id, array $options = []) |
list(['subject' => [...]], $options) with type validation |
forCompany(string $id, array $options = []) |
forSubject('company', $id, $options) |
forContact(string $id, array $options = []) |
forSubject('contact', $id, $options) |
forDeal(string $id, array $options = []) |
forSubject('deal', $id, $options) |
$notes = Teamleader::notes()->forCompany('company-uuid');
$notes = Teamleader::notes()->forDeal('deal-uuid');
$notes = Teamleader::notes()->forSubject('nextgenProject', 'project-uuid');| Method | Equivalent |
|---|---|
createForSubject(string $type, string $id, string $content, array $notify = []) |
create([...]) with type validation |
createForCompany(string $id, string $content, array $notify = []) |
createForSubject('company', ...) |
createForContact(string $id, string $content, array $notify = []) |
createForSubject('contact', ...) |
createForDeal(string $id, string $content, array $notify = []) |
createForSubject('deal', ...) |
Teamleader::notes()->createForCompany('company-uuid', 'Meeting notes.');
Teamleader::notes()->createForDeal(
'deal-uuid',
'Urgent: customer requesting callback.',
[['type' => 'user', 'id' => 'user-uuid']]
);$types = Teamleader::notes()->getAvailableSubjectTypes();The subject type is validated before the request is sent. An InvalidArgumentException is thrown for any value not in this list.
| Type | Description |
|---|---|
company |
Company |
contact |
Contact |
creditNote |
Credit note |
deal |
Deal |
invoice |
Invoice |
meeting |
Meeting (added v1.2.8) |
nextgenProject |
Project (v2) |
product |
Product |
project |
Project (legacy) |
quotation |
Quotation |
subscription |
Subscription |
[
'data' => [
[
'id' => 'note-uuid',
'author' => ['type' => 'user', 'id' => 'user-uuid'],
'subject' => ['type' => 'company', 'id' => 'company-uuid'],
'content' => 'Follow-up call scheduled.',
'created_at' => '2025-03-10T09:15:00+00:00',
'updated_at' => '2025-03-10T09:15:00+00:00',
],
],
'meta' => ['page' => ['size' => 20, 'number' => 1], 'matches' => 4],
]['data' => ['type' => 'note', 'id' => 'note-uuid']]delete() returns an empty result (HTTP 204).
use BadMethodCallException;
use InvalidArgumentException;
use McoreServices\TeamleaderSDK\Exceptions\TeamleaderException;
// Invalid subject type β thrown before the request
try {
$notes = Teamleader::notes()->forSubject('opportunity', 'uuid'); // not a valid type
} catch (InvalidArgumentException $e) {
// "Invalid subject type 'opportunity'. Available types: company, contact, ..."
}
// Invalid notify type β thrown before the request
try {
Teamleader::notes()->create([
'subject' => ['type' => 'deal', 'id' => 'deal-uuid'],
'content' => 'Update.',
'notify' => [['type' => 'team', 'id' => 'team-uuid']], // only 'user' is valid
]);
} catch (InvalidArgumentException $e) {
// 'Only user notifications are supported'
}
// info() β always throws
try {
Teamleader::notes()->info('note-uuid');
} catch (BadMethodCallException $e) {
// Use list() with subject filter instead
}Last Updated: August 2026 β’ SDK Version: 2.2.2 β’ Made with β€οΈ by MCore Services
- Departments
- Users
- Teams
- Custom Fields
- Work Types
- Document Templates
- Currencies
- Notes
- Email Tracking
- Closing Days
- Day Off Types
- Days Off
- User Schedules
- Invoices
- Credit Notes
- Subscriptions
- Payment Methods
- Payment Terms
- Tax Rates
- Withholding Tax Rates
- Commercial Discounts
Next Gen Projects
Legacy Projects