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

# Consumers

> Register and unregister webhook consumers over the ShoulderTap HTTP API.

Registering a consumer tells ShoulderTap which kinds it handles and where to deliver answers. This endpoint registers **webhook** consumers; in-process consumers are registered through the [SDK](/consumers/sdk).

## Register a consumer

<code>POST /api/v1/consumers</code>

Body is a [ConsumerRegistration](/api/contracts). Required: `id`, `handles_kinds`, `delivery`.

```bash theme={null}
curl -X POST http://localhost:8776/api/v1/consumers \
  -H "Authorization: Bearer $SHOULDERTAP_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "my-consumer",
    "handles_kinds": ["glossary.definition", "freeform.answer"],
    "delivery": {"type": "webhook", "url": "https://my-service.example.com/shouldertap-webhook"},
    "dedup_window": "PT24H"
  }'
```

Returns `201 Created` with `{ id }`. See [Webhook consumers](/consumers/webhooks) for the event payloads your URL will receive.

<ParamField body="id" type="string" required>
  The consumer's id.
</ParamField>

<ParamField body="handles_kinds" type="array" required>
  Kinds this consumer deals with.
</ParamField>

<ParamField body="delivery" type="object" required>
  `{ "type": "webhook", "url": "..." }` for a webhook consumer.
</ParamField>

<ParamField body="dedup_window" type="string" default="P1D">
  ISO-8601 duration for deduplication.
</ParamField>

<ParamField body="auto_accept" type="boolean" default="false">
  Deliver without human review. See the [warning](/consumers/overview#auto-accept).
</ParamField>

<ParamField body="kind_schemas" type="object">
  Optional custom capture schemas per kind. See [Kinds](/api/kinds).
</ParamField>

## Unregister a consumer

<code>DELETE /api/v1/consumers/\{id}</code>

```bash theme={null}
curl -X DELETE http://localhost:8776/api/v1/consumers/my-consumer \
  -H "Authorization: Bearer $SHOULDERTAP_API_TOKEN"
```

Returns `204 No Content`.
