{"openapi":"3.0.0","info":{"title":"DitLead API documentation","version":"1.0.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"<a href=\"https://ditlead.com/docs/integrations/api\" target=\"_blank\">Learn more</a> about API authorization for each resource type."}},"schemas":{"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"string"}}},"ApiKeyCheckInput":{"type":"object","required":["keyType"],"properties":{"keyType":{"type":"string","default":"platform","enum":["platform","system"]}}},"ApiKeyCheckResponse":{"type":"object","properties":{"success":{"type":"boolean"},"isValid":{"type":"boolean"}}},"CampaignFetchData":{"type":"object","properties":{"campaignId":{"type":"string","description":"the campaigns's ID"},"organizationId":{"type":"string","description":"the organization's ID"},"campaignName":{"type":"string","description":"the campaign's name"},"campaignTimezone":{"type":"string","description":"the campaign's timezone"},"sendingDays":{"type":"object","description":"array of the campaign's scheduled sending days.","properties":{"enabled":{"type":"booleanmn","description":"is the campaign scheduled to send out on this day of the week."},"day":{"type":"string","description":"the scheduled day of the week."},"period":{"type":"object","description":"start end time for the day","properties":{"start":{"type":"string","description":"the start time"},"end":{"type":"string","description":"the end time"}}}}},"useCustomStartEndTime":{"type":"boolean","description":"does the campaign use custom defined start and end time."},"startTime":{"type":"object","properties":{"date":{"type":"string","description":"the campaign's start time"}}},"endTime":{"type":"object","properties":{"date":{"type":"string","description":"the campaign's end time"}}},"campaignSteps":{"type":"number","description":"number of flow steps in campaign"},"numberOfSent":{"type":"number","description":"number of messages sent"},"numberOfReplies":{"type":"number","description":"number of replies"},"numberOfOpens":{"type":"number","description":"number of unique opens"},"totalNumberOfOpens":{"type":"number","description":"number of unique opens"},"numberOfUnsubscribe":{"type":"number","description":"number of unsubscribes"},"totalNumberOfBounce":{"type":"number","description":"number of bounce"},"totalNumberOfProspect":{"type":"number","description":"number of leads/prospects in list"},"totalProspectNotOnList":{"type":"number","description":"number of leads/prospects not in list"},"totalNumberOfContacted":{"type":"number","description":"number of leads/prospects contacted"},"numberOfSendError":{"type":"number","description":"number of failed sends"},"numberOfCompletedCampaign":{"type":"number","description":"number of leads/prospects that has completed campaign"},"totalNumberVideoView":{"type":"number","description":"number of video views"},"campaignStatus":{"type":"object","description":"The campaign status, and status message","properties":{"isActive":{"type":"string","description":"denotes if the campaign is active"},"status":{"type":"string","description":"the campaigns status state","enum":["all","draft","scheduled","running","paused","errored","restarted","completed","limit"]},"statusComments":{"type":"string","description":"the campaigns status state message"}}}}},"ContactEmail":{"type":"object","properties":{"email":{"type":"string","description":"Email address"},"verified":{"type":"boolean","description":"Whether the email has been verified"},"isValid":{"type":"boolean","description":"Whether the email is valid"},"isPrimary":{"type":"boolean","description":"Whether this is the primary email"},"msg":{"type":"string","description":"Verification message"}}},"ContactData":{"type":"object","properties":{"_id":{"type":"string","description":"MongoDB ObjectId of the contact"},"publicId":{"type":"string","description":"The contact's public ID"},"emails":{"type":"array","items":{"$ref":"#/components/schemas/ContactEmail"},"description":"Array of email addresses"},"list":{"type":"array","items":{"type":"string"},"description":"Array of list ObjectIds the contact belongs to"},"campaignsParticipated":{"type":"array","items":{"type":"string"},"description":"Array of campaign ObjectIds"},"addedBy":{"type":"object","description":"User who added the contact"},"assignTo":{"type":"array","items":{"type":"object"},"description":"Users assigned to this contact"},"contactLabel":{"type":"array","items":{"type":"object"},"description":"Labels assigned to the contact"},"addedVia":{"type":"string","description":"How the contact was added (upload, api, etc.)"},"attributes":{"type":"object","description":"Custom attributes of the contact","additionalProperties":{"type":"string"}}}},"ContactFetchResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the request was successful"},"data":{"type":"object","properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/ContactData"}},"pagination":{"type":"object","properties":{"page":{"type":"number","description":"Current page number"},"pageSize":{"type":"number","description":"Number of items per page"},"totalCount":{"type":"number","description":"Total number of contacts"},"totalPages":{"type":"number","description":"Total number of pages"}}}}}}},"ContactDataResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the request was successful"},"data":{"$ref":"#/components/schemas/ContactData"}}},"CreateContactInput":{"type":"object","required":["attributes"],"properties":{"attributes":{"type":"object","description":"Contact attributes (e.g., first_name, last_name, email, etc.)","example":{"first_name":"John","last_name":"Doe","email":"john.doe@example.com","company":"Acme Inc"}},"listId":{"type":"string","description":"Optional - Public ID of a list to add the contact to"},"campaignId":{"type":"string","description":"Optional - ID of a campaign to add the contact to"}}},"UpdateContactInput":{"type":"object","required":["attributes"],"properties":{"attributes":{"type":"object","description":"Contact attributes to update","example":{"first_name":"Jane","company":"New Company Inc","phone":"+1234567890"}}}},"DeleteContactResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the request was successful"},"data":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"deletedContact":{"type":"object","properties":{"publicId":{"type":"string","description":"The public ID of the deleted contact"},"email":{"type":"string","description":"The email of the deleted contact"}}}}}}},"AddContactToListInput":{"type":"object","required":["listId"],"properties":{"listId":{"type":"string","description":"The public ID of the list to add the contact to","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"}}},"RemoveContactFromListInput":{"type":"object","required":["listId"],"properties":{"listId":{"type":"string","description":"The public ID of the list to remove the contact from","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"}}},"SuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the request was successful"},"data":{"type":"object","properties":{"message":{"type":"string","description":"Success message"}}}}},"EmailVerifyInput":{"type":"object","properties":{"email":{"type":"string","description":"the email address to check for validity."}}},"EmailVerifyResult":{"type":"object","properties":{"success":{"type":"boolean","description":"status of the email verification."},"msg":{"type":"string","description":"verification result in text."},"email":{"type":"string","description":"the verified email address."}}},"SuccessDataObjectResponse":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"}}},"ListData":{"type":"object","properties":{"publicId":{"type":"string","description":"The list's public ID"},"listName":{"type":"string","description":"The list's name"},"listType":{"type":"string","description":"The type of list (manual, upload, etc.)"},"totalNumberOfProspect":{"type":"number","description":"Total number of prospects in the list"},"totalNumberOfProspectUpload":{"type":"number","description":"Total number of prospects uploaded"},"totalNumberOfVerified":{"type":"number","description":"Total number of verified prospects"},"numberOfValid":{"type":"number","description":"Number of valid email addresses"},"numberOfInValid":{"type":"number","description":"Number of invalid email addresses"},"numberOfUnknown":{"type":"number","description":"Number of unknown email addresses"},"verifyList":{"type":"boolean","description":"Whether the list should be verified"},"status":{"type":"object","description":"The list status","properties":{"statusMsg":{"type":"string","description":"The status message"},"statusComments":{"type":"array","items":{"type":"string"},"description":"Status comments"}}},"createdAt":{"type":"string","format":"date-time","description":"When the list was created"}}},"ListFetchResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the request was successful"},"data":{"type":"object","properties":{"lists":{"type":"array","items":{"$ref":"#/components/schemas/ListData"}},"pagination":{"type":"object","properties":{"page":{"type":"number","description":"Current page number"},"pageSize":{"type":"number","description":"Number of items per page"},"totalCount":{"type":"number","description":"Total number of lists"},"totalPages":{"type":"number","description":"Total number of pages"}}}}}}},"ListDataResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the request was successful"},"data":{"$ref":"#/components/schemas/ListData"}}},"CreateListInput":{"type":"object","required":["listName"],"properties":{"listName":{"type":"string","description":"The name for the new list","example":"My New List"}}},"DeleteListResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the request was successful"},"data":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"deletedList":{"type":"object","properties":{"publicId":{"type":"string","description":"The public ID of the deleted list"},"listName":{"type":"string","description":"The name of the deleted list"}}}}}}},"MailboxAddInput":{"type":"object","properties":{"firstName":{"type":"string","require":true,"description":"the sender first name"},"lastName":{"type":"string","require":true,"description":"the sender last name"},"smtp":{"type":"object","description":"the SMTP credentials.","properties":{"host":{"type":"string","required":true,"description":"the SMTP host to connect to"},"port":{"type":"string","required":true,"description":"the SMTP port to connect to"},"username":{"type":"string","required":true,"description":"the SMTP username"},"password":{"type":"string","required":true,"description":"the SMTP password"},"emailAddress":{"type":"string","required":true,"description":"the SMTP email address"},"secure":{"type":"boolean","required":true,"description":"will force secure if true. false by default"}}},"imap":{"type":"object","description":"the IMAP credentials.","properties":{"host":{"type":"string","required":true,"description":"the IMAP host to connect to"},"port":{"type":"string","required":true,"description":"the IMAP port to connect to"},"username":{"type":"string","required":true,"description":"the IMAP username"},"password":{"type":"string","required":true,"description":"the IMAP password"}}}}},"MailboxValidateInput":{"type":"object","properties":{"smtp":{"type":"object","description":"the SMTP credentials.","properties":{"host":{"type":"string","required":true,"description":"the SMTP host to connect to"},"port":{"type":"string","required":true,"description":"the SMTP port to connect to"},"username":{"type":"string","required":true,"description":"the SMTP username"},"password":{"type":"string","required":true,"description":"the SMTP password"},"emailAddress":{"type":"string","required":true,"description":"the SMTP email address"},"secure":{"type":"boolean","required":true,"description":"will force secure if true. false by default"}}},"imap":{"type":"object","description":"the IMAP credentials.","properties":{"host":{"type":"string","required":true,"description":"the IMAP host to connect to"},"port":{"type":"string","required":true,"description":"the IMAP port to connect to"},"username":{"type":"string","required":true,"description":"the IMAP username"},"password":{"type":"string","required":true,"description":"the IMAP password"}}}}},"MailboxWarmingInput":{"type":"object","properties":{"mailboxAddress":{"type":"string","description":"the email address to turn on.","required":true},"warming":{"type":"boolean","description":"true to turn on warming for the mailbox, false to turn off warming.","required":true},"manualWarming":{"type":"boolean","description":"true to turn on manual warming for the mailbox, false to turn off manual warming. Defaults to false.","required":true}}},"MailboxReconnectInput":{"type":"object","properties":{"mailboxAddress":{"type":"string","description":"the email address to reconnect."},"mailboxId":{"type":"string","description":"the mailbox ID to reconnect."}}},"MailboxInsightInput":{"type":"object","properties":{"fromDate":{"type":"date","description":"start datetime to fetch insight for. Defaults to 7 days ago"},"toDate":{"type":"date","description":"end datetime to fetch insight for. Defaults to current day"}}},"MailboxUpdateInput":{"type":"object","properties":{"firstName":{"type":"string","required":false,"description":"the first name to update (optional)."},"lastName":{"type":"string","required":false,"description":"the last name to update (optional)."},"warmingSetting":{"type":"object","description":"the SMTP credentials.","properties":{"maximumSendPerDay":{"type":"integer","required":false,"description":"max. email to send for warmup per day"},"increasePerDay":{"type":"integer","required":false,"description":"number to ramp up warmup by daily."},"replyRate":{"type":"integer","required":false,"description":"daily reply rate (in percentage)."},"randomizeMax":{"type":"boolean","required":false,"description":"randomize the max. emails sent per day."}}},"campaignSetting":{"type":"object","description":"the SMTP credentials.","properties":{"sendingLimit":{"type":"integer","required":false,"description":"max. email to send as part of campaign per day"}}}}},"MailboxToggleResult":{"type":"object","properties":{"success":{"type":"boolean","description":"true if the operation was successful."},"data":{"type":"string","description":"the result of the operation in text."}}},"WebhookSubscriptionFetchData":{"type":"object","properties":{"success":{"type":"boolean"},"eventId":{"type":"array","description":"array of the event ids"},"url":{"type":"array","description":"destination URL"},"createdAt":{"type":"array","description":"the datetime subscription was created"},"updatedAt":{"type":"array","description":"the datetime subscription was created"}}},"WebhookSubscriptionInput":{"type":"object","properties":{"eventId":{"type":"array","description":"array of the event ids to subscribe to.","example":["email.bounced","email.opened","contact.replied","contact.created","contact.contacted","contact.started_campaign","contact.restarted_campaign","contact.completed_campaign","contact.unsubscribed","campaign.scheduled","campaign.started","campaign.paused","campaign.restarted","campaign.completed","campaign.limit","campaign.errored"]},"name":{"type":"string","description":"optional name to identify the webhook subscription on dashboard."},"url":{"type":"string","description":"the webhook URL to send event to."}}},"WebhookSubscriptionDataObjectResponse":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string","description":"the webhook subscription id. This Id can be used to fetch, update or delete the webhook subscription later."}}}}},"security":[{"bearerAuth":[]}],"paths":{"/v1/apikey/validate":{"post":{"tags":["API key"],"description":"Check the status of an API key","summary":"Confirm the status of an API key","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCheckInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCheckResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCheckResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contact":{"get":{"tags":["Contact"],"description":"Get all contacts in workspace with optional search","summary":"Get all contacts in workspace","parameters":[{"in":"query","name":"page","schema":{"type":"integer"},"description":"For pagination, defaults to page 1"},{"in":"query","name":"pageSize","schema":{"type":"integer"},"description":"Number of items per page (max 100), defaults to 20"},{"in":"query","name":"search","schema":{"type":"string"},"description":"Search term to filter contacts by attributes"},{"in":"query","name":"listId","schema":{"type":"string"},"description":"Filter contacts by list public ID"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFetchResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Contact"],"description":"Create a new contact","summary":"Create a new contact","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactInput"}}}},"responses":{"201":{"description":"Contact created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDataResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Contact already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contact/{contactId}":{"get":{"tags":["Contact"],"description":"Get a single contact by ID","summary":"Get a single contact by ID","parameters":[{"in":"path","name":"contactId","required":true,"schema":{"type":"string"},"description":"The public ID of the contact"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDataResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contact not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Contact"],"description":"Update a contact's attributes","summary":"Update a contact's attributes","parameters":[{"in":"path","name":"contactId","required":true,"schema":{"type":"string"},"description":"The public ID of the contact"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactInput"}}}},"responses":{"200":{"description":"Contact updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDataResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contact not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Contact"],"description":"Delete a contact","summary":"Delete a contact","parameters":[{"in":"path","name":"contactId","required":true,"schema":{"type":"string"},"description":"The public ID of the contact to delete"}],"responses":{"200":{"description":"Contact deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteContactResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contact not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contact/{contactId}/add-to-list":{"post":{"tags":["Contact"],"description":"Add a contact to a list","summary":"Add a contact to a list","parameters":[{"in":"path","name":"contactId","required":true,"schema":{"type":"string"},"description":"The public ID of the contact"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddContactToListInput"}}}},"responses":{"200":{"description":"Contact added to list successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contact or list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contact/{contactId}/remove-from-list":{"post":{"tags":["Contact"],"description":"Remove a contact from a list","summary":"Remove a contact from a list","parameters":[{"in":"path","name":"contactId","required":true,"schema":{"type":"string"},"description":"The public ID of the contact"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveContactFromListInput"}}}},"responses":{"200":{"description":"Contact removed from list successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contact or list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/verify-email":{"post":{"tags":["Email Verification"],"description":"Check the validity of an email address","summary":"Verify email","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/list":{"get":{"tags":["List"],"description":"Get all lists in workspace","summary":"Get all lists in workspace","parameters":[{"in":"query","name":"page","schema":{"type":"integer"},"description":"For pagination, defaults to page 1"},{"in":"query","name":"pageSize","schema":{"type":"integer"},"description":"Number of items per page (max 100), defaults to 20"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFetchResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["List"],"description":"Create a new empty list","summary":"Create a new empty list","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListInput"}}}},"responses":{"201":{"description":"List created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDataResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/list/{listId}":{"get":{"tags":["List"],"description":"Get a single list by ID","summary":"Get a single list by ID","parameters":[{"in":"path","name":"listId","required":true,"schema":{"type":"string"},"description":"The public ID of the list"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDataResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"List not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["List"],"description":"Delete a list","summary":"Delete a list and remove it from all associated contacts","parameters":[{"in":"path","name":"listId","required":true,"schema":{"type":"string"},"description":"The public ID of the list to delete"}],"responses":{"200":{"description":"List deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteListResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"List not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/campaign":{"get":{"tags":["Campaign"],"description":"List campaigns","summary":"List campaigns","parameters":[{"in":"query","name":"status","schema":{"type":"integer"},"description":"The campaigns status to fetch","enum":["all","draft","scheduled","running","paused","errored","restarted","completed","limit"]},{"in":"query","name":"page","schema":{"type":"integer"},"description":"For paginations, defaults to page 1"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignFetchData"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mailbox":{"get":{"tags":["Mailbox"],"description":"Get all mailboxes in project","summary":"Get all mailboxes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionFetchData"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Mailbox"],"description":"Add a mailbox the SMTP and the IMAP","summary":"Add new mailbox","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxAddInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionFetchData"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Webhook"],"description":"Delete mailbox","summary":"Delete mailbox","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxReconnectInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessDataObjectResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mailbox/{mailboxId}":{"get":{"tags":["Mailbox"],"description":"Get details of a mailbox","summary":"Get a mailbox","parameters":[{"in":"query","name":"mailboxId","schema":{"type":"integer"},"description":"The ID of the mailbox to fetch"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionFetchData"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Mailbox"],"description":"Update mailbox settings","summary":"Update a mailbox settings","parameters":[{"in":"query","name":"mailboxId","schema":{"type":"integer"},"description":"The ID of the mailbox to update"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxUpdateInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mailbox/validate":{"post":{"tags":["Mailbox"],"description":"Validate the SMTP and the IMAP of a mailbox","summary":"Validate SMTP & IMAP","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxValidateInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionFetchData"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mailbox/reconnect":{"post":{"tags":["Mailbox"],"description":"Attempt to reconnect a mailbox using existing settings","summary":"Validate a mailbox","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxReconnectInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionFetchData"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mailbox/check-spf":{"post":{"tags":["Mailbox"],"description":"Check SPF record for a domain","summary":"Verify SPF configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"Domain name to check SPF record for","example":"example.com"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"hasSpf":{"type":"boolean"},"record":{"type":"string"},"isValid":{"type":"boolean"}}}}}}}},"400":{"description":"Bad request"},"403":{"description":"Authentication failed"}}}},"/v1/mailbox/check-dkim":{"post":{"tags":["Mailbox"],"description":"Check DKIM record for a domain","summary":"Verify DKIM configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain","selector"],"properties":{"domain":{"type":"string","description":"Domain name to check DKIM record for","example":"example.com"},"selector":{"type":"string","description":"DKIM selector (e.g., default, google, k1)","example":"default"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"hasDkim":{"type":"boolean"},"record":{"type":"string"},"isValid":{"type":"boolean"}}}}}}}},"400":{"description":"Bad request"},"403":{"description":"Authentication failed"}}}},"/v1/mailbox/check-dmarc":{"post":{"tags":["Mailbox"],"description":"Check DMARC record for a domain","summary":"Verify DMARC configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"Domain name to check DMARC record for","example":"example.com"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"hasDmarc":{"type":"boolean"},"record":{"type":"string"},"isValid":{"type":"boolean"},"policy":{"type":"string"}}}}}}}},"400":{"description":"Bad request"},"403":{"description":"Authentication failed"}}}},"/v1/mailbox/batch-dns-check":{"post":{"tags":["Mailbox"],"description":"Start a batch DNS check for all sender accounts in a workspace","summary":"Batch DNS verification","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["checkTypes"],"properties":{"checkTypes":{"type":"array","items":{"type":"string","enum":["spf","dkim","dmarc"]},"description":"Types of DNS checks to perform","example":["spf","dkim","dmarc"]},"dkimSelector":{"type":"string","description":"DKIM selector to use (default is 'default')","example":"default"}}}}}},"responses":{"200":{"description":"Batch created successfully"},"400":{"description":"Bad request"},"403":{"description":"Authentication failed"}}},"get":{"tags":["Mailbox"],"description":"Get all batch DNS checks for a workspace","summary":"List all batches","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","default":20},"description":"Number of batches to return"},{"in":"query","name":"offset","schema":{"type":"integer","default":0},"description":"Number of batches to skip"}],"responses":{"200":{"description":"Success"},"403":{"description":"Authentication failed"}}}},"/v1/mailbox/batch-dns-check/{batchId}":{"get":{"tags":["Mailbox"],"description":"Get batch DNS check results","summary":"Fetch batch DNS check results","parameters":[{"in":"path","name":"batchId","required":true,"schema":{"type":"string"},"description":"The batch ID"}],"responses":{"200":{"description":"Success"},"403":{"description":"Authentication failed"},"404":{"description":"Batch not found"}}}},"/v1/mailbox/insight/{mailboxId}":{"get":{"tags":["Mailbox"],"description":"Get campaign and warming data for mailbox","summary":"Mailbox Insight & Analytics","parameters":[{"in":"query","name":"mailboxId","schema":{"type":"integer"},"description":"The ID of the mailbox to fetch analytics for."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxInsightInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionFetchData"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mailbox/warming":{"post":{"tags":["Mailbox"],"description":"Toggle warming for a mailbox","summary":"Turn on/off warming","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxWarmingInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mailbox/warming/send":{"post":{"tags":["Mailbox"],"description":"Manually trigger warming send for a mailbox with manual warming enabled. This endpoint will send warming emails immediately for the specified mailbox. The mailbox must have manual warming enabled and must not have reached the daily limit of 45 sends.","summary":"Send warming emails manually","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mailboxId":{"type":"string","description":"The public ID of the mailbox"},"mailboxAddress":{"type":"string","description":"The email address of the mailbox"}},"oneOf":[{"required":["mailboxId"]},{"required":["mailboxAddress"]}]}}}},"responses":{"200":{"description":"Warming send triggered successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"string","example":"Warming send triggered successfully"}}}}}},"400":{"description":"Bad request - mailbox not found, manual warming not enabled, or daily limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed or unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/webhook":{"get":{"tags":["Webhook"],"description":"Get webhook subcription detail","summary":"Get webhook subscription","parameters":[{"in":"query","name":"subscriptionId","schema":{"type":"integer"},"description":"The subscriptionId to fetch"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionFetchData"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Webhook"],"description":"Create new webhook subscription","summary":"Create new webhook subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionDataObjectResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Webhook"],"description":"Delete webhook subscription","summary":"Delete webhook subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessDataObjectResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"tags":[]}