# Sendfox Integration via LowCodeAPI

## Overview

Sendfox is an email marketing platform designed for content creators. The Sendfox API provides functionality for:

- **Authenticated User** - Get account information
- **Contact Lists** - Manage and retrieve contact lists
- **Email Campaigns** - Manage email marketing campaigns

## Base Endpoint

```
https://api.lowcodeapi.com/sendfox/
```

## Authentication

LowCodeAPI handles authentication automatically using Bearer token authentication. You only need to:

1. **Sign up** at [Sendfox](https://sendfox.com) to get your API Key
2. **Connect your account** in the LowCodeAPI dashboard
3. **Use your `api_token`** in all requests

The `api_token` is your LowCodeAPI authentication token. LowCodeAPI will automatically:
- Fetch your Sendfox API key
- Apply it to each request as a Bearer token

**Auth Type**: Bearer Token

## API Categories

- **Marketing Email** - Email marketing and campaigns

## Common Endpoints

### Category: Authenticated User

#### Get User Information

**Method**: `GET` | **LowCodeAPI Path**: `/me`

**Full URL**:
```
https://api.lowcodeapi.com/sendfox/me?api_token={api_token}
```

**Description**: Get information for the authenticated user.

**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/sendfox/me?api_token=YOUR_API_TOKEN"
```

**Official Documentation**: [Get User](https://help.sendfox.com/article/278-endpoints)

---

### Category: Contact

#### Get Contact Lists

**Method**: `GET` | **LowCodeAPI Path**: `/lists`

**Full URL**:
```
https://api.lowcodeapi.com/sendfox/lists?api_token={api_token}
```

**Description**: Get paginated contact lists.

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number for pagination |

**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/sendfox/lists?page=1&api_token=YOUR_API_TOKEN"
```

**Official Documentation**: [Contact Lists](https://help.sendfox.com/article/278-endpoints)

---

## Usage Examples

### Example 1: Get Account Information

Retrieve user account details:

```bash
# Get authenticated user information
# No ID needed - returns current user info
curl -X GET "https://api.lowcodeapi.com/sendfox/me?api_token=YOUR_API_TOKEN"
```

### Example 2: Browse Contact Lists

Get all contact lists:

```bash
# Get first page of contact lists
# No ID needed - lists all contacts
curl -X GET "https://api.lowcodeapi.com/sendfox/lists?page=1&api_token=YOUR_API_TOKEN"

# Get second page
curl -X GET "https://api.lowcodeapi.com/sendfox/lists?page=2&api_token=YOUR_API_TOKEN"
```

### Example 3: Complete Workflow

Combine user info and contact lists:

```bash
# Step 1: Get user information
# No ID needed - returns current user
curl -X GET "https://api.lowcodeapi.com/sendfox/me?api_token=YOUR_API_TOKEN"

# Step 2: Get all contact lists
# No ID needed - lists all contacts
curl -X GET "https://api.lowcodeapi.com/sendfox/lists?api_token=YOUR_API_TOKEN"
```

## Complete Endpoint Reference

For a complete list of all 2 endpoints and their parameters, refer to:

- **OpenAPI Definition**: https://backend.lowcodeapi.com/sendfox/definition
- **Official Sendfox Documentation**: https://help.sendfox.com/article/278-endpoints

## Rate Limits & Best Practices

- **Rate Limit**: Refer to your Sendfox plan for rate limits
- **Best Practices**:
  - Implement pagination for large contact lists
  - Cache user information to reduce API calls
  - Use contact lists for targeted campaigns

## Error Handling

All responses are wrapped in a `data` key:
```json
{
  "data": {
    // Actual response from Sendfox
  }
}
```

Common errors:
- **401**: Invalid API key
- **429**: Rate limit exceeded