---
updatedAt: 2026-05-07T02:00:54.000Z
agentTools:
  projectIndex: https://docs.aurorasendcloud.com/llms.txt
---

# Update Tracking Domain

Update configuration of an existing tracking domain, including track name and SSL certificate information. Renaming is rejected when CNAME has already passed (41020); a new name must not equal an existing sending domain (41203) and must be unique per account (41202). Switching to auto certificate creates a Cloudflare hostname (41217 on failure); switching to manual deletes it. Renaming an auto-certificate domain recreates the Cloudflare hostname.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Email"
  },
  "servers": [
    {
      "url": "https://api.aurorasendcloud.com/",
      "description": "Singapore Region\n- Base URL: https://api.aurorasendcloud.com/\n"
    },
    {
      "url": "https://api-us.aurorasendcloud.com/",
      "description": "US (Silicon Valley) Region\n- Base URL: https://api-us.aurorasendcloud.com/\n"
    },
    {
      "url": "https://api-hk.aurorasendcloud.com/",
      "description": "CN (Hong Kong SAR) Region\n- Base URL: https://api-hk.aurorasendcloud.com/\n"
    }
  ],
  "tags": [
    {
      "name": "Tracking Domain",
      "description": "Interfaces for managing email tracking domains"
    }
  ],
  "paths": {
    "/api/trackDomain/update": {
      "post": {
        "summary": "Update Tracking Domain",
        "description": "Update configuration of an existing tracking domain, including track name and SSL certificate information. Renaming is rejected when CNAME has already passed (41020); a new name must not equal an existing sending domain (41203) and must be unique per account (41202). Switching to auto certificate creates a Cloudflare hostname (41217 on failure); switching to manual deletes it. Renaming an auto-certificate domain recreates the Cloudflare hostname.",
        "operationId": "update-tracking-domain",
        "tags": [
          "Tracking Domain"
        ],
        "security": [
          {
            "apiUser": [],
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Track ID (single). Required (40029 if empty); must resolve to a tracking domain of the caller (41018 otherwise).",
                    "example": 68554
                  },
                  "name": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 255,
                    "pattern": "^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,46}[a-zA-Z0-9]{0,1}\\.)+([a-zA-Z0-9]+)$",
                    "description": "New track name (optional; omit to keep current name). Same constraints as add: 4-255 characters total, each dot-separated label no more than 48 characters. Rejected when CNAME already passed (41020), when it equals a sending domain (41203), or when it already exists (41202).",
                    "example": "test.com"
                  },
                  "autoCertificate": {
                    "type": "boolean",
                    "description": "Optional. If omitted: keep current certificate mode. true: switch to automatic certificate. false: switch to manual certificate. If true, certContent and certKey may be omitted or empty. Note: a non-boolean string (e.g. `yes`) fails binding to null and is silently treated as \"keep current mode\" rather than rejected — always send literal `true`/`false`.",
                    "example": false
                  },
                  "certContent": {
                    "type": "string",
                    "format": "byte",
                    "maxLength": 65530,
                    "description": "Certificate content (PEM format). Consumed only when the target mode is manual: must be a standard PEM envelope (41205/41204 otherwise, 41206 over 65530 chars) and match the track domain (41214/41215).",
                    "example": ""
                  },
                  "certKey": {
                    "type": "string",
                    "format": "byte",
                    "maxLength": 8192,
                    "description": "Certificate private key (PEM format). Consumed only when the target mode is manual: standard PEM envelope required (41208/41207, 41209 over 8192 chars), must pair with certContent (41212).",
                    "example": ""
                  }
                },
                "required": [
                  "id"
                ]
              },
              "examples": {
                "New Example": {
                  "summary": "New Example",
                  "value": "{\n  \"id\": 213546\n\t\"certContent\":\"----BEGIN CERTIFICATE----- MIIGFTCCBP2gAwIBAgIQBeOnvnb05OX5qsRFcIwQgDANBgkqhkiG9w0BAQsFADBu MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 d3cuZGlnaWNlcnQuY29tMS0wKwYDVQQDEyRFbmNyeXB0aW9uIEV2ZXJ5d2hlcmUg RFYgVExTIENBIC0gRzIwHhcNMjUxMDI3MDAwMDAwWhcNMjYwMTI0MjM1OTU5WjAd MRswGQYDVQQDExJ0cmFjay5ndW96dGVzdC50b3AwggEiMA0GCSqGSIb3DQEBAQUA A4IBDwAwggEKAoIBAQDC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QRxGykEuyn iRyiAi4AvKtPKAfUHjUnq+r+1QPJfc3wAAABmiTl3zwAAAQDAEcwRQIgVCrN8Fob 4xA3cbXEwgtblO9jElA9iM1GU8D7VYe+ticCIQD8fP6xwJTVa1TBFtGQYuDyEPPH fTIv0OjDAy+tqf4M3AB2AEmcm2neHXzs/DbezYdkprhbrwqHgBnRVVL76esp3fjD AAABmiTl30sAAAQDAEcwRQIgLn6oxyuP7u33g6LkIcLmafasD87Fpf6LRboBTzyz jwECIQC/VaTCXh2sFz15gYxzULR4aVoJvlGo2OT5xqlywxKcljANBgkqhkiG9w0B AQsFAAOCAQEAcEWzA2vDk9ThR/qA06KwAPyWeo5swVRT8eXWyzoDvvGD5DDktlK6 vamiIGdE6v4sdBRQ3yTEJcdKH/s5YvAiq/giCPTmbzptdCTITXpvbWvp6T1xSqq0 cHf/q/oc/R8pjj8Xh5d8GXunFKx0iePf1HG1F6Y+7R7qPImwbk515rOU0YMjEU3/ hL9T32qjeDYobDjCVtuSjZ2N1crazci+sGhRqeyTbX0JqE9iK4ckai8V4kct0eIF Fjlhddd2qSCb/E36nX5KR9jKR/W+reeKP6Gvai6cm15V7CD1kOya5/JpmmZ5OqSg eO84z08Ve7y5Bf8r5pt1g3EaLBv6XISVmQ== -----END CERTIFICATE-----\"\n}"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "Request successful"
                    },
                    "result": {
                      "type": "boolean",
                      "example": true
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Track ID",
                              "example": 999224
                            },
                            "name": {
                              "type": "string",
                              "description": "Track name",
                              "example": "track.test.com"
                            },
                            "cname": {
                              "type": "boolean",
                              "description": "CNAME configuration status (true: passed, false: failed)",
                              "example": false
                            },
                            "gmtCreated": {
                              "type": "string",
                              "description": "Time of track creation",
                              "example": "2014-11-01 22:41:52"
                            },
                            "gmtUpdated": {
                              "type": "string",
                              "description": "Time of track modification",
                              "example": "2015-09-25 10:56:06"
                            },
                            "cname.domain": {
                              "type": "string",
                              "description": "Track host records",
                              "example": "track2"
                            },
                            "cname.value": {
                              "type": "string",
                              "description": "Record value to configure for track",
                              "example": "track2.sendcloud.net"
                            },
                            "https": {
                              "type": "boolean",
                              "description": "HTTPS configuration status (true: configured, false: not configured)",
                              "example": false
                            },
                            "certiValidityStart": {
                              "type": "string",
                              "description": "Start time of the SSL certificate validity period (format: yyyy-MM-dd HH:mm:ss)",
                              "example": ""
                            },
                            "certiValidityEnd": {
                              "type": "string",
                              "description": "End time of the SSL certificate validity period (format: yyyy-MM-dd HH:mm:ss)",
                              "example": ""
                            },
                            "autoCertificate": {
                              "type": "boolean",
                              "description": "Whether automatic certificate mode is enabled",
                              "example": false
                            },
                            "txt": {
                              "type": "boolean",
                              "description": "(This field is abandoned and no configuration is needed.)TXT record configuration status",
                              "example": false
                            },
                            "status": {
                              "type": "string",
                              "description": "Tracking domain verification/certificate status",
                              "enum": [
                                "Verified",
                                "Verifying",
                                "Unverified",
                                "Certificate not uploaded",
                                "Certificate expired"
                              ],
                              "example": "Verifying"
                            },
                            "txt.host": {
                              "type": "string",
                              "description": "(This field is abandoned and no configuration is needed.)TXT host record,Use semicolons to separate multiple values, map one-to-one to txt.value.",
                              "example": "xxxxxx"
                            },
                            "txt.value": {
                              "type": "string",
                              "description": "(This field is abandoned and no configuration is needed.)TXT record value,Use semicolons to separate multiple values.map one-to-one to txt.host.",
                              "example": "xxxxxx"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Business error. Note: server returns HTTP 200 with the business code in `statusCode`; the HTTP status here is a documentation placeholder. See error code table below for 40029/41001/41002/41003/41018/41020/41202/41203/41204-41218.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "description": "Business error code"
                    },
                    "message": {
                      "type": "string"
                    },
                    "result": {
                      "type": "boolean",
                      "example": false
                    }
                  }
                },
                "examples": {
                  "40029": {
                    "summary": "GLOBAL_ID_NOTEMPTY — id empty or not provided",
                    "value": {
                      "statusCode": 40029,
                      "message": "The ID cannot be empty",
                      "result": false
                    }
                  },
                  "41001": {
                    "summary": "DOMAIN_NAME_NOTEMPTY — name empty",
                    "value": {
                      "statusCode": 41001,
                      "message": "name cannot be an empty string",
                      "result": false
                    }
                  },
                  "41002": {
                    "summary": "DOMAIN_NAME_LENGTH_EXCEEDED — name not within 4-255 characters",
                    "value": {
                      "statusCode": 41002,
                      "message": "name should be 4-255 characters long",
                      "result": false
                    }
                  },
                  "41003": {
                    "summary": "DOMAIN_NAME_FORMAT_ERROR — name does not match the domain name rules (e.g. a label longer than 48 characters)",
                    "value": {
                      "statusCode": 41003,
                      "message": "name does not match the domain name rules",
                      "result": false
                    }
                  },
                  "41018": {
                    "summary": "TRACK_DOMAIN_NON_EXISTS — id does not resolve to a tracking domain of the caller",
                    "value": {
                      "statusCode": 41018,
                      "message": "track domain non-exists",
                      "result": false
                    }
                  },
                  "41020": {
                    "summary": "TRACK_DOMAIN_NOT_MODIFY — CNAME already passed; rename not allowed",
                    "value": {
                      "statusCode": 41020,
                      "message": "CNAME passed.No Modification is allowed",
                      "result": false
                    }
                  },
                  "41202": {
                    "summary": "TRACKDOMAIN_BUYS — new name already exists",
                    "value": {
                      "statusCode": 41202,
                      "message": "Tracking domain name already exists and cannot be added",
                      "result": false
                    }
                  },
                  "41203": {
                    "summary": "TRACKDOMAIN_NOT_SENDINGDOMAIN — new name equals a sending domain",
                    "value": {
                      "statusCode": 41203,
                      "message": "Tracking domain cannot be the same as sending domain",
                      "result": false
                    }
                  },
                  "41217": {
                    "summary": "TRACKDOMAIN_RECREATE_CLOUDFLARE_HOSTNAME_FAILED — Cloudflare hostname create/delete failed during mode switch or rename",
                    "value": {
                      "statusCode": 41217,
                      "message": "create cloudflare hostname failed",
                      "result": false
                    }
                  }
                }
              }
            }
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "code": "curl --location 'https://api2.sendcloud.net/api/trackDomain/update' \\\n--header 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode 'apiUser={{apiUser}}' \\\n--data-urlencode 'apiKey={{apiKey}}' \\\n--data-urlencode 'id={{id}}' \\\n--data-urlencode 'certContent={{certContent}}' \\\n--data-urlencode 'certKey={{certKey}}'",
              "language": "shell",
              "name": ""
            }
          ],
          "samples-languages": [
            "shell"
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiUser": {
        "type": "apiKey",
        "in": "query",
        "name": "apiUser",
        "description": "API_USER for identity verification"
      },
      "apiKey": {
        "type": "apiKey",
        "in": "query",
        "name": "apiKey",
        "description": "API_KEY for identity verification"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```

# Sibling pages

* [Get Tracking Domains List](https://docs.aurorasendcloud.com/reference/get-tracking-domains-list.md)
* [Add Tracking Domain](https://docs.aurorasendcloud.com/reference/add-tracking-domain.md)
* [Get Tracking Domain Verify Status](https://docs.aurorasendcloud.com/reference/get-tracking-domain-verify-status.md)
* [Delete Tracking Domain](https://docs.aurorasendcloud.com/reference/delete-tracking-domain.md)