Download OpenAPI specification:Download
This API allows you to automate certain operations, such as managing Projects, Smart Links, Rotators, and retrieving stats.
These endpoints require the use of an API key, issued by ClickMagick, as part of a Standard or Pro plan.
A Project allows you to track all your traffic and conversions for a single website, store, or sales funnel - no matter how many landing pages, ads or traffic sources you have.
Get a list of Projects and their IDs.
| search | string <string> Only include Projects where their |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects
{- "projects": [
- {
- "id": 29583,
- "name": "Bigfoot Surfboards"
}
], - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Create a new Project.
| name required | string The unique "friendly name" for this project. You can use letters, numbers, underscores, periods, dashes, and spaces. |
| time_zone | string Default: "The `time_zone` in your User Settings." The time zone for the Project specified using the named format in the IANA Time Zone Database, such as |
| currency | string 3 characters Default: "The currency setting in User Settings" If you're using the Auto Cost feature to pull in cost data from your Ad Account (Google, Facebook, etc.), and your ad account is sending cost data to ClickMagick in one currency, but all of your sales are being reported to ClickMagick in a different currency, then ClickMagick needs to convert your Auto Cost data from the currency that it's being reported in to the same currency that your sales are being reported in. The The value of You can find a complete of International Bank Account Numbers at IBAN Currency Codes. ClickMagick only supports the most common currencies at this point. If you need a currency that is not currently supported, submit a ticket and we will add it. |
| project_domain | string Default: "not set" If set, only clicks and conversions from this domain will be processed. This is generally only set if somebody has copied your web page, along with your tracking code and is unknowingly sending tracking information to your Project. Do not include the protocol ( |
| use_cogs | boolean Default: false Set to |
| attribution_window | integer >= 1 Default: "forever" Normally, conversions are tracked forever and attributed to the appropriate click for the visitor. In some cases, however, you may want to ignore conversions that happen after a certain number of days because they don’t relate to your current ad campaign. In that case, you would set |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects -d "name=example.com"
{- "id": 29583,
- "errors": [ ],
- "status": "OK",
- "warnings": [ ]
}Get the settings for one or more Projects by ID.
| id required | integer <int32> >= 0 To get the settings for one or more Projects, pass in a single |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/settings?id=29583&id=...
{- "projects": [
- {
- "created": "2025-09-25T18:53:23Z",
- "currency": "AUD",
- "id": 29583,
- "name": "Bigfoot Surfboards",
- "project_domain": "surf.example.com",
- "time_zone": "Australia/Sydney",
- "use_cogs": true
}
], - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Get the UTM values used in clicks to a Project.
| id required | integer <int32> >= 0 The ID of the Project. |
| start_time | string <date-time> The ISO-8601 timestamp |
| end_time | string <date-time> The ISO-8601 timestamp |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/utms?id=29583&start_time=...&end_time=...
{- "utm": {
- "source": [
- "google",
- "facebook"
], - "medium": [
- "cpc"
], - "campaign": [
- "spring-sale",
- "summer-sale"
], - "term": [ ],
- "content": [ ]
}, - "status": "OK"
}Permanently delete a Project and all of its associated clicks, actions, engagements, and sales.
| project_id required | integer <int32> >= 1 Example: 29583 The project id for this request. |
curl -X DELETE -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Edit the settings of a Project.
| project_id required | integer <int32> >= 0 The ID of the project to update. |
| time_zone | string The time zone for the project specified using the named format in the IANA Time Zone Database, such as |
| currency | string 3 characters Default: "The currency setting in User Settings" If you're using the Auto Cost feature to pull in cost data from your Ad Account (Google, Facebook, etc.), and your ad account is sending cost data to ClickMagick in one currency, but all of your sales are being reported to ClickMagick in a different currency, then ClickMagick needs to convert your Auto Cost data from the currency that it's being reported in to the same currency that your sales are being reported in. The The value of You can find a complete of International Bank Account Numbers at IBAN Currency Codes. ClickMagick only supports the most common currencies at this point. If you need a currency that is not currently supported, submit a ticket and we will add it. |
| project_domain | string If set, only clicks and conversions from this domain will be processed. This is generally only set if somebody has copied your web page, along with your tracking code and is unknowingly sending tracking information to your project. Do not include the protocol ( |
| use_cogs | string Set to |
| attribution_window | integer >= 1 Normally, conversions are tracked forever and attributed to the appropriate click for the visitor. In some cases, however, you may want to ignore conversions that happen after a certain number of days because they don’t relate to your current ad campaign. In that case, you would set |
curl -X PATCH -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583 -d "time_zone=Australia/Sydney"
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Create a stats report for a Project using the 'last_click' attribution model.
To use other attribution models, see Create a stats report for a Project using a specific model.
| project_id required | integer <int32> >= 1 Example: 29583 The project id for this request. |
A request to generate a campaign project stats report.
| end_time | string <date-time> The ISO-8601 timestamp Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| start_time | string <date-time> The ISO-8601 timestamp Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Only match results with this utm_campaign value. |
| utm_content | string Only match results with this utm_content value. |
| utm_medium | string Only match results with this utm_medium value. |
| utm_source | string Only match results with this utm_source value. |
| utm_term | string Only match results with this utm_term value. |
| refresh | boolean Default: false Whether to regenerate the report from scratch. Stats reports are cached for a period of time depending upon how long it took to initially compute the report. The longer a report takes to generate, the longer the report will be cached for. Note that if the requested report does not include the most recent 24 hours, then it will stay in the cache much longer. Any date range that includes "today" is constantly changing as clicks come in throughout the day so stats must be continually recomputed. By default, cached reports are always returned to minimize the amount of recomputing required and stats are computed fresh only if they are not in the cache. |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583/stats -d "utm_source=google"
{- "status": "OK"
}Create a stats report for a Project using a specific attribution model.
| project_id required | integer <int32> >= 1 Example: 29583 The project id for this request. |
| attribution_model required | string (AttributionModel) Enum: "first_click" "last_click" "linear" "pos_based" "time_decay" The source data model to use for this report. |
A request to generate a campaign project stats report.
| end_time | string <date-time> The ISO-8601 timestamp Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| start_time | string <date-time> The ISO-8601 timestamp Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Only match results with this utm_campaign value. |
| utm_content | string Only match results with this utm_content value. |
| utm_medium | string Only match results with this utm_medium value. |
| utm_source | string Only match results with this utm_source value. |
| utm_term | string Only match results with this utm_term value. |
| refresh | boolean Default: false Whether to regenerate the report from scratch. Stats reports are cached for a period of time depending upon how long it took to initially compute the report. The longer a report takes to generate, the longer the report will be cached for. Note that if the requested report does not include the most recent 24 hours, then it will stay in the cache much longer. Any date range that includes "today" is constantly changing as clicks come in throughout the day so stats must be continually recomputed. By default, cached reports are always returned to minimize the amount of recomputing required and stats are computed fresh only if they are not in the cache. |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583/stats/linear -d "utm_source=google"
{- "status": "OK"
}Retrieve a stats report once it has been generated.
If the report is still being generated, a 202 status will be
returned with the progress of how much of the report has been generated.
Once the report has been generated, a 200 status will be returned,
along with the data of the report.
| report_id required | integer <int32> >= 1 Example: 3752921 The report id for this request. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/stats/reports/3752921
{- "last_updated": "2025-10-22T18:38:59Z",
- "progress": {
- "completed": true,
- "percentage_completed": 100
}, - "stats": {
- "acr": 69.7,
- "actions": 3374,
- "ad_spend": 6498,
- "aov": 69.91,
- "cpa": 1.93,
- "cpc": 1.34,
- "cpe": 2.67,
- "cps": 6.77,
- "currency_symbol": "£",
- "customers": 243,
- "customers_new": 200,
- "customers_repeat": 43,
- "ecr": 50.2,
- "engagements": 2432,
- "epa": 19.89,
- "epc": 13.86,
- "epe": 27.6,
- "ltv": 69.91,
- "profit": 60612,
- "project_id": 29583,
- "refunds": 111.02,
- "refunds_cogs": 91.02,
- "revenue": 67111.02,
- "revenue_backend": 7383.98,
- "revenue_initial": 9931.75,
- "revenue_recurring": 7483.56,
- "revenue_upsells": 5854.61,
- "roas": 10.33,
- "roas_24h": 2.74,
- "roi": 933,
- "sales": 960,
- "scr": 19.8,
- "unique_clicks": 4843
}, - "status": "OK",
- "total_seconds": 39
}Get a list of the UTM-powered URLs that were built using the URL Builder.
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| cursor | string <string> Pass in the previous page's cursor |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/urls
{- "urls": [
- {
- "notes": null,
}
], - "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": "ODM3MjYyMTE"
}, - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Get actions for all projects using the last_click attribution model.
To use other attribution models, see Get actions for all projects using a specific model.
Results are not returned in any specified order.
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/actions?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "actions": [
- {
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "salespage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 3956114,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get actions for all Projects using a specific attribution model.
Results are not returned in any specified order.
| attribution_model required | string (AttributionModel) Enum: "first_click" "last_click" "linear" "pos_based" "time_decay" The source data model to use for this report. |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/actions/linear?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "actions": [
- {
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "salespage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 3956114,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get actions for a specific Project using the last_click attribution model.
To use other attribution models, see Get actions for a Project using a specific model.
Results are not returned in any specified order.
| project_id required | integer <int32> >= 1 Example: 29583 The project id for this request. |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583/actions?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "actions": [
- {
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "salespage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 3956114,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get actions for a specific Project using a specific attribution model.
Results are not returned in any specified order.
| project_id required | integer <int32> >= 1 Example: 29583 The project id for this request. |
| attribution_model required | string (AttributionModel) Enum: "first_click" "last_click" "linear" "pos_based" "time_decay" The source data model to use for this report. |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583/actions/linear?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "actions": [
- {
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "salespage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 3956114,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get engagements for all Projects using the last_click attribution model.
To use other attribution models, see Get engagements for all Projects using a specific model.
Results are not returned in any specified order.
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/engagements?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "sales": [
- {
- "cmc_amt": 97.52,
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "checkoutpage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 809274,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_campaign": "end+of+season",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get engagements for all Projects using a specific attribution model.
Results are not returned in any specified order.
| attribution_model required | string (AttributionModel) Enum: "first_click" "last_click" "linear" "pos_based" "time_decay" The source data model to use for this report. |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/engagements/linear?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "sales": [
- {
- "cmc_amt": 97.52,
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "checkoutpage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 809274,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_campaign": "end+of+season",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get engagements for a specific Project using the last_click attribution model.
To use other attribution models, see Get engagements for a Project using a specific model.
Results are not returned in any specified order.
| project_id required | integer <int32> >= 1 Example: 29583 The project id for this request. |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583/engagements?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "sales": [
- {
- "cmc_amt": 97.52,
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "checkoutpage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 809274,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_campaign": "end+of+season",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get engagements for a specific Project using a specific attribution model.
Results are not returned in any specified order.
| project_id required | integer <int32> >= 1 Example: 29583 The project id for this request. |
| attribution_model required | string (AttributionModel) Enum: "first_click" "last_click" "linear" "pos_based" "time_decay" The source data model to use for this report. |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583/engagements/linear?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "sales": [
- {
- "cmc_amt": 97.52,
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "checkoutpage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 809274,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_campaign": "end+of+season",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get sales for all Projects using the last_click attribution model.
To use other attribution models, see Get sales for all Projects using a specific model.
Results are not returned in any specified order.
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/sales?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "sales": [
- {
- "cmc_amt": 97.52,
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "salespage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 910176,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "shopify_order_id": "#000-10",
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_campaign": "end+of+season",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get sales for all Projects using a specific attribution model.
Results are not returned in any specified order.
| attribution_model required | string (AttributionModel) Enum: "first_click" "last_click" "linear" "pos_based" "time_decay" The source data model to use for this report. |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/sales/linear?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "sales": [
- {
- "cmc_amt": 97.52,
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "salespage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 910176,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "shopify_order_id": "#000-10",
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_campaign": "end+of+season",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get sales for a specific Project using the last_click attribution model.
To use other attribution models, see Get sales for a Project using a specific model.
Results are not returned in any specified order.
| project_id required | integer <int32> >= 1 Example: 29583 The project id for this request. |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583/sales?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "sales": [
- {
- "cmc_amt": 97.52,
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "salespage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 910176,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "shopify_order_id": "#000-10",
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_campaign": "end+of+season",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Get sales for a specific Project using a specific attribution model.
Results are not returned in any specified order.
| project_id required | integer <int32> >= 1 Example: 29583 The project id for this request. |
| attribution_model required | string (AttributionModel) Enum: "first_click" "last_click" "linear" "pos_based" "time_decay" The source data model to use for this report. |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| end_time | string <date-time> Example: end_time=2025-10-22T18:38:59Z The ISO-8601 timestamp for the ending date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| start_time | string <date-time> Example: start_time=2025-10-21T09:46:11Z The ISO-8601 timestamp for the starting date and time of the time range for the request. Must be used in conjunction with See also ISO-8601 in Wikipedia. |
| utm_campaign | string Example: utm_campaign=end+of+season Only match results with this utm_campaign value. |
| utm_content | string Example: utm_content=best+surfboard Only match results with this utm_content value. |
| utm_medium | string Example: utm_medium=cpc Only match results with this utm_medium value. |
| utm_source | string Example: utm_source=google Only match results with this utm_source value. |
| utm_term | string Example: utm_term=Hang+Ten Only match results with this utm_term value. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/campaigns/projects/29583/sales/linear?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "sales": [
- {
- "cmc_amt": 97.52,
- "cmc_project": "Bigfoot Surfboards",
- "cmc_ref": "salespage",
- "cmc_tid": null,
- "country": "US",
- "device": "desktop",
- "fbclid": null,
- "gclid": null,
- "id": 910176,
- "ip": "192.0.2.1",
- "msclkid": null,
- "project_id": 29583,
- "shopify_order_id": "#000-10",
- "timestamp": "2025-10-22T18:38:59Z",
- "utm_campaign": "end+of+season",
- "utm_content": "best+surfboard",
- "utm_medium": "cpc",
- "utm_source": "google",
- "utm_term": "Hang+Ten",
- "visitor_id": "cmc2516938438"
}
], - "status": "OK"
}Retrieve a list of your Smart Links and IDs.
For more information on Smart Links, please see the knowledgebase.
| cursor | string <string> Pass in the previous page's cursor |
| group_id | integer <int32> If you provide a top-level |
| include_archived | boolean Default: false Include archived links in the results or not. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| recursive | boolean Default: false Return Smart Links for the group specified by |
| subgroup_id | integer <int32> Return only the links in the subgroup specified by the |
| search | string <string> Only include links where their |
| sort_direction | string <string> Default: "newest_first" Enum: "alpha" "newest_first" "oldest_first" Specify how links should be sorted: |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links?limit=1
{- "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": "ODM3MjYyMTE"
}, - "errors": [ ],
- "links": [
- {
- "archived": false,
- "group_id": 18365,
- "id": 1731254,
- "link_name": "Callaway Golf Bags",
- "link_slug": "golfbags",
- "subgroup_id": 10435
}
], - "status": "OK",
- "warnings": [ ]
}Create a new Smart Link.
| backup_url | string <= 255 characters The URL that clicks will be redirected to if they can't be redirected to any other URL in the link settings. For example, if the |
| blank_referrer | string Default: "false" Enum: "true" "false" Blank the referrer when redirecting clicks so that the site you're sending traffic to can't tell where it's coming from. |
| cost | number <float> Default: 0 The cost of your clicks, if known in advance. If set, you must set |
| cost_type | string Enum: "no_cost_type" "one_time_cost" "cost_per_click" "daily" "monthly" The type of cost for this Smart Link, e.g. |
| domain_id | integer <int32> >= 0 Default: 0 If you have any custom tracking domains set up to use with your Smart Links, you can use any of those domains at any time with any of your Smart Links. This |
| exclude_country | string Default: "no countries" If you want to exclude clicks from specific countries from being delivered to this link, use the For each country that you want to exclude clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also exclude Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks that are explicitly excluded will be redirected through the You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. |
| filter_abuser | string Default: "nothing" Enum: "block" "flag" "nothing" An "abuser" is a user who exhibits abnormal and suspicious click patterns, such as clicking the same Smart Link 30 times in one minute or clicking 30 different Smart Links within one minute. Setting this to Setting this to Setting this to |
| filter_anon | string Default: "nothing" Enum: "block" "flag" "nothing" An anonymous user is one who is using an anonymous proxy, Virtual Private Network, TOR, or similiar technologies to mask the IP address where their click is originating from. See |
| filter_bot | string Default: "flag" Enum: "block" "flag" "nothing" A bot is any type of automated program or software that accesses your Smart Links or Rotators. See |
| filter_server | string Default: "flag" Enum: "block" "flag" "nothing" This represents a "click" from a known web server or hosting company. The overwhelming majority of the time these are scripts used by scammers to generate fake clicks. See |
| filter_spider | string Default: "flag" Enum: "block" "flag" "nothing" A "spider" is a piece of code that search engines use to index the web, following links in pages as they find them during the indexing process. These spider "clicks" are generally innocent, but they don't represent real clicks from real users and they mess up your stats. See |
| filter_user | string Default: "flag" Enum: "block" "flag" "nothing" These are the clicks that come from the IPs or IP ranges that you have manually added via your IP Manager page.
See |
| include_country | string Default: "all countries" If you want clicks only from specific countries to be delivered to this link, use the For each country that you want to allow clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also include Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks from countries that are not explicitly included will be redirected through the You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. |
| ios_url | string <= 255 characters If the click is from an iOS device, clicks will be redirected to this URL instead of to the |
| link_group | integer <int32> >= 0 Default: 0 The ID of the group to organize this link under. If you specify |
| link_name | string [ 4 .. 32 ] characters The unique "friendly name" of this link. In the UI, if this is not specified, the |
| link_slug | string [ 4 .. 20 ] characters A unique identifier used as part of the Smart Link, e.g., |
| link_subgroup | integer <int32> >= 0 Default: 0 The ID of the subgroup to organize this link under. If you specify |
| max_clicks | integer <int32> >= 0 If specified, this is the maximum number of clicks to redirect through the Smart Link. All additional clicks will then be redirected through the |
| mobile_url | string <= 255 characters The URL that clicks from mobile devices will be redirected to instead of to the |
| notes | string <= 1024 characters Notes that you would like to keep for this link. |
| password | string <= 20 characters Setting a password will display a generic login page that the user must enter the password to continue. |
| pixels | string <= 2560 characters The |
| primary_url required | string <= 255 characters The primary URL to deliver clicks to. |
| repeat_on_primary_url | string Default: "false" Enum: "true" "false" Redirect visitors to the |
| repeat_url | string <= 255 characters Repeat clicks from the same visitor will be redirected to this URL. |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links -d "primary_url=https://www.example.com/"
{- "errors": [ ],
- "id": 1731254,
- "status": "OK",
- "warnings": [ ]
}Get the settings for one or more Smart Links by ID.
| id required | integer <int32> >= 0 To get the settings of one or more Smart Links, pass in a single |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/settings?id=1731254&id=...
{- "links": [
- {
- "archived": false,
- "backup_url": null,
- "blank_referrers": false,
- "cost": 0.54,
- "cost_type": "cost_per_click",
- "created": "2025-09-25T18:53:23Z",
- "domain_id": 49735,
- "exclude_countries": [
- "NG"
], - "filter_abuser": "nothing",
- "filter_anon": "flag",
- "filter_bot": "flag",
- "filter_server": "flag",
- "filter_spider": "flag",
- "filter_user": "flag",
- "has_split_urls": false,
- "id": 1731254,
- "include_countries": [ ],
- "ios_url": null,
- "last_click": "2025-09-25T19:53:23Z",
- "last_reset": "2025-10-15T14:19:47Z",
- "link_group": 27395,
- "link_name": "Callaway Golf Bags",
- "link_slug": "golfbags",
- "link_subgroup": null,
- "max_clicks": null,
- "mobile_url": null,
- "notes": null,
- "password": null,
- "pixels": null,
- "repeat_primary_url": false,
- "repeat_url": null,
- "split_type": "epc"
}
], - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Permanently delete a Smart Link and all of its associated clicks.
| link_id required | integer <int32> >= 0 The ID of the Link to delete. |
curl -X DELETE -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/1731254
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Edit an existing Smart Link.
| link_id required | integer <int32> >= 0 The ID of the Link to update. |
| primary_url required | string <= 255 characters The primary URL to deliver clicks to. |
| link_slug | string [ 4 .. 20 ] characters A unique identifier used as part of the Smart Link, e.g., |
| link_name | string [ 4 .. 32 ] characters The unique "friendly name" of this link. In the UI, if this is not specified, the |
| domain_id | integer <int32> >= 0 Default: 0 If you have any custom tracking domains set up to use with your Smart Links, you can use any of those domains at any time with any of your Smart Links. This |
| link_group | integer <int32> >= 0 Default: 0 The ID of the group to organize this link under. If you specify |
| link_subgroup | integer <int32> >= 0 Default: 0 The ID of the subgroup to organize this link under. If you specify |
| archived | boolean Default: false Indicates if this link is archived. You can still send traffic to this link, but the link won't show up with other links in the UI unless you're viewing the "Archived Links" view. |
| pixels | string <= 2560 characters The |
| cost | number <float> Default: 0 The cost of your clicks, if known in advance. If set, you must set |
| cost_type | string Enum: "no_cost_type" "one_time_cost" "cost_per_click" "cost_per_action" "cost_per_sale" "daily" "monthly" The type of cost for this Smart Link, e.g. |
| backup_url | string <= 255 characters The URL that clicks will be redirected to if they can't be redirected to any other URL in the link settings. For example, if the |
| mobile_url | string <= 255 characters The URL that clicks from mobile devices will be redirected to instead of to the |
| ios_url | string <= 255 characters If the click is from an iOS device, clicks will be redirected to this URL instead of to the |
| repeat_url | string <= 255 characters Repeat clicks from the same visitor will be redirected to this URL. To unset this value, set it to nothing, e.g., |
| repeat_on_primary_url | boolean Default: false Redirect visitors to the |
| include_country | string Default: "all countries" If you want clicks only from specific countries to be delivered to this link, use the For each country that you want to allow clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also include Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks from countries that are not explicitly included will be redirected through the You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. |
| exclude_country | string Default: "no countries" If you want to exclude clicks from specific countries from being delivered to this link, use the For each country that you want to exclude clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also exclude Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks from countries that explicitly excluded will be redirected through the You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. |
| filter_abuser | string Default: "nothing" Enum: "block" "flag" "nothing" An "abuser" is a user who exhibits abnormal and suspicious click patterns, such as clicking the same Smart Link 30 times in one minute or clicking 30 different Smart Links within one minute. Setting this to Setting this to Setting this to |
| filter_anon | string Default: "nothing" Enum: "block" "flag" "nothing" An anonymous user is one who is using an anonymous proxy, Virtual Private Network, TOR, or similiar technologies to mask the IP address where their click is originating from. See |
| filter_bot | string Default: "flag" Enum: "block" "flag" "nothing" A bot is any type of automated program or software that accesses your Smart Links or Rotators. See |
| filter_server | string Default: "flag" Enum: "block" "flag" "nothing" This represents a "click" from a known web server or hosting company. The overwhelming majority of the time these are scripts used by scammers to generate fake clicks. See |
| filter_spider | string Default: "flag" Enum: "block" "flag" "nothing" A "spider" is a piece of code that search engines use to index the web, following links in pages as they find them during the indexing process. These spider "clicks" are generally innocent, but they don't represent real clicks from real users and they mess up your stats. See |
| filter_user | string Default: "flag" Enum: "block" "flag" "nothing" These are the clicks that come from the IPs or IP ranges that you have manually added via your IP Manager page.
See |
| max_clicks | integer <int32> >= 0 If specified, this is the maximum number of clicks to redirect through the Smart Link. All additional clicks will then be redirected through the |
| blank_referrer | string Default: false Blank the referrer when redirecting clicks so that the site you're sending traffic to can't tell where it's coming from. |
| password | string <= 20 characters Setting a password will display a generic login page that the user must enter the password to continue. To unset this value, set it to nothing, e.g., |
| notes | string <= 1024 characters Notes that you would like to track for this link. To unset this value, set it to nothing, e.g., |
curl -X PATCH -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/12345 -d "link_name=Example Test"
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Get the stats for one or more Smart Links by Smart Link ID.
| id required | Array of integers <int32> Pass in one or more Smart Link IDs. For example: id=12345&id=12346&id=12347 |
| start_time | string <date-time> The ISO-8601 timestamp |
| end_time | string <date-time> The ISO-8601 timestamp |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/stats -d "id=1731254&id=..."
{- "status": "OK"
}Poll for the specified links stats report. If the report is still being generated, a 202 status will be
returned with the progress of how much of the report has been generated.
Once the report has been generated, a 200 status will be returned with the stats.
| report_id required | integer <int32> >= 1 Example: 3752921 The report id for this request. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/stats/reports/3752921
{- "last_updated": "2025-10-22T18:38:59Z",
- "stats": [
- {
- "link_id": 1731254,
- "total_clicks": 1447,
- "unique_clicks": 134,
- "flagged_clicks": 4,
- "cost": 2477.1,
- "cpc": 1.88,
- "revenue": 45453.75,
- "profit": 42976.65,
- "epc": 34.54,
- "roi": 1735
}
], - "total_seconds": 39,
- "progress": {
- "completed": false,
- "percentage_completed": 47
}, - "errors": [
- "string"
], - "status": "OK",
- "warnings": [
- "string"
]
}Rotators allow you to take a single link and distribute incoming clicks across multiple destination URLs.
Get a list of your rotators.
For more information on rotators, please see the knowledgebase.
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| group_id | integer <int32> If you provide a |
| cursor | string Example: cursor=ZBDkPOxCKRi The cursor representing your current place in the results. |
| sort_direction | string <string> Default: "newest_first" Enum: "alpha" "newest_first" "oldest_first" Specify how rotators should be sorted: |
| search | string <string> Only include rotators where their |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators?limit=1
{- "rotators": [
- {
- "id": 128364,
- "rotator_mode": "spillover",
- "rotator_name": "Health-related Traffic",
- "rotator_slug": "healthtraffic"
}
], - "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": "ODM3MjYyMTE"
}, - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Create a new rotator.
For more information on rotators, please see the knowledgebase.
| rotator_slug required | string [ 4 .. 20 ] characters A unique identifier used as part of the Rotator link, e.g., |
| rotator_name | string [ 4 .. 32 ] characters The unique "friendly name" of this Rotator. In the UI, if this is not specified, the |
| domain_id | integer <int32> >= 0 Default: 0 If you have any custom Rotator domains set up to use with your Rotator links, you can use any of those domains at any time with any of your Rotator links. This |
| rotator_group | integer <int32> >= 0 The ID of the group to organize this Rotator under. If not specified, the 'All' group will be used. |
| rotator_mode required | string Enum: "fulfillment" "spillover" "random" "sequential" ClickMagick offers four Rotator modes to deliver clicks to your Rotator URLs in different ways, depending upon what you’re trying to accomplish. For a complete explanation of how these different modes work, see this article: |
| random_repeat_clicks | string Enum: "same_url" "random_url" When repeat clicks come in for the |
| sequential_repeat_clicks | string Enum: "same_url" "next_url" When repeat clicks come in for the |
| spillover_repeat_clicks | string Enum: "backup_url" "last_url" "top_of_rotator" When repeat clicks come in for the |
| spillover_randomize | integer <int32> This setting is only for Spillover Rotators. If set, it is the number of minutes that ClickMagick should wait before randomly shuffling all of the Rotator's URLs. This random shuffling is useful at times because clicks are always delivered starting with the Rotator URL that's in the first position, and then down from there. Shuffling causes the URLs to get different priorities after they have been shuffled. If you don't specify anything for this setting, no shuffling occurs. |
| spillover_randomize_last_url | boolean Default: true If the Rotator is a Spillover Rotator and |
| backup_url required | string Clicks for this Rotator will be sent to the |
| mobile_url | string <= 255 characters The URL that clicks from mobile devices will be redirected to instead of being processed by this Rotator. If you don't want clicks from iOS devices to go to this URL, then specify an |
| ios_url | string <= 255 characters If the click is from an iOS device, clicks will be redirected to this URL instead of to the rotator. Clicks from iOS devices will automatically be redirected to the URL in the |
| pixels | string <= 2560 characters The |
| email_start_subject | string The subject of the notification email when delivery starts for a Rotator URL. For more information on notification emails, please visit the knowledgebase. |
| email_start | string The body of the starting email, in plain text or HTML. |
| email_finish_subject | string The subject of the notification email when all clicks have been delivered. |
| email_finish | string The body of the finish email, in plain text or HTML. |
| email_reply_to | string The Reply-To email address for both the starting and finish email messages. |
| include_country | string Default: "all countries" If you want clicks only from specific countries to be delivered to this Rotator, use the For each country that you want to allow clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also include Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks from countries that are not explicitly included will be redirected through the You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. Note: Clicks to Rotators are included or excluded before they are processed by any geotargetting settings in a particular URL of the Rotator. |
| exclude_country | string Default: "no countries" If you want to exclude clicks from specific countries from being delivered to this Rotator, use the For each country that you want to exclude clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also exclude Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks that are explicitly excluded will be redirected through the You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. |
| filter_abuser | string Default: "nothing" Enum: "block" "flag" "nothing" An "abuser" is a user who exhibits abnormal and suspicious click patterns, such as clicking the same Rotator link 30 times in one minute or clicking 30 different Rotator links within one minute. Setting this to Setting this to Setting this to |
| filter_anon | string Default: "nothing" Enum: "block" "flag" "nothing" An anonymous user is one who is using an anonymous proxy, Virtual Private Network, TOR, or similiar technologies to mask the IP address where their click is originating from. See |
| filter_bot | string Default: "flag" Enum: "block" "flag" "nothing" A bot is any type of automated program or software that accesses your Rotator links or Rotators. See |
| filter_server | string Default: "flag" Enum: "block" "flag" "nothing" This represents a "click" from a known web server or hosting company. The overwhelming majority of the time these are scripts used by scammers to generate fake clicks. See |
| filter_spider | string Default: "flag" Enum: "block" "flag" "nothing" A "spider" is a piece of code that search engines use to index the web, following links in pages as they find them during the indexing process. These spider "clicks" are generally innocent, but they don't represent real clicks from real users and they mess up your stats. See |
| filter_user | string Default: "flag" Enum: "block" "flag" "nothing" These are the clicks that come from the IPs or IP ranges that you have manually added via your IP Manager page.
See |
| blank_referrer | boolean Default: false Blank the referrer when redirecting clicks so that the site you're sending traffic to can't tell where it's coming from. |
| notes | string <= 1024 characters Notes that you would like to keep for this Rotator. |
curl -X POST -H "apikey: YOURAPIKEY" https://api.clickmagick.com/v1/rotators -d "rotator_name=test&backup_url=https://www.example.com/backup"
{- "id": 128364,
- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Get the settings for one or more Rotators by ID.
| id required | integer <int32> >= 0 To get the settings of one or more Rotators, pass in a single |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/settings?id=128364&id=...
{- "rotators": [
- {
- "backup_url": "backup.example.com",
- "blank_referrer": false,
- "created": "2025-09-25T18:53:23Z",
- "domain_id": 0,
- "email_finish": null,
- "email_finish_subject": null,
- "email_reply_to": null,
- "email_start": null,
- "email_start_subject": null,
- "exclude_countries": [
- "NG"
], - "filter_abuser": "nothing",
- "filter_anon": "flag",
- "filter_bot": "flag",
- "filter_server": "flag",
- "filter_spider": "flag",
- "filter_user": "flag",
- "id": 128364,
- "include_countries": [ ],
- "ios_url": null,
- "last_reset": "2025-10-15T14:19:47Z",
- "mobile_url": null,
- "notes": null,
- "pixels": null,
- "random_repeat_clicks": "random_url",
- "rotator_group": 0,
- "rotator_mode": "spillover",
- "rotator_name": "Health-related Traffic",
- "rotator_slug": "healthtraffic",
- "sequential_repeat_clicks": "next_url",
- "spillover_randomize_last_url": false,
- "spillover_randomize": null,
- "spillover_repeat_clicks": "top_of_rotator"
}
], - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Permanently delete a Rotator and all of its associated clicks.
| rotator_id required | integer <int32> >= 0 The ID of the Rotator to delete. |
curl -X DELETE -H "apikey: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/12345
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Update an existing Rotator.
| rotator_id required | integer <int32> >= 0 The ID of the Rotator to update. |
| rotator_slug | string [ 4 .. 20 ] characters A unique identifier used as part of the Rotator link, e.g., |
| rotator_name | string [ 4 .. 32 ] characters The unique "friendly name" of this Rotator. In the UI, if this is not specified, the |
| domain_id | integer <int32> >= 0 Default: 0 If you have any custom Rotator domains set up to use with your Rotator links, you can use any of those domains at any time with any of your Rotator links. This |
| rotator_group | integer <int32> >= 0 The ID of the group to organize this Rotator under. If not specified, the 'All' group will be used. To unset this value,
set it to nothing, e.g., |
| rotator_mode | string Enum: "fulfillment" "spillover" "random" "sequential" ClickMagick offers four Rotator modes to deliver clicks to your Rotator URLs in different ways, depending upon what you’re trying to accomplish. For a complete explanation of how these different modes work, see this article: |
| random_repeat_clicks | string Enum: "same_url" "random_url" When repeat clicks come in for the |
| sequential_repeat_clicks | string Enum: "same_url" "next_url" When repeat clicks come in for the |
| spillover_repeat_clicks | string Enum: "backup_url" "last_url" "top_of_rotator" When repeat clicks come in for the |
| spillover_randomize | integer <int32> This setting is only for Spillover Rotators. If set, it is the number of minutes that ClickMagick should wait before randomly shuffling all of the Rotator's URLs. This random shuffling is useful at times because clicks are always delivered starting with the Rotator URL that's in the first position, and then down from there. Shuffling causes the URLs to get different priorities after they have been shuffled. If you don't specify anything for this setting, no shuffling occurs. To unset this value, set it to nothing, e.g., |
| spillover_randomize_last_url | boolean Default: true If the Rotator is a Spillover Rotator and |
| backup_url | string Clicks for this Rotator will be sent to the |
| mobile_url | string <= 255 characters The URL that clicks from mobile devices will be redirected to instead of being processed by this Rotator. If you don't want clicks from iOS devices to go to this URL, then specify an |
| ios_url | string <= 255 characters If the click is from an iOS device, clicks will be redirected to this URL instead of to the rotator. Clicks from iOS devices will automatically be redirected to the URL in the |
| pixels | string <= 2560 characters The |
| email_start_subject | string The subject of the notification email when delivery starts for a Rotator URL. To unset this value, set it to nothing, e.g., For more information on notification emails, please visit the knowledgebase. |
| email_start | string The body of the starting email, in plain text or HTML. To unset this value, set it to nothing, e.g., |
| email_finish_subject | string The subject of the notification email when all clicks have been delivered. To unset this value, set it to nothing, e.g., |
| email_finish | string The body of the finish email, in plain text or HTML. To unset this value, set it to nothing, e.g., |
| email_reply_to | string The Reply-To email address for both the starting and finish email messages. To unset this value, set it to nothing, e.g., |
| include_country | string Default: "all countries" If you want clicks only from specific countries to be delivered to this Rotator, use the For each country that you want to allow clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also include Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks from countries that are not explicitly included will be redirected through the You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. Note: Clicks to Rotators are included or excluded before they are processed by any geotargetting settings in a particular URL of the Rotator. |
| exclude_country | string Default: "no countries" If you want to exclude clicks from specific countries from being delivered to this Rotator, use the For each country that you want to exclude clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also exclude Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks from countries that explicitly excluded will be redirected through the You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. |
| filter_abuser | string Default: "nothing" Enum: "block" "flag" "nothing" An "abuser" is a user who exhibits abnormal and suspicious click patterns, such as clicking the same Rotator link 30 times in one minute or clicking 30 different Rotator links within one minute. Setting this to Setting this to Setting this to |
| filter_anon | string Default: "nothing" Enum: "block" "flag" "nothing" An anonymous user is one who is using an anonymous proxy, Virtual Private Network, TOR, or similar technologies to mask the IP address where their click is originating from. See |
| filter_bot | string Default: "flag" Enum: "block" "flag" "nothing" A bot is any type of automated program or software that accesses your Rotator links or Rotators. See |
| filter_server | string Default: "flag" Enum: "block" "flag" "nothing" This represents a "click" from a known web server or hosting company. The overwhelming majority of the time these are scripts used by scammers to generate fake clicks. See |
| filter_spider | string Default: "flag" Enum: "block" "flag" "nothing" A "spider" is a piece of code that search engines use to index the web, following links in pages as they find them during the indexing process. These spider "clicks" are generally innocent, but they don't represent real clicks from real users and they mess up your stats. See |
| filter_user | string Default: "flag" Enum: "block" "flag" "nothing" These are the clicks that come from the IPs or IP ranges that you have manually added via your IP Manager page.
See |
| blank_referrer | boolean Default: false Blank the referrer when redirecting clicks so that the site you're sending traffic to can't tell where it's coming from. |
| notes | string <= 1024 characters Notes that you would like to keep for this Rotator. |
curl -X PATCH -H "apikey: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/12345 -d "rotator_name=test2"
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Get the stats for one or more Rotators by Rotator ID.
| id required | Array of integers <int32> Pass in one or more Rotator IDs. |
| start_time | string <date-time> The ISO-8601 timestamp |
| end_time | string <date-time> The ISO-8601 timestamp |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/stats -d "id=128364&id=..."
{- "status": "OK"
}Poll for the specified Rotators stats report. If the report is still being generated, a 202 status will be
returned with the progress of how much of the report has been generated.
Once the report has been generated, a 200 status will be returned with the stats.
| report_id required | integer <int32> >= 1 Example: 3752921 The report id for this request. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/stats/reports/3752921
{- "last_updated": "2025-10-22T18:38:59Z",
- "stats": [
- {
- "rotator_id": 128364,
- "active_urls": 10,
- "paused_urls": 4,
- "archived_urls": 0,
- "total_clicks": 507,
- "unique_clicks": 134,
- "flagged_clicks": 5
}
], - "total_seconds": 39,
- "progress": {
- "completed": false,
- "percentage_completed": 47
}, - "errors": [
- "string"
], - "status": "OK",
- "warnings": [
- "string"
]
}Every Rotator has a list of Rotator URLs that it distributes clicks to. Use these endpoints to manage the URLs for a specific Rotator.
Get the list of Rotator URLs and IDs for a specific Rotator.
| rotator_id required | integer <int32> >= 0 The ID of the parent Rotator of these Rotator URLs. |
| status | string Enum: "all_urls" "active_urls" "paused_urls" "archived_urls" "all_but_archived" Restrict the URLs with the specified status. |
| limit | integer <int32> [ 1 .. 100 ] Default: 100 Example: limit=10 Maximum number of items to fetch for this page. |
| cursor | string <string> Pass in the previous page's cursor |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/128364/urls?limit=1
{- "rotator_urls": [
- {
- "id": 358792,
- "name": "Terry Jones 500C",
- "status": "active"
}
], - "cursor": {
- "next": "ZBDkPOxCKRi",
- "prev": null
}, - "errors": [ ],
- "status": "OK",
- "warnings": [ ]
}Create a new Rotator URL.
| rotator_id required | integer <int32> >= 0 The ID of the Rotator to create a URL for. |
| name required | string The name of this Rotator URL. |
| status | string Default: "active" Enum: "active" "paused" "archived" Set the initial state that the Rotator URL should be in. In almost all cases, you'll want to set this to |
| url required | string The URL to deliver clicks to. |
| position | integer <int32> >= 1 The position in the Rotator. If the position is not specified, it will be added to the last position in the Rotator. |
| weight | integer <int32> [ 1 .. 10 ] Default: 1 When using a Sequential Rotator, this allows you to specify at what speed the URL should get traffic. For example, a weight of 2 means that this URL will get twice the traffic during the same period of time as compared to URLs that have the default weight of 1. If you set this to 3, traffic will be delivered 3 times faster. |
| max_clicks | integer <int32> >= 1 Default: null The maximum number of unique clicks to send to this Rotator. If not specified, it defaults to "unlimited". |
| max_clicks_daily | integer <int32> >= 0 The maximum number of unique clicks to send to this Rotator per day. If not specified, it defaults to "unlimited". |
| bonus | integer <int32> [ 0 .. 100 ] Default: 0 The percentage of max_clicks to over-deliver. |
| min_t1 | integer <int32> [ 0 .. 100 ] Default: 0 The minimum amount of Tier 1 Traffic that's allowed for this URL on a percentage basis. If you set |
| max_t1 | integer <int32> [ 0 .. 100 ] Default: 100 The maximum amount of Tier 1 Traffic that's allowed for this URL on a percentage basis. If you set |
| min_mobile | integer <int32> [ 0 .. 100 ] Default: 0 The minimum amount of mobile traffic this URL will receive on a percentage basis. If you set |
| max_mobile | integer <int32> [ 0 .. 100 ] Default: 0 The maximum amount of mobile traffic this URL will receive on a percentage basis. If you set |
| pixels | string The |
| start_time | string <datetime> The ISO-8601 date-time (YYYY-MM-DDThh:mm:ssZ) to start sending traffic to this Rotator URL. |
| end_time | string <datetime> The ISO-8601 date-time (YYYY-MM-DDThh:mm:ssZ) to stop sending traffic to this Rotator URL. |
| include_country | string Default: "all countries" If you want clicks only from specific countries to be delivered to this Rotator URL, use the For each country that you want to allow clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also include Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks from countries that are not explicitly included will be redirected through the parent Rotator's You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. NOTE: The geotargetting settings of the parent Rotator are processed first. That means that if you include a country in this Rotator URL, but the Rotator itself excludes that country, this URL will never get those clicks. |
| exclude_country | string Default: "no countries" If you want to exclude clicks from specific countries from being delivered to this Rotator URL, use the For each country that you want to exclude clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also exclude Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks that are explicitly excluded will be redirected through the parent Rotator's You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. NOTE: The geotargetting settings of the parent Rotator are processed first. That means that more countries may be excluded from this Rotator URL than you have explicitly specified here. |
string The email address to use when sending start and finish notification messages. | |
| send_start_email | string Enum: "on_add" "on_first_click" If the parent Rotator has a "start" email set up, should that email be sent as soon as this URL is added to the system or should the email wait until the first click has been delivered to the URL? |
| send_finish_email | boolean Default: true If the parent Rotator has a "finish" email set up, send that email when all clicks to this URL have been delivered. |
| notes | string Notes that you would like to track for this link. |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/128364/urls -d "name=Terry Jones 500C&url=..."
{- "errors": [ ],
- "id": 358792,
- "status": "OK",
- "warnings": [ ]
}Get the settings for one or more Rotator URLs by ID.
| id required | integer <int32> >= 0 To get the settings of one or more Rotator URLs, pass in a single |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/urls/settings?id=358792&id=...
{- "rotator_urls": [
- {
- "id": 358792,
- "rotator_id": 128364,
- "name": "Terry Jones 500C",
- "status": "active",
- "position": 1,
- "weight": 1,
- "max_clicks": 500,
- "max_clicks_daily": 25,
- "bonus": 0,
- "min_t1": 60,
- "max_t1": null,
- "min_mobile": null,
- "max_mobile": null,
- "pixels": null,
- "start_time": null,
- "end_time": null,
- "include_countries": [ ],
- "exclude_countries": [
- "NG"
], - "email": "terry@example.com",
- "send_start_email": "on_first_click",
- "send_finish_email": true,
- "notes": null,
- "last_reset": "2025-10-15T14:19:47Z",
- "created": "2025-09-25T18:53:23Z"
}
], - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Permanently delete a Rotator URL and all of its associated clicks.
| rotator_id required | integer <int32> >= 0 The ID of the parent Rotator of these Rotator URLs. |
| url_id required | integer <int32> >= 0 The ID of the Rotator URL to delete. |
curl -X DELETE -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/128364/urls/358792
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Update a Rotator URL.
| rotator_id required | integer <int32> >= 0 The ID of the parent Rotator of these Rotator URLs. |
| url_id required | integer <int32> >= 0 The ID of the URL to edit. |
| name | string The name of this Rotator URL. |
| status | string Default: "active" Enum: "active" "paused" "archived" Set the initial state that the Rotator URL should be in. In almost all cases, you'll want to set this to |
| url | string The URL to deliver clicks to. |
| position | integer <int32> >= 1 The position in the Rotator. To move the URL to the last position, set it to nothing, e.g., |
| weight | integer <int32> [ 1 .. 10 ] Default: 1 When using a Sequential Rotator, this allows you to specify at what speed the URL should get traffic. For example, a weight of 2 means that this URL will get twice the traffic during the same period of time as compared to URLs that have the default weight of 1. If you set this to 3, traffic will be delivered 3 times faster. |
| max_clicks | integer <int32> >= 1 Default: null The maximum number of unique clicks to send to this Rotator. If not specified, it defaults to "unlimited". To reset |
| max_clicks_daily | integer <int32> >= 0 Default: 0 The maximum number of unique clicks to send to this Rotator per day. If not specified, it defaults to "unlimited". To reset |
| bonus | integer <int32> [ 0 .. 100 ] Default: 0 The percentage of max_clicks to over-deliver. |
| min_t1 | integer <int32> [ 0 .. 100 ] Default: 0 The minimum amount of Tier 1 Traffic that's allowed for this URL on a percentage basis. To reset |
| max_t1 | integer <int32> [ 0 .. 100 ] Default: 100 The maximum amount of Tier 1 Traffic that's allowed for this URL on a percentage basis. To reset |
| min_mobile | integer <int32> [ 0 .. 100 ] Default: 0 The minimum amount of mobile traffic this URL will receive on a percentage basis. To reset |
| max_mobile | integer <int32> [ 0 .. 100 ] Default: 0 The maximum amount of mobile traffic this URL will receive on a percentage basis. To reset |
| pixels | string The |
| start_time | string <datetime> The ISO-8601 date-time (YYYY-MM-DDThh:mm:ssZ) to start sending traffic to this Rotator URL. To clear |
| end_time | string <datetime> The ISO-8601 date-time (YYYY-MM-DDThh:mm:ssZ) to stop sending traffic to this Rotator URL. To clear |
| include_country | string Default: "all countries" If you want clicks only from specific countries to be delivered to this Rotator URL, use the For each country that you want to allow clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also include Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks from countries that are not explicitly included will be redirected through the parent Rotator's You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. NOTE: The geotargetting settings of the parent Rotator are processed first. That means that if you include a country in this Rotator URL, but the Rotator itself excludes that country, this URL will never get those clicks. To clear |
| exclude_country | string Default: "no countries" If you want to exclude clicks from specific countries from being delivered to this Rotator URL, use the For each country that you want to exclude clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also exclude Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks that are explicitly excluded will be redirected through the parent Rotator's You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. NOTE: The geotargetting settings of the parent Rotator are processed first. That means that more countries may be excluded from this Rotator URL than you have explicitly specified here.
To clear |
string The email address to use when sending start and finish notification messages. To clear | |
| send_start_email | string Enum: "on_add" "on_first_click" If the parent Rotator has a "start" email set up, should that email be sent as soon as this URL is added to the system or should the email wait until the first click has been delivered to the URL? |
| send_finish_email | boolean Default: true If the parent Rotator has a "finish" email set up, send that email when all clicks to this URL have been delivered. |
| notes | string Notes that you would like to track for this link. To clear |
curl -X PATCH -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/128364/urls/358792 -d "url=https://www.example.com/offer"
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Get the stats for one or more Rotator URLs by Rotator URL ID.
| id required | Array of integers <int32> Pass in one or more Rotator URL IDs. |
| rotator_id required | integer <int32> The ID of the Rotator that the URL IDs belong to. |
| start_time | string <date-time> The ISO-8601 timestamp |
| end_time | string <date-time> The ISO-8601 timestamp |
| time_zone | string To accurately determine the number of clicks received for |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/urls/stats -d "id=358792&id=..."
{- "status": "OK"
}Poll for the specified Rotator URLs stats report. If the report is still being generated, a 202 status will be
returned with the progress of how much of the report has been generated.
Once the report has been generated, a 200 status will be returned with the stats.
| report_id required | integer <int32> >= 1 Example: 3752921 The report id for this request. |
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/urls/stats/reports/3752921
{- "last_updated": "2025-10-22T18:38:59Z",
- "stats": [
- {
- "url_id": 358792,
- "rotator_id": 128364,
- "total_clicks": 193,
- "unique_clicks": {
- "delivered": 186,
- "max_clicks": 200,
- "bonus_clicks": 10
}, - "flagged_clicks": 5,
- "clicks_today": {
- "delivered": 10,
- "max_daily": 15
}, - "status": "paused",
- "status_paused_reason": "user_paused"
}
], - "total_seconds": 39,
- "progress": {
- "completed": false,
- "percentage_completed": 47
}, - "errors": [
- "string"
], - "status": "OK",
- "warnings": [
- "string"
]
}Return the settings for all custom domains that have been set up for Smart Links and Rotators.
For more information on Domains, please see the knowledgebase.
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/domains
{- "domains": [
- {
- "id": 49735,
- "domain": "example.com",
- "type": "link",
- "setup": "cname",
- "error_url": null
}
], - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Create a custom domain for use by Smart Links or Rotators. The custom domain does not have to be a root domain. It can have subdomains, e.g., track.example.com.
For more information on Domains, please see the knowledgebase.
| domain required | string <= 255 characters The domain name to use as a custom domain. |
| type required | string Enum: "link" "rotator" The type of tracking to use this custom domain for. |
| error_url | string <= 255 characters The URL to redirect visitors to if an error occurs with your custom domain when using it. This is most commonly caused by using a non-existent or misspelled link slug or Rotator slug with the domain. For example, you meant to send clicks to It's perfectly okay to set the |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://dev-api.clickmagick.com/v1/domains -d "domain=example.com&type=link"
{- "id": 49735,
- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Permanently delete a custom domain. Any URLs that use the deleted domain will obviously no longer work. The Smart Links or Rotators can still be used if you use the generic ClickMagick domains instead: clkmg.com for Smart Links, or clkmr.com for Rotators.
For more information on Domains, please see the knowledgebase.
| domain_id required | integer <int32> >= 0 The ID of the domain to permanently delete. |
curl -X DELETE -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/domains/49735
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Use Groups and Subgroups to organize your Smart Links and Rotators.
Note that if you delete a Group or Subgroup, all links in the group will be moved to the "All" group.
Return a list of available Link & Rotator Groups.
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/groups
{- "groups": [
- {
- "id": 27395,
- "name": "Gardening",
- "subgroups": [
- {
- "id": 14273,
- "name": "Composters"
}
]
}
], - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Create a new Smart Link Group that can be used for organizing your Links.
| name required | string The name of the Link Group to create. |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/groups -d "name=Gardening"
{- "id": 27395,
- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Rename an existing Smart Link group or subgroup.
| name required | string The new name of the group or subgroup. |
| group_id required | integer <int32> >= 0 The ID of the top-level Group. |
| subgroup_id | integer <int32> >= 0 If you're renaming a subgroup, pass both the |
curl -X PATCH -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/groups?group_id=27395&name=Gardening
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Delete an existing Smart Link group or subgroup. If you delete a top-level group, all subgroups will be deleted as well. All affected Links will be assigned to the default "All" Group.
| group_id required | integer <int32> >= 0 The ID of the top-level Smart Link group. |
| subgroup_id | integer <int32> >= 0 If you're deleting a subgroup, pass in the additional |
curl -X DELETE -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/groups?group_id=27395&subgroup_id=14273
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Create a new Smart Link subgroup.
| group_id required | integer <int32> >= 0 The Group ID that this new subgroup should be added to. |
| name required | string The name of the subgroup to create. |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/links/groups/27395/subgroups -d "name=Composters"
{- "id": 14273,
- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Return a list of Rotator Groups. Unlike Smart Link Groups, Rotator Groups do not have Subgroups.
curl -X GET -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/groups
{- "groups": [
- {
- "id": 27395,
- "name": "Weightloss"
}
], - "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Create a new Rotator Group.
| name required | string The name of the Rotator Group to create. |
curl -X POST -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/groups -d "name=Weightloss"
{- "id": 27395,
- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Rename an existing Rotator group.
| name required | string The new name of the group. |
| group_id required | integer <int32> >= 0 The ID of the Rotator roup. |
curl -X PATCH -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/groups?group_id=27395&name=Weightloss
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}Delete an existing Rotator group. All affected Links will be assigned to the default "All" Group.
| group_id required | integer <int32> >= 0 The ID of the rotator group. |
curl -X DELETE -H "X-APIKEY: YOURAPIKEY" https://api.clickmagick.com/v1/rotators/groups?group_id=27395
{- "status": "OK",
- "errors": [ ],
- "warnings": [ ]
}User settings allow you to modify the global default values for your Projects, Smart Links, and Rotators.
{- "errors": [ ],
- "settings": {
- "affiliate_username": null,
- "blocked_countries": [
- "NG"
], - "copy_to_clipboard": true,
- "currency": "USD",
- "custom_logo_image_url": null,
- "custom_logo_link_url": null,
- "date_range": "today",
- "filter_abuser": "block",
- "filter_anon": "nothing",
- "filter_bot": "flag",
- "filter_server": "flag",
- "filter_spider": "flag",
- "filter_user": "flag",
- "invalid_click_threshold": 10,
- "notify_conversions": true,
- "notify_split": true,
- "public_logo_type": "clickmagick_logo",
- "show_subgroup_links": true,
- "tablet": "desktop",
- "time_zone": "Australia/Sydney"
}, - "status": "OK",
- "warnings": [ ]
}Allows you to update your account settings.
| affiliate_username | string Is this user also an affiliate marketer for ClickMagick? This is their username if so. |
| blocked_country | string Default: "no countries" If you want to blocks clicks from specific countries from ever being delivered to any Smart Link or Rotator, use the For each country that you want to block clicks from, set this parameter to its standard two two-letter country abbreviation, such as
You can also block Tier 1, Tier 2, and Tier 3 countries with a single setting: If you use this parameter, all clicks that are explcitly excluded will be redirected through the You can find a full list of two-letter country codes in the International Banking (IBAN) Country Code List. |
| blocked_countries_url | string If set, blocked country clicks are redirected to this URL. |
| clickbank_secret_key | string Default: null If you want your account to receive and process ClickBank Instant Notifications, you need to set your ClickBank secret key here. |
| copy_to_clipboard | boolean When saving or creating a Smart Link or Rotator link, should the Smart Link or Rotator link be automatically copied to the clipboard? If |
| currency | string 3 characters Default: "USD" If you're using the Auto Cost feature to pull in cost data from your Ad Account (Google, Facebook, etc.), and your ad account is sending cost data to ClickMagick in one currency, but all of your sales are being reported to ClickMagick in a different currency, then ClickMagick needs to convert your Auto Cost data from the currency that it's being reported in to the same currency that your sales are being reported in. The The value of You can find a complete of International Bank Account Numbers at IBAN Currency Codes. ClickMagick only supports the most common currencies at this point. If you need a currency that is not currently supported, submit a ticket and we will add it. |
| custom_logo_image_url | string Default: null The URL to the custom logo if the |
| custom_logo_link_url | string Default: null If the custom logo is clicked on, the browser will be redirected to this URL. |
| date_range | string Enum: "today" "last_7_days" "last_30_days" "this_month" "this_year" "all_time" This is the default date range whenever you first log in to ClickMagick. |
| error_url | string The URL to redirect visitors to if an incoming click can't be delivered. This is most commonly caused by using a non-existent or misspelled link slug or Rotator slug in your link. For example, you meant to send clicks to It's perfectly okay to set the |
| filter_abuser | string Default: "nothing" Enum: "block" "flag" "nothing" An "abuser" is a user who exhibits abnormal and suspicious click patterns, such as clicking the same Smart Link 30 times in one minute or clicking 30 different Smart Links within one minute. Setting this to Setting this to Setting this to |
| filter_anon | string Default: "nothing" Enum: "block" "flag" "nothing" An anonymous user is one who is using an anonymous proxy, Virtual Private Network, TOR, or similiar technologies to mask the IP address where their click is originating from. See |
| filter_apply | boolean Default: false If set to |
| filter_bot | string Default: "flag" Enum: "block" "flag" "nothing" A bot is any type of automated program or software that accesses your Smart Links or Rotators. See |
| filter_server | string Default: "flag" Enum: "block" "flag" "nothing" This represents a "click" from a known web server or hosting company. The overwhelming majority of the time these are scripts used by scammers to generate fake clicks. See |
| filter_spider | string Default: "flag" Enum: "block" "flag" "nothing" A "spider" is a piece of code that search engines use to index the web, following links in pages as they find them during the indexing process. These spider "clicks" are generally innocent, but they don't represent real clicks from real users and they mess up your stats. See |
| filter_user | string Default: "flag" Enum: "block" "flag" "nothing" These are the clicks that come from the IPs or IP ranges that you have manually added via your IP Manager page.
See |
| invalid_click_threshold | integer Default: 10 ClickMagick will send an email if it detects this setting's number of non-existent Smart Link or Rotator link requests to your account within a short period of time. This can be caused by normal web activity, but can also be caused if you delete a Smart Link or Rotator link from your account and you have a web page that is still sending traffic to the deleted link. |
| public_logo_type | string Default: "clickmagick_logo" Enum: "clickmagick_logo" "custom_logo" "no_logo" |
| notify_conversions | boolean Default: false Receive a notification by email each time you make a sale. |
| notify_split | boolean Default: false Receive a notification by email when you have a statistically valid Split Test winner. |
| show_subgroup_links | boolean If |
| tablet | string Default: "desktop" Enum: "desktop" "mobile" Treat traffic from tablet devices as either |
| time_zone | string The default time zone that ClickMagick uses for the account, specified using the named format in the IANA Time Zone Database, such as |
{- "errors": [ ],
- "status": "OK",
- "warnings": [ ]
}