Process a batch of URLs to create short links. This endpoint accepts either a CSV file (similar to the validate endpoint) or a list of pre-validated URL objects.
Request
multipart/form-data (for file upload) or application/json (for json body)
Body Parameters
You must provide one of the following: file, csv_content, or validated_urls.
The CSV file to upload. Max Size : 5MB
Format : CSV
The raw CSV content as a string.
An array of URL objects that have passed validation. This is useful if you have already run the /validate endpoint and want to confirm the creation of those specific entries. Item Structure :
original_url: string
custom_alias: string (optional)
name: string (optional)
domain: string (optional)
tags: array of strings (optional)
Whether to generate trackable QR codes for all created URLs.
The format of the returned QR codes: image (base64 PNG) or json (metadata).
Response
Indicates if the batch processing started successfully.
List of successfully created short URLs.
List of URLs that failed to create during the insert phase, with error details.
Summary of the operation (e.g., “Successfully created 50 URLs. 2 failed.”).
Request Examples
cURL (File)
cURL (Validated Data)
curl -X POST "https://jmpy.me/api/v1/bulk-urls/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@/path/to/urls.csv"
curl -X POST "https://jmpy.me/api/v1/bulk-urls/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"validated_urls": [
{
"original_url": "https://example.com/page1",
"custom_alias": "custom-1"
},
{
"original_url": "https://example.com/page2"
}
]
}'