The idea is:
Add two endpoints to the n8n public API:
- GET /api/v1/annotation-tags: list execution annotation tags (paginated, same format as GET /tags).
- POST /api/v1/annotation-tags: create an execution annotation tag by name (201 on success, 409 if the name already exists, 400 for an invalid name).
They need two new API key scopes: annotationTag:list and annotationTag:create (for owner, admin and member roles). The PUT /executions/{id}/tags endpoint stays unchanged.
My use case:
I tag executions with a ticket number (for example “API-123”) from a workflow, using the public API. PUT /executions/{id}/tags accepts only IDs of existing annotation tags. The
public API has no way to list or create these tags:
- The /tags endpoints manage workflow tags. They are a different entity, so their IDs are rejected (“Some tags not found”).
- The internal /rest/annotation-tags endpoints return 401 with an API key.
So a tag for a new ticket must first be created by hand in the UI, and the automation cannot work alone.
I think it would be beneficial to add this because:
The execution tags endpoint is already public, but it cannot be used on its own. With these two endpoints, a client with an API key can create a tag and assign it to an execution.
The change is small: the controller reuses the existing AnnotationTagService, the existing tag DTOs and the existing scopes of the internal REST API.
Any resources to support this?
- Docs for the existing endpoint: n8n API | Connect | n8n Docs
- Draft pull request with implementation and integration tests: feat(API): Add public API endpoints to list and create execution annotation tags by Kasp42 · Pull Request #41136 · n8n-io/n8n · GitHub
- A community node that needs this: https://www.npmjs.com/package/n8n-nodes-execution-tags
Are you willing to work on this?
Yes. The implementation is already in the draft pull request above.