> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pubrio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 예제: 채용 공고 추적

> company_first 및 signal_first 감지 모드를 사용한 채용 공고 모니터링의 전체 안내 — 복사 가능한 코드 포함.

이 가이드에서는 두 가지 실제 시나리오를 안내합니다. 모든 코드 블록은 복사, 붙여넣기, 실행이 가능합니다 — `YOUR_API_KEY`를 실제 키로 교체하기만 하면 됩니다.

<Tabs>
  <Tab title="기업 우선: OpenAI 추적">
    ## 시나리오: OpenAI가 새 채용을 올릴 때 모니터링

    OpenAI가 채용 공고를 올렸을 때 즉시 알림을 받고 — 엔지니어링 리더십의 연락처를 자동으로 얻고 싶은 경우입니다.

    ### 모니터 생성

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.pubrio.com/monitors/create \
        -H "Content-Type: application/json" \
        -H "pubrio-api-key: YOUR_API_KEY" \
        -d '{
          "name": "OpenAI Job Tracker",
          "detection_mode": "company_first",
          "signal_types": ["jobs"],
          "signal_filters": [
            {
              "signal_type": "jobs",
              "filters": {
                "locations": ["US"]
              }
            }
          ],
          "companies": [
            "67c4696b-b7b0-46b5-b2af-9f434543661e"
          ],
          "is_company_enrichment": true,
          "is_people_enrichment": true,
          "people_enrichment_configs": [
            {
              "max_people_to_return": 5,
              "people_contact_types": ["email-work"],
              "filters": {
                "management_levels": ["director", "vp"],
                "departments": ["master_engineering"]
              }
            }
          ],
          "destination_type": "webhook",
          "destination_config": {
            "webhook_url": "https://usewebhook.com/YOUR_WEBHOOK_ID",
            "headers": {
              "Authorization": "Bearer your-secret-token"
            }
          },
          "max_records_per_trigger": 5,
          "profile_id": 1
        }'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://api.pubrio.com/monitors/create",
          headers={
              "Content-Type": "application/json",
              "pubrio-api-key": "YOUR_API_KEY"
          },
          json={
              "name": "OpenAI Job Tracker",
              "detection_mode": "company_first",
              "signal_types": ["jobs"],
              "signal_filters": [
                  {
                      "signal_type": "jobs",
                      "filters": {
                          "locations": ["US"]
                      }
                  }
              ],
              "companies": [
                  "67c4696b-b7b0-46b5-b2af-9f434543661e"
              ],
              "is_company_enrichment": True,
              "is_people_enrichment": True,
              "people_enrichment_configs": [
                  {
                      "max_people_to_return": 5,
                      "people_contact_types": ["email-work"],
                      "filters": {
                          "management_levels": ["director", "vp"],
                          "departments": ["master_engineering"]
                      }
                  }
              ],
              "destination_type": "webhook",
              "destination_config": {
                  "webhook_url": "https://usewebhook.com/YOUR_WEBHOOK_ID",
                  "headers": {
                      "Authorization": "Bearer your-secret-token"
                  }
              },
              "max_records_per_trigger": 5,
              "profile_id": 1
          }
      )

      data = response.json()
      print(f"Monitor created: {data['data']['monitor_id']}")
      print(f"Signature: {data['data']['signature']}")
      ```

      ```javascript Node.js theme={null}
      const response = await fetch("https://api.pubrio.com/monitors/create", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "pubrio-api-key": "YOUR_API_KEY"
        },
        body: JSON.stringify({
          name: "OpenAI Job Tracker",
          detection_mode: "company_first",
          signal_types: ["jobs"],
          signal_filters: [
            {
              signal_type: "jobs",
              filters: {
                locations: ["US"]
              }
            }
          ],
          companies: [
            "67c4696b-b7b0-46b5-b2af-9f434543661e"
          ],
          is_company_enrichment: true,
          is_people_enrichment: true,
          people_enrichment_configs: [
            {
              max_people_to_return: 5,
              people_contact_types: ["email-work"],
              filters: {
                management_levels: ["director", "vp"],
                departments: ["master_engineering"]
              }
            }
          ],
          destination_type: "webhook",
          destination_config: {
            webhook_url: "https://usewebhook.com/YOUR_WEBHOOK_ID",
            headers: {
              Authorization: "Bearer your-secret-token"
            }
          },
          max_records_per_trigger: 5,
          profile_id: 1
        })
      });

      const data = await response.json();
      console.log("Monitor created:", data.data.monitor_id);
      console.log("Signature:", data.data.signature);
      ```
    </CodeGroup>

    **동작 설명:**

    * OpenAI(`companies`에 도메인 또는 LinkedIn URL로 지정)의 미국 신규 채용 공고를 모니터링
    * 기업 데이터를 보강하고 최대 5명의 디렉터/VP급 엔지니어링 담당자를 검색
    * 트리거당 최대 5개 레코드를 webhook으로 전달
    * 기타 모든 설정은 합리적인 기본값 사용(실시간 빈도, 일일 500회 상한 등)

    <Note>
      `company_first` 모드에서는 일반적으로 `companies`와 신호 필터만 필요합니다. `company_filters`는 선택 사항입니다 — 관심 목록을 더 넓은 기업 기준과 결합하고 싶을 때 두 번째 필터링 레이어를 추가합니다.
    </Note>

    ### 즉시 테스트

    예약된 스캔을 기다리지 마세요 — 수동 실행을 트리거하여 모든 것이 정상 작동하는지 확인하세요. `tried_at`에 과거 타임스탬프를 사용하여 데이터가 있는지 확인합니다(현재 시간을 사용하면 아직 새로운 신호가 나타나지 않아 0개 결과가 반환될 수 있습니다):

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.pubrio.com/monitors/process/try \
        -H "Content-Type: application/json" \
        -H "pubrio-api-key: YOUR_API_KEY" \
        -d '{
          "monitor_id": "YOUR_MONITOR_ID",
          "tried_at": "2026-01-01T00:00:00.000Z",
          "profile_id": 1
        }'
      ```
    </CodeGroup>

    <Info>
      수동 트리거는 예약 트리거와 마찬가지로 크레딧을 소비합니다. 테스트를 위한 대표적인 결과를 얻으려면 `tried_at`에 최근 과거 날짜를 사용하세요.
    </Info>

    ### 결과 확인

    몇 초 후, [usewebhook.com](https://usewebhook.com)에서 webhook URL을 확인하여 페이로드를 확인하세요. 로그를 통해서도 검증할 수 있습니다:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.pubrio.com/monitors/statistics/logs \
        -H "Content-Type: application/json" \
        -H "pubrio-api-key: YOUR_API_KEY" \
        -d '{
          "profile_id": 1,
          "monitor_id": "YOUR_MONITOR_ID",
          "page": 1,
          "per_page": 5
        }'
      ```
    </CodeGroup>

    각 로그 항목에는 상태, 신호/기업/인물 수, 크레딧 사용량, 처리 시간이 표시됩니다.
  </Tab>

  <Tab title="신호 우선: AI 채용 발견">
    ## 시나리오: AI/ML 직군을 채용하는 기업 발견

    이전에 추적했는지 여부에 관계없이, 적극적으로 AI 팀을 구축하고 있는 기업을 찾고 싶은 경우입니다. 이것은 잠재 고객 발굴 사용 사례입니다.

    ### 모니터 생성

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.pubrio.com/monitors/create \
        -H "Content-Type: application/json" \
        -H "pubrio-api-key: YOUR_API_KEY" \
        -d '{
          "name": "AI Hiring Discovery",
          "detection_mode": "signal_first",
          "signal_types": ["jobs"],
          "signal_filters": [
            {
              "signal_type": "jobs",
              "filters": {
                "titles": ["Machine Learning", "AI Engineer", "Data Scientist"],
                "locations": ["US"]
              }
            }
          ],
          "company_filters": {
            "employees": [[201, 500], [501, 1000], [1001, 5000]]
          },
          "is_company_enrichment": true,
          "is_people_enrichment": true,
          "people_enrichment_configs": [
            {
              "max_people_to_return": 3,
              "people_contact_types": ["email-work"],
              "filters": {
                "management_levels": ["founder", "c_suite", "vp"]
              }
            }
          ],
          "destination_type": "webhook",
          "destination_config": {
            "webhook_url": "https://usewebhook.com/YOUR_WEBHOOK_ID",
            "body": {
              "pipeline": "ai-prospecting"
            }
          },
          "max_records_per_trigger": 10,
          "profile_id": 1
        }'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://api.pubrio.com/monitors/create",
          headers={
              "Content-Type": "application/json",
              "pubrio-api-key": "YOUR_API_KEY"
          },
          json={
              "name": "AI Hiring Discovery",
              "detection_mode": "signal_first",
              "signal_types": ["jobs"],
              "signal_filters": [
                  {
                      "signal_type": "jobs",
                      "filters": {
                          "titles": ["Machine Learning", "AI Engineer", "Data Scientist"],
                          "locations": ["US"]
                      }
                  }
              ],
              "company_filters": {
                  "employees": [[201, 500], [501, 1000], [1001, 5000]]
              },
              "is_company_enrichment": True,
              "is_people_enrichment": True,
              "people_enrichment_configs": [
                  {
                      "max_people_to_return": 3,
                      "people_contact_types": ["email-work"],
                      "filters": {
                          "management_levels": ["founder", "c_suite", "vp"]
                      }
                  }
              ],
              "destination_type": "webhook",
              "destination_config": {
                  "webhook_url": "https://usewebhook.com/YOUR_WEBHOOK_ID",
                  "body": {
                      "pipeline": "ai-prospecting"
                  }
              },
              "max_records_per_trigger": 10,
              "profile_id": 1
          }
      )

      data = response.json()
      print(f"Monitor created: {data['data']['monitor_id']}")
      ```
    </CodeGroup>

    **동작 설명:**

    * 미국의 AI/ML 채용 공고를 스캔
    * **글로벌 기업 필터**가 결과를 중간 규모 기업(직원 201\~5,000명)으로 좁힙니다 — 이것이 신호와 기업 조건을 결합하는 힘입니다
    * 기업을 보강하고 최대 3명의 창업자/C-suite/VP 연락처를 검색
    * webhook 핸들러에서 라우팅을 위한 커스텀 `pipeline` 필드를 페이로드에 추가
    * 기본 실시간 빈도

    ### 즉시 테스트

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.pubrio.com/monitors/process/try \
        -H "Content-Type: application/json" \
        -H "pubrio-api-key: YOUR_API_KEY" \
        -d '{
          "monitor_id": "YOUR_MONITOR_ID",
          "tried_at": "2026-01-01T00:00:00.000Z",
          "profile_id": 1
        }'
      ```
    </CodeGroup>

    <Info>
      수동 트리거는 크레딧을 소비합니다. 테스트를 위한 대표적인 데이터를 얻으려면 `tried_at`에 최근 과거 날짜를 사용하세요 — 현재 시간을 사용하면 해당 순간에 새로운 신호가 나타나지 않아 0개 결과가 반환될 수 있습니다.
    </Info>

    ### 수신 내용

    [usewebhook.com](https://usewebhook.com)을 확인하세요 — 신호를 주요 구조로 하는 `signal_first` 페이로드가 표시됩니다. 루트 레벨에 `destination_config.body`의 커스텀 `pipeline` 필드가 있는 것에 주목하세요:

    ```json theme={null}
    {
      "monitor": { ... },
      "metadata": {
        "total_signals": 5,
        "total_companies": 4,
        "total_people": 10
      },
      "triggered_at": "2026-04-06T14:30:00.000Z",
      "signals": [
        {
          "signal_type": "jobs",
          "signal": { ... },
          "companies": [
            {
              "company_name": "...",
              "domain": "...",
              "company_size": 800,
              "people": [...],
              ...
            }
          ]
        },
        ...
      ],
      "pipeline": "ai-prospecting"
    }
    ```
  </Tab>
</Tabs>

***

## 실패한 전달 재시도

특정 트리거가 실패한 경우(예: webhook이 일시적으로 다운), 전체 스캔을 다시 실행하지 않고 재시도할 수 있습니다:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.pubrio.com/monitors/process/retry \
    -H "Content-Type: application/json" \
    -H "pubrio-api-key: YOUR_API_KEY" \
    -d '{
      "monitor_id": "YOUR_MONITOR_ID",
      "monitor_log_id": "THE_FAILED_LOG_ID",
      "profile_id": 1
    }'
  ```
</CodeGroup>

[통계 로그](/ko/api-reference/endpoint/monitors/statistics_logs)를 쿼리하고 `"status": "failed"` 항목을 필터링하여 `monitor_log_id`를 찾으세요.

***

## 다음 단계

<CardGroup cols={2}>
  <Card title="모범 사례" icon="star" href="/ko/developer-guides/best-practices">
    빈도, 크레딧, 재시도, 스케일링.
  </Card>

  <Card title="Webhook 설정" icon="plug" href="/ko/developer-guides/setting-up-webhooks">
    상세한 webhook 구성 및 서명 검증.
  </Card>
</CardGroup>
