Event subscriptions
Artifacts emits structured events for repository lifecycle changes — creates, deletes, forks, imports, and clones. By subscribing to these events through event subscriptions, you can consume them from a Worker to build commit-driven automation.
For example:
- Run custom workflows when a repository is created or imported
- Kick off a build and deploy a change when an agent pushes to a repo
- Trigger a review agent on every push
Account-level events — Subscribe to the artifacts source to receive events for any repository in your account.
Triggered when a repository is created.
Example:
{ "type": "cf.artifacts.repo.created", "source": { "type": "artifacts", "namespace": "my-namespace", "repoName": "my-repo" }, "payload": { "repoId": "0tvugavnogssnwzk", "defaultBranch": "main", "description": "My Artifacts repository", "readOnly": false, "createdAt": "2026-05-18T15:53:46.833Z", "updatedAt": "2026-05-18T15:53:46.833Z", "lastPushAt": null }, "metadata": { "accountId": "f9f79265f388666de8122cfb508d7776", "eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f", "eventSchemaVersion": 1, "eventTimestamp": "2026-05-18T15:53:48.187Z" }}Triggered when a repository is deleted.
Example:
{ "type": "cf.artifacts.repo.deleted", "source": { "type": "artifacts", "namespace": "my-namespace", "repoName": "my-repo" }, "payload": { "repoId": "0tvugavnogssnwzk", "defaultBranch": "main", "description": "My Artifacts repository", "readOnly": false, "createdAt": "2026-05-18T15:53:46.833Z", "updatedAt": "2026-05-18T15:53:46.833Z", "lastPushAt": null }, "metadata": { "accountId": "f9f79265f388666de8122cfb508d7776", "eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f", "eventSchemaVersion": 1, "eventTimestamp": "2026-05-18T15:53:59.914Z" }}Triggered when a repository is forked.
Example:
{ "type": "cf.artifacts.repo.forked", "source": { "type": "artifacts", "namespace": "source-namespace", "repoName": "source-repo" }, "payload": { "namespace": "target-namespace", "repoName": "target-repo", "repoId": "5ankv1vhl4xnw7wq", "defaultBranch": "main", "description": "Fork of source-repo", "readOnly": false, "createdAt": "2026-05-18T15:53:52.384Z", "updatedAt": "2026-05-18T15:53:54.579Z", "lastPushAt": null }, "metadata": { "accountId": "f9f79265f388666de8122cfb508d7776", "eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f", "eventSchemaVersion": 1, "eventTimestamp": "2026-05-18T15:53:54.641Z" }}Triggered when a repository is imported from an external Git remote.
Example:
{ "type": "cf.artifacts.repo.imported", "source": { "type": "artifacts", "namespace": "my-namespace", "repoName": "my-repo" }, "payload": { "repoId": "d7nd72k964cv9kub", "defaultBranch": "main", "description": null, "readOnly": false, "createdAt": "2026-05-18T15:53:54.864Z", "updatedAt": "2026-05-18T15:53:57.737Z", "lastPushAt": null, "sourceUrl": "https://github.com/example/repo.git", "branch": "main" }, "metadata": { "accountId": "f9f79265f388666de8122cfb508d7776", "eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f", "eventSchemaVersion": 1, "eventTimestamp": "2026-05-18T15:53:58.195Z" }}Repository-level events — Subscribe to the artifacts.repo source with a namespace and repo_name to receive events scoped to a single repository.
Triggered when commits are pushed to a repository.
Example:
{ "type": "cf.artifacts.repo.pushed", "source": { "type": "artifacts.repo", "namespace": "my-namespace", "repoName": "my-repo" }, "payload": { "ref": "refs/heads/main", "before": "abc123def456abc123def456abc123def456abc1", "after": "def789ghi012def789ghi012def789ghi012def7", "commits": [ { "id": "def789ghi012def789ghi012def789ghi012def7", "message": "Fix bug in authentication", "messageTruncated": false, "timestamp": "2025-05-01T02:48:57.000Z", "author": { "name": "Developer Name", "email": "developer@example.com" }, "committer": { "name": "Developer Name", "email": "developer@example.com" }, "parents": [ "abc123def456abc123def456abc123def456abc1" ] } ], "totalCommitsCount": 1, "commitsTruncated": false }, "metadata": { "accountId": "f9f79265f388666de8122cfb508d7776", "eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f", "eventSchemaVersion": 1, "eventTimestamp": "2025-05-01T02:48:57.132Z" }}Triggered when a repository is cloned.
Example:
{ "type": "cf.artifacts.repo.cloned", "source": { "type": "artifacts.repo", "namespace": "my-namespace", "repoName": "my-repo" }, "payload": {}, "metadata": { "accountId": "f9f79265f388666de8122cfb508d7776", "eventSubscriptionId": "0ab4c7b45a39491ba5da2973f3d093a6", "eventSchemaVersion": 1, "eventTimestamp": "2026-05-18T15:53:51.358Z" }}Triggered when updates are fetched from a repository.
Example:
{ "type": "cf.artifacts.repo.fetched", "source": { "type": "artifacts.repo", "namespace": "my-namespace", "repoName": "my-repo" }, "payload": {}, "metadata": { "accountId": "f9f79265f388666de8122cfb508d7776", "eventSubscriptionId": "0ab4c7b45a39491ba5da2973f3d093a6", "eventSchemaVersion": 1, "eventTimestamp": "2026-05-18T15:53:51.358Z" }}