sky-agency-api-doc-dev.adamo.tech Open in urlscan Pro
209.97.163.31  Public Scan

URL: https://sky-agency-api-doc-dev.adamo.tech/
Submission: On March 19 via api from US — Scanned from US

Form analysis 0 forms found in the DOM

Text Content

NAV


DOVE HERO

example

 * Introduction
 * Authentication
 * Users
   * Get All Users
   * Get Current User
   * Get An User
   * Update An User
   * Update Notification
   * Generate QR code
   * Accuracy OTP
   * Mark Onboarding Guide
   * Generate OTP Code
   * Get Limited Message
 * Campaign
   * Get all campaign
   * Get a campaign
   * Create campaign
   * Update campaign
   * Delete campaigns
   * Contact lead
   * General information contact leads
   * Clone reciever
   * Remove contacts from campaign
   * Add contacts
   * Add contacts by tags
   * Add contacts by segment
   * Remove label from campaign
   * Run campaign
   * Pause or continue campaign
   * Save campaign
   * Duplicate flow
   * Add existed flow
   * Get campaign preview
   * Get other active campaigns
   * Stat of campaign
   * Last activity
   * Show type channel template
   * Get campaign attributes
   * Get campaign contact tracking
   * Download campaign CSV
   * Data analytic
   * Duplicate campaign
   * Add schedule to campaign
   * Add flow to campaign
 * Flow
   * Get a flow
   * Create flow
   * Update flow
   * Delete flow
   * Create step channel
   * Create timing step
   * Create condition step
   * Create step by action
   * Remove step
 * Step
   * Update step
   * Remove toggle
 * Label
   * Get all label
   * Create label
   * Update label
   * Delete label
   * Add multi label
   * Unmatch multi campaigns
 * Segment
   * Get all segments
   * Create segment
   * Update segment
   * Delete segment
   * Segment template
   * Preview result segment
 * Schedule
   * Get all schedule
   * Get a schedule
   * Create schedule
   * Update schedule
   * Delete schedule
   * Get timezone
   * Duplicate schedule
 * Companies
   * Get All Companies
   * Choose Current Company
   * Get A Company
   * Create company
   * Update A Company
   * Delete A Company
   * Get Whatsapp Profiles
   * Link Phone Number
   * Unlink Phone Number
   * Update Logo Whatsapp Business Profile
   * Mark Seen Whatsapp Video Tutorial
   * Cancel Company Rent Number
 * Contacts
   * Get all contacts
   * Get a contact
   * Create contact
   * Update contact
   * Update multi contact
   * Update multi contact with dynamic attributes
   * Delete contact
   * Check before import by CSV
   * Check before import by manually
   * Import CSV
   * Destroy contacts invalid
   * Destroy multi contact
   * Check whatsapp number availability
   * Get status import
   * List of dynamic attributes
   * All activities
   * Load notes
 * Custom attributes
   * Get all attributes
   * Get an attribute
   * Create attribute
   * Update attribute
   * Delete attribute
 * Template
   * Get all template
   * Get a template
   * Create template
   * Update template
   * Upload image
   * Destroy multi
   * Duplicate multi
   * Send test
   * Update status whatsapp templates
   * Check valid name
   * Detach media
   * Add tag
   * Send whatsapp template
   * Resend whatsapp template
   * Send direct message
 * Whatsapp inbox
   * Get all messages
   * Create messages
   * Get all chatrooms
   * Get a chatroom
   * Delete chatroom
   * Get whatsapp chat room assignment
   * Assignment for user
   * Unassign for user
   * Business initiate
   * User initiate
   * Filter chatroom
   * Bulk destroy chat room
   * Count unread messages
 * Event
   * Get all event
   * Get an event
   * Create an event
   * Update event
   * Delete event
   * Sync recent events
   * Get event timezone
   * Show schedule campaign event
   * Show list category names
 * Tags
   * Get all tags
   * Create tag
   * Update tag
   * Delete tag
   * Add multi tag
   * Add multi tag to chatroom
   * Add multi tag to document
   * List and subscribers
   * Count contact
   * Unmatch multi contacts
   * Remove tag records
   * Unmatch template
 * Notifications
   * Get notifications
   * Mark as read
   * Mark all as read
   * Count unread
 * Errors

 * Sign Up for a Developer Key
 * Documentation Powered by Slate


INTRODUCTION

Welcome to the DoveHero API! You can use our API to access DoveHero API
endpoints, which can get information in our database.

You can view code examples in the dark area to the right.


AUTHENTICATION

DoveHero uses API keys to allow access to the API. You can register a new
DoveHero API key at your profile.

DoveHero expects for the API key to be included in all API requests to the
server in a header that looks like the following:

X-Api-Key: <Your API Key>

If an API key was not given or it doesn't belong to an existing account, a 401
Unauthorized response status is returned.


USERS


GET ALL USERS

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "first_name": "jasmine",
            "last_name": "mai",
            "phone": "+447893986555",
            "whatsapp_number": "+84355643122",
            "language": [],
            "favourite_email_client": null,
            "prefer_email": null,
            "note": null,
            "avatar": null,
            "role": "owner"
        },
        {
            "id": 2,
            "first_name": "karine",
            "last_name": "le",
            "phone": "570-395-5693",
            "whatsapp_number": "672-406-2632",
            "language": [],
            "favourite_email_client": null,
            "prefer_email": null,
            "note": null,
            "avatar": null,
            "role": "admin"
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 2,
    "current_page": 1,
    "base_total": null
}


This endpoint retrieves all users.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/users


RESPONSE

The response body will contain an array of user objects under the 'data' key,
along with metadata such as total pages, total number of users, and current
page. Each user object includes properties such as id, first name, last name,
phone, WhatsApp number, language, favorite email client, preferred email, note,
avatar, and role.


GET CURRENT USER

Copy to Clipboard{
    "data": {
        "current_user": {
            "id": 1,
            "first_name": "jasmine",
            "last_name": "mai",
            "phone": "+447893986555",
            "whatsapp_number": "+84355643122",
            "email": "dungadamo1@gmail.com",
            "language": [],
            "favourite_email_client": null,
            "prefer_email": null,
            "note": null,
            "avatar": null,
            "current_company": {
                "id": 1,
                "name": "ankunding",
                "phone": "112-053-5571",
                "whatsapp_number": null,
                "email": null,
                "logo": null,
                "active": false,
                "created_at": "2023-09-07T01:24:49.926Z",
                "updated_at": "2024-01-24T04:06:16.477Z",
                "invite_requests": {
                    "id": 1,
                    "requested_user_id": 4,
                    "requesting_user_id": 1,
                    "status": "accepted",
                    "company_id": 1,
                    "role": 2,
                    "created_at": "2023-12-04T02:38:16.565Z",
                    "updated_at": "2023-12-04T02:38:48.734Z",
                    "added_by": {
                        "id": 1,
                        "email": "dungadamo1@gmail.com"
                    }
                },
                "current_user_role": null,
                "wa_video_tutorial": true,
                "status_connected_waba": {
                    "current_step": 5,
                    "status": "completed"
                }
            },
            "current_company_role": {
                "id": 1,
                "company_id": 1,
                "user_id": 1,
                "role": "owner",
                "email_notification": false
            },
            "enable_two_factor": false,
            "is_admin_platform": false,
            "sign_in_count": 551,
            "current_whatsapp_business_profiles": [
                {
                    "id": 1,
                    "phone_number": "+84981349672",
                    "phone_number_id": "120044767859540",
                    "verify_code_status": "verified",
                    "whatsapp_account_id": "129350453585384",
                    "company": {
                        "id": 1,
                        "name": "ankunding"
                    },
                    "about": "About Text",
                    "address": "496 Balistreri Keys",
                    "description": "jasmine",
                    "vertical": "BEAUTY",
                    "email": "dungadamo1@gmail.com",
                    "websites": "dungadamo1.com",
                    "image": "https://dovehero-staging.s3.amazonaws.com/et677gmw4rynp71x4jegup2n9th4",
                    "project_id": "64f92a474548ca0be7e6c5c6",
                    "project_name": "Dung Adamo 1_4f0fd12c-8258-4df3-9d87-596b9908a00d",
                    "display_name": "Dung Adamo 2"
                }
            ],
            "current_whatsapp_business": true,
            "mark_onboarding_guide": null,
            "last_sign_in_at": "2024-01-24T06:07:41.709Z",
            "is_dismiss_two_factor": true,
            "type_otp": "email",
            "is_confirmed": true,
            "rent_phone_number": {
                "id": 1,
                "company_id": 1,
                "phone_number": "+18252546823",
                "country_code": "CA",
                "email": "dungadamo1@gmail.com",
                "status": "deactive",
                "price": "5",
                "created_at": "2023-12-18T05:02:32.965Z",
                "updated_at": "2024-01-18T06:03:20.185Z",
                "phone_sid": "PN2b28fe008d69c5bb59fd2c09dc2f71b3",
                "business_name": "Adamo",
                "expiration_date": "2024-02-18T05:02:23.000Z"
            },
            "companies": [
                {
                    "id": 1,
                    "name": "jasmine12121",
                    "phone": "0355643122",
                    "whatsapp_number": "",
                    "email": "jasmine@gmail.com",
                    "logo": null,
                    "wa_video_tutorial": false
                },
                {
                    "id": 2,
                    "name": "ankunding",
                    "phone": "785-226-1908",
                    "whatsapp_number": null,
                    "email": null,
                    "logo": null,
                    "wa_video_tutorial": true
                },
                {
                    "id": 3,
                    "name": "Earnestine",
                    "phone": "602-836-1605",
                    "whatsapp_number": null,
                    "email": null,
                    "logo": null,
                    "wa_video_tutorial": false
                }
            ],
            "providers": [
                {
                    "email": null,
                    "access_token": "ya29.a0AfB_byCagJkGuGSdwIWMKNWgomwsIbNYxN3jxKOoI9VfX_vd2rcUqdXvb3kVjh3zeZRauplmflUPqq1AECKuMaqcG7YgIVCVOFNgPpUXhyk_YRIs8Csh19lprqwH9AavPlz4fAlAFiuZuODIT-e0M74v3d8aIZw-c9dXaCgYKAYgSARESFQGOcNnCKCbJgCtEK-Vb02VDfY978g0171"
                }
            ]
        }
    }
}



This endpoint retrieves current user data.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/current-user-infor


RESPONSE

The response to the request includes a JSON object with detailed information
about the current user. The response contains data such as user ID, name,
contact information, language preferences, company details, roles, two-factor
authentication status, WhatsApp business profiles, and more.


GET AN USER

Copy to Clipboard{
    "data": {
        "id": 1,
        "first_name": "jasmine",
        "last_name": "mai",
        "phone": "+447893986555",
        "email": "dungadamo1@gmail.com",
        "whatsapp_number": "+84355643122",
        "language": [],
        "favourite_email_client": null,
        "prefer_email": null,
        "note": null,
        "avatar": null,
        "role": null,
        "time_zone": "Asia/Bangkok",
        "time_zone_name": "Hanoi (UTC +07:00)",
        "is_dismiss_two_factor": true
    }
}


This endpoint is used to retrieve data from any user.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/users/{id}


URL PARAMETERS

Parameter Description id The ID of user


RESPONSE

The response will include a JSON object containing various user details such as
ID, first name, last name, phone number, email, WhatsApp number, preferred
language, favorite email client, time zone, and more.


UPDATE AN USER

Copy to Clipboard{
    "data": {
        "id": 3,
        "first_name": "Chauncey",
        "last_name": "Roome",
        "phone": null,
        "email": "chauncey@gmail.com",
        "whatsapp_number": "733-821-8892",
        "language": [],
        "favourite_email_client": null,
        "prefer_email": null,
        "note": null,
        "avatar": null,
        "role": null,
        "time_zone": "Etc/UTC",
        "time_zone_name": "Etc/UTC",
        "is_dismiss_two_factor": false
    }
}


This endpoint allows updating user information with the HTTP PUT method.


HTTP REQUEST

PUT https://sky-agency-api-dev.adamo.tech/api/v3/users/{id}

Copy to ClipboardExample request body: 
{
    "first_name": "Chauncey",
    "last_name": "Roome",
    "phone": null,
    "email": "chauncey@gmail.com",
    "whatsapp_number": "733-821-8892",
    "language": [],
    "favourite_email_client": null,
    "prefer_email": null,
    "note": null,
    "avatar": null,
    "role": null,
    "time_zone": "Etc/UTC",
    "time_zone_name": "Etc/UTC",
    "is_dismiss_two_factor": false

}



REQUIRED PARAMETERS

Parameter Description ID The ID of user


OPTIONAL PARAMETERS

Parameter Type Description first_name string The user's first name. last_name
string The user's last name. phone string The user's phone number. email string
The user's email address. whatsapp_number string The user's WhatsApp number.
language string The user's preferred language. favourite_email_client string The
user's favorite email client. prefer_email string The user's preferred email
address. avatar string The user's avatar image. time_zone string The user's time
zone. is_dismiss_two_factor boolean Indicates whether the user has dismissed
two-factor authentication.


RESPONSE

Upon successful execution, the endpoint returns a status code of 200 along with
a JSON response containing the updated user information.


UPDATE NOTIFICATION

Copy to Clipboard{
    "message": "Turn-on notification successfully!"
}


This endpoint is used to update notification settings for a user.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/users/update-notification


RESPONSE

After successful execution, the endpoint returns a successful on or off
notification


GENERATE QR CODE

Copy to Clipboard{
    "data": {
        "qrcode_url": "https://sky-agency-api-dev.adamo.tech/api/v3/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdk1LIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ca91e523dae41526c56a8a9aa2575b667b7a313c/qrcode_dungadamo1@gmail.com.png"
    }
}


This endpoint sends an HTTP GET request to generate a QR code for a user.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/users/generate-qrcode


RESPONSE

Upon successful execution, the response will have a status code of 200 and will
include a JSON object with a "qrcode_url" key, which contains the URL for the
generated QR code.


ACCURACY OTP

Copy to Clipboard{
    "message": "Enable two factor authentication successfully"
}


This endpoint is used to send a POST request to verify the accuracy of a
one-time password (OTP) for user authentication.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/users/accuracy-otp

Copy to ClipboardExample request body: 
{
    "otp_attempt": "141681"
}



REQUIRED PARAMETERS

Parameter Type Description otp_attempt string The code is sent to the user's
email when they request to enable 2FA.


RESPONSE

The response will contain JSON content with a message under the message key that
enabled or disabled 2FA


MARK ONBOARDING GUIDE

Copy to Clipboard{
    "message": "Marked onboading guide successfully!"
}


This endpoint makes an HTTP POST request to mark the onboarding guide for a
user.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/users/mark-onboarding-guide


RESPONSE

The response will contain a JSON object with a key "message" which may hold a
relevant message.


GENERATE OTP CODE

Copy to Clipboard{
    "message": "OTP code has been sent to your email"
}


This endpoint makes an HTTP POST request to generate an OTP code for user
verification.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/users/generate-otp-code

Copy to ClipboardExample request body: 
{
  "type": "email"
}



REQUIRED PARAMETERS

Parameter Type Description type string Specifies the type of OTP code to be
generated (email or whatsapp)


RESPONSE

A message indicating the result of the OTP code generation process.


GET LIMITED MESSAGE

Copy to Clipboard{
    "data": {
        "type": "project",
        "id": "64f92a474548ca0be7e6c5c6",
        "name": "Dung Adamo 1_4f0fd12c-8258-4df3-9d87-596b9908a00d",
        "business_id": "64f92a4613b03f7b13c8b065",
        "partner_id": "64e60b1bb582c60e76a1af5a",
        "plan_activated_on": 1704592726874,
        "status": "active",
        "sandbox": false,
        "active_plan": "BASIC_MONTHLY",
        "created_at": 1694050887389,
        "updated_at": 1706162400184,
        "plan_renewal_on": 1707271126874,
        "scheduled_subscription_changes": null,
        "wa_number": "84981349672",
        "wa_messaging_tier": "tier_2",
        "wa_display_name_status": "REJECTED",
        "fb_business_manager_status": "VERIFIED",
        "wa_display_name": "Dung Adamo 2",
        "wa_quality_rating": "FLAGGED",
        "wa_about": "mai dung",
        "wa_display_image": "https://pps.whatsapp.net/v/t61.24694-24/412354985_1080613636481244_3902985087295010138_n.jpg?ccb=11-4&oh=01_AdSs3YRoTfj8MBkRuDNCKboxuFQXj4KbJkm4HTkex9GE8A&oe=6591463D&_nc_sid=e6ed6c&_nc_cat=105",
        "wa_business_profile": {
            "address": "56 to huu",
            "description": "jasmine",
            "email": "dungadamo1@gmail.com",
            "vertical": "BEAUTY",
            "websites": [
                "dungadamo1.com"
            ]
        },
        "billing_currency": "USD",
        "timezone": "Asia/Calcutta GMT+05:30",
        "subscription_started_on": 1694051926874,
        "is_whatsapp_verified": true,
        "subscription_status": "active",
        "daily_template_limit": 10000
    }
}


This endpoint makes an HTTP GET request to retrieve limited daily message data.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/limited-daily-message


RESPONSE

The response to the request returns a status code of 200, along with a JSON
object containing various fields related to the limited daily message data.


CAMPAIGN


GET ALL CAMPAIGN

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "name": "single_campaign 2024-01-29 11:36:29 UTC",
            "status": "draft",
            "type": "single",
            "recipients": 4,
            "click_rate": "0.0",
            "created_at": "2024-01-29T06:27:33.529Z",
            "updated_at": "2024-01-29T06:31:21.625Z",
            "conversions": null,
            "bounced_rate": "0.0",
            "open_rate": "0.0",
            "sent_rate": "0.0",
            "labels": [],
            "emoji": "happy",
            "last_activity": null
        },
        {
            "id": 2,
            "name": "single_campaign 2024-01-19 03:33:25 UTC",
            "status": "completed",
            "type": "single",
            "recipients": 50,
            "click_rate": "0.0",
            "created_at": "2024-01-19T03:31:25.627Z",
            "updated_at": "2024-01-19T03:31:51.648Z",
            "conversions": null,
            "bounced_rate": "36.84",
            "open_rate": "36.84",
            "sent_rate": "63.16",
            "labels": [],
            "emoji": null,
            "last_activity": "send"
        },
        {
            "id": 3,
            "name": "single_campaign 2024-01-19 03:22:42 UTC",
            "status": "completed",
            "type": "single",
            "recipients": 102,
            "click_rate": "2.38",
            "created_at": "2024-01-19T03:20:42.348Z",
            "updated_at": "2024-01-19T03:21:05.036Z",
            "conversions": null,
            "bounced_rate": "59.52",
            "open_rate": "26.19",
            "sent_rate": "40.48",
            "labels": [],
            "emoji": null,
            "last_activity": "open"
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 3,
    "current_page": 1,
    "base_total": null
}


This endpoint retrieves a list of campaigns.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/campaigns


RESPONSE

The response will be in JSON format and will include an array of campaign
objects, each containing details such as id, name, status, type, recipients,
click rate, created date, updated date, conversions, bounced rate, open rate,
sent rate, labels, emoji, and last activity. Additionally, the response will
include metadata, pagination details like total pages, total count, current
page, and base total.


GET A CAMPAIGN

Copy to Clipboard{
    "data": {
        "id": 4,
        "name": "single_campaign 2023-12-30 16:14:33 UTC",
        "status": "completed",
        "type": "single",
        "recipients": 0,
        "click_rate": null,
        "created_at": "2023-12-30T16:12:33.637Z",
        "updated_at": "2023-12-30T16:12:37.716Z",
        "conversions": null,
        "flows": [
            {
                "id": 1,
                "company_id": 1,
                "name": "flow 2023-12-30 16:14:33 UTC",
                "created_at": "2023-12-30T16:12:33.690Z",
                "updated_at": "2023-12-30T16:12:33.690Z",
                "toggle_type": "A",
                "campaign_id": 4
            }
        ],
        "bounced_rate": null,
        "draft": false,
        "list_id": 1,
        "labels": [],
        "schedule": {
            "id": 1,
            "name": "date_time schedule 2023-12-30 16:14:33 UTC",
            "time_zone_name": "UTC (UTC +00:00)",
            "time_zone": "Etc/UTC",
            "date": "2023-12-30",
            "time": "16:14",
            "number_campaign": 1,
            "type": "date_time"
        },
        "emoji": null,
        "is_able_to_publish": true
    }
}


This endpoint makes an HTTP GET request to retrieve details of a specific
campaign with the ID


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}


REQUIRED PARAMETERS

Parameter Type Description ID bigint The ID of the campaign


RESPONSE

The response will be in JSON format and will include information such as the
campaign name, status, type, recipients, click rate, creation and update
timestamps, conversions, flows, bounced rate, draft status, list ID, labels,
schedule details, emoji, and publish status..


CREATE CAMPAIGN

Copy to Clipboard{
    "data": {
        "id": 8,
        "company_id": 1,
        "name": "single_campaign 2024-01-29 11:36:29 UTC",
        "status": "draft",
        "type": "single",
        "recieptiens": null,
        "click_rate": null,
        "conversions": null,
        "bounced_rate": null,
        "email_send": null,
        "created_at": "2024-01-29T06:27:33.529Z",
        "updated_at": "2024-01-29T06:27:33.529Z",
        "draft": false,
        "discarded_at": null,
        "schedule_campaign_id": null,
        "schedule_campaign_type": null,
        "emoji": null,
        "list_id": 1
    }
}


This endpoint allows the client to create a new campaign.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/campaigns

Copy to ClipboardExample request body: 
{
    "name": "single_campaign 2024-01-30 11:36:29 UTC",
    "type": "single"
}



REQUIRED PARAMETERS

Parameter Type Description name string The name of the campaign type string The
type of the campain


OPTIONAL PARAMETERS

Parameter Type Description emoji string The emoji associated with the campaign.
campaign_labels_attributes array The campaign label attributes (id, label_id)


RESPONSE

Upon successful creation, the endpoint returns a 201 status code along with the
response data


UPDATE CAMPAIGN

Copy to Clipboard{
    "data": {
        "id": 8,
        "name": "single_campaign 2024-01-30 11:36:29 UTC",
        "status": "draft",
        "type": "multiple",
        "recipients": 0,
        "click_rate": null,
        "created_at": "2024-01-29T06:27:33.529Z",
        "updated_at": "2024-01-29T06:31:21.625Z",
        "conversions": null,
        "flows": [],
        "bounced_rate": null,
        "draft": false,
        "list_id": 1,
        "labels": [],
        "schedule": null,
        "emoji": "happy",
        "is_able_to_publish": false
    }
}


This endpoint allows you to update the details of a specific campaign.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}

Copy to ClipboardExample request body: 
{
    "name": "single_campaign 2024-01-30 11:36:29 UTC",
    "type": "multiple"
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign type string The type
of the campain (single, multiple)


OPTIONAL PARAMETERS

Parameter Type Description name string The name of the campaign emoji string The
emoji associated with the campaign. campaign_labels_attributes array The
campaign label attributes (id, label_id)


RESPONSE

The response contains the updated details of the campaign, including the ID,
name, status, type, recipients, click rate, creation date, update date,
conversions, flows, bounced rate, draft status, associated list ID, labels,
schedule, emoji, and publish status.


DELETE CAMPAIGNS

Copy to Clipboard{
    "message": "Delete successfully"
}


This endpoint is used to delete campaigns.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/delete

Copy to ClipboardExample request body: 
{
    "ids": [1, 2]
}



REQUIRED PARAMETERS

Parameter Type Description ids bigint The IDs of the campaign


RESPONSE

This endpoint is used to delete campaigns by providing the IDs of the campaigns
to be deleted in the request body. The response will contain a message
confirming the deletion.


CONTACT LEAD

Copy to Clipboard{
    "data": [
        {
            "id": 2,
            "first_name": "jasmine",
            "last_name": "ho",
            "email": null,
            "email_marketing": "unsubcribed",
            "company_name": null,
            "source": "imported",
            "rating": 2,
            "dynamic_attributes": {},
            "notes": [],
            "avatar": null,
            "tags": [
                {
                    "id": 3,
                    "company_id": 1,
                    "name": "tag2",
                    "description": "",
                    "type": "contact",
                    "total_contacts": 2
                }
            ],
            "lists": [
                {
                    "id": 1,
                    "name": "single_campaign 2024-01-16 09:20:49 UTC"
                },
                {
                    "id": 2,
                    "name": "single_campaign 2024-01-04 06:40:57 UTC"
                },
                {
                    "id": 3,
                    "name": "single_campaign 2024-01-15 02:45:15 UTC"
                }
            ],
            "phone_number": "+84355643134",
            "whatsapp_number_status": "not_registered",
            "whatsapp_number": "+84355643134",
            "updated_at": "2023-12-06T08:08:45.494Z",
            "created_at": "2023-12-06T08:08:45.494Z",
            "status": []
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This endpoint retrieves the contact lead information for a specific campaign
with the ID.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/contact-lead


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign.


RESPONSE

The response will include an array of contact lead data, along with metadata
such as total count, current page, and total pages.


GENERAL INFORMATION CONTACT LEADS

Copy to Clipboard{
    "data": {
        "email_contact": 0,
        "email_contact_tags": [],
        "whatsapp_contact": 4,
        "whatsapp_contact_tags": [
            {
                "id": 2,
                "company_id": 1,
                "name": "tag 359",
                "description": "",
                "type": "contact",
                "total_contacts": 360
            },
            {
                "id": 3,
                "company_id": 1,
                "name": "tag3",
                "description": "",
                "type": "contact",
                "total_contacts": 2
            },
            {
                "id": 4,
                "company_id": 1,
                "name": "tag2",
                "description": "",
                "type": "contact",
                "total_contacts": 2
            }
        ],
        "phone_number_contact": 1,
        "all_contact_tags": [
            {
                "id": 1,
                "company_id": 1,
                "name": "tag9",
                "description": "",
                "type": "contact",
                "total_contacts": 10
            },
            {
                "id": 2,
                "company_id": 1,
                "name": "tag3",
                "description": "",
                "type": "contact",
                "total_contacts": 10
            },
            {
                "id": 3,
                "company_id": 221,
                "name": "tag2",
                "description": "",
                "type": "contact",
                "total_contacts": 10
            }
        ]
    }
}


This API endpoint retrieves the general information about contacts and leads for
a specific campaign with the ID.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/general-information-contact-leads


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign.


RESPONSE

The response will be in JSON format with the following structure email_contact,
email_contact_tags, whatsapp_contact, whatsapp_contact_tags,
phone_number_contact, all_contact_tags


CLONE RECIEVER

Copy to Clipboard{
    "message": "4 contacts were added in this campaign"
}


This endpoint allows you to clone a receiver campaign by making an HTTP POST
request to the specified URL.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/clone-reciever

Copy to ClipboardExample request body: 
{
    "other_campaign_id": [1, 2, 3, 4]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign. other_campaign_id
array The ID of the other campaign to be cloned.


RESPONSE

Upon a successful execution of the request, the server responds with a status
code of 200 and a JSON object with a message key.


REMOVE CONTACTS FROM CAMPAIGN

Copy to Clipboard{
    "message": "Deleted 2 contacts successfully"
}


This endpoint is used to remove contacts from a specific campaign.


HTTP REQUEST

DELETE
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/remove-contacts

Copy to ClipboardExample request body: 
{
    "contact_ids": [1,2]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The unique identifier of the campaign from
which contacts are to be removed. contact_ids array An array of contact IDs


RESPONSE

A message indicating the result of the operation.


ADD CONTACTS

Copy to Clipboard{
    "message": "Added 1 contact successfully"
}


This endpoint allows users to add contacts to a specific campaign


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/add-contacts

Copy to ClipboardExample request body: 
{
    "contact_ids": [1]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The unique identifier of the campaign.
contact_ids array An array of contact IDs


RESPONSE

The response will have a status code of 200 and a content type of
application/json. The response body will contain a message indicating the result
of the operation.


ADD CONTACTS BY TAGS

Copy to Clipboard{
    "message": "Added 2 contacts successfully"
}


This endpoint is used to add contacts to a specific campaign based on their
tags.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/add-contacts-by-tags

Copy to ClipboardExample request body: 
{
    "tags_id": [1,2]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign tags_id array An
array of tag IDs representing the tags of the contacts to be added to the
campaign.


RESPONSE

Upon a successful request, the server returns a 200 status code with a JSON
response containing a message indicating the result of the operation.


ADD CONTACTS BY SEGMENT

Copy to Clipboard{
    "message": "Added 3 contacts successfully"
}


This endpoint allows you to add contacts to a specific campaign based on segment
IDs.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/add-contacts-by-segment

Copy to ClipboardExample request body: 
{
    "segment_ids": [12]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign segment_ids array
The IDs of the segments to add contacts from.


RESPONSE

The response from the last execution had a status code of 200 and a Content-Type
of application/json. The response body included a message indicating the result
of the operation.


REMOVE LABEL FROM CAMPAIGN

Copy to Clipboard{
    "message": "Removed label from campaign successfully"
}


This endpoint sends an HTTP DELETE request to remove a label from a specific
campaign.


HTTP REQUEST

DELETE
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/remove-label-from-campaign

Copy to ClipboardExample request body: 
{
    "label_id": [1,2]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign label_id array The
ID of the label to be removed from the campaign.


RESPONSE

A message indicating the result of the operation.


RUN CAMPAIGN

Copy to Clipboard{
    "message": "Run campaign successfully"
}


This endpoint makes an HTTP POST request to execute a specific campaign.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/run-campaign


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

The response body included a message indicating the result of the operation.


PAUSE OR CONTINUE CAMPAIGN

Copy to Clipboard{
    "message": "Pause campaign successfully"
}


This endpoint makes an HTTP POST request to pause or continue a specific
campaign with the ID.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/pause-or-continue-campaign


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

This endpoint returns a status code of 200 along with a JSON response containing
a message indicating the success or failure of the pause or continue action for
the specified campaign.


SAVE CAMPAIGN

Copy to Clipboard{
    "message": "Save campaign successfully"
}


This API endpoint allows users to save a specific campaign with the ID


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/save-campaign


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

The response body included a message indicating the result of the operation.


DUPLICATE FLOW

Copy to Clipboard{
    "data": {
        "id": 3,
        "name": "copy_2 of campaign",
        "campaign_id": 1,
        "company_id": 1,
        "created_at": "2024-01-29T15:56:20.219Z",
        "updated_at": "2024-01-29T15:56:20.219Z",
        "steps": [
            {
                "id": 1,
                "parent_id": null,
                "step_type": "channel",
                "step_data": {
                    "id": 1,
                    "channel": "whatsapp",
                    "templates": [
                        {
                            "toggle_type": "A",
                            "template_id": 1,
                            "name": "jasmine",
                            "subject": null,
                            "content": "{\"values\":{\"name\":\",\"category\":\"MARKETING\",\"Text\":\"<p>Testing is the process of evaluating a system or component to determine whether it satisfies the specified requirements or works as expected. It involves executing a program or system with the intent of finding errors, bugs, or other defects. Testing is an essential part of the software development life cycle and helps ensure the quality, reliability, and functionality of a product. It can be performed at various stages, such as unit testing, integration testing, system testing, and acceptance testing. <br></p>\",\"Heading\":\"Welcome\",\"Button\":[{\"text\":\"Give me more information\",\"type\":\"URL\",\"type_url_link\":\"dove.com\"}]},\"subMediaKeys\":[],\"elements\":{\"headerElement\":{\"Heading\":\"Heading\"},\"contentElement\":{\"Text\":\"Text\",\"Footer\":null,\"Button\":\"Button\",\"Image List\":null},\"footerElement\":null},\"call_to_action_button\":[{\"text\":\"Give me more information\",\"type\":\"URL\",\"type_url_link\":\"dove.com\"}]}",
                            "template_type": "whatsapp",
                            "link_url": ""
                        }
                    ]
                }
            }
        ]
    }
}


This endpoint is used to duplicate a specific campaign flow identified by its
ID.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/duplicate-flow

Copy to ClipboardExample request body: 
{
    "flow_id": 824
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign flow_id bigint The
ID of the flow to be duplicated.


RESPONSE

Upon successful execution, the API returns a status code of 200 and a JSON
object with the duplicated flow data. The response contains the duplicated
flow's ID, name, campaign ID, company ID, creation and update timestamps, and
the steps involved in the duplicated flow.


ADD EXISTED FLOW

Copy to Clipboard{
    "data": {
        "id": 3,
        "name": "copy_3 of campaign",
        "campaign_id": 1,
        "company_id": 1,
        "created_at": "2024-01-29T16:00:57.910Z",
        "updated_at": "2024-01-29T16:00:57.910Z",
        "steps": [
            {
                "id": 2,
                "parent_id": null,
                "step_type": "channel",
                "step_data": {
                    "id": 2,
                    "channel": "whatsapp",
                    "templates": [
                        {
                            "toggle_type": "A",
                            "template_id": 1,
                            "name": "jasmine",
                            "subject": null,
                            "content": "{\"values\":{\"name\":\",\"category\":\"MARKETING\",\"Text\":\"<p>Testing is the process of evaluating a system or component to determine whether it satisfies the specified requirements or works as expected. It involves executing a program or system with the intent of finding errors, bugs, or other defects. Testing is an essential part of the software development life cycle and helps ensure the quality, reliability, and functionality of a product. It can be performed at various stages, such as unit testing, integration testing, system testing, and acceptance testing. <br></p>\",\"Heading\":\"Welcome\",\"Button\":[{\"text\":\"Give me more information\",\"type\":\"URL\",\"type_url_link\":\"dove.com\"}]},\"subMediaKeys\":[],\"elements\":{\"headerElement\":{\"Heading\":\"Heading\"},\"contentElement\":{\"Text\":\"Text\",\"Footer\":null,\"Button\":\"Button\",\"Image List\":null},\"footerElement\":null},\"call_to_action_button\":[{\"text\":\"Give me more information\",\"type\":\"URL\",\"type_url_link\":\"dove.com\"}]}",
                            "template_type": "whatsapp",
                            "link_url": ""
                        }
                    ]
                }
            }
        ]
    }
}


This endpoint allows you to add an existing flow to a specific campaign.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/add-existed-flow

Copy to ClipboardExample request body: 
{
    "flow_id": 824
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign flow_id bigint The
ID of the existing flow to be added to the campaign.


RESPONSE

Upon successful execution, the API returns a status code of 200 and a JSON
object with the added exist flow data


GET CAMPAIGN PREVIEW

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "jasmine",
        "status": "completed",
        "type": "single",
        "flows": [
            {
                "id": 3,
                "name": "fhfghf",
                "steps": [
                    {
                        "id": 1,
                        "parent_id": null,
                        "step_type": "channel",
                        "step_data": {
                            "id": 1,
                            "channel": "whatsapp",
                            "templates": [
                                {
                                    "toggle_type": "A",
                                    "template_id": 1,
                                    "name": "jasmine",
                                    "subject": null,
                                    "content": "{\"values\":{\"name\":\",\"category\":\"MARKETING\",\"Text\":\"<p>Testing is the process of evaluating a system or component to determine whether it satisfies the specified requirements or works as expected. It involves executing a program or system with the intent of finding errors, bugs, or other defects. Testing is an essential part of the software development life cycle and helps ensure the quality, reliability, and functionality of a product. It can be performed at various stages, such as unit testing, integration testing, system testing, and acceptance testing. <br></p>\",\"Heading\":\"Welcome\",\"Button\":[{\"text\":\"Give me more information\",\"type\":\"URL\",\"type_url_link\":\"dove.com\"}]},\"subMediaKeys\":[],\"elements\":{\"headerElement\":{\"Heading\":\"Heading\"},\"contentElement\":{\"Text\":\"Text\",\"Footer\":null,\"Button\":\"Button\",\"Image List\":null},\"footerElement\":null},\"call_to_action_button\":[{\"text\":\"Give me more information\",\"type\":\"URL\",\"type_url_link\":\"dove.com\"}]}",
                                    "template_type": "whatsapp",
                                    "link_url": ""
                                }
                            ]
                        }
                    }
                ]
            },
            {
                "id": 4,
                "name": "copy_2 of campaign",
                "steps": [
                    {
                        "id": 2,
                        "parent_id": null,
                        "step_type": "channel",
                        "step_data": {
                            "id": 2,
                            "channel": "whatsapp",
                            "templates": [
                                {
                                    "toggle_type": "A",
                                    "template_id": 6156,
                                    "name": "jasmine",
                                    "subject": null,
                                    "content": "{\"values\":{\"name\":\",\"category\":\"MARKETING\",\"Text\":\"<p>Testing is the process of evaluating a system or component to determine whether it satisfies the specified requirements or works as expected. It involves executing a program or system with the intent of finding errors, bugs, or other defects. Testing is an essential part of the software development life cycle and helps ensure the quality, reliability, and functionality of a product. It can be performed at various stages, such as unit testing, integration testing, system testing, and acceptance testing. <br></p>\",\"Heading\":\"Welcome\",\"Button\":[{\"text\":\"Give me more information\",\"type\":\"URL\",\"type_url_link\":\"dove.com\"}]},\"subMediaKeys\":[],\"elements\":{\"headerElement\":{\"Heading\":\"Heading\"},\"contentElement\":{\"Text\":\"Text\",\"Footer\":null,\"Button\":\"Button\",\"Image List\":null},\"footerElement\":null},\"call_to_action_button\":[{\"text\":\"Give me more information\",\"type\":\"URL\",\"type_url_link\":\"dove.com\"}]}",
                                    "template_type": "whatsapp",
                                    "link_url": ""
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
}


This endpoint makes an HTTP GET request to retrieve a preview of a specific
campaign with the ID


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/preview


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

The response will contain the preview data for the campaign, including its ID,
name, status, type, and the flow details. The flow details consist of flow ID,
name, and steps. Each step includes step ID, parent ID, step type, and step
data, which further includes channel, templates, toggle type, template ID, name,
subject, content, template type, and link URL.


GET OTHER ACTIVE CAMPAIGNS

Copy to Clipboard{
    "data": [
        {
            "id": 4,
            "name": "single_campaign 2024-01-29 11:36:29 UTC",
            "status": "paused",
            "type": "multiple",
            "recipients": 5,
            "click_rate": null,
            "created_at": "2024-01-29T06:27:33.529Z",
            "updated_at": "2024-01-29T10:51:27.573Z",
            "conversions": null,
            "flows": [
                {
                    "id": 4,
                    "company_id": 1,
                    "name": "copy_3 of campaign",
                    "created_at": "2024-01-29T16:00:57.910Z",
                    "updated_at": "2024-01-29T16:00:57.910Z",
                    "toggle_type": "A",
                    "campaign_id": 2
                }
            ],
            "bounced_rate": null,
            "draft": false,
            "list_id": 1,
            "labels": [],
            "schedule": {
                "id": 2,
                "name": "for desperate housewifes before weekend",
                "time_zone_name": "Hanoi",
                "time_zone": "Hanoi",
                "date": "2024-12-16",
                "time": "20:00",
                "number_campaign": 1,
                "type": "date_time"
            },
            "emoji": "happy",
            "is_able_to_publish": true
        },
        {
            "id": 5,
            "name": "single_campaign 2024-01-19 03:33:25 UTC",
            "status": "completed",
            "type": "single",
            "recipients": 50,
            "click_rate": null,
            "created_at": "2024-01-19T03:31:25.627Z",
            "updated_at": "2024-01-19T03:31:51.648Z",
            "conversions": null,
            "flows": [
                {
                    "id": 3,
                    "company_id": 1,
                    "name": "flow 2024-01-19 03:33:25 UTC",
                    "created_at": "2024-01-19T03:31:25.953Z",
                    "updated_at": "2024-01-19T03:31:25.953Z",
                    "toggle_type": "A",
                    "campaign_id": 2
                }
            ],
            "bounced_rate": null,
            "draft": false,
            "list_id": 2,
            "labels": [],
            "schedule": {
                "id": 3,
                "name": "date_time schedule 2024-01-19 03:33:25 UTC",
                "time_zone_name": "UTC (UTC +00:00)",
                "time_zone": "Etc/UTC",
                "date": "2024-01-19",
                "time": "03:33",
                "number_campaign": 1,
                "type": "date_time"
            },
            "emoji": null,
            "is_able_to_publish": true
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 2,
    "current_page": 1,
    "base_total": null
}


This endpoint makes an HTTP GET request to retrieve a list of other active
campaigns related to the specified campaign.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/list-other-campaigns-active


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

An array of objects containing details of other active campaigns, including
their IDs, names, statuses, types, recipients, click rates, creation/update
timestamps, conversions, flows, bounce rates, draft status, list IDs, labels,
schedules, emojis, and publish status.


STAT OF CAMPAIGN

Copy to Clipboard{
    "data": {
        "contacts_stat": {
            "total_contacts": 4,
            "email": 0,
            "whatsapp": 4,
            "bounces": 33.33,
            "bounces_number": 1,
            "sent": 66.67,
            "sent_number": 2,
            "click": 0.0,
            "click_number": 0,
            "opened": 66.67,
            "opened_number": 2,
            "replied": 0.0,
            "replied_number": 0
        },
        "flows": [
            {
                "name": "flow2",
                "steps": [
                    {
                        "id": 2,
                        "stat_step": {
                            "total_contacts": 3,
                            "bounces": 33.33,
                            "bounces_number": 1,
                            "sent": 66.67,
                            "sent_number": 2,
                            "opened": 66.67,
                            "opened_number": 2,
                            "clicked": 0.0,
                            "clicked_number": 0,
                            "replied": 0.0,
                            "replied_number": 0
                        },
                        "toggles": [
                            {
                                "bounces": 33.33,
                                "bounces_number": 1,
                                "sent": 66.67,
                                "sent_number": 2,
                                "opened": 66.67,
                                "opened_number": 2,
                                "clicked": 0.0,
                                "clicked_number": 0,
                                "replied": 0.0,
                                "replied_number": 0,
                                "total_contacts": 3
                            }
                        ]
                    }
                ]
            },
            {
                "name": "copy_2 of flow1",
                "steps": [
                    {
                        "id": 1691,
                        "stat_step": {
                            "total_contacts": 0,
                            "bounces": 0,
                            "bounces_number": 0,
                            "sent": 0,
                            "sent_number": 0,
                            "opened": 0,
                            "opened_number": 0,
                            "clicked": 0,
                            "clicked_number": 0,
                            "replied": 0,
                            "replied_number": 0
                        },
                        "toggles": [
                            {
                                "bounces": 0,
                                "bounces_number": 0,
                                "sent": 0,
                                "sent_number": 0,
                                "opened": 0,
                                "opened_number": 0,
                                "clicked": 0,
                                "clicked_number": 0,
                                "replied": 0,
                                "replied_number": 0,
                                "total_contacts": 0
                            }
                        ]
                    }
                ]
            }
        ]
    }
}


This endpoint makes an HTTP GET request to retrieve the statistics of a specific
campaign with the ID


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/stat


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

The response returns the contact statistics and flow details for the campaign.


LAST ACTIVITY

Copy to Clipboard{
    "data": [
        {
            "id": 8,
            "contact_name": " ",
            "contact_email": null,
            "contact_phone_number": null,
            "contact_whatsapp_number": "+84866411836",
            "channel": "whatsapp",
            "time_event": "2023-12-06T10:20:00.000Z",
            "name_event": "open",
            "step": {
                "id": 4,
                "created_at": "2023-12-06T10:12:10.217Z",
                "updated_at": "2023-12-06T10:15:55.313Z",
                "timing_id": null,
                "parent_id": null,
                "stepable_type": "TemplateStep",
                "stepable_id": 3,
                "flow_id": 1,
                "status": "completed",
                "completed_at": null,
                "paused_at": null,
                "include_condition": [],
                "exclude_condition": []
            },
            "contact_id": 12,
            "campaign": {
                "id": 2,
                "name": "campaign1",
                "status": "completed",
                "type": "single",
                "recipients": 4,
                "click_rate": null,
                "created_at": "2023-12-06T10:11:47.265Z",
                "updated_at": "2023-12-06T10:15:56.351Z",
                "conversions": null,
                "flows": [
                    {
                        "id": 3,
                        "company_id": 1,
                        "name": "flow2",
                        "created_at": "2023-12-06T10:12:01.897Z",
                        "updated_at": "2023-12-06T10:12:01.897Z",
                        "toggle_type": "A",
                        "campaign_id": 1
                    },
                    {
                        "id": 4,
                        "company_id": 1,
                        "name": "copy_2 of flow1",
                        "created_at": "2024-01-29T15:56:20.219Z",
                        "updated_at": "2024-01-29T15:56:20.219Z",
                        "toggle_type": "B",
                        "campaign_id": 3
                    }
                ],
                "bounced_rate": null,
                "draft": false,
                "list_id": 2,
                "labels": [
                    {
                        "id": 1,
                        "company_id": 1,
                        "name": "label 1",
                        "description": null
                    }
                ],
                "schedule": {
                    "id": 4,
                    "name": "schedule1",
                    "time_zone_name": "Hanoi (UTC +07:00)",
                    "time_zone": "Asia/Bangkok",
                    "date": "2023-12-06",
                    "time": "17:14",
                    "number_campaign": 1,
                    "type": "date_time"
                },
                "emoji": null,
                "is_able_to_publish": true
            },
            "campaign_labels": [
                {
                    "id": 2,
                    "company_id": 1,
                    "name": "label 1",
                    "description": null,
                    "created_at": "2023-12-05T07:32:28.895Z",
                    "updated_at": "2023-12-05T07:32:28.895Z"
                }
            ],
            "created_at": "2023-12-06T10:20:02.064Z",
            "updated_at": "2023-12-06T10:20:02.072Z"
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This HTTP GET request retrieves the last activity of a specific campaign with
the ID.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/last-activity


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

The response is in JSON format and includes data about the contact, channel,
time event, step, campaign details, labels, and metadata related to the
campaign.


SHOW TYPE CHANNEL TEMPLATE

Copy to Clipboard{
    "data": [
        "whatsapp"
    ]
}


This endpoint retrieves the show type channel template for a specific campaign.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/show-type-channel-template


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

The response body included data indicating the result of the operation.


GET CAMPAIGN ATTRIBUTES

Copy to Clipboard{
    "data": [
        {
            "name": "favoritefood",
            "value": null
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This endpoint retrieves the attributes of a specific campaign.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/campaign-attributes

Copy to ClipboardExample request body: 
{
    "contact_id": 14496
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign contact_id bigint
The ID of the contact for which the campaign attributes are being retrieved.


RESPONSE

The response body included data indicating the result of the operation.


GET CAMPAIGN CONTACT TRACKING

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "first_name": null,
            "last_name": null,
            "email": null,
            "email_marketing": "subscribed",
            "company_name": null,
            "source": "imported",
            "rating": 2,
            "dynamic_attributes": {},
            "notes": [],
            "avatar": null,
            "tags": [
                {
                    "id": 1,
                    "company_id": 1,
                    "name": "tag",
                    "description": "",
                    "type": "contact",
                    "total_contacts": 10
                }
            ],
            "lists": [
                {
                    "id": 1,
                    "name": "bug testing"
                },
                {
                    "id": 2,
                    "name": "single_campaign 2023-11-24 08:47:09 UTC"
                },
                {
                    "id": 3,
                    "name": "single_campaign 2023-11-24 08:52:34 UTC"
                }
            ],
            "phone_number": "",
            "whatsapp_number_status": "not_registered",
            "whatsapp_number": "+84567069763",
            "updated_at": "2023-09-19T07:42:18.374Z",
            "created_at": "2023-09-19T07:42:18.374Z",
            "status": [
                "open"
            ]
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This endpoint retrieves a list of contacts associated with a specific campaign
and their tracking events.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/show-list-contact-track-event

Copy to ClipboardExample request body: 
{
    "type": "send"
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign type string The type
of contact to filter the list (bounces, send, open, click, reply, sending)


RESPONSE

This endpoint retrieves a list of contacts associated with the specified
campaign, along with their details and tracking events.


DOWNLOAD CAMPAIGN CSV

Copy to Clipboard{
    "data": {
        "url": "https://dove-hero-temp.s3.amazonaws.com/temfile-1-day-1706545467.xlsx"
    }
}


This endpoint triggers the download of a CSV file for the campaign with ID.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/download-csv


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

The response will contain a URL to download the CSV file for the specified
campaign.


DATA ANALYTIC

Copy to Clipboard{
    "data": {
        "data_static": {
            "bounces": {
                "total": 1,
                "percentage": "33.33"
            },
            "open": {
                "total": 2,
                "percentage": "66.67"
            },
            "contacted": {
                "total": 2,
                "percentage": "66.67"
            },
            "message_sent": 3
        },
        "data_performance": {
            "2023-11-30": 0,
            "2023-12-01": 0,
            "2023-12-02": 0,
            "2023-12-03": 0,
            "2023-12-04": 0,
            "2023-12-05": 0,
            "2023-12-06": 5,
        }
    }
}


This endpoint makes an HTTP GET request to retrieve data analytics for a
specific campaign


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/{id}/data-analytic


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign


RESPONSE

The response contains data related to the performance of the campaign, including
the number of bounces, opens, contacted, and messages sent, as well as the
performance data for specific dates in the future.


DUPLICATE CAMPAIGN

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "name": "single_campaign 2024-01-29 11:36:29 UTC duplicate_1",
            "status": "draft",
            "type": "multiple",
            "recipients": 33,
            "click_rate": null,
            "created_at": "2024-01-29T17:28:15.840Z",
            "updated_at": "2024-01-29T17:28:15.840Z",
            "conversions": null,
            "flows": [],
            "bounced_rate": null,
            "draft": false,
            "list_id": 2,
            "labels": [],
            "schedule": {
                "id": 1,
                "name": "FirstSchedule duplicate_1 duplicate_3 duplicate_4",
                "time_zone": "Asia/Bangkok",
                "time_zone_name": "Hanoi (UTC +07:00)",
                "days": [
                    "monday"
                ],
                "start_time": "17:20",
                "end_time": "17:30",
                "end_date": "2023-12-11",
                "repeat": "never",
                "number_campaign": 1,
                "type": "option"
            },
            "emoji": "happy",
            "is_able_to_publish": false
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This endpoint allows you to duplicate a campaign by providing the IDs of the
campaigns to be duplicated.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/duplicate


REQUIRED PARAMETERS

Parameter Type Description id array An array of campaign IDs to be duplicated.


RESPONSE

Upon successful execution, the API returns a status code of 200 and a JSON
object with the fields of the campaign


ADD SCHEDULE TO CAMPAIGN

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "single_campaign 2024-01-29 11:36:29 UTC",
        "status": "paused",
        "type": "multiple",
        "recipients": 33,
        "click_rate": null,
        "created_at": "2024-01-29T06:27:33.529Z",
        "updated_at": "2024-01-29T16:56:08.621Z",
        "conversions": null,
        "flows": [
            {
                "id": 1,
                "company_id": 1,
                "name": "copy_3 of flow2",
                "created_at": "2024-01-29T16:00:57.910Z",
                "updated_at": "2024-01-29T16:00:57.910Z",
                "toggle_type": "A",
                "campaign_id": 1
            }
        ],
        "bounced_rate": null,
        "draft": false,
        "list_id": 2,
        "labels": [],
        "schedule": {
            "id": 1,
            "name": "FirstSchedule duplicate_1 duplicate_3",
            "time_zone": "Asia/Bangkok",
            "time_zone_name": "Hanoi (UTC +07:00)",
            "days": [
                "monday"
            ],
            "start_time": "17:20",
            "end_time": "17:30",
            "end_date": "2023-12-11",
            "repeat": "never",
            "number_campaign": 1,
            "type": "option"
        },
        "emoji": "happy",
        "is_able_to_publish": true
    }
}


This endpoint allows you to add a schedule to a campaign.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/add-schedule

Copy to ClipboardExample request body: 
{
    "id": 1,
    "type": "option",
    "schedule_id": 1
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign type string The type
of schedule. schedule_id bigint The ID of the schedule to be added.


RESPONSE

Upon successful execution, the API returns a status code of 200 and a JSON
object with the fields of the campaign


ADD FLOW TO CAMPAIGN

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "abc",
        "status": "draft",
        "type": "multiple",
        "recipients": 0,
        "click_rate": null,
        "created_at": "2023-08-11T02:53:49.944Z",
        "updated_at": "2024-02-16T09:19:33.414Z",
        "conversions": null,
        "flows": [
            {
                "id": 1,
                "company_id": 1,
                "name": "flow",
                "created_at": "2023-08-11T02:55:22.164Z",
                "updated_at": "2023-08-11T02:55:22.164Z",
                "toggle_type": "A",
                "campaign_id": 1
            }
        ],
        "bounced_rate": null,
        "draft": false,
        "list_id": 1,
        "labels": [],
        "schedule": {
            "id": 1,
            "name": "hanoi",
            "time_zone": "Asia/Bangkok",
            "time_zone_name": "Hanoi (UTC +07:00)",
            "days": [
                "friday" 
            ],
            "start_time": "10:02",
            "end_time": "10:06",
            "end_date": "2023-08-11",
            "repeat": "never",
            "number_campaign": 1,
            "type": "option" 
        },
        "emoji": null,
        "is_able_to_publish": true
    }
}


This API endpoint allows you to add a new flow to a campaign


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/campaigns/add-flow

Copy to ClipboardExample request body: 
{
    "id": 1,

    "campaign":{
        "flows_attributes": [
            {
                "name": "abc",
                "company_id": 1,
                "toggle_type": "A" 
            }
        ]
    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the campaign name string The name
of flow. company_id bigint The ID of the company. toggle_type string The type of
toggle.(A or B)


RESPONSE

Upon successful execution, the API returns a status code of 200 and a JSON
object with the fields of the campaign


FLOW


GET A FLOW

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "flow 2023-09-11 08:25:57 UTC",
        "campaign_id": 1,
        "company_id": 1,
        "created_at": "2023-09-11T08:23:57.599Z",
        "updated_at": "2023-09-11T08:23:57.599Z",
        "steps": [
            {
                "id": 1,
                "parent_id": null,
                "step_type": "channel",
                "step_data": {
                    "id": 1,
                    "channel": "whatsapp",
                    "templates": [
                        {
                            "toggle_type": "A",
                            "template_id": 1,
                            "name": "jasmine",
                            "subject": null,
                            "content": "{\"name\":\"jasmine\",\"content\":\"<p>jasminerfrf</p>\",\"body_value\":\"jasminerfrf\\n\",\"template_name\":\"jasmine\",\"language\":\"en_US\",\"lastDroppedElement\":[\"Text\"]}",
                            "template_type": "whatsapp",
                            "link_url": null
                        }
                    ]
                }
            }
        ]
    }
}


This API endpoint sends an HTTP GET request to retrieve information about a
specific flow with the ID.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/flows/{id}


REQUEST PARAMETERS

Parameter Type Description id bigint The ID of the flow


RESPONSE

The response will have a status code of 200 and a content type of
application/json. The response body will include data related to the flow,
including its ID, name, campaign ID, company ID, creation and update timestamps,
as well as details about its steps, including their IDs, types, and associated
channel templates.


CREATE FLOW

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "new flow ",
        "campaign_id": 1,
        "company_id": 1,
        "created_at": "2024-01-31T08:47:47.755Z",
        "updated_at": "2024-01-31T08:47:47.755Z",
        "steps": []
    }
}


This endpoint allows you to add a new flow.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/flows

Copy to ClipboardExample request body: 
{
    "flow": {
        "campaign_id": 1,
        "name": "new flow",
        "toggle_type": "A"
    }
}



REQUIRED PARAMETERS

Parameter Type Description campaign_id bigint The ID of the campaign. name
string The name of the flow. toggle_type type The type of toggle.(A or B)


RESPONSE

The response will contain an array of step objects under the "data" key


UPDATE FLOW

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "update flow",
        "campaign_id": 1,
        "company_id": 1,
        "created_at": "2024-01-31T09:04:49.345Z",
        "updated_at": "2024-01-31T09:05:23.088Z",
        "steps": []
    }
}


This endpoint sends an HTTP PATCH request to update a specific flow with the
provided ID


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/flows/{id}

Copy to ClipboardExample request body: 
{
    "flow": {
        "campaign_id": 1,
        "name": "update flow",
        "toggle_type": "B"
    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the flow campaign_id bigint The
ID of the campaign. name string The name of the flow. toggle_type type The type
of toggle.


RESPONSE

Upon a successful execution, the endpoint returns a status code 200 and a JSON
response with the updated data of the flow, including its ID, name, campaign ID,
company ID, creation timestamp, update timestamp, and an array of steps.


DELETE FLOW

Copy to Clipboard{
    "message": "Destroy flow success"
}


This API endpoint sends an HTTP DELETE request to delete a specific flow.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/flows/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the flow


RESPONSE

Upon successful deletion, the API returns a 200 status with an empty JSON
response containing a message indicating the success of the operation.


CREATE STEP CHANNEL

Copy to Clipboard{
    "data": {
        "id": 1,
        "created_at": "2024-01-31T03:37:09.958Z",
        "updated_at": "2024-01-31T03:37:09.958Z",
        "timing_id": null,
        "parent_id": 1,
        "stepable_type": "TemplateStep",
        "stepable_id": 1,
        "flow_id": 1,
        "status": "new",
        "completed_at": null,
        "paused_at": null,
        "include_condition": [],
        "exclude_condition": []
    }
}


This endpoint allows the user to create a step channel for a specific flow.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/flows/{id}/create-step-channel

Copy to ClipboardExample request body: 
{
    "channel": {
        "parent_id": 1,
        "template_id": 1
    },
    "template_step_id": 1, 
    "toggle_type": "A"
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the flow parent_id bigint The
parent ID of the step. template_id bigint The ID of the template. toggle_type
string The type of toggle (A or B)


OPTIONAL PARAMETERS

Parameter Type Description template_step_id bigint The ID of the template step.


RESPONSE

The response will contain an array of step objects under the "data" key


CREATE TIMING STEP

Copy to Clipboard{
    "data": {
        "id": 2,
        "parent_id": 1
    }
}


This endpoint allows the user to create a timing step for a specific flow.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/flows/{id}/create-timing-step

Copy to ClipboardExample request body: 
{
    "timing": {
        "parent_id": 1,
        "number": 3,
        "unit": "days"
    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the flow number int The number of
the timing step. unit string The unit of the timing step (days, hours, minutes)
parent_id bigint The parent ID of the step.


RESPONSE

The response will contain an array of step objects under the "data" key


CREATE CONDITION STEP

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "created_at": "2024-01-31T04:14:23.576Z",
            "updated_at": "2024-01-31T04:14:23.576Z",
            "timing_id": null,
            "parent_id": 1,
            "stepable_type": "LogicChannel",
            "stepable_id": 3,
            "flow_id": 1,
            "status": "new",
            "completed_at": null,
            "paused_at": null,
            "include_condition": [],
            "exclude_condition": []
        },
        {
            "id": 2,
            "created_at": "2024-01-31T04:14:23.580Z",
            "updated_at": "2024-01-31T04:14:23.580Z",
            "timing_id": null,
            "parent_id": 1,
            "stepable_type": "LogicChannel",
            "stepable_id": 4,
            "flow_id": 1,
            "status": "new",
            "completed_at": null,
            "paused_at": null,
            "include_condition": [],
            "exclude_condition": []
        }
    ]
}


This API endpoint allows you to create a step condition for a specific flow.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/flows/{id}/create-step-condition

Copy to ClipboardExample request body: 
{
    "condition": {
        "logic_id": 2, // ["opens" (id: 1), "clicks" (id: 2), "bounces" (id: 3), "replies" (id: 4)]
        "channel_id": 1, // ["email" (id: 1), "whatsapp" (id: 2), "sms" (id: 3)]
        "parent_id": 2,
        "number": 1,
        "unit": "minutes"
    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the flow logic_id bigint The ID
of the logic channel_id bigint The ID of the channel parent_id bigint The parent
ID of the step. number int The number of the timing step. unit string The unit
of the timing step (days, hours, minutes)


RESPONSE

The response will contain an array of step objects under the "data" key


CREATE STEP BY ACTION

Copy to Clipboard{
    "data": {
        "id": 5,
        "parent_id": 4
    }
}


This endpoint makes an HTTP POST request to create a step by action within a
flow.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/flows/1233/create-step-by-action

Copy to ClipboardExample request body: 
{
    "parent_id": 2,
    "type": "tag",
    "data": {
        "tag_id": 1
    }   
}



REQUIRED PARAMETERS

Parameter Type Description parent_id bigint The parent ID of the step. type
string The type of action (rating, tag, note, notification) data array A array
containing ids


RESPONSE

The response will contain an array of step objects under the "data" key


REMOVE STEP

Copy to Clipboard{
    "message": "Step destroyed successfully"
}


This API endpoint is used to remove steps from a flow.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/flows/{id}/remove-steps

Copy to ClipboardExample request body: 
{
    "step_id": 2
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the flow step_id bigint The ID of
the step to be removed


RESPONSE

Upon a successful execution, the API returns a 200 status with a JSON response
containing a "message" field.


STEP


UPDATE STEP

Copy to Clipboard{
    "message": "Update step successfully"
}


This endpoint is used to update a specific step within a flow.


HTTP REQUEST

PATCH
https://sky-agency-api-dev.adamo.tech/api/v3/flows/{flow_id}/steps/{step_id}


REQUIRED PARAMETERS

Parameter Type Description flow_id bigint The ID of the flow step_id bigint The
ID of the step

Each step will have a different type, so the required parameters will also be
different
Copy to ClipboardExample request body: 
{
    "channel": {
        "template_id": 1
    },
    "toggle_type": "A"
}


 * With 'TemplateStep'

template_id bigint The ID of the template toggle_type string The type of toggle
to be removed. (A or B)

Copy to Clipboard{
    "timing": {
        "number": 5,
        "unit": "days"
    }
}


 * With 'Timing'

number int The number representing the timing. unit string The unit of timing
(days, hours, minutes).

Copy to Clipboard{
    "condition": {
        "logic_id": 3
    }
}


 * With 'LogicChannel'

logic_id int The ID of the logic (opens-1, clicks-2, bounces-3, replies-4)

 * With 'Action'

Copy to Clipboard{
    "data":{
        "tag_id": 1
    }
}


-when type of action is tag

tag_id bigint The ID of the tag.

Copy to Clipboard{
    "data":{
        "rating": "good"
    }
}


-when type of action is rating

rating string The rating.

Copy to Clipboard{
    "data":{
        "note_content": "test note"
    }
}


-when type of action is note

note_content string The content of note.

Copy to Clipboard{
    "data":{
        "to": "abc@gmail.com",
        "insert_personal_data": "funny",
        "subject": "run",
        "text": "aaa"

    }
}


-when type of action is notification

to string The recipient of the step. insert_personal_data string Information
about personal data insertion. subject string The subject of the step. text
string The content of the step.


RESPONSE

Upon successful execution, the endpoint returns a 200 status with a JSON
response containing a message indicating the outcome of the operation.


REMOVE TOGGLE

Copy to Clipboard{
    "data": {
        "id": 2,
        "parent_id": 1
    }
}


This endpoint is used to remove a toggle step with the specified ID from a flow.


HTTP REQUEST

DELETE
https://sky-agency-api-dev.adamo.tech/api/v3/flows/{flow_id}/steps/{step_id}/remove-toggle

Copy to ClipboardExample request body: 
{
    "toggle_type": "B"
}



REQUIRED PARAMETERS

Parameter Type Description flow_id bigint The ID of the flow step_id bigint The
ID of the step


OPTIONAL PARAMETERS

Parameter Type Description toggle_type string The type of toggle to be removed.
(A or B)


RESPONSE

Upon successful deletion, the response will contain the ID of the removed step
and its parent ID, if applicable.


LABEL


GET ALL LABEL

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "company_id": 1,
            "name": "label 1",
            "description": "label label"
        },
        {
            "id": 2,
            "company_id": 1,
            "name": "lable 2",
            "description": null
        },
        {
            "id": 3,
            "company_id": 1,
            "name": "label 3",
            "description": null
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 3,
    "current_page": 1,
    "base_total": null
}


This endpoint sends an HTTP GET request to retrieve a list of labels with
pagination support.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/labels


RESPONSE

The response body included an array of label objects under the "data" key, along
with pagination metadata such as "total_pages", "total", and "current_page".


CREATE LABEL

Copy to Clipboard{
    "data": {
        "id": 4,
        "company_id": 1,
        "name": "label a",
        "description": "Placeat ad eos blanditiis debitis facilis fugia...",
        "created_at": "2024-01-30T09:08:56.674Z",
        "updated_at": "2024-01-30T09:08:56.674Z"
    }
}


This endpoint allows you to create a new label by making an HTTP POST request to
the specified URL.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/labels

Copy to ClipboardExample request body: 
{
    "label": {
        "name": "a",
        "description": "This is a label"

    }
}



REQUIRED PARAMETERS

Parameter Type Description name string The name of the label. description string
The description of the label.


RESPONSE

Upon a successful creation, the endpoint returns a status code of 201 and a JSON
response with the details of the newly created label, including its ID, company
ID, name, description, creation timestamp, and last update timestamp.


UPDATE LABEL

Copy to Clipboard{
    "data": {
        "id": 4,
        "company_id": 1,
        "name": "label c",
        "description": "Placeat ad eos blanditiis debitis facilis fugia..."
    }
}


This HTTP PATCH request is used to update a specific label with the provided ID.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/labels/{id}

Copy to ClipboardExample request body: 
{
    "label": {
        "name": "b",
        "description": "This is a new label"

    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the label. name string The name
of the label. description string The description of the label.


RESPONSE

Upon a successful update, the API will respond with a status code of 200 and a
JSON object in the format


DELETE LABEL

Copy to Clipboard{
    "message": "Delete successful"
}


This endpoint sends an HTTP DELETE request to delete a specific label with the
provided ID


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/labels/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the label.


RESPONSE

Upon successful execution, it returns a 200 status with a JSON response
containing a message indicating the result of the deletion.


ADD MULTI LABEL

Copy to Clipboard{
    "message": "Add label successfully "
}


This endpoint allows you to add multiple labels.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/labels/add-multi-label

Copy to ClipboardExample request body: 
{
    "label_id": [2,3],
    "label": 
        {
            "name": "label c",
            "description": "Placeat ad eos blanditiis debitis facilis fugia...",
            "campaign_labels_attributes":[
                {
                    "campaign_id": 1
                }
            ]
        }   
}



REQUIRED PARAMETERS

Parameter Type Description label_id array The IDs of the label.
campaign_labels_attributes array The attributes of campaign label (id,
campaign_id)


OPTIONAL PARAMETERS

Parameter Type Description name string The name of the label. description string
The description of the label.


RESPONSE

The response to the request will have a status code of 200, and the body will
contain a message indicating the outcome of the operation.


UNMATCH MULTI CAMPAIGNS

Copy to Clipboard{
    "message": "Label lable 2 removed from selected contacts"
}


This endpoint sends an HTTP DELETE request to remove the association of a label
with multiple campaigns.


HTTP REQUEST

DELETE
https://sky-agency-api-dev.adamo.tech/api/v3/labels/{id}/unmatch-multi-campaigns

Copy to ClipboardExample request body: 
{
    "campaign_ids": [1144, 1145]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the label campaign_ids array An
array of campaign IDs to unmatch from the label.


RESPONSE

The response to the request will have a status code of 200, and the body will
contain a message indicating the outcome of the operation.


SEGMENT


GET ALL SEGMENTS

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "company_id": 1,
            "name": "segment1",
            "type": "any",
            "condition_filters": [
                {
                    "id": 2,
                    "relate": null,
                    "segment_id": 1,
                    "type": "first_name",
                    "condition": {
                        "contains": "Jasmine"
                    },
                    "updated_at": "2024-02-01T07:28:16.518Z",
                    "created_at": "2024-02-01T07:28:16.518Z"
                },
                {
                    "id": 3,
                    "relate": null,
                    "segment_id": 1,
                    "type": "email_address",
                    "condition": {
                        "contains": "sbrambell0@bandcamp.com"
                    },
                    "updated_at": "2024-02-01T07:28:16.521Z",
                    "created_at": "2024-02-01T07:28:16.521Z"
                }
            ],
            "created_at": "2024-02-01T07:28:16.516Z",
            "updated_at": "2024-02-01T07:41:46.678Z",
            "number_receiver": 1
        },
        {
            "id": 2,
            "company_id": 1,
            "name": "segment2",
            "type": "any",
            "condition_filters": [
                {
                    "id": 2,
                    "relate": null,
                    "segment_id": 2,
                    "type": "contact_rating",
                    "condition": {
                        "is_not": "3"
                    },
                    "updated_at": "2024-01-31T17:35:49.148Z",
                    "created_at": "2024-01-31T17:35:49.148Z"
                },
                {
                    "id": 3,
                    "relate": null,
                    "segment_id": 2,
                    "type": "contact_rating",
                    "condition": {
                        "is": "5"
                    },
                    "updated_at": "2024-01-31T17:35:49.152Z",
                    "created_at": "2024-01-31T17:35:49.152Z"
                }
            ],
            "created_at": "2024-01-31T17:35:49.146Z",
            "updated_at": "2024-01-31T17:35:49.146Z",
            "number_receiver": 2
        },
        {
            "id": 3,
            "company_id": 1,
            "name": "segment3",
            "type": "any",
            "condition_filters": [
                {
                    "id": 1,
                    "relate": "tags",
                    "segment_id": 3,
                    "type": "tag",
                    "condition": {
                        "contact_is_tagged": 4
                    },
                    "updated_at": "2023-12-06T11:17:55.425Z",
                    "created_at": "2023-12-06T11:17:55.425Z"
                }
            ],
            "created_at": "2023-12-06T11:17:55.422Z",
            "updated_at": "2023-12-06T11:17:55.422Z",
            "number_receiver": 0
        }
    ],
    "per": 20,
    "total_pages": 1,
    "total": 3,
    "current_page": 1
}


This endpoint makes an HTTP GET request to retrieve a list of segments


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/segments


RESPONSE

The response returns a JSON object with an array of segment data, including
details such as segment ID, company ID, name, type, condition filters, number of
receivers, and timestamps for creation and update. Additionally, the response
includes pagination information such as the number of items per page, total
pages, total items, and the current page.


CREATE SEGMENT

Copy to Clipboard{
    "data": {
        "id": 1,
        "company_id": 1,
        "name": "segment",
        "type": "any",
        "condition_filters": [
            {
                "id": 1,
                "relate": null,
                "segment_id": 1,
                "type": "tag",
                "condition": {
                    "contact_is_tagged": 3
                },
                "updated_at": "2024-02-01T07:28:16.518Z",
                "created_at": "2024-02-01T07:28:16.518Z"
            },
            {
                "id": 2,
                "relate": null,
                "segment_id": 1,
                "type": "email_address",
                "condition": {
                    "contains": "sbrambell0@bandcamp.com"
                },
                "updated_at": "2024-02-01T07:28:16.521Z",
                "created_at": "2024-02-01T07:28:16.521Z"
            }
        ],
        "created_at": "2024-02-01T07:28:16.516Z",
        "updated_at": "2024-02-01T07:28:16.516Z",
        "number_receiver": 4
    }
}


This endpoint allows you to add a new segment with the specified name, type, and
condition filters.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/segments

Copy to ClipboardExample request body: 
{
    "segment": {
        "name": "segment",
        "type": "any",
        "condition_filters_attributes": {
            "0": {
                "type": "first_name",
                "condition": {
                    "contains": "david"
                }
            },
            "1": {
                "type": "email_address",
                "condition": {
                    "contains": "jasmine@gmail.com"
                }
            }
        }
    }
}



REQUIRED PARAMETERS

Parameter Type Description name string The name of the segment. type string The
type of the segment.


OPTIONAL PARAMETERS

Parameter Type Description condition_filters_attributes array Array of condition
filters (id, label, type, condition)


RESPONSE

The response returns a JSON object with an array of segment data, including
details such as segment ID, company ID, name, type, condition filters, number of
receivers, and timestamps for creation and update


UPDATE SEGMENT

Copy to Clipboard{
    "data": {
        "id": 1,
        "company_id": 1,
        "name": "segment2",
        "type": "any",
        "condition_filters": [
            {
                "id": 1,
                "relate": null,
                "segment_id": 1,
                "type": "contact_rating",
                "condition": {
                    "is": "2"
                },
                "updated_at": "2024-02-01T07:28:16.518Z",
                "created_at": "2024-02-01T07:28:16.518Z"
            },
            {
                "id": 2,
                "relate": null,
                "segment_id": 14,
                "type": "email_address",
                "condition": {
                    "contains": "sbrambell0@bandcamp.com"
                },
                "updated_at": "2024-02-01T07:28:16.521Z",
                "created_at": "2024-02-01T07:28:16.521Z"
            }
        ],
        "created_at": "2024-02-01T07:28:16.516Z",
        "updated_at": "2024-02-01T07:41:46.678Z",
        "number_receiver": 14
    }
}


This endpoint is used to update a specific segment identified by the ID.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/segments/{id}

Copy to ClipboardExample request body: 
{
    "segment": {
        "name": "segment12",
        "type": "any",
        "condition_filters_attributes": {
            "0": {
                "type": "first_name",
                "condition": {
                    "contains": "Lady"
                }
            }
        }
    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the segment name string The name
of the segment. type string The type of the segment.
condition_filters_attributes array Array of condition filters (id, label, type,
condition)


RESPONSE

Upon a successful execution, the endpoint returns a status code of 200 and the
JSON response.


DELETE SEGMENT

Copy to Clipboard{
    "message": "Delete successful"
}


This API endpoint sends an HTTP DELETE request to delete a specific segment


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/segments/{id}


REQUIRED PAREMETS

Parameter Type Description id bigint The ID of the segment


RESPONSE

Upon successful execution, the server responds with a status code of 200 and a
JSON object with a "message" key. The value of the "message" key will indicate
the outcome of the deletion process.


SEGMENT TEMPLATE

Copy to Clipboard{
    "data": {
        "tag": {
            "options": {
                "contact_is_tagged": "contact is tagged",
                "contact_is_not_tagged": "contact is not tagged"
            },
            "relate_table": "tags",
            "field": "id"
        },
        "contact_rating": {
            "options": {
                "is": "is",
                "is_not": "is not",
                "is_greater_than": "is greater than",
                "is_less_than": "is less than"
            },
            "field": "rating"
        },
        "email_address": {
            "options": {
                "is": "is",
                "is_not": "is not",
                "contains": "contains",
                "does_not_contains": "does not contains",
                "starts_with": "starts with",
                "ends_with": "ends with",
                "is_greater_than": "is greater than",
                "is_less_than": "is less than"
            },
            "field": "email"
        },
        "email_marketing_engagement": {
            "options": {
                "is": "is",
                "is_not": "is not"
            },
            "value_static": [
                "new",
                "never",
                "rarely",
                "sometimes",
                "often",
                "always"
            ],
            "field": "email_marketing_engagement"
        },
        "info_changed": {
            "options": {
                "is_after": "is after",
                "is_before": "is before",
                "is": "is"
            },
            "value_input": {
                "a_specific_date": "a specific date "
            },
            "field": "updated_at"
        },
        "email_marketing_status": {
            "options": {
                "is": "is",
                "is_not": "is not"
            },
            "value_static": [
                "subscribed",
                "unsubscribed",
                "non-subscribed",
                "cleaned"
            ],
            "field": "email_marketing"
        },
        "first_name": {
            "options": {
                "is": "is",
                "is_not": "is not",
                "contains": "contains",
                "does_not_contains": "does not contains",
                "starts_with": "starts with",
                "ends_with": "ends with",
                "is_greater_than": "is greater than",
                "is_less_than": "is less than",
                "is_blank": "is blank",
                "is_not_blank": "is not blank"
            },
            "field": "first_name"
        },
        "last_name": {
            "options": {
                "is": "is",
                "is_not": "is not",
                "contains": "contains",
                "does_not_contains": "does not contains",
                "starts_with": "starts with",
                "ends_with": "ends with",
                "is_greater_than": "is greater than",
                "is_less_than": "is less than",
                "is_blank": "is blank",
                "is_not_blank": "is not blank"
            },
            "field": "last_name"
        },
        "whatsapp_number": {
            "options": {
                "is": "is",
                "is_not": "is not",
                "contains": "contains",
                "does_not_contains": "does not contains",
                "starts_with": "starts with",
                "ends_with": "ends with",
                "is_greater_than": "is greater than",
                "is_less_than": "is less than",
                "is_blank": "is blank",
                "is_not_blank": "is not blank"
            },
            "field": "whatsapp_number"
        },
        "phone_number": {
            "options": {
                "is": "is",
                "is_not": "is not",
                "contains": "contains",
                "does_not_contains": "does not contains",
                "starts_with": "starts with",
                "ends_with": "ends with",
                "is_greater_than": "is greater than",
                "is_less_than": "is less than",
                "is_blank": "is blank",
                "is_not_blank": "is not blank"
            },
            "field": "phone_number"
        },
        "date_added": {
            "options": {
                "is_after": "is after",
                "is_before": "is before",
                "is": "is"
            },
            "value_input": {
                "a_specific_date": "a specific date"
            },
            "field": "created_at"
        }
    }
}


This HTTP GET request retrieves the segment template from the API.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/segments/segment-template


RESPONSE

The response will contain a JSON object with various fields and their
corresponding options for filtering contacts based on different criteria such as
tags, contact rating, email address, engagement, information change, marketing
status, names, and contact details.


PREVIEW RESULT SEGMENT

Copy to Clipboard{
    "segment_params": {
        "name": "",
        "type": "any",
        "condition_filters_attributes": [
            {
                "type": "email_marketing_status",
                "condition": {
                    "is_not": "subscribed"
                }
            }
        ]
    },
    "company_id_segment": 1,
    "current_company_id": 1,
    "contacts": [
        {
            "id": 1,
            "first_name": "Sweden1",
            "last_name": null,
            "email": null,
            "email_marketing": "unsubcribed",
            "company_name": "C1",
            "source": "imported",
            "rating": 2,
            "dynamic_attributes": null,
            "notes": [],
            "avatar": null,
            "tags": [
                {
                    "id": 1,
                    "company_id": 1,
                    "name": "developers",
                    "description": "developers",
                    "type": "contact",
                    "total_contacts": 10
                }
            ],
            "lists": [
                {
                    "id": 1,
                    "name": "single_campaign 2024-01-17 08:53:05 UTC"
                },
                {
                    "id": 2,
                    "name": "single_campaign 2024-01-18 02:44:01 UTC"
                },
                {
                    "id": 3,
                    "name": "single_campaign 2024-01-19 02:48:18 UTC"
                }
            ],
            "phone_number": "",
            "whatsapp_number_status": "not_registered",
            "whatsapp_number": "+46726415553",
            "updated_at": "2024-01-17T06:25:27.475Z",
            "created_at": "2024-01-17T06:25:27.475Z",
            "status": []
        },
        {
            "id": 2,
            "first_name": "Sweden2",
            "last_name": null,
            "email": null,
            "email_marketing": "unsubcribed",
            "company_name": "C2",
            "source": "imported",
            "rating": 2,
            "dynamic_attributes": null,
            "notes": [],
            "avatar": null,
            "tags": [
                {
                    "id": 1,
                    "company_id": 2,
                    "name": "developers",
                    "description": "developers",
                    "type": "contact",
                    "total_contacts": 11
                }
            ],
            "lists": [
                {
                    "id": 5,
                    "name": "single_campaign 2024-01-17 08:53:05 UTC"
                },
                {
                    "id": 6,
                    "name": "single_campaign 2024-01-18 02:44:01 UTC"
                },
                {
                    "id": 7,
                    "name": "single_campaign 2024-01-19 02:48:18 UTC"
                }
            ],
            "phone_number": "",
            "whatsapp_number_status": "not_registered",
            "whatsapp_number": "+46726412129",
            "updated_at": "2024-01-17T06:25:27.475Z",
            "created_at": "2024-01-17T06:25:27.475Z",
            "status": []
        }
    ],
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1
}


This HTTP POST request is used to preview the result of a segment.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/segments/preview-result

Copy to ClipboardExample request body: 
{
    "segment": {
        "name": "segment",
        "type": "any",
        "condition_filters_attributes": [
            {
                "type": "email_marketing_status",
                "condition": {
                    "is_not": "subscribed"
                }
            }
        ]
    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the segment name string The name
of the segment. type string The type of the segment.
condition_filters_attributes array Array of condition filters (id, label, type,
condition)


RESPONSE

The response will be in JSON format and will include the segment parameters,
company IDs, contact details, pagination details, and other relevant data.


SCHEDULE


GET ALL SCHEDULE

Copy to ClipboardResponse for type = option:
{
    "data": [
        {
            "id": 1,
            "name": "FirstSchedule duplicate_1",
            "time_zone": "Asia/Bangkok",
            "time_zone_name": "Hanoi (UTC +07:00)",
            "days": [
                "monday"
            ],
            "start_time": "17:20",
            "end_time": "17:30",
            "end_date": "2023-12-11",
            "repeat": "never",
            "number_campaign": 1,
            "type": "option",
            "start_date": "2023-12-11"
        },
        {
            "id": 2,
            "name": "FirstSchedule",
            "time_zone": "Asia/Bangkok",
            "time_zone_name": "Hanoi (UTC +07:00)",
            "days": [
                "monday"
            ],
            "start_time": "17:20",
            "end_time": "17:30",
            "end_date": "2023-12-11",
            "repeat": "never",
            "number_campaign": 1,
            "type": "option",
            "start_date": "2023-12-11"
        }
    ],
    "per": 20,
    "total_pages": 1,
    "total": 2,
    "current_page": 1
}


Copy to ClipboardResponse for type = date_time:
{
    "data": [
        {
            "id": 1,
            "name": "date_time schedule 2024-01-19 03:33:25 UTC",
            "time_zone_name": "UTC (UTC +00:00)",
            "time_zone": "Etc/UTC",
            "date": "2024-01-19",
            "time": "03:33",
            "number_campaign": 1,
            "type": "date_time"
        },
        {
            "id": 2,
            "name": "date_time schedule 2024-01-19 03:22:42 UTC",
            "time_zone_name": "UTC (UTC +00:00)",
            "time_zone": "Etc/UTC",
            "date": "2024-01-19",
            "time": "03:22",
            "number_campaign": 1,
            "type": "date_time"
        }
    ],
    "per": 20,
    "total_pages": 1,
    "total": 2,
    "current_page": 1
}


This API endpoint sends an HTTP GET request to retrieve a list of schedules.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/schedules


OPTIONAL PARAMETERS

Parameter Type Description type string The type of the schedule (date_time or
option)


RESPONSE

The response will be in JSON format and will include an array of schedule
objects, along with pagination details such as the number of items per page,
total pages, total items, and the current page.


GET A SCHEDULE

> Response for type = date_time:

Copy to Clipboard{
    "data": {
        "id": 4,
        "name": "date_time schedule 2023-12-30 16:13:52 UTC",
        "time_zone_name": "UTC (UTC +00:00)",
        "time_zone": "Etc/UTC",
        "date": "2023-12-30",
        "time": "16:13",
        "number_campaign": 1,
        "type": "date_time"
    }
}


> Response for type = option:

Copy to Clipboard{
    "data": {
        "id": 2,
        "name": "option_schedule",
        "time_zone": "Asia/Bangkok",
        "time_zone_name": "Bangkok (UTC +07:00)",
        "days": [
            "friday"
        ],
        "start_time": "14:58",
        "end_time": "14:59",
        "end_date": "2024-01-15",
        "repeat": "never",
        "number_campaign": 1,
        "type": "option",
        "start_date": "2024-01-14"
    }
}


This endpoint retrieves schedule details based on the provided ID


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/schedules/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the schedule type string The type
of schedule (option or datetime)


RESPONSE

The response will include the schedule's ID, name, time zone name, time zone,
date, time, number of campaigns, and type.


CREATE SCHEDULE

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "for desperate housewifes before weekend",
        "time_zone": "Hanoi",
        "time_zone_name": "Hanoi",
        "days": [
            "monday",
            "tuesday"
        ],
        "start_time": "11:00",
        "end_time": "12:00",
        "end_date": "2024-03-20",
        "repeat": "never",
        "number_campaign": 1,
        "type": "option",
        "start_date": "2024-03-18"
    }
}


This endpoint allows you to add a new schedule for a campaign.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/schedules/

Copy to ClipboardExample request body: 
{
    "type": "option",
    "name": "for desperate housewifes before weekend",
    "time_zone": "Hanoi",
    "days": ["monday", "tuesday"],
    "start_time": "11:00",
    "end_time": "12:00",
    "repeat": "never",
    "campaign_id": "1",
    "end_date": "2024-03-20"
}



REQUIRED PARAMETERS

Note: Schedule has 2 types: option and date_time, so when creating, you will be
able to create it in 2 ways

(If type is option then the campaign needs to have type: multiple)

Parameter Type Description type string The type of schedule. name string The
name of the schedule. time_zone string The time zone for the schedule.
start_time string The start time of schedule . end_time string The end time of
the schedule. repeat string never, every_week, second_week. days array The days
you want to create a schedule. campaign_id bigint The ID of the campaign for
which the schedule is being added.

Copy to Clipboard{
    "data": {
        "id": 5,
        "name": "for desperate housewife before weekend",
        "time_zone_name": "Hanoi",
        "time_zone": "Hanoi",
        "date": "2024-12-16",
        "time": "20:00",
        "number_campaign": 1,
        "type": "date_time"
    }
}


end_date date The end date of the schedule. (optional parameters)

Copy to ClipboardExample request body: 
{
    "type": "date_time",
    "name": "for desperate housewifes",
    "time_zone": "Hanoi",
    "date": "2024-03-20",
    "time": "11:00",
    "campaign_id": "2"
}


(If type is date_time then the campaign needs to have type: single)

Parameter Type Description type string The type of schedule. name string The
name of the schedule. time_zone string The time zone for the schedule. date date
The date for the schedule time time The time for the schedule campaign_id bigint
The ID of the campaign for which the schedule is being added.


RESPONSE

The details of the newly added schedule.


UPDATE SCHEDULE

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "for desperate housewifes before weekend",
        "time_zone": "Hanoi",
        "time_zone_name": "Hanoi",
        "days": [
            "monday",
            "tuesday"
        ],
        "start_time": "11:00",
        "end_time": "12:00",
        "end_date": "2024-03-20",
        "repeat": "never",
        "number_campaign": 1,
        "type": "option",
        "start_date": "2024-03-18"
    }
}


This endpoint is used to update a specific schedule by its ID


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/schedules/{id}

Copy to ClipboardExample request body: 
{
    "type": "option",
    "name": "for desperate before weekend",
    "time_zone": "Hanoi",
    "days": ["monday", "tuesday"],
    "start_time": "11:00",
    "end_time": "12:00",
    "repeat": "never",
    "campaign_id": "1",
    "end_date": "2024-03-21"
}



OPTIONAL PARAMETERS

Note: Schedule has 2 types: option and date_time, so when creating, you will be
able to create it in 2 ways

(If type is option then the campaign needs to have type: multiple)

Parameter Type Description type string The type of schedule. name string The
name of the schedule. time_zone string The time zone for the schedule.
start_time string The start time of schedule . end_time string The end time of
the schedule. repeat string never, every_week, second_week. days array The days
you want to create a schedule. campaign_id bigint The ID of the campaign for
which the schedule is being added.

Copy to Clipboard{
    "data": {
        "id": 5,
        "name": "for desperate housewife before weekend",
        "time_zone_name": "Hanoi",
        "time_zone": "Hanoi",
        "date": "2024-12-16",
        "time": "20:00",
        "number_campaign": 1,
        "type": "date_time"
    }
}


end_date date The end date of the schedule. (optional parameters)

Copy to ClipboardExample request body: 
{
    "type": "date_time",
    "name": "for desperate housewifes",
    "time_zone": "Hanoi",
    "date": "2024-03-20",
    "time": "11:00",
    "campaign_id": "2"
}


(If type is date_time then the campaign needs to have type: single)

Parameter Type Description type string The type of schedule. name string The
name of the schedule. time_zone string The time zone for the schedule. date date
The date for the schedule time time The time for the schedule campaign_id bigint
The ID of the campaign for which the schedule is being added.


RESPONSE

Upon successful execution, the endpoint returns a status code of 200 and a JSON
response with the updated data.


DELETE SCHEDULE

Copy to Clipboard{
    "message": "Delete successful"
}


This endpoint is used to delete a specific schedule by its ID.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/schedules/{id}

Copy to ClipboardExample request body: 
{
    "type": "option"
}



REQUIRED PARAMTERS

Parameter Type Description id bigint The ID of the schedule type string The type
of schedule


RESPONSE

Upon successful deletion, the server will respond with a status code of 200 and
a JSON object containing a message indicating the success of the operation.


GET TIMEZONE

Copy to Clipboard{
    "data": [
        {
            "name": "International Date Line West (UTC -12:00)",
            "value": "International Date Line West"
        },
        {
            "name": "American Samoa (UTC -11:00)",
            "value": "American Samoa"
        },
        {
            "name": "Midway Island (UTC -11:00)",
            "value": "Midway Island"
        },
        {
            "name": "Hawaii (UTC -10:00)",
            "value": "Hawaii"
        },
        {
            "name": "Alaska (UTC -09:00)",
            "value": "Alaska"
        },
        {
            "name": "Pacific Time (US & Canada) (UTC -08:00)",
            "value": "Pacific Time (US & Canada)"
        },

        ...
    ]
}


This API endpoint makes an HTTP GET request to retrieve the timezone
information.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/schedules/get-timezone


RESPONSE

The response will have a status code of 200 and a content type of
application/json. The response body will contain an array of objects with "name"
and "value" properties, representing the timezone data. You can use this
endpoint to fetch the available timezones for scheduling purposes.


DUPLICATE SCHEDULE

Copy to Clipboard{
    "data": {
        "id": 2,
        "company_id": 1,
        "name": "date_time schedule 2023-12-30 16:13:54 UTC duplicate_1",
        "time_zone": "Etc/UTC",
        "date": "2024-02-22",
        "time": "2000-01-01T16:13:00.000Z",
        "created_at": "2024-01-30T08:30:55.704Z",
        "updated_at": "2024-01-30T08:30:55.704Z",
        "time_zone_name": "Etc/UTC"
    }
}


This endpoint allows you to duplicate a schedule by sending an HTTP POST request
to the specified URL


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/schedules/duplicate

Copy to ClipboardExample request body: 
{
    "type": "date_time",
    "id": 1290
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the schedule to be duplicated.
type string The type of the schedule to be duplicated.


RESPONSE

Upon a successful duplication, the server will respond with a status code of 201
and a JSON object containing the duplicated schedule data. The response will
include the ID, company ID, name, time zone, date, time, creation and update
timestamps, and time zone name of the duplicated schedule.


COMPANIES


GET ALL COMPANIES

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "name": "Iliana.Ankunding",
            "phone": "570-395-5693",
            "whatsapp_number": null,
            "email": "ankunding@gmail.com",
            "logo": null,
            "active": false,
            "created_at": "2024-01-23T10:16:31.505Z",
            "updated_at": "2024-01-23T10:16:31.505Z",
            "invite_requests": null,
            "current_user_role": "owner",
            "wa_video_tutorial": false,
            "status_connected_waba": {
                "current_step": 1,
                "status": "pending"
            }
        },
        {
            "id": 2,
            "name": "jasmine12121",
            "phone": "0355643122",
            "whatsapp_number": "",
            "email": "jasmine@gmail.com",
            "logo": null,
            "active": false,
            "created_at": "2024-01-12T07:28:52.202Z",
            "updated_at": "2024-01-12T07:28:57.578Z",
            "invite_requests": null,
            "current_user_role": "owner",
            "wa_video_tutorial": false,
            "status_connected_waba": {
                "current_step": 1,
                "status": "pending"
            }
        },
        {
            "id": 3,
            "name": "Earnestine Kozey",
            "phone": "112-053-5571",
            "whatsapp_number": null,
            "email": null,
            "logo": null,
            "active": false,
            "created_at": "2023-09-07T01:24:49.926Z",
            "updated_at": "2024-01-24T04:06:16.477Z",
            "invite_requests": {
                "id": 1,
                "requested_user_id": 4,
                "requesting_user_id": 1,
                "status": "accepted",
                "company_id": 1,
                "role": 2,
                "created_at": "2023-12-04T02:38:16.565Z",
                "updated_at": "2023-12-04T02:38:48.734Z",
                "added_by": {
                    "id": 1,
                    "email": "dungadamo1@gmail.com"
                }
            },
            "current_user_role": "owner",
            "wa_video_tutorial": true,
            "status_connected_waba": {
                "current_step": 5,
                "status": "completed"
            }
        }
    ]
}


This endpoint makes an HTTP GET request to retrieve a list of companies.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/companies


RESPONSE

The response body will contain an array of company objects


CHOOSE CURRENT COMPANY

Copy to Clipboard{
    "data": {
        "id": 2,
        "company_id": 1,
        "user_id": 1,
        "role": "owner",
        "created_at": "2023-09-07T01:24:51.209Z",
        "updated_at": "2024-01-25T06:09:34.633Z",
        "default": true,
        "email_notification": true
    }
}


This endpoint is used to choose the current company for the user. It is a POST
request to the specified URL. The request body should contain a JSON object with
the "id" parameter.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/companies/choose-current-company

Copy to ClipboardExample request body: 
{
    "id": "1" 
}



REQUIRED PARAMETERS

Parameter Type Description id string The ID of the company to be chosen.


RESPONSE

Contains the details of the chosen company.


GET A COMPANY

Copy to Clipboard{
    "data": {
        "id": 3,
        "name": "Earnestine Kozey",
        "phone": "112-053-5571",
        "whatsapp_number": null,
        "email": null,
        "logo": null,
        "wa_video_tutorial": true,
        "company_users": [
            {
                "id": 1,
                "company_id": 1,
                "user_id": 2,
                "role": "admin",
                "created_at": "2024-01-10T04:10:34.284Z",
                "updated_at": "2024-01-10T06:16:53.901Z",
                "default": true,
                "email_notification": true,
                "user": {
                    "id": 2,
                    "email": "karine@gmail.com",
                    "first_name": "Karine",
                    "last_name": "Le",
                    "avatar_url": null
                }
            },
            {
                "id": 2,
                "company_id": 1,
                "user_id": 1,
                "role": "owner",
                "created_at": "2023-09-07T01:24:51.209Z",
                "updated_at": "2024-01-25T06:09:34.633Z",
                "default": true,
                "email_notification": true,
                "user": {
                    "id": 1,
                    "email": "dungadamo1@gmail.com",
                    "first_name": "jasmine",
                    "last_name": "mai",
                    "avatar_url": null
                }
            }
        ]
    }
}


This endpoint retrieves the details of a specific company.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/companies/{id}


REQUIRED PARAMETERS

Parameter Type Description id string The ID of the company to be chosen.


RESPONSE

This response provides the details of the company including its ID, name,
contact phone, WhatsApp number, email, logo, and other related information.


CREATE COMPANY

Copy to Clipboard{
    "data": {
        "id": 3,
        "name": "jasme",
        "phone": "512-796-7143",
        "whatsapp_number": "512-796-7143",
        "email": null,
        "logo": null,
        "wa_video_tutorial": false,
        "company_users": [
            {
                "id": 4,
                "company_id": 3,
                "user_id": 1,
                "role": "owner",
                "created_at": "2024-03-13T03:51:46.394Z",
                "updated_at": "2024-03-13T03:51:46.394Z",
                "default": true,
                "email_notification": false,
                "user": {
                    "id": 1,
                    "email": "dungadamo@gmail.com",
                    "first_name": "jasmine",
                    "last_name": "mai",
                    "avatar_url": null
                }
            }
        ]
    }
}


This endpoint allows you to add a new company.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/companies

Copy to ClipboardExample request body: 
{
    "company": {
        "name": "jasmine112",
        "phone": "512-796-7143",
        "whatsapp_number": "512-796-7143",
        "email": null,
        "logo": null
    }
}



REQUIRED PARAMETERS

Parameter Type Description name string The name of the company. phone string The
phone number of the company.


OPTIONAL PARAMETERS

Parameter Type Description whatsapp_number string The WhatsApp number of the
company. email string The email address of the company. logo string The URL of
the company's logo. time_zone string The time zone.


RESPONSE

Upon successful execution, the endpoint returns a status code of 201 along with
the new company data in the response body


UPDATE A COMPANY

Copy to Clipboard{
    "data": {
        "id": 3,
        "name": "Earnestine Kozey",
        "phone": "112-053-5571",
        "whatsapp_number": null,
        "email": null,
        "logo": null,
        "wa_video_tutorial": true,
        "company_users": [
            {
                "id": 1,
                "company_id": 1,
                "user_id": 2,
                "role": "admin",
                "created_at": "2024-01-10T04:10:34.284Z",
                "updated_at": "2024-01-10T06:16:53.901Z",
                "default": true,
                "email_notification": true,
                "user": {
                    "id": 2,
                    "email": "karine@gmail.com",
                    "first_name": "Karine",
                    "last_name": "Le",
                    "avatar_url": null
                }
            },
            {
                "id": 2,
                "company_id": 1,
                "user_id": 1,
                "role": "owner",
                "created_at": "2023-09-07T01:24:51.209Z",
                "updated_at": "2024-01-25T06:09:34.633Z",
                "default": true,
                "email_notification": true,
                "user": {
                    "id": 1,
                    "email": "dungadamo1@gmail.com",
                    "first_name": "jasmine",
                    "last_name": "mai",
                    "avatar_url": null
                }
            }
        ]
    }
}


This endpoint allows the user to update the details of a specific company using
an HTTP PATCH request.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/companies/{id}

Copy to ClipboardExample request body: 
{
    "company": {
        "name": "jasmine112",
        "phone": "512-796-7143",
        "whatsapp_number": "512-796-7143",
        "email": null,
        "logo": null
    }
}



REQUIRED PARAMETERS

Parameter Type Description id string The ID of the company to be update.


OPTIONAL PARAMETERS

Parameter Type Description name string The name of the company. phone string The
phone number of the company. whatsapp_number string The WhatsApp number of the
company. email string The email address of the company. logo string The URL of
the company's logo. time_zone string The time zone.


RESPONSE

Upon successful execution, the endpoint returns a status code of 200 along with
the updated company data in the response body. The response includes the updated
company details and the array of company users with their respective
information.


DELETE A COMPANY

Copy to Clipboard{
    "message": "Delete successful"
}


This endpoint sends an HTTP DELETE request to remove the company with the ID


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/companies/{id}


REQUIRED PARAMTERS

Parameter Type Description id string The ID of the company to be chosen.


RESPONSE

Success will return a message notifying that it has been successfully deleted


GET WHATSAPP PROFILES

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "phone_number": "512-796-7143",
            "phone_number_id": "120044767851540",
            "verify_code_status": "verified",
            "whatsapp_account_id": "129350453485384",
            "company": {
                "id": 221,
                "name": "jasmine2"
            },
            "about": "asdasd",
            "address": "56 to huu",
            "description": "",
            "vertical": "BEAUTY",
            "email": "dungadamo1@gmail.com",
            "websites": "dungadamo1.com",
            "image": "https://dovehero-staging.s3.amazonaws.com/et677gmw4rynp71x4jegup22n9th4",
            "project_id": "64f92a474548ca0be7e6c5c6",
            "project_name": "Dung Adamo 1_4f0fd12c-8258-4df3-9d87-596b9908a00d",
            "display_name": "Dung Adamo 2",
            "tier": 1
        }
    ]
}


This endpoint makes an HTTP GET request to retrieve the WhatsApp profiles of
companies.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/companies/get-whatsapp-profiles


RESPONSE

The response body contains an array of objects, each representing a WhatsApp
profile. Each object includes the following attributes:


LINK PHONE NUMBER

Copy to Clipboard{
    "message": "Phone number linked to your company"
}


This API endpoint is a POST request used to link a phone number to a company.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/companies/link-phone-number

Copy to ClipboardExample request body: 
{
    "phone_number_id": "120044767859540"
}



REQUIRED PARAMETERS

Parameter Type Description phone_number_id string The ID of the phone number.


RESPONSE

The response to the request will have a status code of 200, and the body will
contain a message indicating the outcome of the operation.


UNLINK PHONE NUMBER

Copy to Clipboard{
    "message": "Phone number unlinked from your company"
}


This endpoint is used to unlink a phone number from a company.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/companies/unlink-phone-number

Copy to ClipboardExample request body: 
{
    "phone_number_id": "120044767859540"
}



REQUIRED PARAMETERS

Parameter Type Description phone_number_id string The ID of the phone number.


RESPONSE

The response to the request will have a status code of 200, and the body will
contain a message indicating the outcome of the operation.


UPDATE LOGO WHATSAPP BUSINESS PROFILE

This HTTP GET request is used to update the logo for a WhatsApp Business profile
of a company.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/companies/update-logo-whatsapp-business-profile

Copy to ClipboardExample request body: 
{
    "phone_number": "+84981349672"
}



REQUIRED PARAMETERS

Parameter Type Description phone_number string The phone number associated with
the WhatsApp Business profile.


MARK SEEN WHATSAPP VIDEO TUTORIAL

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "Earnestine Kozey",
        "phone": "112-053-5571",
        "whatsapp_number": null,
        "email": null,
        "logo": null,
        "wa_video_tutorial": true,
        "company_users": [
            {
                "id": 1,
                "company_id": 1,
                "user_id": 2,
                "role": "admin",
                "created_at": "2024-01-10T04:10:34.284Z",
                "updated_at": "2024-01-10T06:16:53.901Z",
                "default": true,
                "email_notification": true,
                "user": {
                    "id": 2,
                    "email": "karine@gmail.com",
                    "first_name": "Karine",
                    "last_name": "Le",
                    "avatar_url": null
                }
            },
            {
                "id": 2,
                "company_id": 1,
                "user_id": 1,
                "role": "owner",
                "created_at": "2023-09-07T01:24:51.209Z",
                "updated_at": "2024-01-25T06:09:34.633Z",
                "default": true,
                "email_notification": true,
                "user": {
                    "id": 1,
                    "email": "dungadamo1@gmail.com",
                    "first_name": "jasmine",
                    "last_name": "mai",
                    "avatar_url": null
                }
            }
        ]
    }
}


This HTTP POST request is used to mark a WhatsApp video tutorial as seen for a
specific company.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/companies/mark-seen-whatsapp-video-tutorial


RESPONSE

The response to the request returns a status code of 200, along with a JSON
object containing the updated data for the company. The "wa_video_tutorial"
attribute is set to true, indicating that the WhatsApp video tutorial has been
marked as seen. The response also includes details of the company's users, such
as their IDs, roles, and email notification settings.


CANCEL COMPANY RENT NUMBER

Copy to Clipboard{
    "message": "Deactive the number successfully. You have 10 days left to repurchase this number"
}


This HTTP POST request is used to cancel a company rent number.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/companies/cancel-company-rent-number


RESPONSE

The response to the request will have a status code of 200, and the body will
contain a message indicating the outcome of the operation.


CONTACTS


GET ALL CONTACTS

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "first_name": "jamsine",
            "last_name": "",
            "email": "nzbxn@gmail.com",
            "email_marketing": "subscribed",
            "company_name": "ndnxn",
            "source": "manually added",
            "rating": 2,
            "dynamic_attributes": null,
            "notes": [
                {
                    "id": 1,
                    "content": "new note",
                    "created_at": "2024-01-19T04:35:14.551Z",
                    "updated_at": "2024-01-19T04:35:14.551Z"
                }
            ],
            "avatar": null,
            "tags": [],
            "lists": [
                {
                    "id": 1,
                    "name": "single_campaign 2024-01-29 11:36:29 UTC"
                },
                {
                    "id": 2,
                    "name": "single_campaign 2024-01-30 11:36:29 UTC"
                },
                {
                    "id": 3,
                    "name": "single_campaign 2024-01-31 11:36:29 UTC"
                }
            ],
            "phone_number": "",
            "whatsapp_number_status": "not_registered",
            "whatsapp_number": "",
            "updated_at": "2024-01-19T04:35:14.549Z",
            "created_at": "2024-01-19T04:35:14.549Z",
            "status": []
        },
        {
            "id": 2,
            "first_name": "jasmine",
            "last_name": "",
            "email": "jasmine@gmail.com",
            "email_marketing": "subscribed",
            "company_name": "",
            "source": "manually added",
            "rating": 2,
            "dynamic_attributes": null,
            "notes": [],
            "avatar": null,
            "tags": [],
            "lists": [
                {
                    "id": 4,
                    "name": "single_campaign 2024-01-29 11:36:29 UTC"
                },
                {
                    "id": 5,
                    "name": "single_campaign 2024-01-30 11:36:29 UTC"
                }
            ],
            "phone_number": "",
            "whatsapp_number_status": "not_registered",
            "whatsapp_number": "",
            "updated_at": "2024-01-19T04:03:40.699Z",
            "created_at": "2024-01-19T04:03:40.699Z",
            "status": []
        },
        {
            "id": 3,
            "first_name": "Sweden",
            "last_name": null,
            "email": null,
            "email_marketing": "unsubcribed",
            "company_name": "C1",
            "source": "imported",
            "rating": 2,
            "dynamic_attributes": null,
            "notes": [],
            "avatar": null,
            "tags": [
                {
                    "id": 221,
                    "company_id": 222,
                    "name": "developers",
                    "description": "developers",
                    "type": "contact",
                    "total_contacts": 11
                }
            ],
            "lists": [
                {
                    "id": 1,
                    "name": "single_campaign 2024-01-17 08:53:05 UTC"
                },
                {
                    "id": 2,
                    "name": "single_campaign 2024-01-18 02:44:01 UTC"
                }
            ],
            "phone_number": "",
            "whatsapp_number_status": "not_registered",
            "whatsapp_number": "+46726415553",
            "updated_at": "2024-01-17T06:25:27.475Z",
            "created_at": "2024-01-17T06:25:27.475Z",
            "status": []
        }
    ],
    "metadata": {},
    "per": 3,
    "total_pages": 2,
    "total": 2,
    "current_page": 1,
    "base_total": 2
}


This API endpoint retrieves a list of contacts from the server.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/contacts


RESPONSE

The response will be in JSON format and will include an array of contact
objects, along with metadata about the contacts. Each contact object contains
various attributes such as id, first name, last name, email, company name,
source, rating, dynamic attributes, notes, avatar, tags, lists, phone number,
WhatsApp number status, updated and created timestamps, and status. The metadata
object provides additional information about the pagination and total count of
contacts.


GET A CONTACT

Copy to Clipboard{
    "data": {
        "id": 1,
        "first_name": "jasmine",
        "last_name": "",
        "email": "jasmine@gmail.com",
        "email_marketing": "subscribed",
        "company_name": "hatch",
        "source": "manually added",
        "rating": 2,
        "avatar": null,
        "phone_number": "",
        "whatsapp_number_status": "not_registered",
        "whatsapp_number": null,
        "updated_at": "2024-01-24T09:02:58.837Z",
        "created_at": "2024-01-24T06:21:38.810Z",
        "dynamic_attributes": null,
        "tags": [],
        "lists": [
            {
                "id": 1,
                "name": "single_campaign 2024-01-29 11:36:29 UTC"
            },
            {
                "id": 2,
                "name": "single_campaign 2024-01-30 11:36:29 UTC"
            }
        ],
        "notes": []
    }
}


This endpoint retrieves the details of a specific contact identified by the
provided contact ID.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/contacts/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the contact.


RESPONSE

The response body contains the details of the contact.


CREATE CONTACT

Copy to Clipboard{
    "data": {
        "id": 1,
        "first_name": "Hamel",
        "last_name": "Owlner",
        "email": "howlner4@yandex.ru",
        "email_marketing": "subscribed",
        "company_name": null,
        "source": "manually added",
        "rating": 2,
        "dynamic_attributes": {},
        "notes": [],
        "avatar": null,
        "tags": [],
        "lists": [],
        "phone_number": "",
        "whatsapp_number_status": "not_registered",
        "whatsapp_number": "",
        "updated_at": "2024-02-02T04:38:24.336Z",
        "created_at": "2024-02-02T04:38:24.336Z",
        "status": []
    }
}


This endpoint allows you to add a new contact to the system.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/contacts

Copy to ClipboardExample request body: 
{
    "contact": {
        "first_name": "a",
        "last_name": "b",
        "email": "ab@gmail.com",
        "phone_number": "733-821-8892",
        "whatsapp_number": "633-687-6052",
        "notes_attributes": {
            "id": 1,
            "content": "a"
        }

    }
}



REQUIRED PARAMETERS

Parameter Type Description email string The email address of the contact.
phone_number string The phone number of the contact. whatsapp_number string The
WhatsApp number of the contact.


OPTIONAL PARAMETERS

Parameter Type Description first_name string The first name of the contact.
last_name string The last name of the contact. email_marketing string The email
marketing of the contact (default: "subscribed") company_name string The name of
the company. avatar string The avatar of the contact. rating int The rating of
the contact (default: 2). dynamic_attributes array The dynamic attributes of the
contact. contact_lists_attributes array The contact list attributes of the
contact. (id, list_id) contact_tags_attributes array The contact tag attribute
of the contact. (id, tag_id) notes_attributes array Additional notes or
attributes for the contact. (id, content)


RESPONSE

Upon a successful creation, the endpoint will return a status code of 201 and a
JSON response containing the newly created contact's details.


UPDATE CONTACT

Copy to Clipboard{
    "data": {
        "id": 1,
        "first_name": "Hamel",
        "last_name": "",
        "email": "howlner4@yandex.ru",
        "email_marketing": "subscribed",
        "company_name": null,
        "source": "manually added",
        "rating": 2,
        "dynamic_attributes": {},
        "notes": [],
        "avatar": null,
        "tags": [],
        "lists": [],
        "phone_number": "",
        "whatsapp_number_status": "not_registered",
        "whatsapp_number": "",
        "updated_at": "2024-02-02T04:38:24.336Z",
        "created_at": "2024-02-02T04:38:24.336Z",
        "status": []
    }
}


This endpoint allows you to update the details of a specific contact.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/contacts/{id}

Copy to ClipboardExample request body: 
{
    "contact": {
        "first_name": "a",
        "last_name": "b",
        "email": "ab@gmail.com",
        "phone_number": "733-821-8892",
        "whatsapp_number": "633-687-6052",
        "notes_attributes": {
            "id": 1,
            "content": "a"
        }

    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the contact. phone_number string
The phone number of the contact.


OPTIONAL PARAMETERS

Parameter Type Description first_name string The first name of the contact.
last_name string The last name of the contact. email string The email address of
the contact. email_marketing string The email marketing of the contact (default:
"subscribed") whatsapp_number string The WhatsApp number of the contact.
company_name string The name of the company. avatar string The avatar of the
contact. rating int The rating of the contact (default: 2) dynamic_attributes
array The dynamic attributes of the contact. contact_lists_attributes array The
contact list attributes of the contact. (id, list_id) contact_tags_attributes
array The contact tag attribute of the contact. (id, tag_id) notes_attributes
array Additional notes or attributes for the contact. (id, content)


RESPONSE

The response will contain the updated details of the contact.


UPDATE MULTI CONTACT

Copy to Clipboard{
    "message": "Update successful!"
}


This endpoint is used to update multiple contacts.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/contacts/update-multi

Copy to ClipboardExample request body: 
{   

    "filter": {
        "id": [1, 2]
    },
    "field":
            {
                "first_name": "a",
                "last_name": "b"
            }   
}



REQUIRED PARAMETERS

Parameter Type Description id array The IDs of the contact is placed in the
filter object. field object An object containing attributes of the contact.


RESPONSE

The response body will contain a "message" field with a corresponding message.


UPDATE MULTI CONTACT WITH DYNAMIC ATTRIBUTES

Copy to Clipboard{
    "message": "Update successful 2 contacts!"
}


This endpoint allows you to update multiple contacts with dynamic attributes.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/contacts/update-multi-with-dynamic-attributes

Copy to ClipboardExample request body: 
{
    "data_objects":
    [
        {
            "contact_id": 1,
            "dynamic_attributes": [{"name": "a"}, {"age": 1} ]
        }
    ]
}



REQUIRED PARAMETERS

Parameter Type Description contact_id bigint The ID of the contact to be
updated. dynamic_attributes array An array containing the dynamic attributes.


RESPONSE

The response body will contain a "message" field with a corresponding message.


DELETE CONTACT

This endpoint is used to delete a specific contact with the given ID.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/contacts/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the contact.


RESPONSE

The response returns a status code of 204, indicating a successful deletion with
no content in the response body. The Content-Type is specified as text/xml.


CHECK BEFORE IMPORT BY CSV

Copy to Clipboard{
    "message": "Importing products can take a few minutes to complete",
    "process_id": 1
}


This endpoint is used to check contacts before importing them via a CSV file.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/contacts/check-before-import-by-csv

Copy to ClipboardExample request body: 
{   
    "field":
        {
            "name": "a",
            "phone": "403-179-4986"
        },
    "field_default":
        {
            "email_marketing": "unsubscribed"
        }   
}



REQUIRED PARAMETERS

Parameter Type Description field object An object containing fields to import
into CSV field_default object An object containing fields default to import into
CSV


OPTIONAL PARAMETERS

Parameter Type Description link_file string The link file to import into CSV
file string The file to import into CSV data_rows string The data row to import
into CSV


RESPONSE

Upon successful execution, the API returns a JSON response with a status code of
200. The response contains a message field and a process_id field


CHECK BEFORE IMPORT BY MANUALLY

Copy to Clipboard{
    "message": "Importing products can take a few minutes to complete",
    "process_id": 2
}


This API endpoint is used to check before importing contacts by manually
submitting a POST request to the specified URL


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/contacts/check-before-import-by-manually

Copy to ClipboardExample request body: 
{   
    "field":
        {
            "name": "a",
            "phone": "403-179-4986"
        },
    "field_default":
        {
            "email_marketing": "unsubscribed"
        }   
}



REQUIRED PARAMETERS

Parameter Type Description field object An object containing fields to import
into CSV field_default object An object containing fields default to import into
CSV


OPTIONAL PARAMETERS

Parameter Type Description link_file string The link file to import into CSV
file string The file to import into CSV data_rows string The data row to import
into CSV


RESPONSE

Upon successful execution, the API returns a JSON response with a status code of
200. The response contains a message field and a process_id field


IMPORT CSV

Copy to Clipboard{
    "message": "Importing products can take a few minutes to complete",
    "process_id": 3
}


This endpoint allows you to import contacts by providing a CSV file.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/contacts/import-by-csv

Copy to ClipboardExample request body: 
{
    "import_contact_id": 1,
    "field":
        {
            "name": "a",
            "phone": "403-179-4986"
        },
    "field_default":
        {
            "email_marketing": "unsubscribed"
        }   
}



REQUIRED PARAMETERS

Parameter Type Description import_contact_id bigint The ID of the import contact
field object An object containing fields to import into CSV field_default object
An object containing fields default to import into CSV


OPTIONAL PARAMETERS

Parameter Type Description link_file string The link file to import into CSV
file string The file to import into CSV data_rows string The data row to import
into CSV


RESPONSE

Upon successful execution, the API returns a JSON response with a status code of
200. The response contains a message field and a process_id field


DESTROY CONTACTS INVALID

This API endpoint is used to destroy invalid contacts.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/contacts/destroy-contacts-invalid

Copy to ClipboardExample request body: 
{
    "import_contact_id": 1,
    "type" : ["whatsapp", "phone"] 
}



REQUIRED PARAMETERS

Parameter Type Description import_contact_id bigint The ID of the contact to be
destroyed. type array Indicates the type of contact to be destroyed.


RESPONSE

Upon a successful execution, the API returns a 200 status with an empty JSON
response.


DESTROY MULTI CONTACT

This endpoint sends an HTTP DELETE request to delete multiple contacts.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/contacts/destroy-multi

Copy to ClipboardExample request body: 
{
    "filter": {
        "id": [1, 2]
    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The IDs of the contact to be destroyed.


RESPONSE

The response does not include any content (null) upon successful deletion of the
specified contacts.


CHECK WHATSAPP NUMBER AVAILABILITY

Copy to Clipboard{
    "message": "Valid whatsapp number"
}


This endpoint allows you to check the availability of a WhatsApp number.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/contacts/check-whatsapp-number

Copy to ClipboardExample request body: 
{
    "whatsapp_number": "+676-387-7339"
}



REQUIRED PARAMETERS

Parameter Type Description whatsapp_number string The WhatsApp number to be
checked for availability.


RESPONSE

Upon successful execution, the endpoint returns a 200 status with a JSON
response containing a message indicating the outcome of the operation.


GET STATUS IMPORT

Copy to Clipboard{
    "data": {
        "id": 1,
        "status": "complete",
        "percentage": 100,
        "log": {
            "imported": 0
        },
        "number_account_valid": 0,
        "number_whatsapp_number_valid": 0,
        "number_phone_number_valid": 0,
        "number_email_valid": 0,
        "message_report": "There are 5 email is invalid, 5 phone number is invalid, 5 whatsapp number is invalid. There are 0 rows valid."
    }
}


This endpoint is used to retrieve the status of a contact import process.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/contacts/get-status-import

Copy to ClipboardExample request body: 
{
    "import_contact_id": 1
}



REQUIRED PARAMETERS

Parameter Type Description import_contact_id bigint The ID of the contact import
process.


RESPONSE

The response contains the status details of the contact import process,
including the ID, status, percentage completion, validation counts, and message
report.


LIST OF DYNAMIC ATTRIBUTES

Copy to Clipboard {
    "data": [
        "company_id",
        "first_name",
        "last_name",
        "email",
        "email_marketing",
        "source",
        "rating",
        "phone_number",
        "whatsapp_number",
        "company_name"
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 10,
    "current_page": 1,
    "base_total": null
}


This endpoint is used to retrieve a list of dynamic attributes for contacts.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/contacts/list-dynamic-attributes


RESPONSE

The response will include an array of data along with metadata, pagination
details, and base total.


ALL ACTIVITIES

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "contact_name": "karine",
            "contact_email": "karine@gmail.com",
            "contact_phone_number": "",
            "contact_whatsapp_number": null,
            "channel": "whatsapp",
            "time_event": "2024-01-08T09:41:25.263Z",
            "name_event": "bounces",
            "step": {
                "id": 1,
                "created_at": "2024-01-08T09:40:29.115Z",
                "updated_at": "2024-01-08T09:44:06.925Z",
                "timing_id": null,
                "parent_id": null,
                "stepable_type": "TemplateStep",
                "stepable_id": 1,
                "flow_id": 1,
                "status": "completed",
                "completed_at": null,
                "paused_at": null,
                "include_condition": [],
                "exclude_condition": []
            },
            "contact_id": 1,
            "campaign": {
                "id": 1,
                "name": "single_campaign 2024-01-08 09:42:25 UTC",
                "status": "completed",
                "type": "single",
                "recipients": 56,
                "click_rate": null,
                "created_at": "2024-01-08T09:40:25.399Z",
                "updated_at": "2024-01-08T09:44:09.185Z",
                "conversions": null,
                "flows": [
                    {
                        "id": 1,
                        "company_id": 1,
                        "name": "flow 2024-01-08 09:42:29 UTC",
                        "created_at": "2024-01-08T09:40:29.080Z",
                        "updated_at": "2024-01-08T09:40:29.080Z",
                        "toggle_type": "A",
                        "campaign_id": 1
                    }
                ],
                "bounced_rate": null,
                "draft": false,
                "list_id": 1,
                "labels": [],
                "schedule": {
                    "id": 1,
                    "name": "date_time schedule 2024-01-08 09:42:29 UTC",
                    "time_zone_name": "UTC (UTC +00:00)",
                    "time_zone": "Etc/UTC",
                    "date": "2024-01-08",
                    "time": "09:42",
                    "number_campaign": 1,
                    "type": "date_time"
                },
                "emoji": null,
                "is_able_to_publish": true
            },
            "campaign_labels": [],
            "created_at": "2024-01-08T09:41:25.583Z",
            "updated_at": "2024-01-25T03:44:35.815Z"
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This API endpoint makes an HTTP GET request to retrieve all activities related
to a specific contact.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/contacts/{id}/all-activities


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the contact


RESPONSE

The response will include an array of activity data, along with metadata and
pagination details. Each activity object contains information about the contact,
channel, event, step, campaign, labels, and timestamps.


LOAD NOTES

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "content": "notes",
            "created_at": "2024-01-19T04:35:14.551Z",
            "updated_at": "2024-01-19T04:35:14.551Z"
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This endpoint makes an HTTP GET request to retrieve notes associated with the
contact with ID


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/contacts/{id}/load-notes


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the contact


RESPONSE

The response body contains an empty "data" array, along with "metadata", "per",
"total_pages", "total", "current_page", and "base_total" properties.


CUSTOM ATTRIBUTES


GET ALL ATTRIBUTES

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "name": "areas",
            "created_at": "2024-01-18T02:24:14.324Z",
            "updated_at": "2024-01-18T02:24:14.324Z"
        },
        {
            "id": 2,
            "name": "nationality",
            "created_at": "2024-01-18T02:23:27.266Z",
            "updated_at": "2024-01-18T02:23:27.266Z"
        },
        {
            "id": 3,
            "name": "avatar",
            "created_at": "2024-01-18T02:23:18.470Z",
            "updated_at": "2024-01-18T02:23:18.470Z"
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 3,
    "current_page": 1,
    "base_total": null
}


This endpoint makes an HTTP GET request to retrieve custom attributes from the
server.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/custom-attributes


RESPONSE

The response will be in JSON format and will include an array of custom
attribute objects under the "data" key, along with metadata about the pagination
and total count of custom attributes.


GET AN ATTRIBUTE

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "areas",
        "created_at": "2024-01-18T02:24:14.324Z",
        "updated_at": "2024-01-18T02:24:14.324Z"
    }
}


This endpoint makes an HTTP GET request to retrieve custom attribute information
with the specified ID


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/custom-attributes/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the attribute.


RESPONSE

The response will be in JSON format and will include the custom attribute's ID,
name, creation timestamp, and last update timestamp.


CREATE ATTRIBUTE

Copy to Clipboard{
    "data": {
        "id": 4,
        "name": "test",
        "created_at": "2024-02-01T06:17:58.151Z",
        "updated_at": "2024-02-01T06:17:58.151Z"
    }
}


This endpoint allows you to create custom attributes


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/custom-attributes

Copy to ClipboardExample request body: 
{
    "custom_attribute": {
        "name": "color"
    }
}



REQUIRED PARAMETERS

Parameter Type Description name string The name of the custom attribute.


RESPONSE

Upon a successful creation, the endpoint returns a status code of 201 and a JSON
response with the details of the newly created custom attribute.


UPDATE ATTRIBUTE

Copy to Clipboard{
    "data": {
        "id": 4,
        "name": "update attribute",
        "created_at": "2024-01-18T02:24:14.324Z",
        "updated_at": "2024-02-01T06:24:08.391Z"
    }
}


This endpoint allows the user to update a specific custom attribute using an
HTTP PATCH request to the specified URL.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/custom-attributes/{id}

Copy to ClipboardExample request body: 
{
    "custom_attribute": {
        "name": "update attribute"
    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the attribute. name string The
name of the custom attribute.


RESPONSE

Upon a successful execution, the endpoint returns a status code of 200 and a
JSON response with the updated data of the custom attribute, including its "id",
"name", "created_at", and "updated_at" timestamps.


DELETE ATTRIBUTE

This endpoint sends an HTTP DELETE request to delete a specific custom
attribute.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/custom-attributes/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the attribute.


RESPONSE

The response returned a status code of 204 with a Content-Type of text/xml.


TEMPLATE


GET ALL TEMPLATE

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "name": "timezone_duplicate_2",
            "company_id": "221",
            "template_type": "whatsapp",
            "path": null,
            "subject": null,
            "content": "{\"name\":\"timezone\",\"content\":\"<p>Once upon a time, in a small village nestled between rolling hills and a sparkling river, lived a family unlike any other. The Smiths were known far and wide for their extraordinary bond and their unwavering love for one another.<br><br>The Smith family consisted of Mr. and Mrs. Smith, their three children, and their beloved dog, Max. Each member of the family possessed a unique talent that made them special in their own way. Mr. Smith was a skilled carpenter, crafting intricate furniture that adorned homes throughout the village. Mrs. Smith had a green thumb and could make any plant flourish with her magical touch. Their eldest daughter, Lily, had a voice that could rival the sweetest songbird, and she dreamed of becoming a famous singer one day. Their middle child, Jack, had a natural talent for storytelling and could captivate anyone with his imaginative tales. And their youngest,</p>\",\"body_value\":\"Once upon a time, in a small village nestled between rolling hills and a sparkling river, lived a family unlike any other. The Smiths were known far and wide for their extraordinary bond and their unwavering love for one another.\\n\\nThe Smith family consisted of Mr. and Mrs. Smith, their three children, and their beloved dog, Max. Each member of the family possessed a unique talent that made them special in their own way. Mr. Smith was a skilled carpenter, crafting intricate furniture that adorned homes throughout the village. Mrs. Smith had a green thumb and could make any plant flourish with her magical touch. Their eldest daughter, Lily, had a voice that could rival the sweetest songbird, and she dreamed of becoming a famous singer one day. Their middle child, Jack, had a natural talent for storytelling and could captivate anyone with his imaginative tales. And their youngest,\\n\",\"template_name\":\"timezone\",\"language\":\"en_US\",\"lastDroppedElement\":[\"Text\"]}",
            "updated_at": "2024-01-26T08:36:33.731Z",
            "created_at": "2024-01-26T08:36:33.731Z",
            "images": [],
            "link_url": null,
            "template_whatsapp_status": "DRAFT",
            "language": "en_US",
            "sub_medias": [],
            "media": {
                "id": null,
                "filename": "",
                "url": null,
                "content_type": null,
                "size": null,
                "key": null
            },
            "category": "MARKETING",
            "tags": []
        },
        {
            "id": 2,
            "name": "dunga_duplicate_2",
            "company_id": "221",
            "template_type": "whatsapp",
            "path": null,
            "subject": null,
            "content": "{\"name\":\"dungaaa\",\"content\":\"<p>dungadami</p>\",\"body_value\":\"dungadami\\n\",\"template_name\":\"dungaaa\",\"language\":\"en_US\",\"lastDroppedElement\":[\"Text\"]}",
            "updated_at": "2024-01-26T08:36:33.699Z",
            "created_at": "2024-01-26T08:36:33.699Z",
            "images": [],
            "link_url": null,
            "template_whatsapp_status": "DRAFT",
            "language": "en_US",
            "sub_medias": [],
            "media": {
                "id": null,
                "filename": "",
                "url": null,
                "content_type": null,
                "size": null,
                "key": null
            },
            "category": "MARKETING",
            "tags": []
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 2,
    "current_page": 1,
    "base_total": null
}


This HTTP GET request retrieves the details of a specific template with the ID
and triggers a resend action for the WhatsApp template


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/templates


RESPONSE

The response contains an array of template data along with metadata and
pagination details.


GET A TEMPLATE

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "template_test",
        "company_id": "1",
        "template_type": "whatsapp",
        "path": null,
        "subject": null,
        "content": null,
        "updated_at": "2024-01-28T15:20:53.532Z",
        "created_at": "2023-09-11T08:24:24.541Z",
        "images": [],
        "link_url": "http://abc",
        "template_whatsapp_status": "DRAFT",
        "language": "en_US",
        "sub_medias": [],
        "media": {
            "id": null,
            "filename": "",
            "url": null,
            "content_type": null,
            "size": null,
            "key": null
        },
        "category": "MARKETING",
        "tags": [
            {
                "id": 1,
                "company_id": 1,
                "name": "jasmine test",
                "description": "",
                "type": "template",
                "total_contacts": 0
            }
        ]
    }
}


This HTTP GET request retrieves the details of a specific template with the ID


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/templates/{id}


REQUIRED PARAMETERS

Parameter Type Description ID bigint The ID of template


RESPONSE

The response includes an array of template objects, each containing various
attributes such as ID, name, company ID, template type, path, subject, content,
updated and created timestamps, images, link URL, WhatsApp template status,
language, sub-medias, media details, category, and tags. Additionally, the
response includes metadata, pagination information, and base total.


CREATE TEMPLATE

Copy to Clipboard{
    "data": {
        "id": 2,
        "name": "test",
        "company_id": "1",
        "template_type": "sms",
        "path": null,
        "subject": null,
        "content": null,
        "updated_at": "2024-01-26T11:02:22.539Z",
        "created_at": "2024-01-26T11:02:22.539Z",
        "images": [],
        "link_url": null,
        "template_whatsapp_status": null,
        "language": null,
        "sub_medias": [],
        "media": {
            "id": null,
            "filename": "",
            "url": null,
            "content_type": null,
            "size": null,
            "key": null
        },
        "category": null,
        "tags": []
    }
}


This endpoint allows you to create a new template.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/templates

Copy to ClipboardExample request body:
{
    "name": "test",
    "template_type": "sms"
} 



REQUIRED PARAMETERS

Parameter Type Description template_type string The type of the template.
Possible values are "sms", "whatsapp", or "email".


OPTIONAL PARAMETERS

Parameter Type Description name bigint The name of template


RESPONSE

Upon successful creation, the server responds with a status code of 201 and a
JSON object containing the details of the newly created template, including its
ID, company ID, path, subject, content, images, media details, category, and
tags.


UPDATE TEMPLATE

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "test template",
        "company_id": "1",
        "template_type": "whatsapp",
        "path": null,
        "subject": null,
        "content": "{\"button_link\":\"https://translate.google.com/?hl=vi&sl=en&tl=vi&op=translate\"
        ,\"link_name\":\"translate\"]}",
        "updated_at": "2024-01-28T15:20:53.532Z",
        "created_at": "2023-09-11T08:24:24.541Z",
        "images": [],
        "link_url": "http://abc",
        "template_whatsapp_status": "DRAFT",
        "language": "en",
        "sub_medias": [],
        "media": {
            "id": null,
            "filename": "",
            "url": null,
            "content_type": null,
            "size": null,
            "key": null
        },
        "category": "MARKETING",
        "tags": [
            {
                "id": 2,
                "company_id": 1,
                "name": "jasmine test",
                "description": "",
                "type": "template",
                "total_contacts": 0
            }
        ]
    }
}


This HTTP PATCH request is used to update a specific template with the provided
ID.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/templates/{id}

Copy to ClipboardExample request body:
{
    "name": "test template",
    "content": "{\"button_link\":\"https://translate.google.com/?hl=vi&sl=en&tl=vi&op=translate\",\"link_name\":\"translate\"]}",
    "language": "en"

}



REQUIRED PARAMETERS

Parameter Type Description ID bigint The ID of template


OPTIONAL PARAMETERS

Parameter Type Description name string The name of template content text The
content of template language string The language of template link_url string The
link of template header_type string The header type of template category string
The category of template


RESPONSE

Upon a successful execution of the request, the server returns a status code of
200 and a JSON object in the response body


UPLOAD IMAGE

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "template_test",
        "company_id": "1",
        "template_type": "whatsapp",
        "path": null,
        "subject": null,
        "content": null,
        "updated_at": "2024-01-28T15:20:53.532Z",
        "created_at": "2023-09-11T08:24:24.541Z",
        "images": [],
        "link_url": "http://abc",
        "template_whatsapp_status": "DRAFT",
        "language": "en_US",
        "sub_medias": [],
        "media": {
            "id": null,
            "filename": "",
            "url": null,
            "content_type": null,
            "size": null,
            "key": null
        },
        "category": "MARKETING",
        "tags": [
            {
                "id": 2,
                "company_id": 1,
                "name": "jasmine test",
                "description": "",
                "type": "template",
                "total_contacts": 0
            }
        ]
    }
}


This API endpoint allows users to upload an image for a template.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/templates/upload-image

Copy to ClipboardExample request body: 
{
    "id": 2,
    "image": "j4kOGXKXq/Screenshot from 2022-12-08 11-31-36.png"
}



REQUIRED PARAMETERS

Parameter Type Description ID bigint The ID of template


OPTIONAL PARAMETERS

Parameter Type Description image string The image of template


RESPONSE

Upon a successful execution, the API returns a 200 status code with a JSON
response. The response contains various details related to the uploaded image,
including the ID, name, company ID, template type, path, subject, content,
update and creation timestamps, images, link URL, WhatsApp status, language,
sub-medias, media details, category, and tags associated with the template.


DESTROY MULTI

Copy to Clipboard{
    "message": "Delete successful 2 templates"
}


This endpoint is used to delete multiple templates.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/templates/destroy-multi

Copy to ClipboardExample request body: 
{
    "template_id": [1, 2]
}



REQUIRED PARAMETERS

Parameter Type Description template_id array An array of template IDs as its
value.


RESPONSE

A message indicating the result of the request.


DUPLICATE MULTI

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "name": "template_test_duplicate_1",
            "company_id": "1",
            "template_type": "whatsapp",
            "path": null,
            "subject": null,
            "content": null,
            "updated_at": "2024-01-28T15:49:45.747Z",
            "created_at": "2024-01-28T15:49:45.747Z",
            "images": [],
            "link_url": "http://abc",
            "template_whatsapp_status": "DRAFT",
            "language": "en_US",
            "sub_medias": [],
            "media": {
                "id": null,
                "filename": "",
                "url": null,
                "content_type": null,
                "size": null,
                "key": null
            },
            "category": "MARKETING",
            "tags": []
        },
        {
            "id": 2,
            "name": "timezone_duplicate_4",
            "company_id": "221",
            "template_type": "whatsapp",
            "path": null,
            "subject": null,
            "content": "{\"name\":\"timezone\",\"content\":\"<p>Once upon a time, in a small village nestled between rolling hills and a sparkling river, lived a family unlike any other. The Smiths were known far and wide for their extraordinary bond and their unwavering love for one another.<br><br>The Smith family consisted of Mr. and Mrs. Smith, their three children, and their beloved dog, Max. Each member of the family possessed a unique talent that made them special in their own way. Mr. Smith was a skilled carpenter, crafting intricate furniture that adorned homes throughout the village. Mrs. Smith had a green thumb and could make any plant flourish with her magical touch. Their eldest daughter, Lily, had a voice that could rival the sweetest songbird, and she dreamed of becoming a famous singer one day. Their middle child, Jack, had a natural talent for storytelling and could captivate anyone with his imaginative tales. And their youngest,</p>\",\"body_value\":\"Once upon a time, in a small village nestled between rolling hills and a sparkling river, lived a family unlike any other. The Smiths were known far and wide for their extraordinary bond and their unwavering love for one another.\\n\\nThe Smith family consisted of Mr. and Mrs. Smith, their three children, and their beloved dog, Max. Each member of the family possessed a unique talent that made them special in their own way. Mr. Smith was a skilled carpenter, crafting intricate furniture that adorned homes throughout the village. Mrs. Smith had a green thumb and could make any plant flourish with her magical touch. Their eldest daughter, Lily, had a voice that could rival the sweetest songbird, and she dreamed of becoming a famous singer one day. Their middle child, Jack, had a natural talent for storytelling and could captivate anyone with his imaginative tales. And their youngest,\\n\",\"template_name\":\"timezone\",\"language\":\"en_US\",\"lastDroppedElement\":[\"Text\"]}",
            "updated_at": "2024-01-28T15:49:45.801Z",
            "created_at": "2024-01-28T15:49:45.801Z",
            "images": [],
            "link_url": null,
            "template_whatsapp_status": "DRAFT",
            "language": "en_US",
            "sub_medias": [],
            "media": {
                "id": null,
                "filename": "",
                "url": null,
                "content_type": null,
                "size": null,
                "key": null
            },
            "category": "MARKETING",
            "tags": []
        }
    ]
}


This API endpoint is used to duplicate multiple templates based on the provided
template IDs.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/templates/duplicate-multi

Copy to ClipboardExample request body: 
{
    "template_id": [3, 4]
}



REQUIRED PARAMETERS

Parameter Type Description template_id array An array of template IDs as its
value.


RESPONSE

The response will contain an array of template objects under the "data" key.
Each template object includes various details such as ID, name, company ID,
template type, path, subject, content, images, link URL, template WhatsApp
status, language, sub medias, media details, category, and tags.


SEND TEST

Copy to Clipboard{
    "message": "Send test successfully"
}


This endpoint is used to send a test template via an HTTP POST request.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/templates/send-test

Copy to ClipboardExample request body: 
{
    "type": "whatsapp",
    "content": "test"
}



REQUIRED PARAMETERS

Parameter Type Description type string The type of the template. content string
The content of the template.


RESPONSE

A message indicating the result of the request.


UPDATE STATUS WHATSAPP TEMPLATES

Copy to Clipboard{
    "message": "Update status of whatsapp templates successfull. It may take few minutes to apply!"
}


This endpoint is used to Update status for whatsapp templates via an HTTP POST
request.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/templates/update-status-whatsapp-templates


RESPONSE

A message indicating the result of the request.


CHECK VALID NAME

Copy to Clipboard{
    "message": "Name is valid"
}


This API endpoint is a POST request used to check the validity of a name in a
template


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/templates/check-valid-name

Copy to ClipboardExample request body: 
{
    "name": "timezone_duplicate",
    "type": "whatsapp"
}



REQUIRED PARAMETERS

Parameter Type Description name bigint The name to be validated. type string The
type of the name.


RESPONSE

A message indicating the result of the name validation.


DETACH MEDIA

Copy to Clipboard{
    "message": "Delete successful"
}


This endpoint sends an HTTP DELETE request to detach media from a specific
template


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/templates/{id}/detach-media

Copy to ClipboardExample request body: 
{
    "type": "media"
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The id of template type string The type of
the template. Possible values are "media" or "sub_medias".


RESPONSE

The response will have a status code of 200 and a JSON content type, with a
message indicating the result of the operation.


ADD TAG

Copy to Clipboard{
    "data": {
        "id": 1,
        "name": "template_test",
        "company_id": "1",
        "template_type": "whatsapp",
        "path": null,
        "subject": null,
        "content": null,
        "updated_at": "2024-01-28T16:29:37.838Z",
        "created_at": "2023-09-11T08:24:24.541Z",
        "images": [],
        "link_url": "http://abc",
        "template_whatsapp_status": "DRAFT",
        "language": "en_US",
        "sub_medias": [],
        "media": {
            "id": null,
            "filename": "",
            "url": null,
            "content_type": null,
            "size": null,
            "key": null
        },
        "category": "MARKETING",
        "tags": [
            {
                "id": 1,
                "company_id": 1,
                "name": "test111",
                "description": "Eius a facere quos impedit.",
                "type": "template",
                "total_contacts": 0
            },
            {
                "id": 1,
                "company_id": 1,
                "name": "jasmine test",
                "description": "",
                "type": "template",
                "total_contacts": 0
            }
        ]
    }
}


This endpoint allows you to add a tag to a specific template.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/templates/{id}/add-tag

Copy to ClipboardExample request body: 
{
    "name": "template_test",
    "template_tags_attributes": [{
        "tag_id": 1
    }]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the template


OPTIONAL PARAMETERS

Parameter Type Description template_tags_attributes array An array containing
the tag ID.


RESPONSE

Upon a successful request, the server will respond with a status code of 200 and
a JSON object containing the updated template information, including the added
tag details.


SEND WHATSAPP TEMPLATE

Copy to Clipboard{
    "data": {
        "id": "924921672454967",
        "status": "PENDING",
        "category": "MARKETING"
    }
}


This HTTP POST request is used to create a new WhatsApp template.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/templates/whatsapp

Copy to ClipboardExample request body: 
{
    "body_value": "Hello man",
    "template_name": "Test",
    "language": "en_US"
}



REQUIRED PARAMETERS

Parameter Type Description body_value string The body of the template.
template_name string The name of the template. language string The language of
the template. category string The category of the template.([AUTHENTICATION,
MARKETING, UTILITY])


OPTIONAL PARAMETERS

Parameter Type Description link_url string The URL link associated with the
template. header_type string The type of header for the template. content string
The content of the template.


RESPONSE

Upon successful execution, the API returns a JSON object with the fields id,
status and category.


RESEND WHATSAPP TEMPLATE

Copy to Clipboard{
    "data": {
        "success": true
    }
}


This HTTP POST request is used to create a new WhatsApp template.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/templates/{id}/resend-whatsapp

Copy to ClipboardExample request body: 
{
    "body_value": "Hello man",
    "template_name": "Test",
    "language": "en_US"
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the template. body_value string
The body of the template. template_name string The name of the template.
language string The language of the template.


OPTIONAL PARAMETERS

Parameter Type Description category string The category of the
template.([AUTHENTICATION, MARKETING, UTILITY]) link_url string The URL link
associated with the template. header_type string The type of header for the
template. content string The content of the template.


RESPONSE

Upon successful execution, the API returns a JSON object with the fields id,
status and category.


SEND DIRECT MESSAGE

Copy to Clipboard{
    "message": "Send message successfull!" 
}


This API endpoint is a POST request to send a direct message using a specific
template.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/templates/{id}/send-direct-message

Copy to ClipboardExample request body: 
{
    "contact_ids": [1,2]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the template. contact_ids array
An array of contact IDs to whom the direct message will be sent.


RESPONSE

Upon successful execution, the API returns a 200 status with a JSON response.
The response includes the message successfull.


WHATSAPP INBOX


GET ALL MESSAGES

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "chat_room_id": 1,
            "wa_message_id": "wamid.HBgLNDY3MjY0MTQyMjQVAgASGCA3ODI1NUVCOEU4RTY5MURBRUFGRDhFRTREQ0JFMjQ1MwA=",
            "wa_sender_number": "+46726414224",
            "wa_recipient_number": "+84981349672",
            "wa_message_type": "quick_reply_button",
            "wa_message_content": null,
            "file_name": null,
            "file_url": null,
            "status": "reply",
            "data": {
                "answer": {
                    "type": "quick_reply_button",
                    "content": {
                        "text": "Give me a call",
                        "payload": "Give me a call"
                    }
                },
                "message_reply": {
                    "id": 1,
                    "data": [],
                    "status": "send",
                    "file_url": null,
                    "reaction": null,
                    "template": {
                        "id": 1,
                        "name": "full_options",
                        "path": null,
                        "media": {
                            "id": null,
                            "key": null,
                            "url": null,
                            "size": null,
                            "filename": "",
                            "content_type": null
                        },
                        "images": [],
                        "content": "{\"values\":{\"Image List\":[{\"path\":\"download (1).jpg\"},{\"path\":\"free-photo-of-thanh-ph-d-ng-giao-thong-d-ng-ph.jpeg\"}],\"name\":\"full_options\",\"category\":\"MARKETING\",\"Text\":\"<p>Testing is the process of evaluating a system or component to determine whether it satisfies the specified requirements or works as expected. It involves executing a program or system with the intent of finding errors, bugs, or other defects. Testing is an essential part of the software development life cycle and helps ensure the quality, reliability, and functionality of a product. It can be performed at various stages, such as unit testing, integration testing, system testing, and acceptance testing. <br><br></p>\",\"Heading\":\"Welcome\",\"Footer\":\"Thank you so much!\",\"Button\":[{\"text\":\"Contact us\",\"type\":\"URL\",\"type_url_link\":\"https://translate.google.com/?hl=vi\"},{\"text\":\"Phone number\",\"type\":\"PHONE_NUMBER\",\"phone_number\":\"+84355643122\"}],\"Quick Reply\":[{\"text\":\"Give me a call\",\"disclosure\":false}]},\"subMediaKeys\":[\"241cxd2tiffbib3qthl0viffyon8\",\"miuxxhuwuh7rst0q173bbpduplqh\"],\"elements\":{\"headerElement\":{\"Heading\":\"Heading\"},\"contentElement\":{\"Text\":\"Text\",\"Footer\":\"Footer\",\"Button\":\"Button\",\"Image List\":\"Image List\"},\"footerElement\":{\"Quick Reply\":\"Quick Reply\"}},\"call_to_action_button\":[{\"text\":\"Contact us\",\"type\":\"URL\",\"type_url_link\":\"https://translate.google.com/?hl=vi\"},{\"text\":\"Phone number\",\"type\":\"PHONE_NUMBER\",\"phone_number\":\"+84355643122\"}]}",
                        "subject": null,
                        "category": "MARKETING",
                        "language": "en_US",
                        "link_url": "",
                        "company_id": "1",
                        "created_at": "2024-01-12T07:37:33.895Z",
                        "sub_medias": [
                            {
                                "id": 1,
                                "key": "241cxd2tiffbib3qthl0viffyon8",
                                "url": "https://dovehero-staging.s3.amazonaws.com/241cxd2tiffbib3qthl0viffyon8",
                                "size": 1,
                                "filename": "download (1).jpg",
                                "content_type": "image/jpeg"
                            },
                            {
                                "id": 2,
                                "key": "miuxxhuwuh7rst0q173bbpduplqh",
                                "url": "https://dovehero-staging.s3.amazonaws.com/miuxxhuwuh7rst0q173bbpduplqh",
                                "size": 2,
                                "filename": "free-photo-of-thanh-ph-d-ng-giao-thong-d-ng-ph.jpeg",
                                "content_type": "image/jpeg"
                            }
                        ],
                        "updated_at": "2024-01-12T07:44:11.851Z",
                        "template_type": "whatsapp",
                        "template_whatsapp_status": "APPROVED"
                    },
                    "file_name": null,
                    "parent_id": null,
                    "created_at": "2024-01-19T03:21:37.462Z",
                    "updated_at": "2024-01-19T07:23:09.685Z",
                    "chat_room_id": 1,
                    "wa_message_id": "wamid.HBgLNDY3MjY0MTQyMjQVAgARGBJFNTZDNjM1QjI1QkMyNEU3QzUA",
                    "wa_message_type": "template",
                    "wa_sender_number": "+84981349672",
                    "dynamic_attributes": null,
                    "wa_message_content": null,
                    "wa_recipient_number": "+46726414224"
                }
            },
            "parent_id": null,
            "created_at": "2024-01-19T07:23:57.000Z",
            "updated_at": "2024-01-19T07:23:57.000Z",
            "time_message": "2024-01-19T07:23:47.462Z",
             "dynamic_attributes": [
                {
                    "name": "icebreaker",
                    "order": 1,
                    "value": "Navigating the marketing landscape is an art in itself, Dung. I'd love to hear which campaign you've worked on that you're most proud of!"
                }
            ],
            "reaction": null,
            "template": {
                "id": 1,
                "name": "test_library",
                "company_id": "1",
                "template_type": "whatsapp",
                "path": null,
                "subject": null,
                "content": "{\"values\":{\"name\":\"test_library\",\"category\":\"MARKETING\",\"Text\":\"<p>Happy New Year</p>\",\"Image\":{}},\"subMediaKeys\":[],\"elements\":{\"headerElement\":{\"Image\":\"Image\"},\"contentElement\":{\"Text\":\"Text\",\"Footer\":null,\"Button\":null,\"Image List\":null},\"footerElement\":null}}",
                "updated_at": "2024-01-15T12:22:54.073Z",
                "created_at": "2024-01-15T12:21:20.078Z",
                "images": [],
                "link_url": "https://dovehero-staging.s3.amazonaws.com/t2sszm0hu70htatamewselti336r",
                "template_whatsapp_status": "APPROVED",
                "language": "en_US",
                "sub_medias": [],
                "media": {
                    "id": 4,
                    "filename": "image.jpg",
                    "url": "https://dovehero-staging.s3.amazonaws.com/t2sszm0hu70htathmewselti336r",
                    "content_type": "image/jpeg",
                    "size": 76144,
                    "key": "t2sszm0hu70htathmewselti336r"
                },
                "category": "MARKETING",
                "thumbnail": null,
                "reaction": "none",
                "text_preview": null
            }
        },
        {
            "id": 2,
            "chat_room_id": 2,
            "wa_message_id": "wamid.HBgLODQzNTU2NDMxMjIVAgARGBI0OTc3M0JDODI0RDE4QjdFNDQA",
            "wa_sender_number": "+14159694262",
            "wa_recipient_number": "+84355643125",
            "wa_message_type": "video",
            "wa_message_content": "https://dovehero-staging.s3.amazonaws.com/0qo2ls5jys05dmn0l7gw86fn9ecj",
            "file_name": "DoveHero Automation, (1).mp4",
            "file_url": "https://dovehero-staging.s3.amazonaws.com/0qo2ls5jys05dmn0l7gw86fn9ecj",
            "status": "open",
            "data": {
                "caption": "",
                "content": "https://dovehero-staging.s3.amazonaws.com/0qo2ls5jys05dmn0l7gw86fn9ecj",
                "filename": "DoveHero Automation, (1).mp4"
            },
            "parent_id": null,
            "created_at": "2024-03-15T08:30:01.194Z",
            "updated_at": "2024-03-15T08:32:39.088Z",
            "time_message": null,
            "dynamic_attributes": null,
            "reaction": {
                "id": 1,
                "wa_message_id": "wamid.HBgLODQzNTU2NDMxMjIVAgASGBYzRUIwQzdEMkJCNTNGMjRFRUNBMzhCAA==",
                "wa_sender_number": "+84355653122",
                "wa_recipient_number": "+14159614162",
                "wa_message_type": "reaction",
                "wa_message_content": null,
                "created_at": "2024-03-15T08:38:30.000Z",
                "updated_at": "2024-03-15T08:38:30.000Z",
                "step_id": null,
                "contact_id": 1,
                "template_step_record_id": null,
                "chat_room_id": 2,
                "status": "reply",
                "parent_id": null,
                "template_id": null,
                "data": {
                    "emoji": "🙏",
                    "message_id": "wamid.HBgLODQzNTU2NDMxMjIVAgARGBI0OTc3M0JDODI0RDE4QjdFNDQA"
                },
                "time_message": "2024-03-15T08:38:30.000Z",
                "open_new_conversation": false,
                "conversation_type": null
            },
            "template": null
        },
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 2,
    "current_page": 1,
    "base_total": null
}


This endpoint makes an HTTP GET request to retrieve WhatsApp messages.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/messages


RESPONSE

The response will be in JSON format and will include an array of message
objects, along with metadata such as pagination details. Each message object
contains information such as the message ID, sender and recipient numbers,
message type, content, file details, status, timestamps, and additional data.
The metadata includes details about the pagination, total number of messages,
and current page information.


CREATE MESSAGES

This POST request is used to send a WhatsApp message.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/messages

Copy to ClipboardExample request body: 
{
    "message": {
        "contact_id": 1,
        "type": "text",
        "room_id": 1,
        "text": "This is a message"
    }
}



REQUIRED PARAMETERS

Parameter Type Description contact_id bigint The ID of the contact. type string
The type of message. (text, image, audio, document, sticker, video, interactive)
room_id bigint The ID of the room. file string The file to be sent, if any. text
string The text content of the message. caption string The caption for the file,
if applicable.


RESPONSE

Upon successful creation, the server responds with a status code of 200 and a
JSON object containing the details of the message.


GET ALL CHATROOMS

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "contact_id": 1,
            "whatsapp_business_profile_id": 1,
            "company_id": 1,
            "status": "user_initiated",
            "active_status": "unread",
            "company_name": "jasmine12121",
            "created_at": "2024-01-17T08:51:37.577Z",
            "updated_at": "2024-02-05T04:06:40.215Z",
            "last_message": {
                "id": 1,
                "chat_room_id": 1,
                "wa_message_id": "wamid.HBgLNDY3MjY0MTYwNzQVAgASGCBERkVCOUZBMjg1QzNBRkNCRTc4RjUzQTBDQUM2QTc0MQA=",
                "wa_sender_number": "+46726416074",
                "wa_recipient_number": "+84981349672",
                "wa_message_type": "text",
                "wa_message_content": "Wui",
                "file_name": null,
                "file_url": null,
                "status": "reply",
                "data": {
                    "body": "Wui"
                },
                "parent_id": null,
                "created_at": "2024-01-19T09:26:53.000Z",
                "updated_at": "2024-02-05T03:59:13.832Z",
                "dynamic_attributes": null,
                "reaction": null,
                "template": null
            },
            "contact": {
                "id": 1,
                "first_name": "jasmine",
                "last_name": "",
                "email": "jasmine@gmail.com",
                "email_marketing": "subscribed",
                "company_name": "",
                "source": "manually",
                "rating": 2,
                "notes": [],
                "phone_number": "",
                "whatsapp_number": null,
                "updated_at": "2024-02-02T09:45:17.214Z",
                "created_at": "2024-01-24T06:21:38.810Z",
                "avatar_url": null
            },
            "tags": []
        },
        {
            "id": 2,
            "contact_id": 2,
            "whatsapp_business_profile_id": 1,
            "company_id": 1,
            "status": "customer_service_window",
            "active_status": "unread",
            "company_name": "Earnestine Kozey",
            "created_at": "2024-01-19T02:46:44.996Z",
            "updated_at": "2024-01-19T07:23:59.630Z",
            "last_message": {
                "id": 1,
                "chat_room_id": 2,
                "wa_message_id": "wamid.HBgLNDY3MjY0MTQyMjQVAgASGCA3ODI1NUVCOEU4RTY5MURBRUFGRDhFRTREQ0JFMjQ1MwA=",
                "wa_sender_number": "+46726414224",
                "wa_recipient_number": "+84981349672",
                "wa_message_type": "quick_reply_button",
                "wa_message_content": null,
                "file_name": null,
                "file_url": null,
                "status": "reply",
                "data": {
                    "answer": {
                        "type": "quick_reply_button",
                        "content": {
                            "text": "Give me a call",
                            "payload": "Give me a call"
                        }
                    },
                    "message_reply": {
                        "id": 1,
                        "data": [],
                        "status": "send",
                        "file_url": null,
                        "reaction": null,
                        "template": {
                            "id": 1,
                            "name": "full_options",
                            "path": null,
                            "media": {
                                "id": null,
                                "key": null,
                                "url": null,
                                "size": null,
                                "filename": "",
                                "content_type": null
                            },
                            "images": [],
                            "content": "{\"values\":{\"Image List\":[{\"path\":\"download (1).jpg\"},{\"path\":\"free-photo-of-thanh-ph-d-ng-giao-thong-d-ng-ph.jpeg\"}],\"name\":\"full_options\",\"category\":\"MARKETING\",\"Text\":\"<p>Testing is the process of evaluating a system or component to determine whether it satisfies the specified requirements or works as expected. It involves executing a program or system with the intent of finding errors, bugs, or other defects. Testing is an essential part of the software development life cycle and helps ensure the quality, reliability, and functionality of a product. It can be performed at various stages, such as unit testing, integration testing, system testing, and acceptance testing. <br><br></p>\",\"Heading\":\"Welcome\",\"Footer\":\"Thank you so much!\",\"Button\":[{\"text\":\"Contact us\",\"type\":\"URL\",\"type_url_link\":\"https://translate.google.com/?hl=vi\"},{\"text\":\"Phone number\",\"type\":\"PHONE_NUMBER\",\"phone_number\":\"+84355643122\"}],\"Quick Reply\":[{\"text\":\"Give me a call\",\"disclosure\":false}]},\"subMediaKeys\":[\"241cxd2tiffbib3qthl0viffyon8\",\"miuxxhuwuh7rst0q173bbpduplqh\"],\"elements\":{\"headerElement\":{\"Heading\":\"Heading\"},\"contentElement\":{\"Text\":\"Text\",\"Footer\":\"Footer\",\"Button\":\"Button\",\"Image List\":\"Image List\"},\"footerElement\":{\"Quick Reply\":\"Quick Reply\"}},\"call_to_action_button\":[{\"text\":\"Contact us\",\"type\":\"URL\",\"type_url_link\":\"https://translate.google.com/?hl=vi\"},{\"text\":\"Phone number\",\"type\":\"PHONE_NUMBER\",\"phone_number\":\"+84355643122\"}]}",
                            "subject": null,
                            "category": "MARKETING",
                            "language": "en_US",
                            "link_url": "",
                            "company_id": "1",
                            "created_at": "2024-01-12T07:37:33.895Z",
                            "sub_medias": [
                                {
                                    "id": 1,
                                    "key": "241cxd2tiffbib3qthl0viffyon8",
                                    "url": "https://dovehero-staging.s3.amazonaws.com/241cxd2tiffbib3qthl0viffyon8",
                                    "size": 5,
                                    "filename": "download (1).jpg",
                                    "content_type": "image/jpeg"
                                },
                                {
                                    "id": 2,
                                    "key": "miuxxhuwuh7rst0q173bbpduplqh",
                                    "url": "https://dovehero-staging.s3.amazonaws.com/miuxxhuwuh7rst0q173bbpduplqh",
                                    "size": 3,
                                    "filename": "free-photo-of-thanh-ph-d-ng-giao-thong-d-ng-ph.jpeg",
                                    "content_type": "image/jpeg"
                                }
                            ],
                            "updated_at": "2024-01-12T07:44:11.851Z",
                            "template_type": "whatsapp",
                            "template_whatsapp_status": "APPROVED"
                        },
                        "file_name": null,
                        "parent_id": null,
                        "created_at": "2024-01-19T03:21:37.462Z",
                        "updated_at": "2024-01-19T07:23:09.685Z",
                        "chat_room_id": 1,
                        "wa_message_id": "wamid.HBgLNDY3MjY0MTQyMjQVAgARGBJFNTZDNjM1QjI1QkMyNEU3QzUA",
                        "wa_message_type": "template",
                        "wa_sender_number": "+84981349672",
                        "dynamic_attributes": null,
                        "wa_message_content": null,
                        "wa_recipient_number": "+46726414224"
                    }
                },
                "parent_id": null,
                "created_at": "2024-01-19T07:23:57.000Z",
                "updated_at": "2024-01-19T07:23:57.000Z",
                "dynamic_attributes": null,
                "reaction": null,
                "template": null
            },
            "contact": {
                "id": 2,
                "first_name": "Sweden84",
                "last_name": null,
                "email": null,
                "email_marketing": "unsubcribed",
                "company_name": "C84",
                "source": "imported",
                "rating": 2,
                "notes": [],
                "phone_number": null,
                "whatsapp_number": "+46726414224",
                "updated_at": "2024-01-17T06:25:27.475Z",
                "created_at": "2024-01-17T06:25:27.475Z",
                "avatar_url": null
            },
            "tags": []
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 2,
    "current_page": 1,
    "base_total": null
}


This endpoint makes an HTTP GET request to retrieve a list of WhatsApp chat
rooms.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms


RESPONSE

The response will include an array of chat room objects, each containing
information such as the room ID, contact ID, company ID, status, active status,
company name, creation and update timestamps, last message details, contact
details, and tags associated with the chat room.


GET A CHATROOM

Copy to Clipboard{
    "data": {
        "id": 1,
        "whatsapp_business_profile_id": 1,
        "status": "user_initiated",
        "company_id": 1,
        "created_at": "2024-01-17T08:51:37.577Z",
        "updated_at": "2024-02-05T04:06:40.215Z",
        "messages": [
            {
                "id": 1,
                "chat_room_id": 1,
                "wa_message_id": "wamid.HBgLNDY3MjY0MTYwNzQVAgARGBIxOTUzOTY2OTA3RUFDOUIyRDIA",
                "wa_sender_number": "+84981349672",
                "wa_recipient_number": "+46726416074",
                "wa_message_type": "template",
                "wa_message_content": null,
                "file_name": null,
                "file_url": null,
                "status": "send",
                "data": [],
                "parent_id": null,
                "created_at": "2024-01-17T08:51:37.590Z",
                "updated_at": "2024-01-18T20:04:10.085Z",
                "dynamic_attributes": null,
                "reaction": null,
                "template": {
                    "id": 1,
                    "name": "jasmine_testing",
                    "company_id": "1",
                    "template_type": "whatsapp",
                    "path": null,
                    "subject": null,
                    "content": "{\"values\":{\"name\":\"jasmine_testing\",\"category\":\"MARKETING\",\"Text\":\"<p>This template is for testing</p>\",\"Image\":{}},\"subMediaKeys\":[],\"elements\":{\"headerElement\":{\"Image\":\"Image\"},\"contentElement\":{\"Text\":\"Text\",\"Footer\":null,\"Button\":null,\"Image List\":null},\"footerElement\":null}}",
                    "updated_at": "2024-01-17T03:17:25.523Z",
                    "created_at": "2024-01-17T03:16:12.429Z",
                    "images": [],
                    "link_url": "https://dovehero-staging.s3.amazonaws.com/5ho50ed43h0e0gp7p1x3uknvpop3",
                    "template_whatsapp_status": "APPROVED",
                    "language": "en_US",
                    "sub_medias": [],
                    "media": {
                        "id": 1,
                        "filename": "image.jpg",
                        "url": "https://dovehero-staging.s3.amazonaws.com/5ho50ed43h0e0gp7p1x3uknvpop3",
                        "content_type": "image/jpeg",
                        "size": 5,
                        "key": "5ho50ed43h0e0gp7p1x3uknvpop3"
                    },
                    "category": "MARKETING"
                }
            }
        ],
        "contact": {
            "id": 1,
            "first_name": "jasmine",
            "last_name": "",
            "email": "jasmine@gmail.com",
            "email_marketing": "subscribed",
            "company_name": "",
            "source": "manually",
            "rating": 2,
            "notes": [],
            "phone_number": "",
            "whatsapp_number": null,
            "updated_at": "2024-02-02T09:45:17.214Z",
            "created_at": "2024-01-24T06:21:38.810Z",
            "avatar_url": null
        },
        "whatsapp_business_profile": {
            "id": 1,
            "phone_number": "+84981349672",
            "phone_number_id": "120044767859540",
            "verify_code_status": "verified",
            "whatsapp_account_id": "129350453585384",
            "company": {
                "id": 1,
                "name": "jasmine12121"
            },
            "about": "About Text",
            "address": "",
            "description": "jasmine",
            "vertical": "BEAUTY",
            "email": "jasmine@gmail.com",
            "websites": "jasmine.com",
            "image": "https://dovehero-staging.s3.amazonaws.com/et677gmw4rynp71x4jegup2n9th4",
            "project_id": "64f92a474548ca0be7e6c5c6",
            "project_name": "4f0fd12c-8258-4df3-9d87-596b9908a00d",
            "display_name": "jasmine"
        },
        "company": {
            "id": 1,
            "name": "jasmine12121",
            "phone": "1234567890",
            "whatsapp_number": "+84981349672",
            "email": null,
            "logo": null,
            "wa_video_tutorial": true
        },
        "tags": []
    }
}


This endpoint makes an HTTP GET request to retrieve details of a specific
WhatsApp chat room identified by the provided ID.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the chatroom.


RESPONSE

The response contains information about the chat room, including its ID,
associated WhatsApp business profile, status, company ID, creation and update
timestamps, messages exchanged within the chat room, contact details, WhatsApp
business profile details, company details, and associated tags.


DELETE CHATROOM

Copy to Clipboard{
    "message": "Delete successfully"
}



HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the chatroom.


RESPONSE

Upon successful execution, the endpoint returns a 200 status with a JSON
response containing a message indicating the outcome of the operation.


GET WHATSAPP CHAT ROOM ASSIGNMENT

Copy to Clipboard{
    "data": {
        "id": 1,
        "first_name": "jasmine",
        "last_name": "mai",
        "phone": "+447893986555",
        "email": "dungadamo1@gmail.com",
        "whatsapp_number": "+84355643122",
        "language": [],
        "favourite_email_client": null,
        "prefer_email": null,
        "note": null,
        "avatar": null,
        "role": "owner",
        "time_zone": "Asia/Bangkok",
        "time_zone_name": "Hanoi (UTC +07:00)",
        "is_dismiss_two_factor": true
    }
}


This endpoint is used to assign a user to a specific WhatsApp chat room.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/{id}/assign


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the chatroom.


RESPONSE

This endpoint retrieves user data.


ASSIGNMENT FOR USER

Copy to Clipboard{
    "message": "Assign successfull!"
}


This endpoint is used to assign a user to a specific WhatsApp chat room.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/{id}/assign

Copy to ClipboardExample request body: 
{
    "assignee_id": 1
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the chatroom. assignee_id bigint
The ID of the assignee.


RESPONSE

Upon a successful assignment, the response will contain a status code of 201 and
a message.


UNASSIGN FOR USER

Copy to Clipboard{
    "message": "Unassign successfull!"
}


This endpoint is used to unassign a specific chat room with the ID from a
WhatsApp service.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/{id}/unassign


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the chatroom.


RESPONSE

Upon successful execution, the endpoint returns a status code of 200 along with
a JSON response.


BUSINESS INITIATE

Copy to Clipboard{
    "message": "Update status sucessfully!"
}


This API endpoint allows you to initiate a business chat in a specific WhatsApp
chat room with the ID.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/{id}/business_initiate


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the chatroom.


RESPONSE

Upon successful execution, the API returns a 200 status with a JSON response
containing a message field.


USER INITIATE

Copy to Clipboard{
    "message": "Update status sucessfully!"
}


This endpoint makes an HTTP POST request to initiate a user in a specific
WhatsApp chat room.


HTTP REQUEST

POST
https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/{id}/user_initiate


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the chatroom.


RESPONSE

Upon successful execution, the API returns a 200 status with a JSON response
containing a message field.


FILTER CHATROOM

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "contact_id": 1,
            "whatsapp_business_profile_id": 1,
            "company_id": 1,
            "status": "business_initiated",
            "active_status": "unread",
            "company_name": "jamine1212",
            "created_at": "2024-01-17T08:51:37.577Z",
            "updated_at": "2024-02-05T04:31:14.876Z",
            "last_message": {
                "id": 1,
                "chat_room_id": 1,
                "wa_message_id": "wamid.HBgLNDY3MjY0MTYwNzQVAgASGCBERkVCOUZBMjg1QzNBRkNCRTc4RjUzQTBDQUM2QTc0MQA=",
                "wa_sender_number": "+46726416074",
                "wa_recipient_number": "+84981349672",
                "wa_message_type": "text",
                "wa_message_content": "Wui",
                "file_name": null,
                "file_url": null,
                "status": "reply",
                "data": {
                    "body": "Wui"
                },
                "parent_id": null,
                "created_at": "2024-01-19T09:26:53.000Z",
                "updated_at": "2024-02-05T03:59:13.832Z",
                "dynamic_attributes": null,
                "reaction": null,
                "template": null
            },
            "contact": {
                "id": 1,
                "first_name": "jasmine",
                "last_name": "",
                "email": "jasmine@gmail.com",
                "email_marketing": "subscribed",
                "company_name": "",
                "source": "manually",
                "rating": 2,
                "notes": [],
                "phone_number": "",
                "whatsapp_number": null,
                "updated_at": "2024-02-02T09:45:17.214Z",
                "created_at": "2024-01-24T06:21:38.810Z",
                "avatar_url": null
            },
            "tags": []
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This HTTP GET request is used to filter WhatsApp chat rooms.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/filter

Copy to ClipboardExample request body: 
{
    "type": "unread"
}



REQUIRED PARAMETERS

Parameter Type Description type string The type of the chatroom. (active,
assigned, unassigned, unread, last_24_hours)


RESPONSE

The response will contain an array of "data" which includes information about
the chat rooms, such as their IDs, contact IDs, company IDs, status, and last
messages. Additionally, the "metadata" field provides information about the
pagination and total count of chat rooms.


BULK DESTROY CHAT ROOM

Copy to Clipboard{
    "message": "Delete successfully"
}


This endpoint is used to delete multiple WhatsApp chat rooms in bulk.


HTTP REQUEST

DELETE
https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/bulk_destroy

Copy to ClipboardExample request body: 
{
    "ids": [890, 889]
}



REQUIRED PARAMETERS

Parameter Type Description ids array An array of IDs of the chat rooms to be
deleted.


RESPONSE

Upon a successful execution with a status code of 200, the response will be in
JSON format with a message indicating the result of the operation.


COUNT UNREAD MESSAGES

Copy to Clipboard{
    "data": 44
}


This endpoint makes an HTTP GET request to retrieve the count of unread messages
in WhatsApp chat rooms.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/whatsapp/chat_rooms/count-unread


RESPONSE

The response will be in JSON format with a "data" field indicating the count of
unread messages, which will be a non-negative integer value.


EVENT


GET ALL EVENT

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "title": "multi_campaign 2024-01-01 08:12:51 UTC",
            "description": null,
            "type": "multi_campaign",
            "start_date": "2023-12-12",
            "end_date": "2024-01-01",
            "start_time": "09:43",
            "end_time": "12:43",
            "repeat": "second_week",
            "days": [
                "monday"
            ],
            "campaign_id": 1,
            "event_tags": [],
            "notification_content": null
        },
        {
            "id": 2,
            "title": "multi_campaign 2024-01-02 08:12:51 UTC",
            "description": null,
            "type": "multi_campaign",
            "start_date": "2023-12-13",
            "end_date": "2024-01-07",
            "start_time": "16:01",
            "end_time": "16:05",
            "repeat": "never",
            "days": [
                "wednesday"
            ],
            "campaign_id": 2,
            "event_tags": [],
            "notification_content": null
        },
        {
            "id": 3,
            "title": "single_campaign 2024-01-01 08:12:51 UTC",
            "description": null,
            "type": "single_campaign",
            "start_date": "2024-01-01",
            "end_date": "2024-01-01",
            "start_time": "15:12",
            "end_time": "16:12",
            "repeat": null,
            "days": [],
            "campaign_id": 3,
            "event_tags": [],
            "notification_content": null
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 3,
    "current_page": 1,
    "base_total": null
}


This endpoint makes an HTTP GET request to retrieve a list of events.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/events


RESPONSE

The response will be in JSON format and will include an array of event objects
with their respective metadata. Each event object contains an ID, title,
description, type, start date, end date, start time, end time, repeat
information, associated campaign ID, event tags, and notification content. The
metadata object provides additional information about the pagination and total
count of events.


GET AN EVENT

Copy to Clipboard{
    "data": {
        "id": 3,
        "title": "single_campaign 2023-09-11 08:25:57 UTC",
        "description": null,
        "type": "single_campaign",
        "start_date": "2023-09-11",
        "end_date": "2023-09-11",
        "start_time": "15:25",
        "end_time": "16:25",
        "repeat": null,
        "days": [],
        "campaign_id": 3,
        "event_tags": [],
        "notification_content": null
    }
}


This endpoint makes an HTTP GET request to retrieve details of a specific event
with the ID


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/events/401


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the event


RESPONSE

The response will be in JSON format and will include the event's ID, title,
description, type, start date, end date, start time, end time, repeat
information, associated campaign ID, event tags, and notification content if
available.


CREATE AN EVENT

Copy to Clipboard{
    "data": {
        "id": 4,
        "title": "Event single",
        "description": "range time",
        "type": "note",
        "start_date": "2024-04-25",
        "end_date": "2024-04-25",
        "start_time": "10:00",
        "end_time": "15:00",
        "repeat": null,
        "days": [],
        "campaign_id": 4,
        "event_tags": [],
        "notification_content": null
    }
}


This endpoint allows you to add a new event.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/events

Copy to ClipboardExample request body: 
{
    "event": {
        "title": "Event abac",
        "description": "range time",
        "start_date": "2024-04-25",
        "end_date": "2024-04-25",
        "start_time": "10:00",
        "end_time": "15:00",
        "time_zone": "Asia/Bangkok",
        "type": "note",
        "notification_attributes": {
            "title": "test notification",
            "content": "Test content notification",
            "time_exec": "2023-05-08 16:10"
        }
    }
}



REQUIRED PARAMETERS

Parameter Type Description start_date date Event creation start date end_date
date Event creation end date start_time time Event creation start time end_time
time Event creation end time type string The type of the event


OPTIONAL PARAMETERS

Parameter Type Description timezone string The timezone of the event title
string The title of the event description string The description of the event
days array An array of dates in the event repeat string Repeat event or not
event_tags_attributes array The event tag attributes (id, user_id)
notification_content_attributes array The notification content attributes (id,
title, content, time_exec)


RESPONSE

The response will be in JSON format and will include the event's ID, title,
description, type, start date, end date, start time, end time, repeat
information, associated campaign ID, event tags, and notification content if
available.


UPDATE EVENT

Copy to Clipboard{
    "data": {
        "id": 4,
        "title": "Event multi",
        "description": "range time",
        "type": "note",
        "start_date": "2024-04-25",
        "end_date": "2024-04-25",
        "start_time": "10:00",
        "end_time": "15:00",
        "repeat": null,
        "days": [],
        "campaign_id": 3,
        "event_tags": [],
        "notification_content": null
    }
}


This endpoint allows you to update the details of a specific event.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/events/{id}

Copy to ClipboardExample request body: 
{
    "event": {
        "title": "Event abcccc",
        "description": "range time",
        "start_date": "2024-04-25",
        "end_date": "2024-04-25",
        "start_time": "10:00",
        "end_time": "15:00",
        "time_zone": "Asia/Bangkok",
        "type": "note",
        "notification_attributes": {
            "title": "test notification",
            "content": "Test content notification",
            "time_exec": "2023-05-08 16:10"
        }
    }
}



REQUIRED PARAMETERS

Parameter Type Description ID bigint The ID of the event


OPTIONAL PARAMETERS

Parameter Type Description start_date date Event creation start date end_date
date Event creation end date start_time time Event creation start time end_time
time Event creation end time type string The type of the event timezone string
The timezone of the event title string The title of the event description string
The description of the event days array An array of dates in the event repeat
string Repeat event or not event_tags_attributes array The event tag attributes
(id, user_id) notification_content_attributes array The notification content
attributes (id, title, content, time_exec)


RESPONSE

The response will be in JSON format and will include the event's ID, title,
description, type, start date, end date, start time, end time, repeat
information, associated campaign ID, event tags, and notification content if
available.


DELETE EVENT

This HTTP DELETE request is used to delete the event with the ID from the API.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/events/{id}


REQUIRED PARAMETERS

Parameter Type Description ID bigint The ID of the event


RESPONSE

Upon successful deletion, the server returns a 204 status code with a text/xml
content type. No specific response data is provided.


SYNC RECENT EVENTS

Copy to Clipboard{
    "message": "Request is being processed, please wait"
}


This endpoint is used to sync the recent events.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/events/synsc-recent-events


RESPONSE

A message indicating the result of the request.


GET EVENT TIMEZONE

Copy to Clipboard{
    "data": [
        {
            "name": "International Date Line West (UTC -12:00)",
            "value": "Etc/GMT+12"
        },
        {
            "name": "American Samoa (UTC -11:00)",
            "value": "Pacific/Pago_Pago"
        },
        {
            "name": "Midway Island (UTC -11:00)",
            "value": "Pacific/Midway"
        },
        {
            "name": "Hawaii (UTC -10:00)",
            "value": "Pacific/Honolulu"
        },
        {
            "name": "Alaska (UTC -09:00)",
            "value": "America/Juneau"
        },
        {
            "name": "Pacific Time (US & Canada) (UTC -08:00)",
            "value": "America/Los_Angeles"
        },

        ...

    ]
}


This endpoint makes an HTTP GET request to retrieve the timezone data


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/events/get-timezone


RESPONSE

The response will have a status code of 200 and a content type of
application/json. The response body will contain an array of objects with "name"
and "value" properties, representing the timezone data.


SHOW SCHEDULE CAMPAIGN EVENT

Copy to Clipboard{
    "data": {
        "id": 5,
        "name": "date_time schedule 2023-09-11 08:25:57 UTC",
        "time_zone_name": "UTC (UTC +00:00)",
        "time_zone": "Etc/UTC",
        "date": "2023-09-11",
        "time": "08:25",
        "number_campaign": 1,
        "type": "date_time"
    }
}


This API endpoint retrieves the schedule for a campaign event.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/events/show-schedule-campaign-event

Copy to ClipboardExample request body: 
{
    "id": 1
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the event


RESPONSE

Upon a successful execution (Status: 200), the response will be in JSON format.


SHOW LIST CATEGORY NAMES

Copy to Clipboard{
    "data": [
        "System manually"
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This endpoint makes an HTTP GET request to fetch a list of event category names.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/events/show-list-category-names


RESPONSE

Upon a successful execution (Status: 200), the response will be in JSON format.


SHOW RECIPIENTS CAMPAIGN EVENT

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "first_name": "Netherlands2",
            "last_name": null,
            "email": null,
            "email_marketing": "unsubcribed",
            "company_name": null,
            "source": "imported",
            "rating": 2,
            "dynamic_attributes": {},
            "notes": [],
            "avatar": null,
            "tags": [
                {
                    "id": 1,
                    "company_id": 1,
                    "name": "happy",
                    "description": "eqq",
                    "type": "contact",
                    "total_contacts": 7
                },
                {
                    "id": 2,
                    "company_id": 1,
                    "name": "sad",
                    "description": "cxz",
                    "type": "contact",
                    "total_contacts": 7
                },
                {
                    "id": 3,
                    "company_id": 1,
                    "name": "sad",
                    "description": "dasd",
                    "type": "contact",
                    "total_contacts": 7
                }
            ],
            "lists": [
                {
                    "id": 1,
                    "name": "single_campaign 2023-09-11 08:25:57 UTC"
                },
                {
                    "id": 2,
                    "name": "single_campaign 2024-01-17 06:21:23 UTC"
                },
                {
                    "id": 3,
                    "name": "single_campaign 2024-01-17 10:07:40 UTC"
                },
                {
                    "id": 4,
                    "name": "single_campaign 2024-01-17 10:16:33 UTC"
                }
            ],
            "phone_number": "",
            "whatsapp_number_status": "not_registered",
            "whatsapp_number": "+3197010520212",
            "updated_at": "2024-01-17T03:13:33.405Z",
            "created_at": "2024-01-17T03:13:33.405Z",
            "status": []
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 1,
    "current_page": 1,
    "base_total": null
}


This API endpoint makes an HTTP GET request to retrieve the recipients of a
specific campaign event.


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/events/show-recipients-campaign-event

Copy to ClipboardExample request body: 
{
    "id": 1
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the event


RESPONSE

A message indicating the result of the request.


TAGS


GET ALL TAGS

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "company_id": 1,
            "name": "happy",
            "description": "",
            "type": "template",
            "total_contacts": 0
        },
        {
            "id": 2,
            "company_id": 1,
            "name": "sad",
            "description": "",
            "type": "template",
            "total_contacts": 0
        },
        {
            "id": 3,
            "company_id": 1,
            "name": "cool",
            "description": "",
            "type": "template",
            "total_contacts": 0
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 3,
    "current_page": 1,
    "base_total": null
}


This endpoint sends an HTTP GET request to retrieve a list of tags from the
specified API.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/tags


RESPONSE

The response will contain an array of tag objects, along with metadata about the
tags.


CREATE TAG

Copy to Clipboard{
    "data": {
        "id": 2,
        "company_id": 1,
        "name": "developers",
        "created_at": "2024-01-26T01:16:46.665Z",
        "updated_at": "2024-01-26T01:16:46.665Z",
        "description": "Eius a facere quos impedit.",
        "type": "contact",
        "data": null,
        "color": null
    }
}


This endpoint allows you to create a new tag by sending an HTTP POST request to
the specified URL


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/tags

Copy to ClipboardExample request body: 
{

    "tag": {
        "company_id" : 1,
        "name" : "Developers",
        "description": "develop"
    }
}



REQUIRED PARAMS

Parameter Type Description company_id bigint The ID of the company name string
The name of the tag. description string The description of the tag. type string
The type of the tag. color string The color of the tag


RESPONSE

Upon a successful creation, the endpoint will return a status code of 201 and a
JSON response containing the newly created tag's details, including its ID,
company ID, name, creation date, update date, description, type, data, and
color.


UPDATE TAG

Copy to Clipboard{
    "data": {
        "id": 2,
        "company_id": 1,
        "name": "developer",
        "created_at": "2024-01-26T01:16:46.665Z",
        "updated_at": "2024-01-26T01:16:46.665Z",
        "description": "Eius a facere quos impedit.",
        "type": "contact",
        "data": null,
        "color": null
    }
}


This endpoint allows you to update a specific tag by sending an HTTP PUT request
to the specified URL.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/tags/{id}

Copy to ClipboardExample request body: 
{
    "tag": {
        "company_id" : 1,
        "name" : "Developers Entertainment",
        "description": "DE"
    }
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the tag company_id bigint The ID
of the company name string The name of the tag. description string The
description of the tag. type string The type of the tag. color string The color
of the tag


RESPONSE

Upon a successful execution, the endpoint will return a status code of 200 and a
JSON response with the updated tag details.


DELETE TAG

This API endpoint sends an HTTP DELETE request to remove the tag with the ID 220


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/tags/{id}


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the tag


RESPONSE

The response returns a status code of 204, indicating a successful deletion with
no content in the response body. The Content-Type is specified as text/xml.


ADD MULTI TAG

Copy to Clipboard{
    "message": "Add tag successful"
}


This endpoint allows you to add multiple tags


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/tags/add-multi-tag

Copy to ClipboardExample request body: 
{
    "tag_id": [1, 2],
    "tag": {
     "contact_tags_attributes": [
       { "contact_id": 1 },
       { "contact_id": 2 }
     ]
   }
 }



REQUIRED PARAMETERS

Parameter Type Description tag_id array The IDs of the tag company_id bigint The
ID of the company name string The name of the tag. description string The
description of the tag. type string The type of the tag. color string The color
of the tag contact_tags_attributes array Contact tag attributes (id, contact_id)
template_tags_attributes array Template tag attributes (id, template_id)
tag_records_attributes array Tag record attribute (id, record_id, record_type)


RESPONSE

The response to this request will have a status code of 200 and a content type
of application/json. The response body will contain a message indicating the
outcome of the operation.


ADD MULTI TAG TO CHATROOM

Copy to Clipboard{
    "message": "Update tag successful"
}


This endpoint allows you to add multi tag to chatroom.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/tags/add-multi-chatroom-tag

Copy to ClipboardExample request body: 
{
    "room_id": 1,
    "tag_id": [1,2]
}



REQUIRED PARAMETERS

Parameter Type Description room_id bigint The ID of the chatroom. tag_id array
An array of tag IDs to be added to the chatrooms.


RESPONSE

Upon a successful request, the server will respond with a status code of 200 and
a JSON object containing a message indicating the success of the operation.


ADD MULTI TAG TO DOCUMENT

Copy to Clipboard{
    "message": "Add tag successful"
}


This endpoint allows you to add multi tag to a document in a single request.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/tags/add-multi-document-tag

Copy to ClipboardExample request body: 
{
    "document_id": 1,
    "tag_id": [1,2]
 }



REQUIRED PARAMETERS

Parameter Type Description document_id bigint The ID of the document to which
the tag will be added. tag_id array An array of tag IDs to be added to the
chatrooms.


RESPONSE

Upon a successful request, the server will respond with a status code of 200 and
a JSON object containing a message indicating the success of the operation.


LIST AND SUBSCRIBERS

Copy to Clipboard{
    "data": [
        {
            "id": 3,
            "company_id": 1,
            "name": "tag",
            "type": "contact",
            "total_contacts": 360,
            "open_contact_rate": 21.39,
            "reply_contact_rate": 5.83,
            "total_contacts_bounces": 360
        },
        {
            "id": 4,
            "company_id": 1,
            "name": "mcao",
            "type": "contact",
            "total_contacts": 54,
            "open_contact_rate": 1.85,
            "reply_contact_rate": 0.0,
            "total_contacts_bounces": 54
        },
        {
            "id": 5,
            "company_id": 1,
            "name": "jasmineja",
            "type": "contact",
            "total_contacts": 9,
            "open_contact_rate": 22.22,
            "reply_contact_rate": 22.22,
            "total_contacts_bounces": 9
        }
    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 3,
    "current_page": 1,
    "base_total": null
}


This HTTP GET request retrieves a list of tags along with their subscribers from
the specified API endpoint.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/tags/list-and-subscribers


RESPONSE

The response will be in JSON format and will include an array of tag objects
with details such as ID, company ID, name, type, total contacts, open contact
rate, reply contact rate, and total contact bounces. Additionally, the response
will include metadata, pagination details like total pages, total count, current
page, and base total.


COUNT CONTACT

Copy to Clipboard{
  "data": 5
}


This endpoint is used to retrieve the count of tags associated with a specific
contact.


HTTP REQUEST

POST https://sky-agency-api-dev.adamo.tech/api/v3/tags/count-contact

Copy to ClipboardExample request body: 
{
    "contact_id": 1
}



REQUIRED PARAMETERS

Parameter Type Description contact_id bigint The ID of the contact


RESPONSE

The count of tags associated with the specified contact.


UNMATCH MULTI CONTACTS

Copy to Clipboard{
    "message": "Tag developers 3 removed from selected contacts"
}


This HTTP DELETE request is used to unmatch multiple contacts from a specific
tag.


HTTP REQUEST

DELETE
https://sky-agency-api-dev.adamo.tech/api/v3/tags/{id}/unmatch-multi-contacts

Copy to ClipboardExample request body: 
{
    "contact_ids": [7,8]
}



REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the tag contact_ids array An
array of contact IDs to be unmatched.


RESPONSE

The response to this request will have a status code of 200 and a content type
of application/json. The response body will contain a message indicating the
outcome of the operation.


REMOVE TAG RECORDS

Copy to Clipboard{
    "message": "Tag developers 3 removed successfully"
}


This endpoint sends an HTTP DELETE request to remove tag records associated with
the tag ID.


HTTP REQUEST

DELETE https://sky-agency-api-dev.adamo.tech/api/v3/tags/{id}/remove-tag-records


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the tag


RESPONSE

Upon successful execution, the endpoint returns a 200 status with a JSON
response containing a message indicating the outcome of the operation.


UNMATCH TEMPLATE

Copy to Clipboard{
    "message": "Tag developers 3 removed from selected contacts"
}


This endpoint sends an HTTP DELETE request to remove the unmatch-multi-templates
associated with the tag ID.


HTTP REQUEST

DELETE
https://sky-agency-api-dev.adamo.tech/api/v3/tags/{id}/unmatch-multi-templates


REQUIRED PARAMETERS

Parameter Type Description id bigint The ID of the tag


RESPONSE

Upon successful execution, the endpoint returns a 200 status with a JSON
response containing a message indicating the outcome of the operation.


NOTIFICATIONS


GET NOTIFICATIONS

Copy to Clipboard{
    "data": [
        {
            "id": 1,
            "title": "New message",
            "content": "Netherlands38  sent you a message",
            "time_exec": null,
            "notificationable_type": "Message",
            "notificationable_info": {
                "type": "message",
                "message_id": 1,
                "chat_room_id": 1,
                "company_id": 1,
                "sender_name": "Netherlands38 "
            },
            "status": "read",
            "read_at": "2024-01-25T07:57:20.615Z",
            "user_id": 1,
            "created_at": "2024-01-19T02:49:13.250Z",
            "sub_type": ""
        },
        {
            "id": 2,
            "title": "Campaign bounce rate",
            "content": "The bounce rate of campaign single_campaign 2024-01-18 15:23:26 UTC is 0%.",
            "time_exec": null,
            "notificationable_type": "Campaign",
            "notificationable_info": {
                "type": "bounce_report",
                "campaign_id": 1,
                "company_id": 1,
                "campaign_name": "single_campaign 2024-01-18 15:23:26 UTC",
                "total_percent_bounce": 57.14
            },
            "status": "read",
            "read_at": "2024-01-25T07:57:20.615Z",
            "user_id": 1,
            "created_at": "2024-01-18T15:21:27.027Z",
            "sub_type": ""
        }

    ],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 2,
    "current_page": 1,
    "base_total": null
}


This endpoint retrieves a list of notifications.


HTTP REQUEST

GET https://sky-agency-api-dev.adamo.tech/api/v3/notifications


RESPONSE

The response body will contain an array of notification objects under the 'data'
key, along with metadata such as total pages, total number of notifications, and
current page.


MARK AS READ

Copy to Clipboard{
    "data": [],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 0,
    "current_page": 1,
    "base_total": null
}


This endpoint is used to mark notifications as read by sending an HTTP PATCH
request to the specified URL.


HTTP REQUEST

PATCH https://sky-agency-api-dev.adamo.tech/api/v3/notifications/mark-as-read

Copy to ClipboardExample request body: 
    {
        "ids": [1,2]
    }



REQUIRED PARAMETERS

Parameter Type Description ids string The ID of the notification


RESPONSE

Upon successful execution, the endpoint returns a 200 status code along with an
empty "data" array and metadata including "per", "total_pages", "total",
"current_page", and "base_total" fields.


MARK ALL AS READ

Copy to Clipboard{
    "data": [],
    "metadata": {},
    "per": 20,
    "total_pages": 1,
    "total": 0,
    "current_page": 1,
    "base_total": null
}


This endpoint is used to mark all notifications as read.


HTTP REQUEST

PATCH
https://sky-agency-api-dev.adamo.tech/api/v3/notifications/mark-all-as-read


RESPONSE

Upon successful execution, the endpoint returns a 200 status code along with an
empty "data" array and metadata including "per", "total_pages", "total",
"current_page", and "base_total" fields.


COUNT UNREAD

Copy to Clipboard{
    "data": {
        "total_unread": 2
    }
}


This endpoint makes an HTTP GET request to retrieve the count of unread
notifications


HTTP REQUEST

GET
https://sky-agency-api-dev.adamo.tech/api/v3/notifications/count-unread-notifications


RESPONSE

Upon a successful execution, the endpoint returns a status code of 200 along
with a JSON response body containing the total number of unread notifications
under the "data" field.


ERRORS

This error section is stored in a separate file in includes/_errors.md. Slate
allows you to optionally separate out your docs into many files...just save them
to the includes folder and add them to the top of your index.md's frontmatter.
Files are included in the order listed.

The Kittn API uses the following error codes:

Error Code Meaning 400 bad_request -- Your request is invalid. 401 unauthorized
-- Your API key is wrong. 403 forbidden -- The client does not have access
rights to the content 403 unknown_attribute_error -- Typically occurs in the
context of object-oriented programming 404 not_found -- The server cannot find
the requested resource 405 method_not_allowed -- You tried to access with an
invalid method. 406 not_acceptable -- You requested a format that isn't json.
409 conflict -- This response is sent when a request conflicts with the current
state of the server. 411 length_required -- Server rejected the request because
the Content-Length header field is not defined and the server requires it. 412
precondition_failed -- The client has indicated preconditions in its headers
which the server does not meet. 422 unprocessable_entity -- The request was
well-formed but was unable to be followed due to semantic errors. 422
argument_error -- An argument error typically refers to a mistake or issue with
the way an argument is being used or passed in a programming language or
software 427 unassigned -- Typically refers to a variable that has not been
given a value in programming 429 too_many_requests -- You're requesting too
many! Slow down! 500 internal_error -- We had a problem with our server. Try
again later. 503 service_unavailable -- We're temporarily offline for
maintenance. Please try again later. 422 parameter_missing -- Typically refers
to a situation where a required parameter or variable is not provided or is
missing in a given context, 401 force_logout -- Typically refers to a command or
action that forcibly logs a user out of a system, application, or device,
regardless of their current activity or status 426 force_update -- Typically
refers to a command or action that compels a system or software to undergo an
update, often bypassing normal update procedures 402 invalid_number -- Typically
refers to a situation where a number provided in a specific context is not valid
or acceptable 696 out_of_credit -- Typically refers to a situation where a user
has used up all of their available credit or funds in a particular account or
service.

example