Apply a macro to a ticket by hand
Run every macro action against the ticket as a single logical step.
/v1/macros/{macro_id}/apply/{ticket_id}Editor- Operation id
- apply_macro
- Access
- A viewer is refused.
/v1/macros/{macro_id}/apply/{ticket_id}Run every macro action against the ticket as a single logical step.
Replies / internal notes become ticket_events rows. set_status / set_priority update the tickets row. add_tag appends to tickets.tags.
The actions themselves are executed by macro_engine, which is the same
code a triggered firing runs (SPEC §8b). This route contributes the two
things a trigger has no use for: it resolves a human actor, and it answers
404 for a macro that is missing, disabled or another workspace's.
Tenancy: the request is scoped to one workspace, and the credential presented is what selects it. A caller with no membership in that workspace is refused with 404, which is indistinguishable from a workspace that does not exist.
Authorisation: editor, admin or owner. A viewer receives 403 insufficient_role.
Access: Authorization: Bearer carrying either a realm access token or an API key. A key must hold the helpdesk-ops:write scope, and the workspace role of the person who owns it must meet the floor above.
A realm-issued access token, presented as Authorization: Bearer <token>. It acts as the person who signed in, and every operation resolves their workspace role live from the membership record.
In: header
Path Parameters
uuiduuidResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/macros/497f6eca-6276-4993-bfeb-53cbbbba6f08/apply/497f6eca-6276-4993-bfeb-53cbbbba6f08"{}