Mirror

The mirror update API currently consists of a single endpoint, which is described below.

campaign/{campaign}/mirror, where {campaign} is a placeholder representing the campaign ID.

Request example:

curl -X POST 'https://api.croplink.net/public/v1/mirror/campaign/1/mirror' \
--header 'Authorization: Bearer [yourAuthKey]' \
--header 'Content-Type: application/json' \
--data '{
  "mirror_endpoint": "https://your-mirror.com"
}'
Example response
{
   "mirror": {
        "id": 1,
        "campaign_id": 1,
        "target_url": "https://your-mirror.com",
        "clicks": 0,
        "updated_externally": true,
        "updated_externally_at": "2025-01-27T17:39:41.000000Z",
        "created_at": "2025-01-27T17:39:35.000000Z",
        "updated_at": "2025-01-27T17:39:41.000000Z"
    }
}

Request Body Descriptions

Body parameter
Description

mirror_endpoint (required)

Mirror to be setted.

Error Responses

Make sure to check common errors before.

HTTP code
Response body
Description

404

The campaign with the specified ID in the URL: campaign/{campaign}/mirror could not be found.

403

One potential reason: - Before updating the mirror, ensure that it's created in the settings. - The mirror cannot be updated for the default campaign. - You must be the owner of the campaign to proceed.

422

Validation error.

Last updated