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

# Integrations

> API endpoints for managing account integrations and form integration attachments.

Integrations have two layers via the API — account-level integrations and per-form attachments. See [How integrations work](/integrations/overview) for the conceptual overview.

***

## Account integrations

### List integrations

```
GET /api/integrations/
```

Returns all integrations on the account.

### List by type

```
GET /api/integrations/{type}/
```

Filter by a specific integration type (e.g. `webhook`, `slack`, `hubspot`).

### Create an integration

```
POST /api/integrations/{type}/
```

**Request body**

```json theme={null}
{
  "name": "Production webhook",
  "config": {
    "url": "https://example.com/hooks/feedal",
    "verify_ssl": true
  }
}
```

Config fields vary by integration type. See the individual integration pages for required fields.

### Update an integration

```
PATCH /api/integrations/{type}/{id}/
```

Update `name` or `config` fields. Secret fields (API keys, tokens) are never returned in responses — send the new value to update, or omit the field to leave it unchanged.

### Delete an integration

```
DELETE /api/integrations/{type}/{id}/
```

Permanently deletes the integration and detaches it from all forms. Returns `204 No Content`.

### Test an integration

```
POST /api/integrations/{type}/{id}/test/
```

Fires a test delivery immediately. Returns the result:

```json theme={null}
{
  "success": true,
  "response_code": 200,
  "duration_ms": 312,
  "error_message": null
}
```

### Get OAuth connect URL

```
GET /api/integrations/{type}/connect/
```

For OAuth integrations (`hubspot`, `pipedrive`, `google_sheets`). Returns the authorisation URL to redirect the user to:

```json theme={null}
{
  "url": "https://app.hubspot.com/oauth/authorize?client_id=..."
}
```

### Regenerate webhook secret

```
PUT /api/integrations/webhook/{id}/secret/
```

Generates a new HMAC secret for the webhook. Returns the new value:

```json theme={null}
{
  "secret_key": "new_secret_value"
}
```

***

## Delivery log

### List deliveries

```
GET /api/integrations/{type}/{id}/deliveries/
```

Returns the delivery history for an integration.

**Query parameters**

| Parameter   | Description                           |
| ----------- | ------------------------------------- |
| `status`    | `success` or `error`                  |
| `event`     | Event name (e.g. `session.completed`) |
| `from_date` | ISO date — deliveries on or after     |
| `to_date`   | ISO date — deliveries on or before    |
| `page`      | Page number                           |

### Get delivery detail

```
GET /api/integrations/{type}/{id}/deliveries/{delivery_id}/
```

Returns the full delivery record including request body and response body.

### Retry a delivery

```
POST /api/integrations/{type}/{id}/deliveries/{delivery_id}/retry/
```

Queues an immediate re-delivery with the original payload. Returns:

```json theme={null}
{
  "queued": true
}
```

***

## Form integrations

### List form integrations

```
GET /api/v2/form/{slug}/integrations/
```

Returns all integrations attached to a specific form.

### Attach an integration

```
POST /api/v2/form/{slug}/integrations/
```

**Request body**

```json theme={null}
{
  "integration_id": "uuid",
  "events": ["session.completed"]
}
```

### Update a form integration

```
PATCH /api/v2/form/{slug}/integrations/{id}/
```

**Request body** (any subset)

```json theme={null}
{
  "is_enabled": false,
  "events": ["session.completed", "session.started"],
  "notify_on_failure": true
}
```

### Detach an integration

```
DELETE /api/v2/form/{slug}/integrations/{id}/
```

Removes the integration from this form. The account-level integration is not deleted. Returns `204 No Content`.

***

## Next steps

<CardGroup cols={2}>
  <Card title="Webhook" icon="webhook" href="/integrations/webhook">
    Webhook payload format and signature verification.
  </Card>

  <Card title="How integrations work" icon="circle-info" href="/integrations/overview">
    Event model, delivery log, and retry logic.
  </Card>
</CardGroup>
