# Copy.ai Integration via LowCodeAPI

## Overview

AI-powered content generation platform for creating marketing copy, blog posts, and workflow automation

## Base Endpoint

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

## Authentication

LowCodeAPI handles authentication automatically. You only need to:

1. **Sign up** at [https://www.copy.ai](https://www.copy.ai)
2. **Get your credentials** from [https://app.copy.ai/settings/api](https://app.copy.ai/settings/api)
3. **Connect your account** in LowCodeAPI dashboard
4. **Use your `api_token`** in all requests

The `api_token` is your LowCodeAPI authentication token. LowCodeAPI will automatically:
- Fetch your Copy.ai API key
- Apply it to each request with `x-copy-ai-api-key` header

**Auth Type**: API Key (x-copy-ai-api-key header)

## API Categories

- Content Generation AI

## Common Endpoints

### Category: Webhooks

#### Register Webhook

**Method**: `POST` | **LowCodeAPI Path**: `/webhook`

**Full URL**:
```
https://api.lowcodeapi.com/copyai/webhook&api_token={api_token}
```


**Body Parameters**:

| `url` | string | Yes | The URL of the webhook endpoint. |
| `eventType` | string | Yes | The event type you want to receive notifications for. |
| `workflowId` | string | No | The workflow id you want to receive events for. |


**Example Request**:
```bash
curl -X POST "https://api.lowcodeapi.com/copyai/webhook?&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"value","eventType":"value","workflowId":"value"}'
```

**Official Documentation**: [https://docs.copy.ai/reference/register-webhook](https://docs.copy.ai/reference/register-webhook)

---

#### Get Webhook

**Method**: `GET` | **LowCodeAPI Path**: `/webhook/webhook_id`

**Full URL**:
```
https://api.lowcodeapi.com/copyai/webhook/webhook_id?webhook_id={webhook_id}&api_token={api_token}
```


**Path Parameters**:

| `webhook_id` | string | The ID of the webhook |

**Note**: Path parameters are passed in the URL path. The LowCodeAPI path uses static parameter names, and the actual values are passed as query parameters with the same names.


**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/copyai/webhook/webhook_id?webhook_id=VALUE&&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

**Official Documentation**: [https://docs.copy.ai/reference/get-webhook](https://docs.copy.ai/reference/get-webhook)

---

#### Get All Webhooks

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

**Full URL**:
```
https://api.lowcodeapi.com/copyai/webhook?...&api_token={api_token}
```


**Query Parameters**:

| `size` | number | No | Number of webhooks to include in pagination (up to 100, defaults to 10). |
| `page` | number | No | Used to specify further pages (starts at 1). |


**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/copyai/webhook?...&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

**Official Documentation**: [https://docs.copy.ai/reference/get-all-webhooks](https://docs.copy.ai/reference/get-all-webhooks)

---

#### Remove Webhook

**Method**: `DELETE` | **LowCodeAPI Path**: `/webhook/webhook_id`

**Full URL**:
```
https://api.lowcodeapi.com/copyai/webhook/webhook_id?webhook_id={webhook_id}&api_token={api_token}
```


**Path Parameters**:

| `webhook_id` | string | The ID of the webhook |

**Note**: Path parameters are passed in the URL path. The LowCodeAPI path uses static parameter names, and the actual values are passed as query parameters with the same names.


**Example Request**:
```bash
curl -X DELETE "https://api.lowcodeapi.com/copyai/webhook/webhook_id?webhook_id=VALUE&&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

**Official Documentation**: [https://docs.copy.ai/reference/remove-webhook](https://docs.copy.ai/reference/remove-webhook)

---

### Category: Workflow Runs

#### Start a Workflow Run

**Method**: `POST` | **LowCodeAPI Path**: `/workflow/workflow_id/run`

**Full URL**:
```
https://api.lowcodeapi.com/copyai/workflow/workflow_id/run?workflow_id={workflow_id}&api_token={api_token}
```


**Path Parameters**:

| `workflow_id` | string | The ID of the workflow |

**Note**: Path parameters are passed in the URL path. The LowCodeAPI path uses static parameter names, and the actual values are passed as query parameters with the same names.


**Body Parameters**:

| `startVariables` | object | Yes | A JSON object containing all start variables for your workflow. |
| `metadata` | object | No | A JSON object containing metadata to store and return with the workflow run. Defaults to { 'api': true } |


**Example Request**:
```bash
curl -X POST "https://api.lowcodeapi.com/copyai/workflow/workflow_id/run?workflow_id=VALUE&&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startVariables":"value","metadata":"value"}'
```

**Official Documentation**: [https://docs.copy.ai/reference/start-a-workflow-run](https://docs.copy.ai/reference/start-a-workflow-run)

---

#### Get Workflow Run

**Method**: `GET` | **LowCodeAPI Path**: `/workflow/workflow_id/run/run_id`

**Full URL**:
```
https://api.lowcodeapi.com/copyai/workflow/workflow_id/run/run_id?workflow_id={workflow_id}&run_id={run_id}&api_token={api_token}
```


**Path Parameters**:

| `workflow_id` | string | The ID of the workflow |
| `run_id` | string | The ID of the workflow run |

**Note**: Path parameters are passed in the URL path. The LowCodeAPI path uses static parameter names, and the actual values are passed as query parameters with the same names.


**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/copyai/workflow/workflow_id/run/run_id?workflow_id=VALUE&&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

**Official Documentation**: [https://docs.copy.ai/reference/single-workflow-run](https://docs.copy.ai/reference/single-workflow-run)

---

#### Get All Workflow Runs

**Method**: `GET` | **LowCodeAPI Path**: `/workflow/workflow_id/run`

**Full URL**:
```
https://api.lowcodeapi.com/copyai/workflow/workflow_id/run?workflow_id={workflow_id}&...&api_token={api_token}
```


**Query Parameters**:

| `size` | number | No | Number of runs to include in pagination (up to 100, defaults to 10). |
| `page` | number | No | Used to specify further pages (starts at 1). |


**Path Parameters**:

| `workflow_id` | string | The ID of the workflow |

**Note**: Path parameters are passed in the URL path. The LowCodeAPI path uses static parameter names, and the actual values are passed as query parameters with the same names.


**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/copyai/workflow/workflow_id/run?workflow_id=VALUE&...&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

**Official Documentation**: [https://docs.copy.ai/reference/get-workflow-runs](https://docs.copy.ai/reference/get-workflow-runs)

---

## Usage Examples

### Example 1: Basic Usage

Get started with Copy.ai API by making your first request.

```bash
# Your example code here
# This demonstrates basic usage
curl -X GET "https://api.lowcodeapi.com/copyai/?api_token=YOUR_API_TOKEN"
```

### Example 2: Advanced Usage

Explore more advanced features and parameters.

```bash
# Your example code here
# This demonstrates advanced usage
curl -X GET "https://api.lowcodeapi.com/copyai/?api_token=YOUR_API_TOKEN"
```

## Complete Endpoint Reference

For a complete list of all endpoints and their parameters, refer to:
- **OpenAPI Definition**: `https://backend.lowcodeapi.com/copyai/definition`
- **Official Provider Documentation**: [https://docs.copy.ai/reference](https://docs.copy.ai/reference)

## Rate Limits & Best Practices

- Check your Copy.ai account for specific rate limits
- Use appropriate error handling and retry logic
- Cache responses when appropriate to reduce API calls

## Error Handling

Standard HTTP status codes apply:
- `400` - Invalid request parameters
- `401` - Unauthorized (check your API key)
- `429` - Rate limit exceeded
- `500` - Internal server error