-
-
Notifications
You must be signed in to change notification settings - Fork 0
Tickets
Manage tickets (support cases) in Teamleader Focus.
The Tickets resource manages support cases linked to customers, with messages (replies, internal notes, imported messages) and project linkage.
Access via Teamleader::tickets().
Project linkage (v1.2.8): A ticket links to a legacy milestone via
milestone_id, or to a new-projects project viaproject_idβ either one, but not both. Passing both throwsInvalidArgumentException.No deletion: there is no delete endpoint for tickets.
tickets
| Capability | Supported |
|---|---|
| Pagination | β Supported |
| Filtering | β Supported |
| Sorting | β Not supported |
| Sideloading | β Not supported |
| Creation | β Supported |
| Update | β Supported |
| Deletion | β Not supported |
use McoreServices\TeamleaderSDK\Facades\Teamleader;
$tickets = Teamleader::tickets()->list();
$tickets = Teamleader::tickets()->list([
'relates_to' => ['type' => 'company', 'id' => 'company-uuid'],
'project_ids' => ['project-uuid'],
]);$ticket = Teamleader::tickets()->info('ticket-uuid');Required: subject, customer (type + id), ticket_status_id.
Optional: assignee (type: user), participant (customer must be a company), description, custom_fields, initial_reply (automatic | disabled), and project linkage β milestone_id or project_id (mutually exclusive).
$ticket = Teamleader::tickets()->create([
'subject' => 'Login issue',
'customer' => ['type' => 'company', 'id' => 'company-uuid'],
'ticket_status_id' => 'status-uuid',
'assignee' => ['type' => 'user', 'id' => 'user-uuid'],
'project_id' => 'project-uuid', // new-projects linkage (v1.2.8)
]);The id is injected into the request body. Accepts the same optional fields as create(), including milestone_id / project_id (nullable β pass null to unlink; still mutually exclusive).
Teamleader::tickets()->update('ticket-uuid', [
'subject' => 'Updated subject',
'ticket_status_id' => 'new-status-uuid',
]);
// Move a ticket from a legacy milestone to a new-projects project
Teamleader::tickets()->update('ticket-uuid', [
'milestone_id' => null,
'project_id' => 'project-uuid',
]);| Method | Description |
|---|---|
addReply(string $ticketId, string $body, ?string $ticketStatusId = null, array $attachments = []) |
Customer-facing reply |
addInternalMessage(string $ticketId, string $body, ...) |
Internal note |
importMessage(string $ticketId, string $body, string $sentByType, string $sentById, string $sentAt, ...) |
Import an existing message (e.g. from email) |
getMessage(string $messageId) |
Fetch a single message |
listMessages(string $ticketId, array $filters = [], array $options = []) |
List a ticket's messages |
Teamleader::tickets()->addReply('ticket-uuid', '<p>Thank you for your inquiryβ¦</p>', 'status-uuid');
Teamleader::tickets()->addInternalMessage('ticket-uuid', '<p>Internal noteβ¦</p>');
$messages = Teamleader::tickets()->listMessages('ticket-uuid');sentByType for importMessage() must be one of company, contact, user.
| Method | Filter applied |
|---|---|
forCustomer(string $type, string $id, ...) |
relates_to |
forProjects(array $projectIds, ...) |
project_ids |
byIds(array $ids, ...) |
ids |
excludeStatuses(array $statusIds, ...) |
exclude.status_ids |
$tickets = Teamleader::tickets()->forCustomer('company', 'company-uuid');
$tickets = Teamleader::tickets()->forProjects(['project-uuid-1', 'project-uuid-2']);| Filter | Type | Description |
|---|---|---|
ids |
array | Filter by ticket UUIDs |
relates_to |
object | Related entity ({type: contact|company, id}) |
project_ids |
array | Filter by project UUIDs |
exclude.status_ids |
array | Status UUIDs to exclude |
-
customer types:
contact,company -
initial_reply:
automatic,disabled -
message types:
customer,internal,thirdParty -
importMessage sent_by types:
company,contact,user
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