Authorization: Bearer ********************
{
"destination_url": "https://baharihari.com",
"tags": [
"referral",
"customer relation"
],
"short_link": "ASD123",
"source": "magazine x",
"medium": "cpc banner",
"campaign": "promo2025",
"term": "marketing",
"content": "banner_ad",
"referral": "ref123"
}
curl --location --request POST 'http://localhost:8000/api/localhost:8000/api/urls' \
--header 'Content-Type: application/json' \
--data-raw '{
"destination_url": "https://baharihari.com",
"tags": [
"referral",
"customer relation"
],
"short_link": "ASD123",
"source": "magazine x",
"medium": "cpc banner",
"campaign": "promo2025",
"term": "marketing",
"content": "banner_ad",
"referral": "ref123"
}'
{
"data": {
"destination_url": "https://baharihari.com",
"short_link": "short.bitunixads.com/3R2z1l",
"source": "magazine-x",
"medium": "cpc-banner",
"campaign": "promo2025",
"term": "marketing",
"content": "banner_ad",
"referral": "ref123",
"updated_at": "2025-03-04T09:21:39.000000Z",
"created_at": "2025-03-04T09:21:39.000000Z",
"id": 11,
"tags": [
{
"id": 2,
"name": "referral",
"created_at": "2025-03-04T09:21:39.000000Z",
"updated_at": "2025-03-04T09:21:39.000000Z",
"pivot": {
"url_id": 11,
"tag_id": 2
}
},
{
"id": 3,
"name": "customer-relation",
"created_at": "2025-03-04T09:21:39.000000Z",
"updated_at": "2025-03-04T09:21:39.000000Z",
"pivot": {
"url_id": 11,
"tag_id": 3
}
}
]
},
"message": "URL created successfully"
}