Create Link
curl --request POST \
--url https://api.example.com/links/create \
--header 'Content-Type: application/json' \
--data '
{
"organizationId": "<string>",
"name": "<string>",
"targetUrl": "<string>",
"slug": "<string>",
"expiresAt": "<string>",
"expiredRedirectUrl": "<string>",
"ogTitle": "<string>",
"ogDescription": "<string>",
"ogImageUrl": "<string>",
"ogVideoUrl": "<string>",
"iosUrl": "<string>",
"androidUrl": "<string>",
"externalId": "<string>"
}
'{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"targetUrl": "<string>",
"organizationId": "<string>",
"createdBy": "<string>",
"createdAt": "<string>"
}Links API
Create Link
Creates a new short link with optional custom slug and device targeting
POST
/
links
/
create
Create Link
curl --request POST \
--url https://api.example.com/links/create \
--header 'Content-Type: application/json' \
--data '
{
"organizationId": "<string>",
"name": "<string>",
"targetUrl": "<string>",
"slug": "<string>",
"expiresAt": "<string>",
"expiredRedirectUrl": "<string>",
"ogTitle": "<string>",
"ogDescription": "<string>",
"ogImageUrl": "<string>",
"ogVideoUrl": "<string>",
"iosUrl": "<string>",
"androidUrl": "<string>",
"externalId": "<string>"
}
'{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"targetUrl": "<string>",
"organizationId": "<string>",
"createdBy": "<string>",
"createdAt": "<string>"
}Authentication
Requires API key withwrite:links scope.
Request Body
Organization ID to create the link under
Display name for the link (max 255 characters)
Destination URL (must be absolute HTTP/HTTPS URL)
Custom slug (3-50 characters, alphanumeric, hyphens, underscores). Auto-generated if not provided
ISO 8601 expiration date. Link redirects to
expiredRedirectUrl after this timeURL to redirect to after expiration
Open Graph title for link previews (max 200 characters)
Open Graph description (max 500 characters)
Open Graph image URL
Open Graph video URL
iOS-specific destination URL (for device targeting)
Android-specific destination URL (for device targeting)
Your external identifier for this link (max 255 characters)
Response
Unique link identifier
Generated or custom slug. Full URL is
https://dby.to/{slug}Display name
Destination URL
Parent organization ID
User ID that created the link
ISO 8601 timestamp of creation
Example Request
curl -X POST https://api.databuddy.cc/links/create \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_abc123",
"name": "Product Launch",
"targetUrl": "https://example.com/products/new",
"slug": "launch",
"ogTitle": "Check out our new product!",
"ogDescription": "The best product launch of 2024",
"ogImageUrl": "https://example.com/og-image.png"
}'
Example Response
{
"id": "lnk_xyz123",
"slug": "launch",
"name": "Product Launch",
"targetUrl": "https://example.com/products/new",
"organizationId": "org_abc123",
"createdBy": "usr_456",
"expiresAt": null,
"expiredRedirectUrl": null,
"ogTitle": "Check out our new product!",
"ogDescription": "The best product launch of 2024",
"ogImageUrl": "https://example.com/og-image.png",
"ogVideoUrl": null,
"iosUrl": null,
"androidUrl": null,
"externalId": null,
"createdAt": "2024-03-01T17:00:00Z",
"updatedAt": "2024-03-01T17:00:00Z"
}
Short URL
Your link is now accessible at:https://dby.to/launch
⌘I