Skip to main content

List Workspaces

Returns all workspaces and their associated campaigns (funnels) for the company tied to your API key.

GET /v1/workspaces

:::tip Discovering IDs This is the recommended starting point for any integration. The workspace and campaign IDs returned here are the IDs you pass to other endpoints such as List Contacts and Get KPI. :::

Authentication​

Requires the x-perspective-api-key header. See Authentication for details.

Example request​

curl "https://api.perspective.co/v1/workspaces" \
-H "x-perspective-api-key: $PERSPECTIVE_API_KEY"

Response​

Returns { data: Workspace[] }.

Workspace object​

FieldTypeRequiredDescription
idstringYesUnique workspace identifier.
namestringYesDisplay name of the workspace.
campaignsobject[]YesCampaigns (funnels) belonging to this workspace. See WorkspaceCampaign fields.

WorkspaceCampaign fields​

Each item in the campaigns array has the following fields.

FieldTypeRequiredDescription
idstringYesUnique campaign (funnel) identifier. Use this as the funnelId in contacts and metrics endpoints.
namestringYesDisplay name of the campaign.
statusstringYesPublication status. One of: "online", "offline".

Example response​

{
"data": [
{
"id": "ws_abc123",
"name": "Main Workspace",
"campaigns": [
{
"id": "fnl_xyz789",
"name": "Lead Generation Funnel",
"status": "online"
},
{
"id": "fnl_def456",
"name": "Onboarding Quiz",
"status": "offline"
}
]
},
{
"id": "ws_ghi012",
"name": "Client Projects",
"campaigns": [
{
"id": "fnl_jkl345",
"name": "Consultation Booking",
"status": "online"
}
]
}
]
}

Errors​

See Errors for the full list of status codes and handling guidance.

StatusMeaning
401Missing or invalid API key.
403Your API key does not have permission to access workspaces.
500Internal server error.