# Get agency feed

Get agency feed is a read in the HeadHoncho API. How the workspace sends closed jobs to its agency: the webhook address, the daily file, whether it is on, and the last tries.

Page: https://headhoncho.app/docs/api/get_agency_feed | Part of the HeadHoncho API docs: https://headhoncho.app/docs/api | Machine-readable: https://headhoncho.app/docs/api/openapi.json | Everything in one file: https://headhoncho.app/docs/api/llms-full.txt

## The request

Reference for **Get agency feed**, HeadHoncho API v1. It is a read, sent to the base address `https://api.headhoncho.app`.

`GET /api/v1/agency/feed`

The key needs the **Company settings** area at **read**. An answered call costs 1 credit; a refusal costs nothing. See [credits](https://headhoncho.app/docs/api/errors#credits).

Send your key as `Authorization: Bearer hh_live_...`. See [API keys](https://headhoncho.app/docs/api/keys).

## Parameters

This call takes no parameters.

## Try it with your key

Paste your key and change the values. The box builds the call as a cURL line and a fetch line, ready to copy. It never sends anything itself.

Paste your key on the web page and it fills a cURL line and a fetch line with your key and the example values. The page never sends the key anywhere. The same lines with a placeholder key are under Examples below.

## What comes back

feed (webhook_url, webhook_secret_hint, api_token_hint, daily_to, daily_hour, enabled, changed_at), columns and keys of the rows it sends, deliveries (the last 50 webhook tries: id, job_id, ticket, event_kind, status, attempt, response_code, error, attempted_at) and exports (the last 14 daily files). Secrets are never shown, only their last characters.

It never changes a record. It only reads the companies the key reaches.

## Every field in the answer

Types are read from the example answer. Money is a plain number in the company's currency. A time carries its offset from UTC (`Z` is UTC). Ids are opaque text. A field with no line of its own here has its name spelled out; the common fields mean the same on every page.

| Field | Type | Meaning |
| --- | --- | --- |
| `feed` | object | The feed. |
| `feed.webhook_url` | text | The webhook url. |
| `feed.webhook_secret_hint` | text | The webhook secret hint. |
| `feed.api_token_hint` | text | The api token hint. |
| `feed.daily_to` | text | The daily to. |
| `feed.daily_hour` | whole number | The daily hour. |
| `feed.enabled` | true or false | The enabled. |
| `feed.changed_at` | time (ISO 8601, with offset) | When it was changed. Carries its offset from UTC; `Z` is UTC. |
| `date_format` | text | The date format. |
| `event` | text | The kind of event, as a code. |
| `columns` | list of text | The columns. |
| `keys` | list of text | The keys. |
| `deliveries` | list of objects | The deliveries. |
| `deliveries[].id` | id (text) | The id of this record. Ids are opaque text: keep them exactly as given. |
| `deliveries[].job_id` | id (text) | The id of the job. |
| `deliveries[].ticket` | whole number | The job number the ticket shows. |
| `deliveries[].event_kind` | text | The event kind. |
| `deliveries[].status` | text | The job status. |
| `deliveries[].attempt` | whole number | The attempt. |
| `deliveries[].response_code` | whole number | The response code. |
| `deliveries[].error` | text | The error. |
| `deliveries[].attempted_at` | time (ISO 8601, with offset) | When it was attempted. Carries its offset from UTC; `Z` is UTC. |
| `exports` | list of objects | The exports. |
| `exports[].id` | id (text) | The id of this record. Ids are opaque text: keep them exactly as given. |
| `exports[].sent_to` | text | The sent to. |
| `exports[].period_key` | date (YYYY-MM-DD) | The period key. |
| `exports[].rows` | whole number | The rows. |
| `exports[].status` | text | The job status. |
| `exports[].error` | text | The error. |
| `exports[].sent_at` | time (ISO 8601, with offset) | When the sent happened. Carries its offset from UTC; `Z` is UTC. |

## Owners and admins only

The feed belongs to the whole workspace, as in the app, where only an owner or an admin opens it. The key must reach every company.

## Errors that apply

| Code | Status | What it means |
| --- | --- | --- |
| [`missing_key`](https://headhoncho.app/docs/api/errors#missing_key) | 401 | Send your key as Authorization: Bearer hh_live_... |
| [`unknown_key`](https://headhoncho.app/docs/api/errors#unknown_key) | 401 | That key is not one we issued, or it was revoked. |
| [`no_access`](https://headhoncho.app/docs/api/errors#no_access) | 403 | This credential does not reach that. Ask the person who made it for access. |
| [`no_credits`](https://headhoncho.app/docs/api/errors#no_credits) | 402 | Out of credits. Top up on Settings › Credits, or turn on auto top-up. |

## Related

- [List ad accounts](https://headhoncho.app/docs/api/list_ad_accounts): The ad accounts and call tracking each company has connected, and how each one is doing.
- [List campaigns](https://headhoncho.app/docs/api/list_campaigns): Spend by campaign for a range, with the calls, leads, lead cost, revenue and profit each one produced, and the revenue that could not be placed.
- [List agency jobs](https://headhoncho.app/docs/api/list_agency_jobs): The agency's jobs feed on a key: one row per job that opened or closed in the range, in the agency's sixteen columns, a page at a time.
- The same records in the app: [Settings](https://headhoncho.app/docs/settings).
- How the API fits together: [the model](https://headhoncho.app/docs/api/model), [API keys](https://headhoncho.app/docs/api/keys), [errors](https://headhoncho.app/docs/api/errors) and [the MCP server](https://headhoncho.app/docs/api/mcp).

## Examples

### Answer

```json
{
  "feed": {
    "webhook_url": "https://agency.example.com/hooks/headhoncho",
    "webhook_secret_hint": "...a91f",
    "api_token_hint": "...7c20",
    "daily_to": "files@agency.example.com",
    "daily_hour": 6,
    "enabled": true,
    "changed_at": "2026-10-12T15:04:10Z"
  },
  "date_format": "YYYY-MM-DD HH:MM",
  "event": "job.closed",
  "columns": [
    "Ticket",
    "Status",
    "Customer phone (E.164)"
  ],
  "keys": [
    "ticket",
    "status",
    "customer_phone"
  ],
  "deliveries": [
    {
      "id": "dlv_31aa",
      "job_id": "job_1138",
      "ticket": 1138,
      "event_kind": "job.closed",
      "status": "sent",
      "attempt": 1,
      "response_code": 200,
      "error": "",
      "attempted_at": "2026-10-16T11:41:02Z"
    }
  ],
  "exports": [
    {
      "id": "exp_90b2",
      "sent_to": "files@agency.example.com",
      "period_key": "2026-10-25",
      "rows": 12,
      "status": "sent",
      "error": "",
      "sent_at": "2026-10-26T11:00:03Z"
    }
  ]
}
```

### cURL

```bash
curl "https://api.headhoncho.app/api/v1/agency/feed" \
  -H "Authorization: Bearer hh_live_..."
```

### Python

```python
import requests

response = requests.get(
    "https://api.headhoncho.app/api/v1/agency/feed",
    headers={"Authorization": "Bearer hh_live_..."},
)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.headhoncho.app/api/v1/agency/feed", {
  headers: { Authorization: "Bearer hh_live_..." },
});
const data = await response.json();
console.log(data);
```

### Your AI

```text
Tool: get_agency_feed
Arguments: none
Access: read on Company settings
Hints: readOnly=true, destructive=false, idempotent=true, openWorld=false
Try asking: "Using HeadHoncho, get agency feed."
```
