Creating Bulk Link using API

API Endpoint:

  • POST /api/user/v1/bulk

Request Example

curl --location --request POST 'https://apiv2.foxlyme.com/api/user/v1/bulk?domain_id=string' \
--header 'api-key: API_KEY' \
--form 'upload=@path/to/file.csv' \
--form 'bunch_name=Strings' \
--form 'password=String' \
--form 'expire_on=YYYY-MM-DD' \
--form 'status=number' \
--form 'expiration_link=string' \
--form 'clicks=numbers' \
--form 'tags=string' \
--form 'note=string'

Query Parameter:

  • domain_id=string

Request Body (form-data):

  • upload (csv file, required)

  • bunch_name (string, required)

  • password (string, optional)

  • expire_on (date in YYYY-MM-DD format, optional)

  • status (number: 0 for Inactive, 1 for Active, required)

  • expiration_link (string, required)

  • clicks (number, required)

  • tags (string, required)

  • note (string, required)

Response Body:
{
    "error": false,
    "message": "Bulk link added successfully"
}

Get All Your Bulk List

API Endpoint:

  • GET /api/user/v1/bulk

Request Example

curl --location --request GET 'https://apiv2.foxlyme.com/api/user/v1/getbulk' \
--header 'api-key: API_KEY'

Query Parameters (optional):

  • sortBy: string (oldest/newest)

  • search: string (bunch name)

  • page: number

  • limit: number

Response Body:

{
    "message": "All Bunches fetched successfully",
    "data": [
        {
            "_id": number,
            "status": number,
            "unsafe_url": array,
            "bunch_name": "string",
            "user_id": "string",
            "bunch_id": "string",
            "created_at": "string",
            "domain_id": "string",
            "totalUrls": number
        }
    ]
}

Get Single Bulk Information

API Endpoint:

  • GET /api/user/v1/bunchdata

Request Example

curl --location --request GET 'https://apiv2.foxlyme.com/api/user/v1/bunchdata?bunch_id=string' \
--header 'api-key: API_KEY'

Query Parameter:

  • bunch_id: string

Response Body:

{
    "error": false,
    "message": "Bunch Data fetched successfully",
    "data": [
        {
            "_id": number,
            "result": {
                "status": 1,
                "tags": [],
                "note": "string",
                "long_url": "string",
                "bunch_id": "string",
                "short_url": "string",
                "created_at": "string"
            },
            "totalclicks": number
        }
    ]
}

Change Status of the Bulk

API Endpoint:

  • PUT /api/user/v1/bunchchangestatus

Request Example

curl --location --request PUT 'https://apiv2.foxlyme.com/api/user/v1/bunchchangestatus?bunch_id=string' \
--header 'api-key: API_KEY' \
--data-raw '{
    "status": number
}'

Query Parameter:

  • bunch_id: string

Request Body:

  • status: number

Response Body:

{
    "error": false,
    "message": "URL updated successfully"
}

Update the Bunch

Description: This API is used to update your existing data. Only include the keys you want to update. Do not include keys with empty values. For example, to update the bunch name, provide only bunch_name as shown below:

{"bunch_name": "String"}

Do not provide other keys with empty values, such as:

{
    "bunch_name": "String",
    "key": ""
}

API Endpoint:

  • PUT /api/user/v1/editbulklink

Request Example

curl --location --request PUT 'https://apiv2.foxlyme.com/api/user/v1/editbulklink?
bunch_id=string&domain_id=string' \
--header 'api-key: API_KEY' \
--data-raw '{
    "bunch_name": "string",
    "clicks": Number,
    "expiration_link": "string",
    "expire_on": "string",
    "note": "string",
    "password": "string",
    "status": Number,
    "tags": []
}'

Query Parameters:

  • bunch_id: string

  • domain_id: string (optional)

Response Body:

{
    "error": false,
    "message": "URL updated successfully"
}

Delete the Bunch

API Endpoint:

  • DELETE /api/user/v1/bulkdelete

Request Example

curl --location --request DELETE 'https://apiv2.foxlyme.com/api/user/v1/bulkdelete?
bunch_id=string' \
--header 'api-key: API_KEY'

Query Parameter:

  • bunch_id: string

Response Body:

{
    "error": false,
    "message": "Bunch deleted successfully"
}

Delete Single URL of Bunch

Description: If you wish to delete a particular single URL from any Bunch of your Bulk links, utilize this API. Remember, the purpose of this API is to delete any single URL from a bunch, not the entire bunch.

API Endpoint:

  • DELETE /api/user/v1/deletesingleurl

Request Example

curl --location --request DELETE 'https://apiv2.foxlyme.com/api/user/v1/deletesingleurl?
url_shortner_id=string&short_code=string' \
--header 'api-key: API_KEY'

Query Parameters:

  • url_shortner_id: string

  • short_code: string (For Example: If your short URL is https://example.com/xvhdn, the short code here is ‘xvhdn’)

Response Body:

{
    "error": false,
    "message": "URL deleted successfully"
}

Get Single Bunch Clicks

Description: This API provides you with the total clicks of your bunch.

API Endpoint:

  • GET /api/user/v1/bunchclicks

Request Example

curl --location --request GET 'https://apiv2.foxlyme.com/api/user/v1/bunchclicks?
bunch_id=string' \
--header 'api-key: API_KEY'

Query Parameter:

  • bunch_id: string

Response Body:

{
    "message": "URL data fetched successfully",
    "data": {
        "totalClicks": number,
        "todayClicks": number,
        "createdAt": "string"
    }
}

Get Clicks of Your Bunch by Day-wise

Description: This API provides information about the clicks of the last 30 days of your particular Bulk links.

API Endpoint:

  • POST /api/user/v1/bunchdaywiseclicks

Request Example

curl --location --request POST 'https://apiv2.foxlyme.com/api/user/v1/bunchdaywiseclicks?
bunch_id=string' \
--header 'api-key: API_KEY'

Query Parameter:

  • bunch_id: string

Response Body:

{
    "error": false,
    "message": "Bunch Clicks data fetched successfully",
    "totalCount": number,
    "daysData": {
        "day1": number,
        "day2": number,
        "day3": number,
        "day4": number,
        "day5": number,
        "day6": number,
        "day7": number,
        ...
    },
    "new": true,
    "highest": "string" // Describes the Date of highest clicks
}