# Svix Integration API

API for managing Svix webhook integrations

**Version:** 1.0.0

## Overview

### Base URLs

- **Production server**: `https://sv.api.repzo.me`

- **Staging server**: `https://staging.sv.api.repzo.me`

### API Categories

- **Svix Integration**: Operations related to Svix webhook integration management

## Authentication

This API uses the following authentication methods:

- **ApiKeyAuth**

## Endpoints

### `/svix-integration`

#### GET /svix-integration

**Summary:** Get all Svix integration records

**Description:** Retrieve a list of all Svix integration records with optional filtering and pagination

**Tags:** Svix Integration

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `limit` | query | integer | No | Maximum number of records to return |

| `offset` | query | integer | No | Number of records to skip for pagination |

| `sort` | query | string | No | Field to sort by |

| `order` | query | string | No | Sort order (asc or desc) |

| `filter` | query | string | No | Filter conditions in JSON format |

| `search` | query | string | No | Search term for text fields |

##### Responses

**200** - List of Svix integration records retrieved successfully

Content-Type: `application/json`

**400** - Bad request

**401** - Unauthorized

**500** - Internal server error

---

#### POST /svix-integration

**Summary:** Create a new Svix integration

**Description:** Create a new Svix integration with the provided data

**Tags:** Svix Integration

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Svix integration created successfully

Content-Type: `application/json`

**400** - Bad request

**401** - Unauthorized

**500** - Internal server error

---

### `/svix-integration/{id}`

#### GET /svix-integration/{id}

**Summary:** Get Svix integration by ID

**Description:** Retrieve a specific Svix integration by its ID

**Tags:** Svix Integration

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | Svix integration ID |

##### Responses

**200** - Svix integration retrieved successfully

Content-Type: `application/json`

**404** - Svix integration not found

**401** - Unauthorized

**500** - Internal server error

---

#### PUT /svix-integration/{id}

**Summary:** Update Svix integration

**Description:** Update an existing Svix integration with new data

**Tags:** Svix Integration

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | Svix integration ID |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Svix integration updated successfully

Content-Type: `application/json`

**400** - Bad request

**404** - Svix integration not found

**401** - Unauthorized

**500** - Internal server error

---

#### DELETE /svix-integration/{id}

**Summary:** Delete Svix integration

**Description:** Delete an existing Svix integration

**Tags:** Svix Integration

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | Svix integration ID |

##### Responses

**200** - Svix integration deleted successfully

Content-Type: `application/json`

**404** - Svix integration not found

**401** - Unauthorized

**500** - Internal server error

---

## Data Models

### SvixIntegration

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `_id` | string | No | Unique identifier for the Svix integration |

| `name` | string | Yes | Name of the integration |

| `description` | string | No | Description of the integration |

| `applicationId` | string | Yes | Svix application ID |

| `endpointUrl` | string | Yes | Webhook endpoint URL |

| `eventTypes` | array | No | List of event types to subscribe to |

| `secret` | string | No | Webhook secret for signature verification |

| `isActive` | boolean | No | Whether the integration is active |

| `metadata` | object | No | Additional metadata |

| `createdAt` | string | No | Record creation timestamp |

| `updatedAt` | string | No | Record last update timestamp |

### SvixIntegrationInput

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `name` | string | Yes | Name of the integration |

| `description` | string | No | Description of the integration |

| `applicationId` | string | Yes | Svix application ID |

| `endpointUrl` | string | Yes | Webhook endpoint URL |

| `eventTypes` | array | No | List of event types to subscribe to |

| `secret` | string | No | Webhook secret for signature verification |

| `isActive` | boolean | No | Whether the integration is active |

| `metadata` | object | No | Additional metadata |

## TypeScript Usage

See [svix-integration-examples.md](./svix-integration-examples.md) for detailed TypeScript usage examples.
