### GET /api/leads Source: https://dedi.emailbison.com/api/reference.openapi Retrieve a list of all leads for the authenticated user. ```markdown ### Parameters - **search** (string, query, optional): Search term for filtering replies. (example: "interested") - **filters** (object, query, optional) (example: []) - **filters.lead_campaign_status** (string, query, optional): Filter by lead campaign status. One of `in_sequence`, `sequence_finished`, `sequence_stopped`, `never_contacted`, `replied`. (example: "in_sequence") - **filters.emails_sent** (array (string), query, optional): Filter by the number of emails sent. (example: ["facilis"]) - **filters.emails_sent.criteria** (string, query, optional): Comparison operator for emails sent. One of `=`, `>=`, `>`, `<=`, `<`. (example: ">=") - **filters.emails_sent.value** (integer, query, optional): Value for the number of emails sent. (example: 10) - **filters.opens** (object, query, optional) (example: []) - **filters.opens.criteria** (string, query, optional): Comparison operator for email opens. One of `=`, `>=`, `>`, `<=`, `<`. (example: ">") - **filters.opens.value** (integer, query, optional): Value for the number of email opens. (example: 100) - **filters.replies** (object, query, optional) (example: []) - **filters.replies.criteria** (string, query, optional): Comparison operator for replies. One of `=`, `>=`, `>`, `<=`, `<`. (example: "=") - **filters.replies.value** (integer, query, optional): Value for the number of replies. (example: 5) - **filters.verification_statuses** (array (string), query, optional): A verification status. Accepted values: `verifying`, `verified`, `risky`, `unknown`, `unverified`, `inactive`, `bounced`, `unsubscribed` (example: ["eos"]) - **filters.tag_ids** (array (integer), query, optional): Filter by tag IDs. (example: [1,2,3]) - **filters.excluded_tag_ids** (array (integer), query, optional): Exclude leads by tag IDs. (example: [1,2,3]) - **filters.without_tags** (boolean, query, optional): Only show leads that have no tags attached. (example: true) - **filters.created_at** (object, query, optional) (example: []) - **filters.created_at.criteria** (string, query, optional): Comparison operator for the created_at date. One of `=`, `>=`, `>`, `<=`, `<`. (example: ">=") - **filters.created_at.value** (string, query, optional): Value for the created_at date. Must be a valid date in YYYY-MM-DD format. (example: "2025-03-22") - **filters.updated_at** (object, query, optional) (example: []) - **filters.updated_at.criteria** (string, query, optional): Comparison operator for the updated_at date. One of `=`, `>=`, `>`, `<=`, `<`. (example: "<=") - **filters.updated_at.value** (string, query, optional): Value for the updated_at date. Must be a valid date in YYYY-MM-DD format. (example: "2025-03-22") ### Responses #### 200 - response - **data** (array (object)) (example: [{"id":1,"first_name":"John","last_name":"Doe","email":"john@doe.com","title":"Engineer","company":"John Doe company","notes":"Important client","status":"verified","custom_variables":[{"name":"company_website","value":"https://company.com"},{"name":"linkedin_url","value":"https://linkedin.com/in/john"}],"lead_campaign_data":[],"overall_stats":{"emails_sent":3,"opens":0,"replies":1,"unique_replies":1,"unique_opens":0},"created_at":"2025-04-14T16:59:21.000000Z","updated_at":"2025-05-18T12:53:32.000000Z"},{"id":1,"first_name":"Jane","last_name":"Doe","email":"jane@doe.com","title":"Engineer","company":"Jane Doe company","notes":"Important client","status":"bounced","custom_variables":[{"name":"company_website","value":"https://company.com"},{"name":"linkedin_url","value":"https://linkedin.com/in/jane"}],"lead_campaign_data":[],"overall_stats":{"emails_sent":3,"opens":0,"replies":1,"unique_replies":1,"unique_opens":0},"created_at":"2025-04-14T16:59:21.000000Z","updated_at":"2025-05-18T12:53:32.000000Z"}]) Array items: - **id** (integer) (example: 1) - **first_name** (string) (example: "John") - **last_name** (string) (example: "Doe") - **email** (string) (example: "john@doe.com") - **title** (string) (example: "Engineer") - **company** (string) (example: "John Doe company") - **notes** (string) (example: "Important client") - **status** (string) (example: "verified") - **custom_variables** (array (object)) (example: [{"name":"company_website","value":"https://company.com"},{"name":"linkedin_url","value":"https://linkedin.com/in/john"}]) Array items: - **name** (string) (example: "company_website") - **value** (string) (example: "https://company.com") - **lead_campaign_data** (array) (example: []) - **overall_stats** (object) - **emails_sent** (integer) (example: 3) - **opens** (integer) (example: 0) - **replies** (integer) (example: 1) - **unique_replies** (integer) (example: 1) - **unique_opens** (integer) (example: 0) - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/leads?search=interested&filters=&filters.lead_campaign_status=in_sequence&filters.emails_sent=facilis&filters.emails_sent.criteria=>=&filters.emails_sent.value=10&filters.opens=&filters.opens.criteria=>&filters.opens.value=100&filters.replies=&filters.replies.criteria==&filters.replies.value=5&filters.verification_statuses=eos&filters.tag_ids=1,2,3&filters.excluded_tag_ids=1,2,3&filters.without_tags=true&filters.created_at=&filters.created_at.criteria=>=&filters.created_at.value=2025-03-22&filters.updated_at=&filters.updated_at.criteria=<=&filters.updated_at.value=2025-03-22" ``` ``` -------------------------------- ### GET /api/webhook-events/sample-payload Source: https://dedi.emailbison.com/api/reference.openapi API endpoint for GET /api/webhook-events/sample-payload ```markdown ### Request Body **Content-Type:** application/json - **event_type** (string (email_sent|lead_first_contacted|lead_replied|lead_interested|email_opened|email_bounced|lead_unsubscribed|email_account_added|email_account_removed|email_account_disconnected|email_account_reconnected|manual_email_sent|untracked_reply_received)) (required): The event type. (example: "email_sent") ("email_sent"|"lead_first_contacted"|"lead_replied"|"lead_interested"|"email_opened"|"email_bounced"|"lead_unsubscribed"|"email_account_added"|"email_account_removed"|"email_account_disconnected"|"email_account_reconnected"|"manual_email_sent"|"untracked_reply_received") ### Responses #### 200 - response ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/webhook-events/sample-payload" \ -H "Content-Type: application/json" \ -d '{ "event_type": "email_sent" }' ``` ``` -------------------------------- ### GET /api/leads/{lead_id} Source: https://dedi.emailbison.com/api/reference.openapi Retrieve the details of a specific lead ```markdown ### Responses #### 200 - response ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/leads/{lead_id}" ``` ``` -------------------------------- ### GET /api/webhook-url Source: https://dedi.emailbison.com/api/reference.openapi Retrieve a list of all webhooks for the authenticated user's workspace. ```markdown ### Responses #### 200 - response - **data** (array (object)) (example: [{"id":1,"name":"Slack","url":"https://your-webhook-url/webhooks","events":["email_sent","email_opened"],"created_at":"2025-04-14T16:59:21.000000Z","updated_at":"2025-05-18T12:53:32.000000Z"}]) Array items: - **id** (integer) (example: 1) - **name** (string) (example: "Slack") - **url** (string) (example: "https://your-webhook-url/webhooks") - **events** (array (string)) (example: ["email_sent","email_opened"]) - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/webhook-url" ``` ``` -------------------------------- ### GET /api/campaigns/v1.1/{campaign_id}/sequence-steps Source: https://dedi.emailbison.com/api/reference.openapi This endpoint allows the authenticated user to view the sequence steps of the campaign. ```markdown ### Responses #### 200 - success ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/campaigns/v1.1/{campaign_id}/sequence-steps" ``` ``` -------------------------------- ### GET /api/campaigns/{campaign_id}/sequence-steps Source: https://dedi.emailbison.com/api/reference.openapi This endpoint allows the authenticated user to view the sequence steps of the campaign. ```markdown ### Responses #### 200 - success ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/campaigns/{campaign_id}/sequence-steps" ``` ``` -------------------------------- ### POST /api/campaigns/{campaign_id}/leads/attach-leads Source: https://dedi.emailbison.com/api/reference.openapi This endpoint allows the authenticated user to import leads by their IDs into a campaign. If you are adding leads to an active campaign, we cache them locally, and then sync every 5 minutes to ensure there is no interruption to your sending. **Important:** If you add leads into a "reply followup campaign" using this endpoint, we will just start the conversation from **the last sent reply**. We recommend that you use the more explicit `/replies/id/followup-campaign/push` endpoint to control exactly which conversation you want to follow up on. ```markdown ### Request Body **Content-Type:** application/json - **allow_parallel_sending** (boolean): Force add leads that are "In Sequence" in other campaigns. (example: true) - **lead_ids** (array (integer)) (required): An array of lead IDs to import. (example: [1,2,3]) ### Responses #### 200 - success - **data** (object) - **success** (boolean) (example: true) - **message** (string) (example: "Leads successfully added to Campaign One.") ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/campaigns/{campaign_id}/leads/attach-leads" \ -H "Content-Type: application/json" \ -d '{ "allow_parallel_sending": true, "lead_ids": [ 1, 2, 3 ] }' ``` ``` -------------------------------- ### DELETE /api/leads/bulk Source: https://dedi.emailbison.com/api/reference.openapi Permanently delete leads and associated data **Hold on. You may not need to delete leads.** You may be able to simply re-upload leads instead **I mapped the wrong custom variables for these leads** No problem! Simply re-upload the leads and we'll update the records in place. This is especially useful if you already have lead history like conversations, campaigns, etc. **I don't to email these leads anymore** We recommend unsubscribing these leads instead. Bulk select -> Update Status -> Unsubscribe. This way, you can preserve the lead history and stats for future reports. **I want to update these leads with more data** Instead of deleting, simply re-upload the leads. We'll update the records in place. This includes all campaign emails too. **I attached the wrong tags** You can simply bulk select and remove tags instead of deleting the entire leads. **I don't want to use too much data** We have no limits on lead storage. You can store as many leads as you want. We recommend keeping the leads in your workspace for future campaigns. **Why is it recommended to not delete leads?** We build up history for every lead record you upload. There's no harm in keeping it in the workspace. If you delete leads, future responses from that lead will be untracked and not tied to any campaigns. This can be harder to manage for your team. The behaviour of deleting leads comes from other sequencers that charge you for lead storage. You don't need to worry about deleting leads for 99% of use cases. **If you still want to delete leads, please read below carefully** **Leads will be removed from campaigns** This will stop all future emails for the selected leads and remove them from all campaigns. If campaigns have no more leads remaining, they will be marked as "completed" **Previous campaign stats will be preserved** We will preserve all past campaign stats like replies, opens, emails sent, etc. **Past and future lead conversations will be affected** Past conversations will no longer be tied to these leads, and future emails in those conversations will show us as "untracked." **Leads will no longer be accessible via API** If you have workflows that use these leads, they will no longer work. These leads will be deleted permanently. If you re-upload them in the future, they will be different lead records. **Future campaign stats will not be tracked** If any of these leads reply in the future, those emails not increment any stats. They will show up as "untracked replies." This also means that any webhook workflows will also be affected. **We recommend unsubscribing these leads instead** If you simply don't want to email these leads anymore, we recommend unsubscribing them instead. This will preserve all data and all workflows, and there's no additional cost to you. ```markdown ### Request Body **Content-Type:** application/json - **lead_ids** (array (integer)): The id of an existing record in the leads table. (example: [20]) ### Responses #### 200 - response - **data** (object) - **success** (boolean) (example: true) - **message** (string) (example: "Lead deletion process started. This might take some time depending on how much data you have.") ### Example Usage ```bash curl -X DELETE "https://dedi.emailbison.com/api/leads/bulk" \ -H "Content-Type: application/json" \ -d '{ "lead_ids": [ 20 ] }' ``` ``` -------------------------------- ### GET /api/webhook-url/{id} Source: https://dedi.emailbison.com/api/reference.openapi Get the details of a specific webhook. ```markdown ### Responses #### 200 - response - **data** (object) - **id** (integer) (example: 1) - **name** (string) (example: "Slack") - **url** (string) (example: "https://your-webhook-url/webhooks") - **events** (array (string)) (example: ["email_sent","email_opened"]) - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/webhook-url/{id}" ``` ``` -------------------------------- ### GET /api/reply-templates/{id} Source: https://dedi.emailbison.com/api/reference.openapi API endpoint for GET /api/reply-templates/{id} ```markdown ### Responses #### 200 - success - **data** (object) - **id** (integer) (example: 9) - **uuid** (string) (example: "a04c1f16-2cef-4bb7-b90b-c5de0fc4b239") - **user_id** (integer) (example: 19) - **name** (string) (example: "new reply template") - **body** (string) (example: "this is a message") - **replyTemplateAttachments** (array) (example: []) - **created_at** (string) (example: "2025-11-07T03:59:55.000000Z") - **updated_at** (string) (example: "2025-11-07T03:59:55.000000Z") ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/reply-templates/{id}" ``` ``` -------------------------------- ### POST /api/workspaces/v1.1/users Source: https://dedi.emailbison.com/api/reference.openapi This endpoint provides a convenient way to create a new user on your instance, and add them to the current workspace. This provides an alternate flow where you want to mass create users. If you simply want to invite users and have them accept the invitation, or accept it programmatically, consider using the other endpoints. ```markdown ### Request Body **Content-Type:** application/json - **name** (string) (required): The name of the user (example: "John Doe") - **password** (string) (required): The password of the user. (example: "securepasswordlol") - **email** (string) (required): The email of the user. (example: "example@example.com") - **role** (string (admin|editor|client|reseller)) (required): The role of the new team member. (example: "admin") ("admin"|"editor"|"client"|"reseller") ### Responses #### 200 - success - **data** (object) - **name** (string) (example: "tingz") - **email** (string) (example: "listkittest@example.com") - **workspace** (object) - **id** (integer) (example: 1) - **name** (string) (example: "Cody's Team") - **personal_team** (boolean) (example: true) - **main** (boolean) (example: true) - **parent_id** (string) (example: null) - **total_monthly_email_verification_credits** (integer) (example: 2500) - **remaining_monthly_email_verification_credits** (integer) (example: 2462) - **remaining_email_verification_credits** (integer) (example: 250) - **total_email_verification_credits** (integer) (example: 250) - **sender_email_limit** (integer) (example: 0) - **warmup_limit** (integer) (example: 50) - **warmup_filter_phrase** (string) (example: "qvwy7276") - **has_access_to_warmup** (boolean) (example: false) - **has_access_to_healthcheck** (boolean) (example: false) - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") - **profile_photo_path** (string) (example: null) - **profile_photo_url** (string) (example: "https://ui-avatars.com/api/?name=t&color=7F9CF5&background=EBF4FF") - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/workspaces/v1.1/users" \ -H "Content-Type: application/json" \ -d '{ "name": "John Doe", "password": "securepasswordlol", "email": "example@example.com", "role": "admin" }' ``` ``` -------------------------------- ### DELETE /api/leads/{lead_id} Source: https://dedi.emailbison.com/api/reference.openapi Permanently delete a lead and its associated data **Hold on. You may not need to delete leads.** You may be able to simply re-upload leads instead **I mapped the wrong custom variables for these leads** No problem! Simply re-upload the leads and we'll update the records in place. This is especially useful if you already have lead history like conversations, campaigns, etc. **I don't to email these leads anymore** We recommend unsubscribing these leads instead. Bulk select -> Update Status -> Unsubscribe. This way, you can preserve the lead history and stats for future reports. **I want to update these leads with more data** Instead of deleting, simply re-upload the leads. We'll update the records in place. This includes all campaign emails too. **I attached the wrong tags** You can simply bulk select and remove tags instead of deleting the entire leads. **I don't want to use too much data** We have no limits on lead storage. You can store as many leads as you want. We recommend keeping the leads in your workspace for future campaigns. **Why is it recommended to not delete leads?** We build up history for every lead record you upload. There's no harm in keeping it in the workspace. If you delete leads, future responses from that lead will be untracked and not tied to any campaigns. This can be harder to manage for your team. The behaviour of deleting leads comes from other sequencers that charge you for lead storage. You don't need to worry about deleting leads for 99% of use cases. **If you still want to delete leads, please read below carefully** **Leads will be removed from campaigns** This will stop all future emails for the selected leads and remove them from all campaigns. If campaigns have no more leads remaining, they will be marked as "completed" **Previous campaign stats will be preserved** We will preserve all past campaign stats like replies, opens, emails sent, etc. **Past and future lead conversations will be affected** Past conversations will no longer be tied to these leads, and future emails in those conversations will show us as "untracked." **Leads will no longer be accessible via API** If you have workflows that use these leads, they will no longer work. These leads will be deleted permanently. If you re-upload them in the future, they will be different lead records. **Future campaign stats will not be tracked** If any of these leads reply in the future, those emails not increment any stats. They will show up as "untracked replies." This also means that any webhook workflows will also be affected. **We recommend unsubscribing these leads instead** If you simply don't want to email these leads anymore, we recommend unsubscribing them instead. This will preserve all data and all workflows, and there's no additional cost to you. ```markdown ### Responses #### 200 - response - **data** (object) - **success** (boolean) (example: true) - **message** (string) (example: "Lead deletion process started. This might take some time depending on how much data you have.") ### Example Usage ```bash curl -X DELETE "https://dedi.emailbison.com/api/leads/{lead_id}" ``` ``` -------------------------------- ### GET /api/blacklisted-domains/{blacklisted_domain_id} Source: https://dedi.emailbison.com/api/reference.openapi Get a single blacklisted domain by domain or ID. ```markdown ### Responses #### 200 - response - **data** (object) - **id** (integer) (example: 1) - **domain** (string) (example: "example.com") - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/blacklisted-domains/{blacklisted_domain_id}" ``` ``` -------------------------------- ### POST /api/campaigns/v1.1/{campaign_id}/sequence-steps Source: https://dedi.emailbison.com/api/reference.openapi This endpoint allows the authenticated user to create the campaign sequence steps from scratch. ```markdown ### Request Body **Content-Type:** application/json - **title** (string) (required): The title for the sequence. (example: "John Doe sequence") - **sequence_steps** (array (object)) (required): The array containing the sequence steps (example: [{"email_subject":"EmailBison is awesome!","email_subject_variables":["{FIRST_NAME}"],"order":1,"email_body":"Try it now!","wait_in_days":1,"variant":false,"thread_reply":false},{"email_subject":"EmailBison is awesome!","order":2,"email_body":"Try it now!","wait_in_days":1,"variant":true,"variant_from_step":1,"thread_reply":true}]) Array items: - **email_subject** (string) (required): The subject for the email. (example: "EmailBison is awesome!") - **email_subject_variables** (array (string)): The subject variables. (example: null) - **order** (integer): The order of the step. (example: 1) - **email_body** (string) (required): The body of the email. (example: "Try it now!") - **wait_in_days** (integer) (required): The days to wait. (example: 1) - **variant** (boolean): Wheter the step is variant of another step. (example: true) - **variant_from_step** (integer): The order number of a step in the current request to be a variant of. Cannot be used with variant_from_step_id. (example: 1) - **variant_from_step_id** (integer): The ID of an already saved step to be a variant of. Cannot be used with variant_from_step. (example: 42) - **attachments** (string (binary)): The email attachments. - **thread_reply** (boolean): Wheter the step should be a reply from the previous step. (example: false) ### Responses #### 200 - success ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/campaigns/v1.1/{campaign_id}/sequence-steps" \ -H "Content-Type: application/json" \ -d '{ "title": "John Doe sequence", "sequence_steps": [ { "email_subject": "EmailBison is awesome!", "email_subject_variables": [ "{FIRST_NAME}" ], "order": 1, "email_body": "Try it now!", "wait_in_days": 1, "variant": false, "thread_reply": false }, { "email_subject": "EmailBison is awesome!", "order": 2, "email_body": "Try it now!", "wait_in_days": 1, "variant": true, "variant_from_step": 1, "thread_reply": true } ] }' ``` ``` -------------------------------- ### GET /api/blacklisted-emails/{blacklisted_email_id} Source: https://dedi.emailbison.com/api/reference.openapi Get a single blacklisted email by email or ID. ```markdown ### Responses #### 200 - response - **data** (object) - **id** (integer) (example: 1) - **email** (string) (example: "john@doe.com") - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/blacklisted-emails/{blacklisted_email_id}" ``` ``` -------------------------------- ### GET /api/replies/{reply_id}/conversation-thread Source: https://dedi.emailbison.com/api/reference.openapi This endpoint gets you a reply object with all previous and newer messages to build out an email thread The user must provide a valid authentication token in the request header to access this endpoint. ```markdown ### Responses #### 200 - success ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/replies/{reply_id}/conversation-thread" ``` ``` -------------------------------- ### POST /api/campaigns/{campaign_id}/sequence-steps Source: https://dedi.emailbison.com/api/reference.openapi This endpoint allows the authenticated user to create the campaign sequence steps from scratch. ```markdown ### Request Body **Content-Type:** application/json - **title** (string) (required): The title for the sequence. (example: "John Doe sequence") - **sequence_steps** (array (object)) (required): The array containing the sequence steps (example: [{"email_subject":"Hello there!","email_subject_variables":["{FIRST_NAME}"],"order":1,"email_body":"Try it now!","wait_in_days":1,"variant":false,"thread_reply":false},{"email_subject":"Reaching you again","order":2,"email_body":"Try it now!","wait_in_days":1,"variant":true,"variant_from_step":1,"thread_reply":true}]) Array items: - **email_subject** (string) (required): The subject for the email. (example: "Hello there!") - **email_subject_variables** (array (string)): The subject variables. (example: null) - **order** (integer): The order of the step. (example: 1) - **email_body** (string) (required): The body of the email. (example: "Try it now!") - **wait_in_days** (integer) (required): The days to wait. (example: 1) - **variant** (boolean): Wheter the step is variant of another step. (example: true) - **variant_from_step** (integer): The order number of a step in the current request to be a variant of. Cannot be used with variant_from_step_id. (example: 1) - **variant_from_step_id** (integer): The ID of an already saved step to be a variant of. Cannot be used with variant_from_step. (example: 42) - **attachments** (string (binary)): The email attachments. - **thread_reply** (boolean): Wheter the step should be a reply from the previous step. (example: false) ### Responses #### 200 - success ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/campaigns/{campaign_id}/sequence-steps" \ -H "Content-Type: application/json" \ -d '{ "title": "John Doe sequence", "sequence_steps": [ { "email_subject": "Hello there!", "email_subject_variables": [ "{FIRST_NAME}" ], "order": 1, "email_body": "Try it now!", "wait_in_days": 1, "variant": false, "thread_reply": false }, { "email_subject": "Reaching you again", "order": 2, "email_body": "Try it now!", "wait_in_days": 1, "variant": true, "variant_from_step": 1, "thread_reply": true } ] }' ``` ``` -------------------------------- ### POST /api/users/headless-ui-token Source: https://dedi.emailbison.com/api/reference.openapi This endpoint allows the authenticated workspace user to generate a headless UI token that's valid for up to **120 minutes**. The main purpose of this token is to let partner apps generate an embedded email account connection view without having to build all the UIs and OAuth connection flows themselves. Multiple tokens can be active at a given time, but they will all expire after **120 minutes**. `Note:` You must get your requesting URL whitelisted before embedding the iframe in your app. The user must provide a valid authentication token in the request header to access this endpoint. Once a token is generated, you can open an Iframe with the following URL format: https://your-bison-url.com/headless-ui-login?token=YOUR_HEADLESS_UI_TOKEN This will then open an app window without the navigation bar and breadcrumbs. For now, this is only recommended for enabling email account connection flows for OAuth. ```markdown ### Responses #### 200 - success ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/users/headless-ui-token" ``` ``` -------------------------------- ### GET /api/tags/{id} Source: https://dedi.emailbison.com/api/reference.openapi View a saved tag. ```markdown ### Responses #### 201 - response ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/tags/{id}" ``` ``` -------------------------------- ### POST /api/leads Source: https://dedi.emailbison.com/api/reference.openapi Create a single lead (contact) record ```markdown ### Request Body **Content-Type:** application/json - **first_name** (string) (required): The first name of the contact. (example: "John") - **last_name** (string) (required): The last name of the contact. (example: "Doe") - **email** (string) (required): The email address of the contact. Must be unique and in a valid email format. (example: "john@doe.com") - **title** (string): optional The title of the contact. (example: "Engineer") - **company** (string): optional The company name of the contact. (example: "John Doe Company") - **notes** (string): optional Additional notes about the contact. (example: "Important client") - **custom_variables** (array (object)): optional Array of custom variable objects (example: [{"name":"phone number","value":"9059999999"}]) Array items: - **name** (required): name of the custom variable field (example: "omnis") - **value** (required): value of the custom variable (example: "accusantium") ### Responses #### 201 - response ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/leads" \ -H "Content-Type: application/json" \ -d '{ "first_name": "John", "last_name": "Doe", "email": "john@doe.com", "title": "Engineer", "company": "John Doe Company", "notes": "Important client", "custom_variables": [ { "name": "phone number", "value": "9059999999" } ] }' ``` ``` -------------------------------- ### GET /api/scheduled-emails Source: https://dedi.emailbison.com/api/reference.openapi This endpoint retrieves all scheduled (campaign) emails. ```markdown ### Parameters - **status** (string (sent|scheduled|failed|paused|stopped|bounced|unsubscribed), query, optional): The status of the scheduled email. (example: "bounced") - **campaign_ids** ([]integer, query, optional): Campaign IDs to filter by. (example: "124") - **lead_ids** ([]integer, query, optional): Lead IDs to filter by. (example: "4123") - **sender_email_ids** ([]integer, query, optional): Sender Email IDs to filter by. (example: "533") - **scheduled_date_local** (object, query, optional) (example: []) - **scheduled_date_local.value** (string, query, optional): The date the email was/is scheduled to be sent at. The timezone is the campaign's timezone. The format is YYYY-MM-DD. (example: "2025-04-12") - **scheduled_date_local.criteria** (string (<|<=|=|>|>=), query, optional): The criteria for the scheduled_date_local. (example: ">") ### Responses #### 200 - success ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/scheduled-emails?status=bounced&campaign_ids=124&lead_ids=4123&sender_email_ids=533&scheduled_date_local=&scheduled_date_local.value=2025-04-12&scheduled_date_local.criteria=>" ``` ``` -------------------------------- ### POST /api/leads/bulk/csv Source: https://dedi.emailbison.com/api/reference.openapi Create multiple leads in a single request using a CSV ```markdown ### Request Body **Content-Type:** multipart/form-data - **name** (string) (required): The name of the contact list (example: "John Doe's list") - **csv** (string (binary)) (required): The CSV file containing the contacts. - **existing_lead_behavior** (string (put|patch|skip)): The behavior to apply when a lead already exists. If "put", replace all the lead's fields, including custom variables, with the fields from this request. Fields not passed are cleared. If "patch", only update a field if it's passed. Fields and custom variables not passed are kept. If "skip", do not process the lead. Will default to "put" if not passed. (example: "put") ("put"|"patch"|"skip") - **columnsToMap** (array (object)) (required): The array with the header fields from the csv. (example: [[]]) Array items: - **first_name** (string) (required): The first name header field of the csv. (example: "name") - **last_name** (string) (required): The last name header field of the csv. (example: "last name") - **email** (string) (required): The email address header field of the csv. (example: "e-mail") - **title** (string): The title header field of the csv. (example: "title") - **company** (string): The company name header field of the csv. (example: "company") - **custom_variable** (string): The header field from your CSV to match this variable (example: "linkedin") ### Responses #### 201 - response ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/leads/bulk/csv" \ -H "Content-Type: application/json" \ -d '{ "name": "John Doe's list", "csv": "string", "existing_lead_behavior": "put", "columnsToMap": [ [] ] }' ``` ``` -------------------------------- ### POST /api/campaigns/{campaign_id}/create-schedule-from-template Source: https://dedi.emailbison.com/api/reference.openapi This endpoint allows the authenticated user to create the schedule of the campaign. ```markdown ### Request Body **Content-Type:** application/json - **schedule_id** (integer) (required): The ID of the schedule template. (example: 1) ### Responses #### 200 - success - **data** (object) - **id** (integer) (example: 1) - **type** (string) (example: "Generated") - **monday** (boolean) (example: true) - **tuesday** (boolean) (example: true) - **wednesday** (boolean) (example: true) - **thursday** (boolean) (example: true) - **friday** (boolean) (example: true) - **saturday** (boolean) (example: false) - **sunday** (boolean) (example: false) - **start_time** (string) (example: "08:00") - **end_time** (string) (example: "17:00") - **timezone** (string) (example: "America/New_York") - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/campaigns/{campaign_id}/create-schedule-from-template" \ -H "Content-Type: application/json" \ -d '{ "schedule_id": 1 }' ``` ``` -------------------------------- ### GET /api/custom-variables Source: https://dedi.emailbison.com/api/reference.openapi Retrieve a list of all custom variables for your workspace ```markdown ### Responses #### 200 - response - **data** (array (object)) (example: [{"id":1,"name":"linkedin","created_at":"2025-04-14T16:59:21.000000Z","updated_at":"2025-05-18T12:53:32.000000Z"},{"id":2,"name":"phone_number","created_at":"2025-04-14T16:59:21.000000Z","updated_at":"2025-05-18T12:53:32.000000Z"}]) Array items: - **id** (integer) (example: 1) - **name** (string) (example: "linkedin") - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/custom-variables" ``` ``` -------------------------------- ### POST /api/tags/attach-to-leads Source: https://dedi.emailbison.com/api/reference.openapi Attach multiple tags to leads. ```markdown ### Request Body **Content-Type:** application/json - **tag_ids** (array (integer)) (required): An array of tag IDs to be attached. (example: [1,2]) - **lead_ids** (array (integer)) (required): An array of lead IDs to which the tags will be attached. (example: [3,4]) - **skip_webhooks** (boolean): If set to true, no webhooks will be fired for this action. (example: false) ### Responses #### 200 - response - **data** (object) - **success** (boolean) (example: true) - **message** (string) (example: "Successfully attached tags to leads") ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/tags/attach-to-leads" \ -H "Content-Type: application/json" \ -d '{ "tag_ids": [ 1, 2 ], "lead_ids": [ 3, 4 ], "skip_webhooks": false }' ``` ``` -------------------------------- ### GET /api/custom-tracking-domain/{id} Source: https://dedi.emailbison.com/api/reference.openapi View a custom tracking domains. ```markdown ### Responses #### 200 - response - **data** (object) - **id** (integer) (example: 1) - **domain** (string) (example: "example.com") - **status** (string) (example: "Connected") - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X GET "https://dedi.emailbison.com/api/custom-tracking-domain/{id}" ``` ``` -------------------------------- ### POST /api/blacklisted-domains/bulk Source: https://dedi.emailbison.com/api/reference.openapi Add multiple domains to the blacklist in a single request. ```markdown ### Request Body **Content-Type:** multipart/form-data - **csv** (string (binary)) (required): The CSV file containing the blacklisted emails. ### Responses #### 201 - response - **data** (array (object)) (example: [{"id":1,"domain":"example.com","created_at":"2025-04-14T16:59:21.000000Z","updated_at":"2025-05-18T12:53:32.000000Z"},{"id":2,"domain":"test.com","created_at":"2025-04-14T16:59:21.000000Z","updated_at":"2025-05-18T12:53:32.000000Z"}]) Array items: - **id** (integer) (example: 1) - **domain** (string) (example: "example.com") - **created_at** (string) (example: "2025-04-14T16:59:21.000000Z") - **updated_at** (string) (example: "2025-05-18T12:53:32.000000Z") ### Example Usage ```bash curl -X POST "https://dedi.emailbison.com/api/blacklisted-domains/bulk" \ -H "Content-Type: application/json" \ -d '{ "csv": "string" }' ``` ```