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

# Overview

> How to build an API for integrating with Zaymo

## API Implementation Guide

This documentation outlines the API endpoints that you, as a Zaymo partner, need to implement on your server. Zaymo will make requests to these endpoints to enable in-email purchase functionality for your customers.

## Base URL

You will need to provide Zaymo with the base URL of your API implementation. This is the domain where you'll host these endpoints, for example:

```
https://api.yourdomain.com
```

When Zaymo makes requests to your API, we will append specific paths to your base URL. For example, if your base URL is `https://api.yourdomain.com`, we would make requests to endpoints like:

```
https://api.yourdomain.com/zaymo/upsell
```

All API endpoints in this documentation will follow this pattern, with `/zaymo/` as the prefix for all Zaymo-related routes.

## Authentication

All API endpoints should require authentication using an API key header. For detailed information about implementing authentication, see the [Authentication](/api-reference/authentication) page.

## Response Format

Your API responses should be returned in JSON format. A typical successful response should have the following structure:

```json theme={null}
{
  "success": true,
  "data": {
    // Response data specific to the endpoint
  }
}
```

## Error Handling

When an error occurs, your API should return an appropriate HTTP status code along with a JSON response containing error details:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "invalid_request",
    "message": "A descriptive error message",
  }
}
```

## Rate Limits

If you implement rate limiting on your API, please inform Zaymo of your limits so we can optimize our requests accordingly.

<Card title="Need Help?" icon="circle-question">
  If you have any questions or need assistance with your API implementation, please contact our support team at [support@zaymo.com](mailto:support@zaymo.com).
</Card>
