Skip to main content

Get Workspace

Retrieve the workspace associated with your API key, including workspace settings, billing information, plan limits, and current usage.


Endpoint

GET https://api.campaignlark.com/v1/workspace

Sample Request

GET https://api.campaignlark.com/v1/workspace

Response

Success — 200 OK

{
"error": null,
"data": {
"workspace": {
"id": 42,
"name": "Acme Marketing",
"conversion_tracking": true,
"is_approved": true,
"is_suspended": false,
"created_at": "2025-01-15T10:30:00Z"
},
"billing": {
"subscription": {
"plan_id": 2,
"plan_name": "Pro",
"status": "active",
"current_period_start": "2025-02-01T00:00:00Z",
"current_period_end": "2025-03-01T00:00:00Z",
"cancel_at_period_end": false,
"next_invoice_total": 99.99,
"addons": [
{
"id": 7,
"addon_id": 3,
"name": "Additional Contacts",
"price": 25,
"quantity": 2
}
]
},
"resources": [
{
"name": "contacts",
"used": 1250,
"allowed": 10000
},
{
"name": "monthly_emails",
"used": 18400,
"allowed": 50000
},
{
"name": "domains",
"used": 2,
"allowed": 5
},
{
"name": "users",
"used": 4,
"allowed": 10
},
{
"name": "segments",
"used": 8,
"allowed": 25
},
{
"name": "automations",
"used": 6,
"allowed": 20
},
{
"name": "events",
"used": 3190,
"allowed": 100000
},
{
"name": "hourly_emails",
"used": 184,
"allowed": 1000
}
]
}
}
}

The subscription value is null when the workspace has no active subscription.


Workspace Object

FieldTypeDescription
idintegerUnique workspace ID.
namestringWorkspace name.
conversion_trackingbooleanWhether conversion tracking is enabled for the workspace.
is_approvedbooleanWhether the workspace has been approved.
is_suspendedbooleanWhether the workspace is suspended.
created_atstringWorkspace creation timestamp in ISO 8601 format.

Subscription Object

FieldTypeDescription
plan_idintegerSubscription plan ID.
plan_namestringHuman-readable subscription plan name.
statusstringCurrent subscription status.
current_period_startstringStart of the current billing period in ISO 8601 format.
current_period_endstring or nullEnd of the current billing period in ISO 8601 format.
cancel_at_period_endbooleanWhether the subscription will be canceled at the end of the current period.
next_invoice_totalnumberEstimated total for the next invoice.
addonsarrayAdd-ons attached to the subscription.

Subscription Add-on Object

FieldTypeDescription
idintegerSubscription add-on ID.
addon_idintegerAdd-on catalog ID.
namestringAdd-on name.
pricenumberUnit price of the add-on.
quantityintegerNumber of add-on units.

Resources

Each resource contains the current usage and the allowed amount for that resource.

FieldTypeDescription
namestringResource name: contacts, monthly_emails, domains, users, segments, automations, events, or hourly_emails.
usedintegerCurrent usage for the resource.
allowedintegerMaximum allowed usage for the resource.

The hourly_emails resource tracks emails sent during the current hour and resets every hour.