Short URL custom domains
https://api2.protexting.com/v1/shorturl-domain/indexUse Authorization: Bearer with your server-side token. Legacy access_token URLs remain supported. Replace sample values with your own. Authentication & setup →
Use your existing OAuth access_token query parameter, with the Short URL API app active. Send Accept: application/json and Content-Type: application/json for JSON writes. Action-scoped tokens can call only the permitted action. Every link action is limited to your owned, public, non-deleted parent links. Smart URLs is a separate system.
Manage the same custom-domain registry and saved default as the member workspace. The existing custom-domain feature must be enabled. This does not manage Smart URL links, although both workspaces share the domain registry.
DNS and HTTPS readiness
Index returns domains, default_id and cname_target; view returns one owned non-deleted row. Rows include id, hostname, verification_token, status, selectable, ready_until, next_check_at and message. TXT name: _protexting.<hostname>. TXT value: protexting-verification=<verification_token>. Use the returned CNAME target. Both records are required. On Cloudflare, select DNS only. Verification and HTTPS provisioning run automatically; allow up to one hour, while propagation can take longer. A queued check is not proof of readiness.
Saving a pending default never bypasses DNS/HTTPS readiness. Choose domain ID 0 to use the standard domain. Availability controls new-link selection and preserves existing links. Domain deletion requires the exact saved hostname and acknowledgement that issued and scheduled links stop working. It preserves saved link/click history and verified ownership tombstones, and resets a deleted default atomically. Unused, never-verified registrations may be physically removed under the existing rules. Configured-domain retirement still requires its separate release gate.
GET /v1/shorturl-domain/index
Read owned domain registry, saved default and CNAME target. Requires the existing custom-domain feature gate. TXT host is _protexting.<hostname>; TXT value is protexting-verification=<verification_token>.
Request example
# Set PROTEXTING_ACCESS_TOKEN in your environmentcurl --request GET \ "https://api2.protexting.com/v1/shorturl-domain/index" \ --header 'Accept: application/json' \ --header "Authorization: Bearer ${PROTEXTING_ACCESS_TOKEN:?Set your API token}"Response parameters
| Field | Type | Details |
|---|---|---|
| domains | array | |
| default_id | integer | |
| cname_target | string |
GET /v1/shorturl-domain/view
Read an owned nondeleted domain.
Request parameters
| Field | Type | Details |
|---|---|---|
| id | integer | Required. Owned public link ID (or owned domain ID on domain/view). |
Request example
# Set PROTEXTING_ACCESS_TOKEN in your environmentcurl --request GET \ "https://api2.protexting.com/v1/shorturl-domain/view?id=123" \ --header 'Accept: application/json' \ --header "Authorization: Bearer ${PROTEXTING_ACCESS_TOKEN:?Set your API token}"POST /v1/shorturl-domain/add
Register a unique hostname. Read index for saved ID and DNS values. Verification and HTTPS provisioning remain asynchronous.
JSON body
| Field | Type | Details |
|---|---|---|
| hostname | string | Required. Max 180 characters. |
Request example
# Set PROTEXTING_ACCESS_TOKEN in your environmentcurl --request POST \ "https://api2.protexting.com/v1/shorturl-domain/add" \ --header 'Accept: application/json' \ --header "Authorization: Bearer ${PROTEXTING_ACCESS_TOKEN:?Set your API token}" \ --header 'Content-Type: application/json' \ --data '{ "hostname": "go.yourbrand.com"}'POST /v1/shorturl-domain/default
Save a default. Pending defaults are allowed but cannot generate links. ID 0 selects standard.
JSON body
| Field | Type | Details |
|---|---|---|
| id | integer | Required. |
Request example
# Set PROTEXTING_ACCESS_TOKEN in your environmentcurl --request POST \ "https://api2.protexting.com/v1/shorturl-domain/default" \ --header 'Accept: application/json' \ --header "Authorization: Bearer ${PROTEXTING_ACCESS_TOKEN:?Set your API token}" \ --header 'Content-Type: application/json' \ --data '{ "id": 123}'POST /v1/shorturl-domain/availability
Enable or hide a domain for new-link selection, preserving issued links.
JSON body
| Field | Type | Details |
|---|---|---|
| id | integer | Required. |
| enabled | 0/1 or boolean | Required. |
Request example
# Set PROTEXTING_ACCESS_TOKEN in your environmentcurl --request POST \ "https://api2.protexting.com/v1/shorturl-domain/availability" \ --header 'Accept: application/json' \ --header "Authorization: Bearer ${PROTEXTING_ACCESS_TOKEN:?Set your API token}" \ --header 'Content-Type: application/json' \ --data '{ "id": 123, "enabled": 1}'POST /v1/shorturl-domain/check
Queue the existing background connection check. Does not verify DNS or issue TLS in the HTTP request.
JSON body
| Field | Type | Details |
|---|---|---|
| id | integer | Required. |
Request example
# Set PROTEXTING_ACCESS_TOKEN in your environmentcurl --request POST \ "https://api2.protexting.com/v1/shorturl-domain/check" \ --header 'Accept: application/json' \ --header "Authorization: Bearer ${PROTEXTING_ACCESS_TOKEN:?Set your API token}" \ --header 'Content-Type: application/json' \ --data '{ "id": 123}'POST /v1/shorturl-domain/delete
Delete only after exact hostname and disabled-link acknowledgement. Existing and scheduled links stop working. Retain link/click history and verified ownership; reset a deleted default atomically. Retirement remains behind the existing release gate.
JSON body
| Field | Type | Details |
|---|---|---|
| id | integer | Required. |
| confirm_hostname | string | Required. Max 180 characters. |
| acknowledge_disabled_links | 0/1 or boolean | Required. |
Request example
# Set PROTEXTING_ACCESS_TOKEN in your environmentcurl --request POST \ "https://api2.protexting.com/v1/shorturl-domain/delete" \ --header 'Accept: application/json' \ --header "Authorization: Bearer ${PROTEXTING_ACCESS_TOKEN:?Set your API token}" \ --header 'Content-Type: application/json' \ --data '{ "id": 123, "confirm_hostname": "go.yourbrand.com", "acknowledge_disabled_links": 1}'HTTP status codes
200 success; create/add return 201; link deletion returns 204 without a body. 401: missing/invalid token or disabled API app. 403: denied scope or tracking entitlement. 404: unavailable link or disabled domain feature. 405: wrong HTTP method. 409: reset already in progress. 422: invalid input, invalid dates or unavailable/foreign domain. 503: allocation/custom-deletion failure or unavailable reset signing. Other database/provider failures remain server errors.
Related Short URL reference
Reference from the ProTexting documentation catalog. Code examples are illustrative; this page does not execute API requests.