# Welcome to Emailchaser's API

Welcome to our API documentation!

This documentation will show you how to use our API so that you can automate your outbound like a pro.

If you're a lead gen agency, sales team or GTM expert, then you're in the right place 💪


# Start here

First of all, you will need a new API key.

### Generate your API key

To create a new key:&#x20;

1. Go to [Integrations & API](https://app.emailchaser.com/settings/integrations) in your settings
2. Click "Create API key"
3. Enter an API key name (used for display purposes only)&#x20;
4. Select the scopes you would like this API key to have&#x20;
5. Click the "Create" button&#x20;
6. Copy the key and store it in a secure place&#x20;

**For security reasons, the API key will be displayed only once, and there is no way to recover it if you loose it.**

You are ready to go now, proceed to the Authentication section below to see how to use your API key.


# Authentication

The API uses Bearer Token Authentication via the Authorization header.

`Header Name: Authorization` \
`Header Value Format: Bearer <YOUR_API_KEY>`&#x20;

API Key Format: Your API key should have the following format: `run_<prefix>_<value>`&#x20;


# Rate limits

The rate limit applies to your account and is enforced across all API keys.&#x20;

Current rate limits:

* 100 requests within a 10 second period
* 600 requests within a 60 second period

### Exceeding rate limits

If you exceed the rate limits your request will be returned with a `429` status code.


# Postman Collection

Import this collection into Postman to start exploring the API right away.

{% file src="/files/hPpHGqanwR0rDi3MHfar" %}


# Add leads to a campaign

To add a lead to a campaign, use the [List Campaigns](/api-reference/blocklist) endpoint which will return a paginated list of all your campaigns.&#x20;

Find the campaign ID you'd like the Lead to be added to.&#x20;

Then make a POST request to [Leads](/api-reference/leads#post-api-v1-leads) endpoint including all the Lead details along with `campaignId`&#x20;

This approach let's you add a single lead or up to 1,000 leads per request.

You can also add leads to a campaign using the below low-code tools:&#x20;

**Clay:** add leads from your Clay table to a campaign in Emailchaser\
\- [Video tutorial](https://www.youtube.com/watch?v=i7cgG9PMZTQ)\
\- [Clay integration page](https://www.clay.com/integrations/action/add-leads-to-your-emailchaser-campaign-emailchaser)

**Make:** add leads to your campaign in Emailchaser with Make\
\- Video tutorial\
\- [Make integration page](https://www.make.com/en/integrations/emailchaser-app)


# Check email account health score

Coming soon...


# Disconnect email account

Coming soon...


# Order new email accounts

Coming soon...


# Blocklist

## List blocklist entries

> Returns the workspace suppression list (blocked domains and email addresses), newest first.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.BlocklistListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/models.BlocklistEntry"}},"totalCount":{"type":"integer"}}},"models.BlocklistEntry":{"type":"object","properties":{"createdAt":{"type":"string"},"domain":{"type":"string"},"emailAddress":{"type":"string"},"id":{"type":"integer"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/blocklist":{"get":{"description":"Returns the workspace suppression list (blocked domains and email addresses), newest first.","tags":["Blocklist"],"summary":"List blocklist entries","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Page size (default 100, max 1000)","name":"limit","in":"query"},{"schema":{"type":"integer"},"description":"Offset (default 0)","name":"offset","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.BlocklistListResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to list entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```

## Add blocklist entries

> Adds up to 1000 suppression entries in one call. Each value is either a full email address (contains "@") or a bare domain. Existing entries and invalid values are skipped, so the call is safe to retry and suited to carrying over a suppression list from another sending platform.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.BlocklistAddResponse":{"type":"object","properties":{"created":{"description":"Created is the number of new suppression entries written.","type":"integer"},"skipped":{"description":"Skipped is the number of values ignored because they already existed or\nfailed validation.","type":"integer"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.BlocklistAddRequest":{"type":"object","required":["values"],"properties":{"values":{"description":"Values holds the email addresses and/or domains to block, up to 1000 per\nrequest.","type":"array","items":{"type":"string"}}}}}},"paths":{"/blocklist":{"post":{"description":"Adds up to 1000 suppression entries in one call. Each value is either a full email address (contains \"@\") or a bare domain. Existing entries and invalid values are skipped, so the call is safe to retry and suited to carrying over a suppression list from another sending platform.","tags":["Blocklist"],"summary":"Add blocklist entries","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.BlocklistAddResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to add entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.BlocklistAddRequest"}}},"description":"Values to block","required":true}}}}}
```


# Campaigns

## List campaigns

> Lists all campaigns for the authenticated user's space with optional filtering by status and folder. Supports pagination.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.ListCampaignsResponse":{"type":"object","properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/models.CampaignListItem"}},"hasMore":{"type":"boolean"},"limit":{"type":"integer"},"page":{"type":"integer"},"total":{"type":"integer"}}},"models.CampaignListItem":{"type":"object","properties":{"createdAt":{"type":"string"},"emoji":{"type":"string"},"flow":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"stats":{"$ref":"#/components/schemas/models.CampaignStats"},"status":{"type":"string"},"updatedAt":{"type":"string"}}},"models.CampaignStats":{"type":"object","properties":{"bouncedLeadsCount":{"type":"integer"},"contactedLeadsCount":{"type":"integer"},"emailsSentCount":{"type":"integer"},"leadsRespondedPositivelyCount":{"type":"integer"},"repliedLeadsCount":{"type":"integer"},"senderEmailsConnected":{"type":"integer"},"senderEmailsDisconnected":{"type":"integer"},"senderEmailsTotal":{"type":"integer"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/campaigns":{"get":{"description":"Lists all campaigns for the authenticated user's space with optional filtering by status and folder. Supports pagination.","tags":["Campaigns"],"summary":"List campaigns","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Page number (default: 1)","name":"page","in":"query"},{"schema":{"type":"string","enum":["not_started","running","completed","paused","draft"]},"description":"Filter by status","name":"status","in":"query"},{"schema":{"type":"integer"},"description":"Filter by folder ID","name":"folderId","in":"query"}],"responses":{"200":{"description":"List of campaigns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ListCampaignsResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to retrieve campaigns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```

## Create a campaign

> Creates a campaign in the API key's workspace. The campaign starts in draft status and is placed in the workspace's default folder. A campaign has no emails until a sequence is written to it with PUT /campaigns/{id}/sequence, and it cannot be launched until then.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.CreateCampaignResponse":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/models.CreatedCampaign"},"message":{"type":"string"}}},"models.CreatedCampaign":{"type":"object","properties":{"createdAt":{"type":"string"},"emoji":{"type":"string"},"flow":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"},"timezone":{"type":"string"},"updatedAt":{"type":"string"}}},"models.ErrorInvalidRequest":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToCreateCampaign":{"type":"object","properties":{"error":{"type":"string"}}},"models.CreateCampaignRequest":{"type":"object","required":["name"],"properties":{"allowNonBusinessEmails":{"type":"boolean"},"emoji":{"type":"string","maxLength":10,"minLength":1},"flow":{"description":"Flow defaults to multiple_leads_scheduled, which is what the app creates,\nso a campaign made through the API behaves identically to one made in the\nUI. The api flow skips lead validation and the processing-leads guard at\nlaunch; pass it only if you want that.","type":"string","enum":["multiple_leads_scheduled","api"]},"ignoreOutOfOfficeReplies":{"type":"boolean"},"isEnabledCatchallValidated":{"type":"boolean"},"isEnabledEmailVerifier":{"type":"boolean"},"isEnabledIgnoreHardBouncedLeads":{"type":"boolean"},"isEnabledIgnoreLeadsWhoAlreadyResponded":{"type":"boolean"},"isEnabledLlm":{"description":"Settings - all optional, mirroring UpdateCampaignRequest","type":"boolean"},"isEnabledSkipLeadIfAlreadyExists":{"type":"boolean"},"isEnabledStopFollowUpsForSameCompany":{"type":"boolean"},"isEnabledStopFollowUpsOnReply":{"type":"boolean"},"maximumSendingLimitPerSenderEmail":{"type":"integer","maximum":10000,"minimum":1},"maximumSendingLimitPerSenderEmailVariation":{"type":"integer","maximum":100,"minimum":0},"maximumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"minimumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"name":{"type":"string","maxLength":255,"minLength":1},"timezone":{"type":"string"}}}}},"paths":{"/campaigns":{"post":{"description":"Creates a campaign in the API key's workspace. The campaign starts in draft status and is placed in the workspace's default folder. A campaign has no emails until a sequence is written to it with PUT /campaigns/{id}/sequence, and it cannot be launched until then.","tags":["Campaigns"],"summary":"Create a campaign","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"201":{"description":"Campaign created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateCampaignResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidRequest"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to create campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToCreateCampaign"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateCampaignRequest"}}},"description":"Campaign to create","required":true}}}}}
```

## Get a campaign by ID

> Retrieves detailed information about a specific campaign including settings, schedule, statistics, and email counts.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.GetCampaignResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"emails":{"$ref":"#/components/schemas/models.CampaignEmailCounts"},"emoji":{"type":"string"},"flow":{"type":"string"},"id":{"type":"integer"},"launchAt":{"type":"string"},"name":{"type":"string"},"schedule":{"$ref":"#/components/schemas/models.CampaignSchedule"},"sendAt":{"type":"string"},"settings":{"$ref":"#/components/schemas/models.CampaignSettings"},"stats":{"$ref":"#/components/schemas/models.CampaignStats"},"status":{"type":"string"},"timezone":{"type":"string"},"updatedAt":{"type":"string"}}},"models.CampaignEmailCounts":{"type":"object","properties":{"blocked":{"type":"integer"},"bounced":{"type":"integer"},"canceled":{"type":"integer"},"catchAll":{"type":"integer"},"deferred":{"type":"integer"},"delivered":{"type":"integer"},"draft":{"type":"integer"},"dropped":{"type":"integer"},"errorOnSent":{"type":"integer"},"followUp":{"type":"integer"},"followUpCanceled":{"type":"integer"},"followUpDraft":{"type":"integer"},"invalid":{"type":"integer"},"pending":{"type":"integer"},"replied":{"type":"integer"},"scheduled":{"type":"integer"},"sent":{"type":"integer"},"spamReport":{"type":"integer"},"total":{"type":"integer"},"waitingForReschedule":{"type":"integer"}}},"models.CampaignSchedule":{"type":"object","properties":{"cronSchedule":{"type":"string"},"daysSchedule":{"type":"array","items":{"type":"string"}},"endSchedule":{"type":"string"},"everySchedule":{"type":"integer"},"maximumTimeBetweenEmails":{"type":"integer"},"minimumTimeBetweenEmails":{"type":"integer"},"startSchedule":{"type":"string"}}},"models.CampaignSettings":{"type":"object","properties":{"allowNonBusinessEmails":{"type":"boolean"},"ignoreOutOfOfficeReplies":{"type":"boolean"},"isEnabledCatchallValidated":{"type":"boolean"},"isEnabledEmailVerifier":{"type":"boolean"},"isEnabledIgnoreHardBouncedLeads":{"type":"boolean"},"isEnabledIgnoreLeadsWhoAlreadyResponded":{"type":"boolean"},"isEnabledLlm":{"type":"boolean"},"isEnabledSkipLeadIfAlreadyExists":{"type":"boolean"},"isEnabledStopFollowUpsForSameCompany":{"type":"boolean"},"isEnabledStopFollowUpsOnReply":{"type":"boolean"},"maximumSendingLimitPerSenderEmail":{"type":"integer"},"maximumSendingLimitPerSenderEmailVariation":{"type":"integer"}}},"models.CampaignStats":{"type":"object","properties":{"bouncedLeadsCount":{"type":"integer"},"contactedLeadsCount":{"type":"integer"},"emailsSentCount":{"type":"integer"},"leadsRespondedPositivelyCount":{"type":"integer"},"repliedLeadsCount":{"type":"integer"},"senderEmailsConnected":{"type":"integer"},"senderEmailsDisconnected":{"type":"integer"},"senderEmailsTotal":{"type":"integer"}}},"models.ErrorInvalidCampaignID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/campaigns/{id}":{"get":{"description":"Retrieves detailed information about a specific campaign including settings, schedule, statistics, and email counts.","tags":["Campaigns"],"summary":"Get a campaign by ID","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Campaign ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Campaign details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.GetCampaignResponse"}}}},"400":{"description":"Invalid campaign ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidCampaignID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"500":{"description":"Failed to retrieve campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```

## Update a campaign by ID

> Updates campaign properties such as name, emoji, timezone, and various settings. Only provided fields will be updated.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.UpdateCampaignResponse":{"type":"object","properties":{"campaign":{"type":"object","properties":{"emoji":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}}},"message":{"type":"string"}}},"models.ErrorInvalidCampaignID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToUpdateCampaign":{"type":"object","properties":{"error":{"type":"string"}}},"models.UpdateCampaignRequest":{"type":"object","properties":{"allowNonBusinessEmails":{"type":"boolean"},"emoji":{"type":"string","maxLength":10,"minLength":1},"ignoreOutOfOfficeReplies":{"type":"boolean"},"isEnabledCatchallValidated":{"type":"boolean"},"isEnabledEmailVerifier":{"type":"boolean"},"isEnabledIgnoreHardBouncedLeads":{"type":"boolean"},"isEnabledIgnoreLeadsWhoAlreadyResponded":{"type":"boolean"},"isEnabledLlm":{"description":"Settings - all optional boolean flags","type":"boolean"},"isEnabledSkipLeadIfAlreadyExists":{"type":"boolean"},"isEnabledStopFollowUpsForSameCompany":{"type":"boolean"},"isEnabledStopFollowUpsOnReply":{"type":"boolean"},"maximumSendingLimitPerSenderEmail":{"type":"integer","maximum":10000,"minimum":1},"maximumSendingLimitPerSenderEmailVariation":{"type":"integer","maximum":100,"minimum":0},"maximumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"minimumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"name":{"type":"string","maxLength":255,"minLength":1},"timezone":{"type":"string"}}}}},"paths":{"/campaigns/{id}":{"put":{"description":"Updates campaign properties such as name, emoji, timezone, and various settings. Only provided fields will be updated.","tags":["Campaigns"],"summary":"Update a campaign by ID","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Campaign ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Campaign updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateCampaignResponse"}}}},"400":{"description":"Invalid campaign ID or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidCampaignID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"500":{"description":"Failed to update campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToUpdateCampaign"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateCampaignRequest"}}},"description":"Campaign fields to update","required":true}}}}}
```

## Delete a campaign

> Deletes a campaign and all associated data including emails, sequences, and scheduled tasks.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.DeleteCampaignResponse":{"type":"object","properties":{"id":{"type":"integer"},"message":{"type":"string"}}},"models.ErrorInvalidCampaignID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToDeleteCampaign":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/campaigns/{id}":{"delete":{"description":"Deletes a campaign and all associated data including emails, sequences, and scheduled tasks.","tags":["Campaigns"],"summary":"Delete a campaign","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Campaign ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Campaign deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.DeleteCampaignResponse"}}}},"400":{"description":"Invalid campaign ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidCampaignID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"500":{"description":"Failed to delete campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToDeleteCampaign"}}}}}}}}}
```

## Move a lead to another campaign

> Removes a lead from the source campaign (deleting its unsent emails) and adds it to the target campaign. If the target campaign is running, emails for the lead are enqueued.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.MoveLeadResponse":{"type":"object","properties":{"leadId":{"type":"integer"},"message":{"type":"string"},"sourceCampaignId":{"type":"integer"},"targetCampaignId":{"type":"integer"}}},"models.ErrorInvalidCampaignID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorForbidden":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToMoveLead":{"type":"object","properties":{"error":{"type":"string"}}},"models.MoveLeadRequest":{"type":"object","required":["targetCampaignId"],"properties":{"targetCampaignId":{"type":"integer"}}}}},"paths":{"/campaigns/{id}/leads/{leadId}/move":{"post":{"description":"Removes a lead from the source campaign (deleting its unsent emails) and adds it to the target campaign. If the target campaign is running, emails for the lead are enqueued.","tags":["Campaigns"],"summary":"Move a lead to another campaign","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Source campaign ID","name":"id","in":"path","required":true},{"schema":{"type":"integer"},"description":"Lead ID","name":"leadId","in":"path","required":true}],"responses":{"200":{"description":"Lead moved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.MoveLeadResponse"}}}},"400":{"description":"Invalid campaign ID, lead ID or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidCampaignID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"403":{"description":"Forbidden - lead does not belong to your space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorForbidden"}}}},"404":{"description":"Campaign, target campaign or lead not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"500":{"description":"Failed to move lead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToMoveLead"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.MoveLeadRequest"}}},"description":"Target campaign","required":true}}}}}
```

## Pause a campaign

> Pauses a running campaign and cancels all scheduled emails.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.PauseCampaignResponse":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}}},"message":{"type":"string"}}},"models.ErrorInvalidCampaignID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToPauseCampaign":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/campaigns/{id}/pause":{"post":{"description":"Pauses a running campaign and cancels all scheduled emails.","tags":["Campaigns"],"summary":"Pause a campaign","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Campaign ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Campaign paused successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.PauseCampaignResponse"}}}},"400":{"description":"Invalid campaign ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidCampaignID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"500":{"description":"Failed to pause campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToPauseCampaign"}}}}}}}}}
```

## Launch or resume a campaign

> Launches a new campaign or resumes a paused campaign. Validates campaign configuration before launching.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.LaunchCampaignResponse":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}}},"message":{"type":"string"}}},"models.ErrorCampaignValidation":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToLaunchCampaign":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/campaigns/{id}/resume":{"post":{"description":"Launches a new campaign or resumes a paused campaign. Validates campaign configuration before launching.","tags":["Campaigns"],"summary":"Launch or resume a campaign","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Campaign ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Campaign launched/resumed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.LaunchCampaignResponse"}}}},"400":{"description":"Campaign validation failed (missing configuration)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignValidation"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"409":{"description":"Campaign is currently processing leads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Failed to launch/resume campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToLaunchCampaign"}}}}}}}}}
```

## Update campaign schedule

> Updates the sending schedule for a campaign including timezone, days, time windows, and frequency.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.UpdateCampaignScheduleResponse":{"type":"object","properties":{"campaign":{"type":"object","properties":{"daysSchedule":{"type":"array","items":{"type":"string"}},"endSchedule":{"type":"string"},"everySchedule":{"type":"integer"},"id":{"type":"integer"},"maximumTimeBetweenEmails":{"type":"integer"},"minimumTimeBetweenEmails":{"type":"integer"},"name":{"type":"string"},"startSchedule":{"type":"string"},"timezone":{"type":"string"}}},"message":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.UpdateCampaignScheduleRequest":{"type":"object","required":["timezone"],"properties":{"daysSchedule":{"description":"For multiple leads scheduled campaigns (flow 3) and API campaigns","type":"array","items":{"type":"string"}},"endSchedule":{"type":"string"},"everySchedule":{"type":"integer","minimum":1},"maximumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"minimumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"sendAt":{"description":"For single lead scheduled campaigns (flow 2)","type":"string"},"startSchedule":{"type":"string"},"timezone":{"description":"Common field for all flows","type":"string"}}}}},"paths":{"/campaigns/{id}/schedule":{"put":{"description":"Updates the sending schedule for a campaign including timezone, days, time windows, and frequency.","tags":["Campaigns"],"summary":"Update campaign schedule","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Campaign ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Campaign schedule updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateCampaignScheduleResponse"}}}},"400":{"description":"Invalid request body or schedule configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"500":{"description":"Failed to update campaign schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateCampaignScheduleRequest"}}},"description":"Schedule configuration","required":true}}}}}
```

## Get a campaign's sequence

> Returns the ordered emails that make up a campaign's sequence, including any A/B variants. delayDays on each step is counted from the previous step; the first step is always 0.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.GetSequenceResponse":{"type":"object","properties":{"campaignId":{"type":"integer"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/models.SequenceStep"}},"total":{"type":"integer"}}},"models.SequenceStep":{"type":"object","properties":{"body":{"type":"string"},"contentType":{"type":"string"},"delayDays":{"type":"integer"},"order":{"type":"integer"},"subject":{"type":"string"},"useSameThread":{"type":"boolean"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/models.SequenceVariant"}}}},"models.SequenceVariant":{"type":"object","properties":{"body":{"type":"string"},"label":{"type":"string"},"subject":{"type":"string"}}},"models.ErrorInvalidCampaignID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToRetrieveSequence":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/campaigns/{id}/sequence":{"get":{"description":"Returns the ordered emails that make up a campaign's sequence, including any A/B variants. delayDays on each step is counted from the previous step; the first step is always 0.","tags":["Campaigns"],"summary":"Get a campaign's sequence","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Campaign ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Campaign sequence","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.GetSequenceResponse"}}}},"400":{"description":"Invalid campaign ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidCampaignID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"500":{"description":"Failed to retrieve campaign sequence","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToRetrieveSequence"}}}}}}}}}
```

## Replace a campaign's sequence

> Replaces the campaign's whole sequence with the steps provided. The operation is idempotent, so sending the same payload twice leaves the same state and a retried request cannot duplicate steps. delayDays is counted from the previous step and the first step must be 0. Editing a running campaign is allowed and re-queues future sends; already-sent emails are untouched.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.ReplaceSequenceResponse":{"type":"object","properties":{"campaignId":{"type":"integer"},"message":{"type":"string"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/models.SequenceStep"}},"total":{"type":"integer"}}},"models.SequenceStep":{"type":"object","properties":{"body":{"type":"string"},"contentType":{"type":"string"},"delayDays":{"type":"integer"},"order":{"type":"integer"},"subject":{"type":"string"},"useSameThread":{"type":"boolean"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/models.SequenceVariant"}}}},"models.SequenceVariant":{"type":"object","properties":{"body":{"type":"string"},"label":{"type":"string"},"subject":{"type":"string"}}},"models.ErrorInvalidSequence":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnsupportedCampaignFlow":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToReplaceSequence":{"type":"object","properties":{"error":{"type":"string"}}},"models.ReplaceSequenceRequest":{"type":"object","required":["steps"],"properties":{"signature":{"type":"string"},"steps":{"type":"array","maxItems":20,"minItems":1,"items":{"$ref":"#/components/schemas/models.SequenceStepInput"}}}},"models.SequenceStepInput":{"type":"object","required":["body","subject"],"properties":{"body":{"type":"string","minLength":1},"contentType":{"type":"string","enum":["html","text"]},"delayDays":{"type":"integer","maximum":365,"minimum":0},"order":{"type":"integer","minimum":1},"subject":{"type":"string","maxLength":998,"minLength":1},"useSameThread":{"type":"boolean"},"variants":{"type":"array","maxItems":25,"items":{"$ref":"#/components/schemas/models.SequenceVariantInput"}}}},"models.SequenceVariantInput":{"type":"object","required":["label","subject"],"properties":{"body":{"type":"string"},"label":{"type":"string","maxLength":2,"minLength":1},"subject":{"type":"string","maxLength":998,"minLength":1}}}}},"paths":{"/campaigns/{id}/sequence":{"put":{"description":"Replaces the campaign's whole sequence with the steps provided. The operation is idempotent, so sending the same payload twice leaves the same state and a retried request cannot duplicate steps. delayDays is counted from the previous step and the first step must be 0. Editing a running campaign is allowed and re-queues future sends; already-sent emails are untouched.","tags":["Campaigns"],"summary":"Replace a campaign's sequence","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Campaign ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Campaign sequence replaced successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReplaceSequenceResponse"}}}},"400":{"description":"Invalid campaign ID or sequence payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidSequence"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"422":{"description":"Campaign flow does not support sequences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnsupportedCampaignFlow"}}}},"500":{"description":"Failed to replace campaign sequence","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToReplaceSequence"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReplaceSequenceRequest"}}},"description":"Sequence steps","required":true}}}}}
```


# Copilot

## Launch a draft outbound campaign and start lead finding

> Creates a DRAFT Emailchaser campaign (with its email sequence) scoped to the caller's workspace and kicks off Sales Navigator lead extraction. The campaign stays in DRAFT — nothing sends automatically.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.CopilotLaunchResponse":{"type":"object","properties":{"campaignId":{"type":"integer"},"jobId":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.CopilotLaunchRequest":{"type":"object","required":["name","salesNavSearchUrl","sequence"],"properties":{"icp":{"description":"ICP is optional and carried through for reference only.","allOf":[{"$ref":"#/components/schemas/models.CopilotICP"}]},"name":{"description":"Name is the campaign name.","type":"string"},"salesNavData":{"description":"SalesNavData is the optional base64 browser-extension payload that carries\nthe LinkedIn session required to actually run the search. When omitted the\nlead engine cannot authenticate to LinkedIn (see docs), so provide it to\nstart real extraction.","type":"string"},"salesNavSearchUrl":{"description":"SalesNavSearchURL is the LinkedIn Sales Navigator search URL the lead\nengine should extract leads from.","type":"string"},"sequence":{"description":"Sequence is the cold-email sequence to seed the draft campaign with.","type":"array","items":{"$ref":"#/components/schemas/models.CopilotSequenceStep"}}}},"models.CopilotICP":{"type":"object","properties":{"companySizes":{"type":"array","items":{"type":"string"}},"icpName":{"type":"string"},"industries":{"type":"array","items":{"type":"string"}},"personas":{"type":"array","items":{"$ref":"#/components/schemas/models.CopilotPersona"}},"seniorities":{"type":"array","items":{"type":"string"}},"suggestedSalesNavKeywords":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"titles":{"type":"array","items":{"type":"string"}}}},"models.CopilotPersona":{"type":"object","properties":{"seniority":{"type":"string"},"title":{"type":"string"}}},"models.CopilotSequenceStep":{"type":"object","required":["body","subject"],"properties":{"body":{"type":"string"},"followUpAfter":{"description":"FollowUpAfter is the number of days after the previous step. 0 for the\ninitial email; 1-30 for follow-ups.","type":"integer"},"subject":{"type":"string"}}}}},"paths":{"/copilot/launch":{"post":{"description":"Creates a DRAFT Emailchaser campaign (with its email sequence) scoped to the caller's workspace and kicks off Sales Navigator lead extraction. The campaign stays in DRAFT — nothing sends automatically.","tags":["Copilot"],"summary":"Launch a draft outbound campaign and start lead finding","responses":{"202":{"description":"Draft campaign created and lead finding started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CopilotLaunchResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to create draft campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CopilotLaunchRequest"}}},"description":"Campaign name, Sales Nav search URL and sequence","required":true}}}}}
```

## Plan an outbound campaign from a website (read-only)

> Fetches the company website, infers an Ideal Customer Profile with the managed AI model, and drafts a suggested cold-email sequence. Creates nothing.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.CopilotPlanResponse":{"type":"object","properties":{"icp":{"$ref":"#/components/schemas/models.CopilotICP"},"suggestedSequence":{"type":"array","items":{"$ref":"#/components/schemas/models.CopilotSequenceStep"}}}},"models.CopilotICP":{"type":"object","properties":{"companySizes":{"type":"array","items":{"type":"string"}},"icpName":{"type":"string"},"industries":{"type":"array","items":{"type":"string"}},"personas":{"type":"array","items":{"$ref":"#/components/schemas/models.CopilotPersona"}},"seniorities":{"type":"array","items":{"type":"string"}},"suggestedSalesNavKeywords":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"titles":{"type":"array","items":{"type":"string"}}}},"models.CopilotPersona":{"type":"object","properties":{"seniority":{"type":"string"},"title":{"type":"string"}}},"models.CopilotSequenceStep":{"type":"object","required":["body","subject"],"properties":{"body":{"type":"string"},"followUpAfter":{"description":"FollowUpAfter is the number of days after the previous step. 0 for the\ninitial email; 1-30 for follow-ups.","type":"integer"},"subject":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.CopilotPlanRequest":{"type":"object","required":["website"],"properties":{"context":{"description":"Context is optional extra guidance from the caller (e.g. \"we sell to\ndentists in the US\").","type":"string"},"website":{"description":"Website is the company homepage to analyse (with or without scheme).","type":"string"}}}}},"paths":{"/copilot/plan":{"post":{"description":"Fetches the company website, infers an Ideal Customer Profile with the managed AI model, and drafts a suggested cold-email sequence. Creates nothing.","tags":["Copilot"],"summary":"Plan an outbound campaign from a website (read-only)","responses":{"200":{"description":"Suggested ICP and sequence","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CopilotPlanResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"502":{"description":"Failed to analyse website","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CopilotPlanRequest"}}},"description":"Website to analyse","required":true}}}}}
```


# Imports

## Import an Instantly.ai account

> Validates the provided Instantly API key and enqueues a background job that imports the caller's Instantly campaigns and leads into their workspace. Every imported campaign is created in DRAFT state — nothing is sent automatically.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.InstantlyImportResponse":{"type":"object","properties":{"jobId":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.InstantlyImportRequest":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"description":"APIKey is the caller's Instantly.ai API key. It is validated with a\nlightweight call to Instantly before the import job is enqueued.","type":"string"}}}}},"paths":{"/imports/instantly":{"post":{"description":"Validates the provided Instantly API key and enqueues a background job that imports the caller's Instantly campaigns and leads into their workspace. Every imported campaign is created in DRAFT state — nothing is sent automatically.","tags":["Imports"],"summary":"Import an Instantly.ai account","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"202":{"description":"Import job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InstantlyImportResponse"}}}},"400":{"description":"Invalid request body or Instantly API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to start import","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InstantlyImportRequest"}}},"description":"Instantly API key","required":true}}}}}
```

## List Instantly sending accounts

> Fetches the sending accounts of the given Instantly workspace and returns them together with a pre-filled CSV for the bulk IMAP/SMTP connection flow. Mailbox credentials cannot be exported from any provider, so accounts are reconnected either per-mailbox via Google/Microsoft OAuth or in bulk via IMAP app passwords using the returned CSV. Nothing is written to the workspace by this call.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.InstantlyAccountsResponse":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/models.InstantlyAccount"}},"imapCsvTemplate":{"description":"ImapCsvTemplate is a ready-to-fill CSV (one row per account, password\ncolumn empty) for the bulk IMAP/SMTP connection flow.","type":"string"}}},"models.InstantlyAccount":{"type":"object","properties":{"dailyLimit":{"type":"integer"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"provider":{"description":"google | microsoft | other","type":"string"},"status":{"type":"integer"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.InstantlyAccountsRequest":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"description":"APIKey is the caller's Instantly.ai API key.","type":"string"}}}}},"paths":{"/imports/instantly/accounts":{"post":{"description":"Fetches the sending accounts of the given Instantly workspace and returns them together with a pre-filled CSV for the bulk IMAP/SMTP connection flow. Mailbox credentials cannot be exported from any provider, so accounts are reconnected either per-mailbox via Google/Microsoft OAuth or in bulk via IMAP app passwords using the returned CSV. Nothing is written to the workspace by this call.","tags":["Imports"],"summary":"List Instantly sending accounts","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InstantlyAccountsResponse"}}}},"400":{"description":"Invalid request body or Instantly API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"502":{"description":"Instantly API unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InstantlyAccountsRequest"}}},"description":"Instantly API key","required":true}}}}}
```


# Leads

## List leads

> Lists the leads in the API key's workspace, newest first, with pagination. Filter by exact email address to look up a single lead, or by campaign to list only the leads in one campaign. This is how a lead created through POST /leads is found again.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.ListLeadsResponse":{"type":"object","properties":{"hasMore":{"type":"boolean"},"leads":{"type":"array","items":{"$ref":"#/components/schemas/models.LeadResponse"}},"limit":{"type":"integer"},"page":{"type":"integer"},"total":{"type":"integer"}}},"models.LeadResponse":{"type":"object","properties":{"company":{"type":"string"},"createdAt":{"type":"string"},"customVariables":{"description":"CustomVariables are the lead's merge tags beyond the named fields.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"integer"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"},"website":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToRetrieveLeads":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/leads":{"get":{"description":"Lists the leads in the API key's workspace, newest first, with pagination. Filter by exact email address to look up a single lead, or by campaign to list only the leads in one campaign. This is how a lead created through POST /leads is found again.","tags":["Leads"],"summary":"List leads","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Page number (default: 1)","name":"page","in":"query"},{"schema":{"type":"string"},"description":"Filter by exact email address","name":"email","in":"query"},{"schema":{"type":"integer"},"description":"Filter by campaign ID","name":"campaignId","in":"query"}],"responses":{"200":{"description":"List of leads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ListLeadsResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to retrieve leads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToRetrieveLeads"}}}}}}}}}
```

## Create or update leads in bulk

> Creates or updates multiple leads. If a lead with the same email already exists, it will be updated. Optionally associate leads with a campaign by passing campaignId at the top level of the request body, not inside a lead object. Any attribute outside the named fields can be sent in customVariables and becomes a merge tag usable in email copy. PUT /leads is an alias for this endpoint and behaves identically.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.CreateLeadsResponse":{"type":"object","properties":{"count":{"type":"integer"},"leads":{"type":"array","items":{"$ref":"#/components/schemas/models.CreatedLead"}},"message":{"type":"string"}}},"models.CreatedLead":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"integer"}}},"models.ErrorInvalidRequest":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToCreateLeads":{"type":"object","properties":{"error":{"type":"string"}}},"models.CreateOrUpdateLeadsRequest":{"type":"object","required":["leads"],"properties":{"campaignId":{"type":"integer"},"leads":{"type":"array","maxItems":1000,"minItems":1,"items":{"$ref":"#/components/schemas/models.LeadInput"}}}},"models.LeadInput":{"type":"object","required":["email"],"properties":{"company":{"type":"string"},"customVariables":{"description":"CustomVariables holds any attribute the eight named fields do not cover,\nfor example the page a visitor landed on. Each key becomes a merge tag\nusable in email copy as {key}. Keys are matched case-insensitively with\nspaces treated as underscores, so \"Page Visited\" and \"page_visited\" are\nthe same tag. Values are stored as given; non-string values are rendered\nwith their JSON representation at send time.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"website":{"type":"string"}}}}},"paths":{"/leads":{"post":{"description":"Creates or updates multiple leads. If a lead with the same email already exists, it will be updated. Optionally associate leads with a campaign by passing campaignId at the top level of the request body, not inside a lead object. Any attribute outside the named fields can be sent in customVariables and becomes a merge tag usable in email copy. PUT /leads is an alias for this endpoint and behaves identically.","tags":["Leads"],"summary":"Create or update leads in bulk","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"201":{"description":"Leads processed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateLeadsResponse"}}}},"400":{"description":"Invalid request body or no leads provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidRequest"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorCampaignNotFound"}}}},"500":{"description":"Failed to create leads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToCreateLeads"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateOrUpdateLeadsRequest"}}},"description":"Leads to create or update","required":true}}}}}
```

## Get a lead by ID

> Retrieves detailed information about a specific lead.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.GetLeadResponse":{"type":"object","properties":{"lead":{"$ref":"#/components/schemas/models.LeadResponse"}}},"models.LeadResponse":{"type":"object","properties":{"company":{"type":"string"},"createdAt":{"type":"string"},"customVariables":{"description":"CustomVariables are the lead's merge tags beyond the named fields.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"integer"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"},"website":{"type":"string"}}},"models.ErrorInvalidLeadID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorForbidden":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorNotFound":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/leads/{id}":{"get":{"description":"Retrieves detailed information about a specific lead.","tags":["Leads"],"summary":"Get a lead by ID","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Lead ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Lead details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.GetLeadResponse"}}}},"400":{"description":"Invalid lead ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidLeadID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"403":{"description":"Forbidden - lead does not belong to your space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorForbidden"}}}},"404":{"description":"Lead not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorNotFound"}}}}}}}}}
```

## Update a lead by ID

> Updates an existing lead's information. Only provided fields will be updated.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.UpdateLeadResponse":{"type":"object","properties":{"lead":{"$ref":"#/components/schemas/models.LeadResponse"},"message":{"type":"string"}}},"models.LeadResponse":{"type":"object","properties":{"company":{"type":"string"},"createdAt":{"type":"string"},"customVariables":{"description":"CustomVariables are the lead's merge tags beyond the named fields.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"integer"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"},"website":{"type":"string"}}},"models.ErrorInvalidLeadID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorForbidden":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToUpdateLead":{"type":"object","properties":{"error":{"type":"string"}}},"models.UpdateLeadRequest":{"type":"object","properties":{"company":{"type":"string"},"customVariables":{"description":"CustomVariables replaces the lead's whole custom variable map when\nprovided. Omit it to leave the existing variables untouched.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"website":{"type":"string"}}}}},"paths":{"/leads/{id}":{"put":{"description":"Updates an existing lead's information. Only provided fields will be updated.","tags":["Leads"],"summary":"Update a lead by ID","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Lead ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Lead updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateLeadResponse"}}}},"400":{"description":"Invalid lead ID or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidLeadID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"403":{"description":"Forbidden - lead does not belong to your space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorForbidden"}}}},"404":{"description":"Lead not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorNotFound"}}}},"500":{"description":"Failed to update lead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToUpdateLead"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateLeadRequest"}}},"description":"Lead fields to update","required":true}}}}}
```

## Delete a lead by ID

> Deletes a lead and all associated unsent emails. If the lead is associated with campaigns, it will be removed from those campaigns first.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.DeleteLeadResponse":{"type":"object","properties":{"id":{"type":"integer"},"message":{"type":"string"}}},"models.ErrorInvalidLeadID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorForbidden":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToDeleteLead":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/leads/{id}":{"delete":{"description":"Deletes a lead and all associated unsent emails. If the lead is associated with campaigns, it will be removed from those campaigns first.","tags":["Leads"],"summary":"Delete a lead by ID","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Lead ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Lead deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.DeleteLeadResponse"}}}},"400":{"description":"Invalid lead ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidLeadID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"403":{"description":"Forbidden - lead does not belong to your space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorForbidden"}}}},"404":{"description":"Lead not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorNotFound"}}}},"500":{"description":"Failed to delete lead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToDeleteLead"}}}}}}}}}
```


# Sender Emails

## List sender emails

> Lists all sender emails for the authenticated user's space with optional filtering by campaign ID and connection status. Supports pagination.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.ListSenderEmailsResponse":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer"},"page":{"type":"integer"},"senderEmails":{"type":"array","items":{"$ref":"#/components/schemas/models.SenderEmailListItem"}},"total":{"type":"integer"}}},"models.SenderEmailListItem":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"provider":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/sender-emails":{"get":{"description":"Lists all sender emails for the authenticated user's space with optional filtering by campaign ID and connection status. Supports pagination.","tags":["Sender Emails"],"summary":"List sender emails","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Page number (default: 1)","name":"page","in":"query"},{"schema":{"type":"integer"},"description":"Filter by space ID","name":"spaceId","in":"query"},{"schema":{"type":"integer"},"description":"Filter by campaign ID","name":"campaignId","in":"query"},{"schema":{"type":"boolean"},"description":"Filter by connection status","name":"isConnected","in":"query"}],"responses":{"200":{"description":"List of sender emails","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ListSenderEmailsResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to retrieve sender emails","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```

## Connect an SMTP/IMAP sender email

> Connects an SMTP/IMAP mailbox to the workspace using an app password, with no browser step. Google and Microsoft mailboxes are not supported here because both require an interactive consent screen; connect those in the app. The address must be a business domain.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.ConnectSenderEmailResponse":{"type":"object","properties":{"message":{"type":"string"},"senderEmail":{"$ref":"#/components/schemas/models.SenderEmailResponse"}}},"models.SenderEmailResponse":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"connectionHistory":{"type":"array","items":{"$ref":"#/components/schemas/models.ConnectionHistoryItem"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"lastDisconnectedAt":{"type":"string"},"lastReconnectedAt":{"type":"string"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"pictureUrl":{"type":"string"},"provider":{"type":"string"},"provisioningStatus":{"type":"string"},"signature":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}},"models.ConnectionHistoryItem":{"type":"object","properties":{"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"disconnectionReason":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"eventType":{"type":"string"},"id":{"type":"integer"},"userId":{"type":"integer"}}},"models.ErrorInvalidSenderEmailAddress":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorSenderEmailPlanLimit":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorSenderEmailAlreadyConnected":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToConnectSenderEmail":{"type":"object","properties":{"error":{"type":"string"}}},"models.ConnectSenderEmailRequest":{"type":"object","required":["email","imapServerUrl","password","smtpServerUrl"],"properties":{"email":{"type":"string"},"firstName":{"type":"string","maxLength":255},"imapServerUrl":{"description":"ImapServerUrl and SmtpServerUrl accept the provider's host, optionally\nwith a port, for example \"imap.fastmail.com:993\".","type":"string","minLength":1},"lastName":{"type":"string","maxLength":255},"loginString":{"description":"LoginString defaults to the email address when omitted, which is what\nmost providers expect.","type":"string"},"password":{"type":"string","minLength":1},"smtpServerUrl":{"type":"string","minLength":1}}}}},"paths":{"/sender-emails":{"post":{"description":"Connects an SMTP/IMAP mailbox to the workspace using an app password, with no browser step. Google and Microsoft mailboxes are not supported here because both require an interactive consent screen; connect those in the app. The address must be a business domain.","tags":["Sender Emails"],"summary":"Connect an SMTP/IMAP sender email","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"201":{"description":"Sender email connected successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ConnectSenderEmailResponse"}}}},"400":{"description":"Invalid request body or non-business email address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidSenderEmailAddress"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"402":{"description":"Plan does not allow another sender email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorSenderEmailPlanLimit"}}}},"409":{"description":"Email already connected to another workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorSenderEmailAlreadyConnected"}}}},"500":{"description":"Failed to connect sender email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToConnectSenderEmail"}}}},"502":{"description":"Mail provider rejected the credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToConnectSenderEmail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ConnectSenderEmailRequest"}}},"description":"Mailbox credentials","required":true}}}}}
```

## Get a sender email by ID

> Retrieves detailed information about a specific sender email including connection status, limits, and settings.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.GetSenderEmailResponse":{"type":"object","properties":{"senderEmail":{"$ref":"#/components/schemas/models.SenderEmailResponse"}}},"models.SenderEmailResponse":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"connectionHistory":{"type":"array","items":{"$ref":"#/components/schemas/models.ConnectionHistoryItem"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"lastDisconnectedAt":{"type":"string"},"lastReconnectedAt":{"type":"string"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"pictureUrl":{"type":"string"},"provider":{"type":"string"},"provisioningStatus":{"type":"string"},"signature":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}},"models.ConnectionHistoryItem":{"type":"object","properties":{"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"disconnectionReason":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"eventType":{"type":"string"},"id":{"type":"integer"},"userId":{"type":"integer"}}},"models.ErrorInvalidSenderEmailID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorForbidden":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorSenderEmailNotFound":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/sender-emails/{id}":{"get":{"description":"Retrieves detailed information about a specific sender email including connection status, limits, and settings.","tags":["Sender Emails"],"summary":"Get a sender email by ID","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Sender Email ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Sender email details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.GetSenderEmailResponse"}}}},"400":{"description":"Invalid sender email ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidSenderEmailID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"403":{"description":"Forbidden - sender email does not belong to your space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorForbidden"}}}},"404":{"description":"Sender email not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorSenderEmailNotFound"}}}}}}}}}
```

## Update a sender email by ID

> Updates an existing sender email's information. Only provided fields will be updated. Can update name, signature, and daily sending limits.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.UpdateSenderEmailResponse":{"type":"object","properties":{"message":{"type":"string"},"senderEmail":{"$ref":"#/components/schemas/models.SenderEmailResponse"}}},"models.SenderEmailResponse":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"connectionHistory":{"type":"array","items":{"$ref":"#/components/schemas/models.ConnectionHistoryItem"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"lastDisconnectedAt":{"type":"string"},"lastReconnectedAt":{"type":"string"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"pictureUrl":{"type":"string"},"provider":{"type":"string"},"provisioningStatus":{"type":"string"},"signature":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}},"models.ConnectionHistoryItem":{"type":"object","properties":{"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"disconnectionReason":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"eventType":{"type":"string"},"id":{"type":"integer"},"userId":{"type":"integer"}}},"models.ErrorInvalidSenderEmailID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorForbidden":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorSenderEmailNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToUpdateSenderEmail":{"type":"object","properties":{"error":{"type":"string"}}},"models.UpdateSenderEmailRequest":{"type":"object","properties":{"currentDailyLimit":{"type":"integer","maximum":1000,"minimum":0},"familyName":{"type":"string","maxLength":255},"givenName":{"type":"string","maxLength":255,"minLength":1},"maximumSendingsLimitPerDay":{"description":"Daily sending limits","type":"integer","maximum":1000,"minimum":1},"minimumSendingsLimitPerDay":{"type":"integer","maximum":1000,"minimum":1},"signature":{"type":"string"},"toggleGradualBuildUp":{"description":"Gradual build-up toggle","type":"boolean"}}}}},"paths":{"/sender-emails/{id}":{"put":{"description":"Updates an existing sender email's information. Only provided fields will be updated. Can update name, signature, and daily sending limits.","tags":["Sender Emails"],"summary":"Update a sender email by ID","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Sender Email ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Sender email updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateSenderEmailResponse"}}}},"400":{"description":"Invalid sender email ID or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidSenderEmailID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"403":{"description":"Forbidden - sender email does not belong to your space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorForbidden"}}}},"404":{"description":"Sender email not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorSenderEmailNotFound"}}}},"500":{"description":"Failed to update sender email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToUpdateSenderEmail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateSenderEmailRequest"}}},"description":"Sender email fields to update","required":true}}}}}
```


# Workspace

## Get workspace details and members

> Returns the workspace behind the API key: campaign counts broken down by status, and the list of members with their roles. Useful for confirming which workspace a key belongs to.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.SpaceDetails":{"type":"object","properties":{"completed_campaigns":{"type":"integer"},"draft_campaigns":{"type":"integer"},"members":{"type":"array","items":{"$ref":"#/components/schemas/models.MemberInfo"}},"not_started_campaigns":{"type":"integer"},"paused_campaigns":{"type":"integer"},"running_campaigns":{"type":"integer"},"space_id":{"type":"integer"},"total_campaigns":{"type":"integer"},"total_members":{"type":"integer"}}},"models.MemberInfo":{"type":"object","properties":{"created_at":{"type":"string"},"email_address":{"type":"string"},"name":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/space/members":{"get":{"description":"Returns the workspace behind the API key: campaign counts broken down by status, and the list of members with their roles. Useful for confirming which workspace a key belongs to.","tags":["Workspace"],"summary":"Get workspace details and members","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"200":{"description":"Workspace details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SpaceDetails"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to retrieve workspace details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```


# Webhooks

## List webhooks

> Lists all registered webhook endpoints for the authenticated user's space.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.ListWebhooksResponse":{"type":"object","properties":{"total":{"type":"integer"},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/models.WebhookResponse"}}}},"models.WebhookResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer"},"isEnabled":{"type":"boolean"},"name":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/webhooks":{"get":{"description":"Lists all registered webhook endpoints for the authenticated user's space.","tags":["Webhooks"],"summary":"List webhooks","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"200":{"description":"List of webhooks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ListWebhooksResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to retrieve webhooks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```

## Register a webhook

> Registers a webhook endpoint that will be called when the given event type occurs (e.g. LeadCreated, CampaignStatusChanged, EmailReply). The URL must use HTTPS.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.RegisterWebhookResponse":{"type":"object","properties":{"message":{"type":"string"},"webhook":{"$ref":"#/components/schemas/models.WebhookResponse"}}},"models.WebhookResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer"},"isEnabled":{"type":"boolean"},"name":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"models.ErrorInvalidWebhookType":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToRegisterWebhook":{"type":"object","properties":{"error":{"type":"string"}}},"models.RegisterWebhookRequest":{"type":"object","required":["type","url"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}}}},"paths":{"/webhooks":{"post":{"description":"Registers a webhook endpoint that will be called when the given event type occurs (e.g. LeadCreated, CampaignStatusChanged, EmailReply). The URL must use HTTPS.","tags":["Webhooks"],"summary":"Register a webhook","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true}],"responses":{"201":{"description":"Webhook registered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.RegisterWebhookResponse"}}}},"400":{"description":"Invalid request body, webhook type or URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidWebhookType"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to register webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToRegisterWebhook"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.RegisterWebhookRequest"}}},"description":"Webhook to register","required":true}}}}}
```

## Update a webhook

> Updates a registered webhook's name, URL, event type or enabled state. Only provided fields are changed. Disabling a webhook stops deliveries without deleting it.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.UpdateWebhookResponse":{"type":"object","properties":{"message":{"type":"string"},"webhook":{"$ref":"#/components/schemas/models.WebhookResponse"}}},"models.WebhookResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer"},"isEnabled":{"type":"boolean"},"name":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"models.ErrorInvalidWebhookType":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorWebhookNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToUpdateWebhook":{"type":"object","properties":{"error":{"type":"string"}}},"models.UpdateWebhookRequest":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"name":{"type":"string","maxLength":255,"minLength":1},"type":{"type":"string"},"url":{"type":"string"}}}}},"paths":{"/webhooks/{id}":{"put":{"description":"Updates a registered webhook's name, URL, event type or enabled state. Only provided fields are changed. Disabling a webhook stops deliveries without deleting it.","tags":["Webhooks"],"summary":"Update a webhook","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Webhook ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Webhook updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateWebhookResponse"}}}},"400":{"description":"Invalid webhook ID, request body, type or URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidWebhookType"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorWebhookNotFound"}}}},"500":{"description":"Failed to update webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToUpdateWebhook"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateWebhookRequest"}}},"description":"Webhook fields to update","required":true}}}}}
```

## Delete a webhook

> Deletes a registered webhook endpoint. Events of its type will no longer be delivered to its URL.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.DeleteWebhookResponse":{"type":"object","properties":{"id":{"type":"integer"},"message":{"type":"string"}}},"models.ErrorInvalidWebhookID":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorWebhookNotFound":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorFailedToDeleteWebhook":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/webhooks/{id}":{"delete":{"description":"Deletes a registered webhook endpoint. Events of its type will no longer be delivered to its URL.","tags":["Webhooks"],"summary":"Delete a webhook","parameters":[{"schema":{"type":"string"},"description":"Bearer <API_KEY>","name":"Authorization","in":"header","required":true},{"schema":{"type":"integer"},"description":"Webhook ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Webhook deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.DeleteWebhookResponse"}}}},"400":{"description":"Invalid webhook ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorInvalidWebhookID"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorWebhookNotFound"}}}},"500":{"description":"Failed to delete webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorFailedToDeleteWebhook"}}}}}}}}}
```


# Models

## The models.BlocklistAddRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.BlocklistAddRequest":{"type":"object","required":["values"],"properties":{"values":{"description":"Values holds the email addresses and/or domains to block, up to 1000 per\nrequest.","type":"array","items":{"type":"string"}}}}}}}
```

## The models.BlocklistAddResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.BlocklistAddResponse":{"type":"object","properties":{"created":{"description":"Created is the number of new suppression entries written.","type":"integer"},"skipped":{"description":"Skipped is the number of values ignored because they already existed or\nfailed validation.","type":"integer"}}}}}}
```

## The models.BlocklistEntry object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.BlocklistEntry":{"type":"object","properties":{"createdAt":{"type":"string"},"domain":{"type":"string"},"emailAddress":{"type":"string"},"id":{"type":"integer"}}}}}}
```

## The models.BlocklistListResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.BlocklistListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/models.BlocklistEntry"}},"totalCount":{"type":"integer"}}},"models.BlocklistEntry":{"type":"object","properties":{"createdAt":{"type":"string"},"domain":{"type":"string"},"emailAddress":{"type":"string"},"id":{"type":"integer"}}}}}}
```

## The models.CampaignEmailCounts object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CampaignEmailCounts":{"type":"object","properties":{"blocked":{"type":"integer"},"bounced":{"type":"integer"},"canceled":{"type":"integer"},"catchAll":{"type":"integer"},"deferred":{"type":"integer"},"delivered":{"type":"integer"},"draft":{"type":"integer"},"dropped":{"type":"integer"},"errorOnSent":{"type":"integer"},"followUp":{"type":"integer"},"followUpCanceled":{"type":"integer"},"followUpDraft":{"type":"integer"},"invalid":{"type":"integer"},"pending":{"type":"integer"},"replied":{"type":"integer"},"scheduled":{"type":"integer"},"sent":{"type":"integer"},"spamReport":{"type":"integer"},"total":{"type":"integer"},"waitingForReschedule":{"type":"integer"}}}}}}
```

## The models.CampaignListItem object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CampaignListItem":{"type":"object","properties":{"createdAt":{"type":"string"},"emoji":{"type":"string"},"flow":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"stats":{"$ref":"#/components/schemas/models.CampaignStats"},"status":{"type":"string"},"updatedAt":{"type":"string"}}},"models.CampaignStats":{"type":"object","properties":{"bouncedLeadsCount":{"type":"integer"},"contactedLeadsCount":{"type":"integer"},"emailsSentCount":{"type":"integer"},"leadsRespondedPositivelyCount":{"type":"integer"},"repliedLeadsCount":{"type":"integer"},"senderEmailsConnected":{"type":"integer"},"senderEmailsDisconnected":{"type":"integer"},"senderEmailsTotal":{"type":"integer"}}}}}}
```

## The models.CampaignSchedule object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CampaignSchedule":{"type":"object","properties":{"cronSchedule":{"type":"string"},"daysSchedule":{"type":"array","items":{"type":"string"}},"endSchedule":{"type":"string"},"everySchedule":{"type":"integer"},"maximumTimeBetweenEmails":{"type":"integer"},"minimumTimeBetweenEmails":{"type":"integer"},"startSchedule":{"type":"string"}}}}}}
```

## The models.CampaignSettings object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CampaignSettings":{"type":"object","properties":{"allowNonBusinessEmails":{"type":"boolean"},"ignoreOutOfOfficeReplies":{"type":"boolean"},"isEnabledCatchallValidated":{"type":"boolean"},"isEnabledEmailVerifier":{"type":"boolean"},"isEnabledIgnoreHardBouncedLeads":{"type":"boolean"},"isEnabledIgnoreLeadsWhoAlreadyResponded":{"type":"boolean"},"isEnabledLlm":{"type":"boolean"},"isEnabledSkipLeadIfAlreadyExists":{"type":"boolean"},"isEnabledStopFollowUpsForSameCompany":{"type":"boolean"},"isEnabledStopFollowUpsOnReply":{"type":"boolean"},"maximumSendingLimitPerSenderEmail":{"type":"integer"},"maximumSendingLimitPerSenderEmailVariation":{"type":"integer"}}}}}}
```

## The models.CampaignStats object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CampaignStats":{"type":"object","properties":{"bouncedLeadsCount":{"type":"integer"},"contactedLeadsCount":{"type":"integer"},"emailsSentCount":{"type":"integer"},"leadsRespondedPositivelyCount":{"type":"integer"},"repliedLeadsCount":{"type":"integer"},"senderEmailsConnected":{"type":"integer"},"senderEmailsDisconnected":{"type":"integer"},"senderEmailsTotal":{"type":"integer"}}}}}}
```

## The models.ConnectSenderEmailRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ConnectSenderEmailRequest":{"type":"object","required":["email","imapServerUrl","password","smtpServerUrl"],"properties":{"email":{"type":"string"},"firstName":{"type":"string","maxLength":255},"imapServerUrl":{"description":"ImapServerUrl and SmtpServerUrl accept the provider's host, optionally\nwith a port, for example \"imap.fastmail.com:993\".","type":"string","minLength":1},"lastName":{"type":"string","maxLength":255},"loginString":{"description":"LoginString defaults to the email address when omitted, which is what\nmost providers expect.","type":"string"},"password":{"type":"string","minLength":1},"smtpServerUrl":{"type":"string","minLength":1}}}}}}
```

## The models.ConnectSenderEmailResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ConnectSenderEmailResponse":{"type":"object","properties":{"message":{"type":"string"},"senderEmail":{"$ref":"#/components/schemas/models.SenderEmailResponse"}}},"models.SenderEmailResponse":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"connectionHistory":{"type":"array","items":{"$ref":"#/components/schemas/models.ConnectionHistoryItem"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"lastDisconnectedAt":{"type":"string"},"lastReconnectedAt":{"type":"string"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"pictureUrl":{"type":"string"},"provider":{"type":"string"},"provisioningStatus":{"type":"string"},"signature":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}},"models.ConnectionHistoryItem":{"type":"object","properties":{"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"disconnectionReason":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"eventType":{"type":"string"},"id":{"type":"integer"},"userId":{"type":"integer"}}}}}}
```

## The models.ConnectionHistoryItem object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ConnectionHistoryItem":{"type":"object","properties":{"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"disconnectionReason":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"eventType":{"type":"string"},"id":{"type":"integer"},"userId":{"type":"integer"}}}}}}
```

## The models.CopilotICP object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CopilotICP":{"type":"object","properties":{"companySizes":{"type":"array","items":{"type":"string"}},"icpName":{"type":"string"},"industries":{"type":"array","items":{"type":"string"}},"personas":{"type":"array","items":{"$ref":"#/components/schemas/models.CopilotPersona"}},"seniorities":{"type":"array","items":{"type":"string"}},"suggestedSalesNavKeywords":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"titles":{"type":"array","items":{"type":"string"}}}},"models.CopilotPersona":{"type":"object","properties":{"seniority":{"type":"string"},"title":{"type":"string"}}}}}}
```

## The models.CopilotLaunchRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CopilotLaunchRequest":{"type":"object","required":["name","salesNavSearchUrl","sequence"],"properties":{"icp":{"description":"ICP is optional and carried through for reference only.","allOf":[{"$ref":"#/components/schemas/models.CopilotICP"}]},"name":{"description":"Name is the campaign name.","type":"string"},"salesNavData":{"description":"SalesNavData is the optional base64 browser-extension payload that carries\nthe LinkedIn session required to actually run the search. When omitted the\nlead engine cannot authenticate to LinkedIn (see docs), so provide it to\nstart real extraction.","type":"string"},"salesNavSearchUrl":{"description":"SalesNavSearchURL is the LinkedIn Sales Navigator search URL the lead\nengine should extract leads from.","type":"string"},"sequence":{"description":"Sequence is the cold-email sequence to seed the draft campaign with.","type":"array","items":{"$ref":"#/components/schemas/models.CopilotSequenceStep"}}}},"models.CopilotICP":{"type":"object","properties":{"companySizes":{"type":"array","items":{"type":"string"}},"icpName":{"type":"string"},"industries":{"type":"array","items":{"type":"string"}},"personas":{"type":"array","items":{"$ref":"#/components/schemas/models.CopilotPersona"}},"seniorities":{"type":"array","items":{"type":"string"}},"suggestedSalesNavKeywords":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"titles":{"type":"array","items":{"type":"string"}}}},"models.CopilotPersona":{"type":"object","properties":{"seniority":{"type":"string"},"title":{"type":"string"}}},"models.CopilotSequenceStep":{"type":"object","required":["body","subject"],"properties":{"body":{"type":"string"},"followUpAfter":{"description":"FollowUpAfter is the number of days after the previous step. 0 for the\ninitial email; 1-30 for follow-ups.","type":"integer"},"subject":{"type":"string"}}}}}}
```

## The models.CopilotLaunchResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CopilotLaunchResponse":{"type":"object","properties":{"campaignId":{"type":"integer"},"jobId":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"}}}}}}
```

## The models.CopilotPersona object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CopilotPersona":{"type":"object","properties":{"seniority":{"type":"string"},"title":{"type":"string"}}}}}}
```

## The models.CopilotPlanRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CopilotPlanRequest":{"type":"object","required":["website"],"properties":{"context":{"description":"Context is optional extra guidance from the caller (e.g. \"we sell to\ndentists in the US\").","type":"string"},"website":{"description":"Website is the company homepage to analyse (with or without scheme).","type":"string"}}}}}}
```

## The models.CopilotPlanResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CopilotPlanResponse":{"type":"object","properties":{"icp":{"$ref":"#/components/schemas/models.CopilotICP"},"suggestedSequence":{"type":"array","items":{"$ref":"#/components/schemas/models.CopilotSequenceStep"}}}},"models.CopilotICP":{"type":"object","properties":{"companySizes":{"type":"array","items":{"type":"string"}},"icpName":{"type":"string"},"industries":{"type":"array","items":{"type":"string"}},"personas":{"type":"array","items":{"$ref":"#/components/schemas/models.CopilotPersona"}},"seniorities":{"type":"array","items":{"type":"string"}},"suggestedSalesNavKeywords":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"titles":{"type":"array","items":{"type":"string"}}}},"models.CopilotPersona":{"type":"object","properties":{"seniority":{"type":"string"},"title":{"type":"string"}}},"models.CopilotSequenceStep":{"type":"object","required":["body","subject"],"properties":{"body":{"type":"string"},"followUpAfter":{"description":"FollowUpAfter is the number of days after the previous step. 0 for the\ninitial email; 1-30 for follow-ups.","type":"integer"},"subject":{"type":"string"}}}}}}
```

## The models.CopilotSequenceStep object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CopilotSequenceStep":{"type":"object","required":["body","subject"],"properties":{"body":{"type":"string"},"followUpAfter":{"description":"FollowUpAfter is the number of days after the previous step. 0 for the\ninitial email; 1-30 for follow-ups.","type":"integer"},"subject":{"type":"string"}}}}}}
```

## The models.CreateCampaignRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CreateCampaignRequest":{"type":"object","required":["name"],"properties":{"allowNonBusinessEmails":{"type":"boolean"},"emoji":{"type":"string","maxLength":10,"minLength":1},"flow":{"description":"Flow defaults to multiple_leads_scheduled, which is what the app creates,\nso a campaign made through the API behaves identically to one made in the\nUI. The api flow skips lead validation and the processing-leads guard at\nlaunch; pass it only if you want that.","type":"string","enum":["multiple_leads_scheduled","api"]},"ignoreOutOfOfficeReplies":{"type":"boolean"},"isEnabledCatchallValidated":{"type":"boolean"},"isEnabledEmailVerifier":{"type":"boolean"},"isEnabledIgnoreHardBouncedLeads":{"type":"boolean"},"isEnabledIgnoreLeadsWhoAlreadyResponded":{"type":"boolean"},"isEnabledLlm":{"description":"Settings - all optional, mirroring UpdateCampaignRequest","type":"boolean"},"isEnabledSkipLeadIfAlreadyExists":{"type":"boolean"},"isEnabledStopFollowUpsForSameCompany":{"type":"boolean"},"isEnabledStopFollowUpsOnReply":{"type":"boolean"},"maximumSendingLimitPerSenderEmail":{"type":"integer","maximum":10000,"minimum":1},"maximumSendingLimitPerSenderEmailVariation":{"type":"integer","maximum":100,"minimum":0},"maximumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"minimumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"name":{"type":"string","maxLength":255,"minLength":1},"timezone":{"type":"string"}}}}}}
```

## The models.CreateCampaignResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CreateCampaignResponse":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/models.CreatedCampaign"},"message":{"type":"string"}}},"models.CreatedCampaign":{"type":"object","properties":{"createdAt":{"type":"string"},"emoji":{"type":"string"},"flow":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"},"timezone":{"type":"string"},"updatedAt":{"type":"string"}}}}}}
```

## The models.CreateLeadsResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CreateLeadsResponse":{"type":"object","properties":{"count":{"type":"integer"},"leads":{"type":"array","items":{"$ref":"#/components/schemas/models.CreatedLead"}},"message":{"type":"string"}}},"models.CreatedLead":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"integer"}}}}}}
```

## The models.CreateOrUpdateLeadsRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CreateOrUpdateLeadsRequest":{"type":"object","required":["leads"],"properties":{"campaignId":{"type":"integer"},"leads":{"type":"array","maxItems":1000,"minItems":1,"items":{"$ref":"#/components/schemas/models.LeadInput"}}}},"models.LeadInput":{"type":"object","required":["email"],"properties":{"company":{"type":"string"},"customVariables":{"description":"CustomVariables holds any attribute the eight named fields do not cover,\nfor example the page a visitor landed on. Each key becomes a merge tag\nusable in email copy as {key}. Keys are matched case-insensitively with\nspaces treated as underscores, so \"Page Visited\" and \"page_visited\" are\nthe same tag. Values are stored as given; non-string values are rendered\nwith their JSON representation at send time.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The models.CreatedCampaign object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CreatedCampaign":{"type":"object","properties":{"createdAt":{"type":"string"},"emoji":{"type":"string"},"flow":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"},"timezone":{"type":"string"},"updatedAt":{"type":"string"}}}}}}
```

## The models.CreatedLead object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.CreatedLead":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"integer"}}}}}}
```

## The models.DeleteCampaignResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.DeleteCampaignResponse":{"type":"object","properties":{"id":{"type":"integer"},"message":{"type":"string"}}}}}}
```

## The models.DeleteLeadResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.DeleteLeadResponse":{"type":"object","properties":{"id":{"type":"integer"},"message":{"type":"string"}}}}}}
```

## The models.DeleteWebhookResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.DeleteWebhookResponse":{"type":"object","properties":{"id":{"type":"integer"},"message":{"type":"string"}}}}}}
```

## The models.ErrorCampaignNotFound object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorCampaignNotFound":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorCampaignValidation object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorCampaignValidation":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToConnectSenderEmail object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToConnectSenderEmail":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToCreateCampaign object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToCreateCampaign":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToCreateLeads object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToCreateLeads":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToDeleteCampaign object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToDeleteCampaign":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToDeleteLead object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToDeleteLead":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToDeleteWebhook object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToDeleteWebhook":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToLaunchCampaign object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToLaunchCampaign":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToMoveLead object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToMoveLead":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToPauseCampaign object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToPauseCampaign":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToRegisterWebhook object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToRegisterWebhook":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToReplaceSequence object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToReplaceSequence":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToRetrieveLeads object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToRetrieveLeads":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToRetrieveSequence object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToRetrieveSequence":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToUpdateCampaign object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToUpdateCampaign":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToUpdateLead object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToUpdateLead":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToUpdateSenderEmail object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToUpdateSenderEmail":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorFailedToUpdateWebhook object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorFailedToUpdateWebhook":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorForbidden object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorForbidden":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorInvalidCampaignID object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorInvalidCampaignID":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorInvalidLeadID object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorInvalidLeadID":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorInvalidRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorInvalidRequest":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorInvalidSenderEmailAddress object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorInvalidSenderEmailAddress":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorInvalidSenderEmailID object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorInvalidSenderEmailID":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorInvalidSequence object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorInvalidSequence":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorInvalidWebhookID object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorInvalidWebhookID":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorInvalidWebhookType object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorInvalidWebhookType":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorNotFound object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorNotFound":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorSenderEmailAlreadyConnected object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorSenderEmailAlreadyConnected":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorSenderEmailNotFound object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorSenderEmailNotFound":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorSenderEmailPlanLimit object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorSenderEmailPlanLimit":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorUnauthorized object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorUnsupportedCampaignFlow object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorUnsupportedCampaignFlow":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.ErrorWebhookNotFound object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ErrorWebhookNotFound":{"type":"object","properties":{"error":{"type":"string"}}}}}}
```

## The models.GetCampaignResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.GetCampaignResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"emails":{"$ref":"#/components/schemas/models.CampaignEmailCounts"},"emoji":{"type":"string"},"flow":{"type":"string"},"id":{"type":"integer"},"launchAt":{"type":"string"},"name":{"type":"string"},"schedule":{"$ref":"#/components/schemas/models.CampaignSchedule"},"sendAt":{"type":"string"},"settings":{"$ref":"#/components/schemas/models.CampaignSettings"},"stats":{"$ref":"#/components/schemas/models.CampaignStats"},"status":{"type":"string"},"timezone":{"type":"string"},"updatedAt":{"type":"string"}}},"models.CampaignEmailCounts":{"type":"object","properties":{"blocked":{"type":"integer"},"bounced":{"type":"integer"},"canceled":{"type":"integer"},"catchAll":{"type":"integer"},"deferred":{"type":"integer"},"delivered":{"type":"integer"},"draft":{"type":"integer"},"dropped":{"type":"integer"},"errorOnSent":{"type":"integer"},"followUp":{"type":"integer"},"followUpCanceled":{"type":"integer"},"followUpDraft":{"type":"integer"},"invalid":{"type":"integer"},"pending":{"type":"integer"},"replied":{"type":"integer"},"scheduled":{"type":"integer"},"sent":{"type":"integer"},"spamReport":{"type":"integer"},"total":{"type":"integer"},"waitingForReschedule":{"type":"integer"}}},"models.CampaignSchedule":{"type":"object","properties":{"cronSchedule":{"type":"string"},"daysSchedule":{"type":"array","items":{"type":"string"}},"endSchedule":{"type":"string"},"everySchedule":{"type":"integer"},"maximumTimeBetweenEmails":{"type":"integer"},"minimumTimeBetweenEmails":{"type":"integer"},"startSchedule":{"type":"string"}}},"models.CampaignSettings":{"type":"object","properties":{"allowNonBusinessEmails":{"type":"boolean"},"ignoreOutOfOfficeReplies":{"type":"boolean"},"isEnabledCatchallValidated":{"type":"boolean"},"isEnabledEmailVerifier":{"type":"boolean"},"isEnabledIgnoreHardBouncedLeads":{"type":"boolean"},"isEnabledIgnoreLeadsWhoAlreadyResponded":{"type":"boolean"},"isEnabledLlm":{"type":"boolean"},"isEnabledSkipLeadIfAlreadyExists":{"type":"boolean"},"isEnabledStopFollowUpsForSameCompany":{"type":"boolean"},"isEnabledStopFollowUpsOnReply":{"type":"boolean"},"maximumSendingLimitPerSenderEmail":{"type":"integer"},"maximumSendingLimitPerSenderEmailVariation":{"type":"integer"}}},"models.CampaignStats":{"type":"object","properties":{"bouncedLeadsCount":{"type":"integer"},"contactedLeadsCount":{"type":"integer"},"emailsSentCount":{"type":"integer"},"leadsRespondedPositivelyCount":{"type":"integer"},"repliedLeadsCount":{"type":"integer"},"senderEmailsConnected":{"type":"integer"},"senderEmailsDisconnected":{"type":"integer"},"senderEmailsTotal":{"type":"integer"}}}}}}
```

## The models.GetLeadResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.GetLeadResponse":{"type":"object","properties":{"lead":{"$ref":"#/components/schemas/models.LeadResponse"}}},"models.LeadResponse":{"type":"object","properties":{"company":{"type":"string"},"createdAt":{"type":"string"},"customVariables":{"description":"CustomVariables are the lead's merge tags beyond the named fields.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"integer"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The models.GetSenderEmailResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.GetSenderEmailResponse":{"type":"object","properties":{"senderEmail":{"$ref":"#/components/schemas/models.SenderEmailResponse"}}},"models.SenderEmailResponse":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"connectionHistory":{"type":"array","items":{"$ref":"#/components/schemas/models.ConnectionHistoryItem"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"lastDisconnectedAt":{"type":"string"},"lastReconnectedAt":{"type":"string"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"pictureUrl":{"type":"string"},"provider":{"type":"string"},"provisioningStatus":{"type":"string"},"signature":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}},"models.ConnectionHistoryItem":{"type":"object","properties":{"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"disconnectionReason":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"eventType":{"type":"string"},"id":{"type":"integer"},"userId":{"type":"integer"}}}}}}
```

## The models.GetSequenceResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.GetSequenceResponse":{"type":"object","properties":{"campaignId":{"type":"integer"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/models.SequenceStep"}},"total":{"type":"integer"}}},"models.SequenceStep":{"type":"object","properties":{"body":{"type":"string"},"contentType":{"type":"string"},"delayDays":{"type":"integer"},"order":{"type":"integer"},"subject":{"type":"string"},"useSameThread":{"type":"boolean"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/models.SequenceVariant"}}}},"models.SequenceVariant":{"type":"object","properties":{"body":{"type":"string"},"label":{"type":"string"},"subject":{"type":"string"}}}}}}
```

## The models.InstantlyAccount object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.InstantlyAccount":{"type":"object","properties":{"dailyLimit":{"type":"integer"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"provider":{"description":"google | microsoft | other","type":"string"},"status":{"type":"integer"}}}}}}
```

## The models.InstantlyAccountsRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.InstantlyAccountsRequest":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"description":"APIKey is the caller's Instantly.ai API key.","type":"string"}}}}}}
```

## The models.InstantlyAccountsResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.InstantlyAccountsResponse":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/models.InstantlyAccount"}},"imapCsvTemplate":{"description":"ImapCsvTemplate is a ready-to-fill CSV (one row per account, password\ncolumn empty) for the bulk IMAP/SMTP connection flow.","type":"string"}}},"models.InstantlyAccount":{"type":"object","properties":{"dailyLimit":{"type":"integer"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"provider":{"description":"google | microsoft | other","type":"string"},"status":{"type":"integer"}}}}}}
```

## The models.InstantlyImportRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.InstantlyImportRequest":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"description":"APIKey is the caller's Instantly.ai API key. It is validated with a\nlightweight call to Instantly before the import job is enqueued.","type":"string"}}}}}}
```

## The models.InstantlyImportResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.InstantlyImportResponse":{"type":"object","properties":{"jobId":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"}}}}}}
```

## The models.LaunchCampaignResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.LaunchCampaignResponse":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}}},"message":{"type":"string"}}}}}}
```

## The models.LeadInput object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.LeadInput":{"type":"object","required":["email"],"properties":{"company":{"type":"string"},"customVariables":{"description":"CustomVariables holds any attribute the eight named fields do not cover,\nfor example the page a visitor landed on. Each key becomes a merge tag\nusable in email copy as {key}. Keys are matched case-insensitively with\nspaces treated as underscores, so \"Page Visited\" and \"page_visited\" are\nthe same tag. Values are stored as given; non-string values are rendered\nwith their JSON representation at send time.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The models.LeadResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.LeadResponse":{"type":"object","properties":{"company":{"type":"string"},"createdAt":{"type":"string"},"customVariables":{"description":"CustomVariables are the lead's merge tags beyond the named fields.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"integer"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The models.ListCampaignsResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ListCampaignsResponse":{"type":"object","properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/models.CampaignListItem"}},"hasMore":{"type":"boolean"},"limit":{"type":"integer"},"page":{"type":"integer"},"total":{"type":"integer"}}},"models.CampaignListItem":{"type":"object","properties":{"createdAt":{"type":"string"},"emoji":{"type":"string"},"flow":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"stats":{"$ref":"#/components/schemas/models.CampaignStats"},"status":{"type":"string"},"updatedAt":{"type":"string"}}},"models.CampaignStats":{"type":"object","properties":{"bouncedLeadsCount":{"type":"integer"},"contactedLeadsCount":{"type":"integer"},"emailsSentCount":{"type":"integer"},"leadsRespondedPositivelyCount":{"type":"integer"},"repliedLeadsCount":{"type":"integer"},"senderEmailsConnected":{"type":"integer"},"senderEmailsDisconnected":{"type":"integer"},"senderEmailsTotal":{"type":"integer"}}}}}}
```

## The models.ListLeadsResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ListLeadsResponse":{"type":"object","properties":{"hasMore":{"type":"boolean"},"leads":{"type":"array","items":{"$ref":"#/components/schemas/models.LeadResponse"}},"limit":{"type":"integer"},"page":{"type":"integer"},"total":{"type":"integer"}}},"models.LeadResponse":{"type":"object","properties":{"company":{"type":"string"},"createdAt":{"type":"string"},"customVariables":{"description":"CustomVariables are the lead's merge tags beyond the named fields.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"integer"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The models.ListSenderEmailsResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ListSenderEmailsResponse":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer"},"page":{"type":"integer"},"senderEmails":{"type":"array","items":{"$ref":"#/components/schemas/models.SenderEmailListItem"}},"total":{"type":"integer"}}},"models.SenderEmailListItem":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"provider":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}}}}}
```

## The models.ListWebhooksResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ListWebhooksResponse":{"type":"object","properties":{"total":{"type":"integer"},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/models.WebhookResponse"}}}},"models.WebhookResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer"},"isEnabled":{"type":"boolean"},"name":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}}}}}
```

## The models.MemberInfo object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.MemberInfo":{"type":"object","properties":{"created_at":{"type":"string"},"email_address":{"type":"string"},"name":{"type":"string"}}}}}}
```

## The models.MoveLeadRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.MoveLeadRequest":{"type":"object","required":["targetCampaignId"],"properties":{"targetCampaignId":{"type":"integer"}}}}}}
```

## The models.MoveLeadResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.MoveLeadResponse":{"type":"object","properties":{"leadId":{"type":"integer"},"message":{"type":"string"},"sourceCampaignId":{"type":"integer"},"targetCampaignId":{"type":"integer"}}}}}}
```

## The models.PauseCampaignResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.PauseCampaignResponse":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}}},"message":{"type":"string"}}}}}}
```

## The models.RegisterWebhookRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.RegisterWebhookRequest":{"type":"object","required":["type","url"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}}}}}
```

## The models.RegisterWebhookResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.RegisterWebhookResponse":{"type":"object","properties":{"message":{"type":"string"},"webhook":{"$ref":"#/components/schemas/models.WebhookResponse"}}},"models.WebhookResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer"},"isEnabled":{"type":"boolean"},"name":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}}}}}
```

## The models.ReplaceSequenceRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ReplaceSequenceRequest":{"type":"object","required":["steps"],"properties":{"signature":{"type":"string"},"steps":{"type":"array","maxItems":20,"minItems":1,"items":{"$ref":"#/components/schemas/models.SequenceStepInput"}}}},"models.SequenceStepInput":{"type":"object","required":["body","subject"],"properties":{"body":{"type":"string","minLength":1},"contentType":{"type":"string","enum":["html","text"]},"delayDays":{"type":"integer","maximum":365,"minimum":0},"order":{"type":"integer","minimum":1},"subject":{"type":"string","maxLength":998,"minLength":1},"useSameThread":{"type":"boolean"},"variants":{"type":"array","maxItems":25,"items":{"$ref":"#/components/schemas/models.SequenceVariantInput"}}}},"models.SequenceVariantInput":{"type":"object","required":["label","subject"],"properties":{"body":{"type":"string"},"label":{"type":"string","maxLength":2,"minLength":1},"subject":{"type":"string","maxLength":998,"minLength":1}}}}}}
```

## The models.ReplaceSequenceResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.ReplaceSequenceResponse":{"type":"object","properties":{"campaignId":{"type":"integer"},"message":{"type":"string"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/models.SequenceStep"}},"total":{"type":"integer"}}},"models.SequenceStep":{"type":"object","properties":{"body":{"type":"string"},"contentType":{"type":"string"},"delayDays":{"type":"integer"},"order":{"type":"integer"},"subject":{"type":"string"},"useSameThread":{"type":"boolean"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/models.SequenceVariant"}}}},"models.SequenceVariant":{"type":"object","properties":{"body":{"type":"string"},"label":{"type":"string"},"subject":{"type":"string"}}}}}}
```

## The models.SenderEmailListItem object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.SenderEmailListItem":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"provider":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}}}}}
```

## The models.SenderEmailResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.SenderEmailResponse":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"connectionHistory":{"type":"array","items":{"$ref":"#/components/schemas/models.ConnectionHistoryItem"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"lastDisconnectedAt":{"type":"string"},"lastReconnectedAt":{"type":"string"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"pictureUrl":{"type":"string"},"provider":{"type":"string"},"provisioningStatus":{"type":"string"},"signature":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}},"models.ConnectionHistoryItem":{"type":"object","properties":{"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"disconnectionReason":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"eventType":{"type":"string"},"id":{"type":"integer"},"userId":{"type":"integer"}}}}}}
```

## The models.SequenceStep object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.SequenceStep":{"type":"object","properties":{"body":{"type":"string"},"contentType":{"type":"string"},"delayDays":{"type":"integer"},"order":{"type":"integer"},"subject":{"type":"string"},"useSameThread":{"type":"boolean"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/models.SequenceVariant"}}}},"models.SequenceVariant":{"type":"object","properties":{"body":{"type":"string"},"label":{"type":"string"},"subject":{"type":"string"}}}}}}
```

## The models.SequenceStepInput object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.SequenceStepInput":{"type":"object","required":["body","subject"],"properties":{"body":{"type":"string","minLength":1},"contentType":{"type":"string","enum":["html","text"]},"delayDays":{"type":"integer","maximum":365,"minimum":0},"order":{"type":"integer","minimum":1},"subject":{"type":"string","maxLength":998,"minLength":1},"useSameThread":{"type":"boolean"},"variants":{"type":"array","maxItems":25,"items":{"$ref":"#/components/schemas/models.SequenceVariantInput"}}}},"models.SequenceVariantInput":{"type":"object","required":["label","subject"],"properties":{"body":{"type":"string"},"label":{"type":"string","maxLength":2,"minLength":1},"subject":{"type":"string","maxLength":998,"minLength":1}}}}}}
```

## The models.SequenceVariant object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.SequenceVariant":{"type":"object","properties":{"body":{"type":"string"},"label":{"type":"string"},"subject":{"type":"string"}}}}}}
```

## The models.SequenceVariantInput object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.SequenceVariantInput":{"type":"object","required":["label","subject"],"properties":{"body":{"type":"string"},"label":{"type":"string","maxLength":2,"minLength":1},"subject":{"type":"string","maxLength":998,"minLength":1}}}}}}
```

## The models.SpaceDetails object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.SpaceDetails":{"type":"object","properties":{"completed_campaigns":{"type":"integer"},"draft_campaigns":{"type":"integer"},"members":{"type":"array","items":{"$ref":"#/components/schemas/models.MemberInfo"}},"not_started_campaigns":{"type":"integer"},"paused_campaigns":{"type":"integer"},"running_campaigns":{"type":"integer"},"space_id":{"type":"integer"},"total_campaigns":{"type":"integer"},"total_members":{"type":"integer"}}},"models.MemberInfo":{"type":"object","properties":{"created_at":{"type":"string"},"email_address":{"type":"string"},"name":{"type":"string"}}}}}}
```

## The models.UpdateCampaignRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateCampaignRequest":{"type":"object","properties":{"allowNonBusinessEmails":{"type":"boolean"},"emoji":{"type":"string","maxLength":10,"minLength":1},"ignoreOutOfOfficeReplies":{"type":"boolean"},"isEnabledCatchallValidated":{"type":"boolean"},"isEnabledEmailVerifier":{"type":"boolean"},"isEnabledIgnoreHardBouncedLeads":{"type":"boolean"},"isEnabledIgnoreLeadsWhoAlreadyResponded":{"type":"boolean"},"isEnabledLlm":{"description":"Settings - all optional boolean flags","type":"boolean"},"isEnabledSkipLeadIfAlreadyExists":{"type":"boolean"},"isEnabledStopFollowUpsForSameCompany":{"type":"boolean"},"isEnabledStopFollowUpsOnReply":{"type":"boolean"},"maximumSendingLimitPerSenderEmail":{"type":"integer","maximum":10000,"minimum":1},"maximumSendingLimitPerSenderEmailVariation":{"type":"integer","maximum":100,"minimum":0},"maximumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"minimumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"name":{"type":"string","maxLength":255,"minLength":1},"timezone":{"type":"string"}}}}}}
```

## The models.UpdateCampaignResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateCampaignResponse":{"type":"object","properties":{"campaign":{"type":"object","properties":{"emoji":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}}},"message":{"type":"string"}}}}}}
```

## The models.UpdateCampaignScheduleRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateCampaignScheduleRequest":{"type":"object","required":["timezone"],"properties":{"daysSchedule":{"description":"For multiple leads scheduled campaigns (flow 3) and API campaigns","type":"array","items":{"type":"string"}},"endSchedule":{"type":"string"},"everySchedule":{"type":"integer","minimum":1},"maximumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"minimumTimeBetweenEmails":{"type":"integer","maximum":30,"minimum":2},"sendAt":{"description":"For single lead scheduled campaigns (flow 2)","type":"string"},"startSchedule":{"type":"string"},"timezone":{"description":"Common field for all flows","type":"string"}}}}}}
```

## The models.UpdateCampaignScheduleResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateCampaignScheduleResponse":{"type":"object","properties":{"campaign":{"type":"object","properties":{"daysSchedule":{"type":"array","items":{"type":"string"}},"endSchedule":{"type":"string"},"everySchedule":{"type":"integer"},"id":{"type":"integer"},"maximumTimeBetweenEmails":{"type":"integer"},"minimumTimeBetweenEmails":{"type":"integer"},"name":{"type":"string"},"startSchedule":{"type":"string"},"timezone":{"type":"string"}}},"message":{"type":"string"}}}}}}
```

## The models.UpdateLeadRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateLeadRequest":{"type":"object","properties":{"company":{"type":"string"},"customVariables":{"description":"CustomVariables replaces the lead's whole custom variable map when\nprovided. Omit it to leave the existing variables untouched.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The models.UpdateLeadResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateLeadResponse":{"type":"object","properties":{"lead":{"$ref":"#/components/schemas/models.LeadResponse"},"message":{"type":"string"}}},"models.LeadResponse":{"type":"object","properties":{"company":{"type":"string"},"createdAt":{"type":"string"},"customVariables":{"description":"CustomVariables are the lead's merge tags beyond the named fields.","type":"object","additionalProperties":true},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"integer"},"lastName":{"type":"string"},"linkedin":{"type":"string"},"middleName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The models.UpdateSenderEmailRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateSenderEmailRequest":{"type":"object","properties":{"currentDailyLimit":{"type":"integer","maximum":1000,"minimum":0},"familyName":{"type":"string","maxLength":255},"givenName":{"type":"string","maxLength":255,"minLength":1},"maximumSendingsLimitPerDay":{"description":"Daily sending limits","type":"integer","maximum":1000,"minimum":1},"minimumSendingsLimitPerDay":{"type":"integer","maximum":1000,"minimum":1},"signature":{"type":"string"},"toggleGradualBuildUp":{"description":"Gradual build-up toggle","type":"boolean"}}}}}}
```

## The models.UpdateSenderEmailResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateSenderEmailResponse":{"type":"object","properties":{"message":{"type":"string"},"senderEmail":{"$ref":"#/components/schemas/models.SenderEmailResponse"}}},"models.SenderEmailResponse":{"type":"object","properties":{"address":{"type":"string"},"campaignIds":{"type":"array","items":{"type":"integer"}},"connectionHistory":{"type":"array","items":{"$ref":"#/components/schemas/models.ConnectionHistoryItem"}},"createdAt":{"type":"string"},"currentDailyLimit":{"type":"integer"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"familyName":{"type":"string"},"givenName":{"type":"string"},"id":{"type":"integer"},"isConnected":{"type":"boolean"},"lastDisconnectedAt":{"type":"string"},"lastReconnectedAt":{"type":"string"},"manuallyDisconnected":{"type":"boolean"},"maximumSendingsLimitPerDay":{"type":"integer"},"minimumSendingsLimitPerDay":{"type":"integer"},"pictureUrl":{"type":"string"},"provider":{"type":"string"},"provisioningStatus":{"type":"string"},"signature":{"type":"string"},"toggleGradualBuildUp":{"type":"boolean"},"updatedAt":{"type":"string"}}},"models.ConnectionHistoryItem":{"type":"object","properties":{"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"disconnectionReason":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"eventType":{"type":"string"},"id":{"type":"integer"},"userId":{"type":"integer"}}}}}}
```

## The models.UpdateWebhookRequest object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateWebhookRequest":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"name":{"type":"string","maxLength":255,"minLength":1},"type":{"type":"string"},"url":{"type":"string"}}}}}}
```

## The models.UpdateWebhookResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.UpdateWebhookResponse":{"type":"object","properties":{"message":{"type":"string"},"webhook":{"$ref":"#/components/schemas/models.WebhookResponse"}}},"models.WebhookResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer"},"isEnabled":{"type":"boolean"},"name":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}}}}}
```

## The models.WebhookResponse object

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"components":{"schemas":{"models.WebhookResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer"},"isEnabled":{"type":"boolean"},"name":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}}}}}
```


# Contact us

If you encounter an issue with our API, then contact us at <support@emailchaser.com> and we will respond within 24-hours.&#x20;

Additionally, if you want us to add new endpoints to our API, send us an email.


# Slack channel

Our Slack channel is the place to ask our team, other developers and community questions about our API. If you need help integrating your system with our API, then reach out here.

Get in there by [clicking here!](https://emailchasercommunity.slack.com/archives/C07CX8QNKRC)


