Link
GET/api/v1/links
Authorization
bearer_token In: header
Query Parameters
Restrict results to a single campaign
Restrict results to a single status
Value in
- "draft"
- "active"
- "expired"
- "paused"
- "quarantined"
- "deleted"
Full-text search query applied to slug
1-indexed page number
int640 <= valuePage size
int640 <= valueSort field
Sort order (asc or desc)
Value in
- "asc"
- "desc"
Response Body
application/json
curl -X GET "https://example.com/api/v1/links"{ "links": [ { "campaign_id": "string", "created_at": "2019-08-24T14:15:22Z", "destination_url": "string", "domain": "string", "link_id": "string", "short_url": "string", "slug": "string", "status": "draft", "updated_at": "2019-08-24T14:15:22Z" } ], "pagination": { "has_more": true, "page": 0, "page_size": 0, "total": 0 }}POST/api/v1/links
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/links" \ -H "Content-Type: application/json" \ -d '{ "campaign_id": "string", "destination_url": "string" }'{ "link_id": "string", "qr_code_blob_id": "string", "short_url": "string", "slug": "string", "status": "draft"}POST/api/v1/links/batch
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
A batch of links to create under one or more campaigns. Links are created independently and fail-fast (slug collisions are per-link); the server enforces a per-batch cap.
Response Body
application/json
curl -X POST "https://example.com/api/v1/links/batch" \ -H "Content-Type: application/json" \ -d '{ "links": [ { "campaign_id": "string", "destination_url": "string" } ] }'{ "count": 0, "links": [ { "link_id": "string", "qr_code_blob_id": "string", "short_url": "string", "slug": "string", "status": "draft" } ]}GET/api/v1/links/campaigns
Authorization
bearer_token In: header
Query Parameters
Full-text search query applied to campaign name and description
1-indexed page number
int640 <= valuePage size
int640 <= valueSort field
Sort order (asc or desc)
Value in
- "asc"
- "desc"
Response Body
application/json
curl -X GET "https://example.com/api/v1/links/campaigns"{ "campaigns": [ { "active_link_count": 0, "agent_context_policy": { "allow_tracking_pixel": true, "allowed_agents": [ "string" ], "enabled": true, "max_added_query_params": 0 }, "campaign_id": "string", "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "default_domain": "string", "default_utm": { "campaign": "string", "content": "string", "medium": "string", "source": "string", "term": "string" }, "description": "string", "name": "string", "security_policy": { "blocked_reputation_buckets": [ "trusted" ], "cloak_unknown_referrers": true, "password_required_by_default": true }, "updated_at": "2019-08-24T14:15:22Z" } ], "pagination": { "has_more": true, "page": 0, "page_size": 0, "total": 0 }}POST/api/v1/links/campaigns
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/links/campaigns" \ -H "Content-Type: application/json" \ -d '{ "default_domain": "string", "name": "string" }'{ "campaign_id": "string", "created_at": "2019-08-24T14:15:22Z", "default_domain": "string", "name": "string"}GET/api/v1/links/campaigns/{campaign_id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/links/campaigns/string"{ "active_link_count": 0, "agent_context_policy": { "allow_tracking_pixel": true, "allowed_agents": [ "string" ], "enabled": true, "max_added_query_params": 0 }, "campaign_id": "string", "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "default_domain": "string", "default_utm": { "campaign": "string", "content": "string", "medium": "string", "source": "string", "term": "string" }, "description": "string", "name": "string", "security_policy": { "blocked_reputation_buckets": [ "trusted" ], "cloak_unknown_referrers": true, "password_required_by_default": true }, "updated_at": "2019-08-24T14:15:22Z"}GET/api/v1/links/campaigns/{campaign_id}/stats
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/links/campaigns/string/stats"{ "active_link_count": 0, "campaign_id": "string", "outcome_breakdown": { "property1": 0, "property2": 0 }, "total_clicks": 0, "unique_visitors": 0}GET/api/v1/links/domains
curl -X GET "https://example.com/api/v1/links/domains"{ "domains": [ { "campaign_count": 0, "domain": "string", "verified": true } ]}GET/api/v1/links/{link_id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/links/string"{ "campaign_id": "string", "conditional_routes": [ { "destination_url": "string", "fallback_url": "string", "name": "string", "skip_utm": true, "when": { "country_allowlist": [ "string" ], "device_family": "string", "referrer_class": "string", "reputation_min": null } } ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "destination_url": "string", "domain": "string", "link_id": "string", "password": { "enabled": true, "hash_ref": "string" }, "pixel_tracking": { "enabled": true, "pixel_ids": [ "string" ] }, "policy_version": 0, "qr_code": { "blob_id": "string", "enabled": true, "policy_version": 0 }, "security_cloaking": { "enabled": true, "interstitial_url": "string" }, "short_url": "string", "slug": "string", "status": "draft", "ttl": { "expires_at": "2019-08-24T14:15:22Z", "max_clicks": 0, "starts_at": "2019-08-24T14:15:22Z" }, "updated_at": "2019-08-24T14:15:22Z", "utm": { "campaign": "string", "content": "string", "medium": "string", "source": "string", "term": "string" }}PATCH/api/v1/links/{link_id}
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PATCH "https://example.com/api/v1/links/string" \ -H "Content-Type: application/json" \ -d '{}'{ "campaign_id": "string", "conditional_routes": [ { "destination_url": "string", "fallback_url": "string", "name": "string", "skip_utm": true, "when": { "country_allowlist": [ "string" ], "device_family": "string", "referrer_class": "string", "reputation_min": null } } ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "destination_url": "string", "domain": "string", "link_id": "string", "password": { "enabled": true, "hash_ref": "string" }, "pixel_tracking": { "enabled": true, "pixel_ids": [ "string" ] }, "policy_version": 0, "qr_code": { "blob_id": "string", "enabled": true, "policy_version": 0 }, "security_cloaking": { "enabled": true, "interstitial_url": "string" }, "short_url": "string", "slug": "string", "status": "draft", "ttl": { "expires_at": "2019-08-24T14:15:22Z", "max_clicks": 0, "starts_at": "2019-08-24T14:15:22Z" }, "updated_at": "2019-08-24T14:15:22Z", "utm": { "campaign": "string", "content": "string", "medium": "string", "source": "string", "term": "string" }}DELETE/api/v1/links/{link_id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/api/v1/links/string"{ "deleted": true, "link_id": "string"}POST/api/v1/links/{link_id}/password/verify
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/links/string/password/verify" \ -H "Content-Type: application/json" \ -d '{ "password": "string" }'{ "expires_in_seconds": 0, "link_id": "string", "redirect_token": "string", "verified": true}POST/api/v1/links/{link_id}/qr
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/links/string/qr"{ "blob_id": "string", "content_type": "string", "image_base64": "string", "link_id": "string", "policy_version": 0, "size": 0}POST/api/v1/links/{link_id}/quarantine
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/links/string/quarantine" \ -H "Content-Type: application/json" \ -d '{}'{ "link_id": "string", "message": "string", "status": "draft"}POST/api/v1/links/{link_id}/resolve
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/links/string/resolve" \ -H "Content-Type: application/json" \ -d '{}'{ "agent_id": "string", "campaign_id": "string", "final_url": "string", "injected_params": [ "string" ], "interstitial_url": "string", "link_id": "string", "outcome": "redirected", "selected_route": "string", "tracking_pixels": [ "string" ]}GET/api/v1/links/{link_id}/stats
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/links/string/stats"{ "campaign_id": "string", "link_id": "string", "outcome_breakdown": { "property1": 0, "property2": 0 }, "route_breakdown": { "property1": 0, "property2": 0 }, "total_clicks": 0, "unique_visitors": 0}GET/r/{slug}
curl -X GET "https://example.com/r/string"