Skip to content
noBSredir

Workspaces

Workspaces are the top-level container for links, domains, members, and billing.

POST /workspaces

Create a new workspace. New workspaces start on the free plan.

Auth: Required.

Terminal window
curl -X POST https://nobsredir.com/api/workspaces \
-H "X-API-Key: nobs_your_key" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corp"}'

Body:

FieldTypeRequiredDescription
namestringyesWorkspace display name

Response 201:

{
"id": "ws_abc123",
"name": "Acme Corp",
"plan": "free"
}

Errors:

  • 400 - Name is required
  • 403 - Workspace limit reached for your plan

GET /workspaces

List all workspaces the authenticated user is a member of.

Auth: Required.

Terminal window
curl https://nobsredir.com/api/workspaces \
-H "X-API-Key: nobs_your_key"

Response 200:

{
"workspaces": [
{
"id": "ws_abc123",
"name": "Acme Corp",
"plan": "pro",
"role": "owner",
"member_count": 3,
"created_at": "2025-01-15T10:00:00.000Z"
}
]
}

GET /workspaces/:wsId

Get workspace details.

Role: viewer+

Terminal window
curl https://nobsredir.com/api/workspaces/ws_abc123 \
-H "X-API-Key: nobs_your_key"

Response 200:

{
"id": "ws_abc123",
"name": "Acme Corp",
"plan": "pro",
"ga_id": "G-XXXXXXXXXX",
"ga_api_secret": null,
"fb_pixel_id": null,
"fb_access_token": null,
"retargeting_scripts": null,
"default_utm_params": null,
"parent_workspace_id": null,
"member_count": 3,
"created_at": "2025-01-15T10:00:00.000Z"
}

PATCH /workspaces/:wsId

Update workspace settings. Only send the fields you want to change.

Role: owner

Terminal window
curl -X PATCH https://nobsredir.com/api/workspaces/ws_abc123 \
-H "X-API-Key: nobs_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp v2",
"ga_id": "G-XXXXXXXXXX",
"default_utm_params": {"source": "acme", "medium": "shortlink"}
}'

Body:

FieldTypeDescription
namestringWorkspace display name
ga_idstring|nullGoogle Analytics Measurement ID (e.g. G-XXXXXXXXXX)
ga_api_secretstring|nullGA4 Measurement Protocol API secret
fb_pixel_idstring|nullFacebook Pixel ID
fb_access_tokenstring|nullFacebook Conversions API access token
retargeting_scriptsstring[]|nullArray of script URLs to inject on redirect pages. Requires Team or Agency plan.
default_utm_paramsobject|nullDefault UTM params applied to all links. {source?, medium?, campaign?, term?, content?}

All fields optional. Send null to clear a field.

Response 200:

{"ok": true}

Errors:

  • 400 - No updates provided, invalid retargeting script URL
  • 402 - Retargeting scripts require a Team or Agency plan

DELETE /workspaces/:wsId

Delete a workspace and all associated data (links, clicks, domains, members, API keys, audit log, usage).

Role: owner

Terminal window
curl -X DELETE https://nobsredir.com/api/workspaces/ws_abc123 \
-H "X-API-Key: nobs_your_key"

Response 200:

{"ok": true}

This is permanent. No undo.