---
title: "Subscribe an agent to a pipeline"
method: POST
path: "/v1/agents/{id}/pipelines/{jobId}"
tags: ["Agents"]
---

# Subscribe an agent to a pipeline

`POST /v1/agents/{id}/pipelines/{jobId}`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/agents/{id}/pipelines/{jobId}`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Subscribes the agent to the pipeline's pattern signals. Requires the pipeline to have new-pattern signal emission enabled on its reducer or pattern matcher. The running pipeline picks up the subscriber automatically, without a restart.

## Path parameters

- `id` string, required
- `jobId` string, required

## Response `204`

Subscription created (or already present)

## Other responses

- `400`: The pipeline has no reducer or pattern matcher, so it can never emit
- `401`: Unauthorized
- `404`: Agent or pipeline not found
- `409`: The pipeline is not enabled to emit pattern signals

---

[API](https://skmtc.dev/grepr/apis/grepr-api.md) - [All operations](https://skmtc.dev/grepr/apis/grepr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grepr/apis/grepr-api/revisions/2a5ce03a0bf0?raw)
