Skip to content
noBSredir

Import

POST /workspaces/:wsId/import/links

Import links from a CSV string. Auto-detects Bitly export format or accepts generic CSV.

Role: editor+

Terminal window
curl -X POST https://nobsredir.com/api/workspaces/ws_abc123/import/links \
-H "X-API-Key: nobs_your_key" \
-H "Content-Type: application/json" \
-d '{
"csv": "target,title,tags\nhttps://example.com,My Page,\"marketing,social\"\nhttps://other.com,Other,campaign",
"format": "auto",
"domain": "go.yourco.com"
}'

Request body

FieldTypeRequiredDescription
csvstringYesRaw CSV text (including header row)
formatstringNo"generic", "bitly", or "auto" (default: "auto")
domainstringNoDomain for imported links (default: fnl.sh)

CSV columns

Generic format - recognized target columns: target, url, destination, long_url

ColumnRequiredDescription
target / url / destination / long_urlYesDestination URL
titleNoLink title
slugNoCustom slug (requires custom domain)
tagsNoComma-separated tags (max 10)
noteNoInternal note

Bitly format - auto-detected when bitlink column is present. Uses long_url for target.

Response (201)

{
"created": 2,
"skipped": 0,
"errors": [
{ "row": 4, "reason": "Missing target URL" }
],
"links": [
{
"id": "xK9mQ2bL",
"domain": "go.yourco.com",
"slug": "abc123",
"target": "https://example.com",
"title": "My Page",
"tags": ["marketing", "social"],
"short_url": "https://go.yourco.com/abc123"
}
]
}

Error responses

StatusReason
400Missing csv field, empty CSV, no data rows, over 500 rows, no target column
403Insufficient role (viewer cannot import)

Per-row errors

Rows that fail validation are reported in the errors array with the 1-indexed row number and reason. Valid rows are still imported.

Common per-row errors:

  • Missing target URL
  • Invalid URL (not http/https)
  • Custom slug on fnl.sh (requires custom domain)
  • Slug already exists on this domain
  • Invalid slug characters

Limits

  • Maximum 500 data rows per request
  • Maximum 10 tags per link (extras truncated)
  • Custom slugs require a custom domain