POST
/
bulk-urls
/
validate
Validate Bulk CSV
curl --request POST \
  --url https://jmpy.me/api/v1/bulk-urls/validate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "csv_content": "<string>"
}
'
{
  "success": true,
  "data": {
    "validation": {},
    "preview": {
      "will_create": 123,
      "will_skip": 123,
      "available_limit": 123,
      "valid_urls": [
        {}
      ],
      "invalid_urls": [
        {}
      ]
    }
  },
  "message": "<string>"
}
Validates a CSV file containing a list of URLs to be shortened. This endpoint checks for format errors, duplicates, and plan limits before actual creation. It returns a summary of valid and invalid entries, along with a preview of the data.

Request

You can send the CSV data either as a file upload (multipart/form-data) or as a raw string in the JSON body.

Headers

Content-Type
string
required
multipart/form-data (for file upload) or application/json (for raw content)

Body Parameters

file
file
The CSV file to upload. Required if csv_content is not provided.Max Size: 5MB Format: CSV (comma-separated values)
csv_content
string
The raw CSV content as a string. Required if file is not provided.

CSV Format Requirements

The CSV should have headers corresponding to the short-urls creation parameters. The url column is required. Supported Columns:
  • url (Required): The long URL to shorten
  • custom_alias: Optional custom alias
  • name: Optional friendly name
  • domain: Optional branded domain or subdomain (must be fully qualified, e.g., link.mysite.com)
  • tags: Optional comma-separated tags (e.g., “promo,social”)
Example CSV:
url,custom_alias,name,tags
https://example.com/page1,alias1,First Link,"tag1,tag2"
https://example.com/page2,,Second Link,tag1

Response

success
boolean
Indicates if the request was successful.
data
object
message
string
Human-readable summary message.

Request Examples

curl -X POST "https://jmpy.me/api/v1/bulk-urls/validate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/urls.csv"