# Workspace

Check which workspace a key belongs to, what its plan allows and how much of it is in use, read the overview numbers, and change the workspace settings.

## Read the workspace

`GET https://formpik.com/api/v1/workspace`

Works with every key.

*cURL*

```bash
curl -X GET "https://formpik.com/api/v1/workspace" \
  -H "Authorization: Bearer $FORMPIK_API_KEY"
```

*200 OK*

```json
{
  "data": {
    "id": "wsp_4k8m2n6q",
    "name": "Northwind Studio",
    "logo": "https://formpik.cdn.modulify.website/workspace-logos/wsp_4k8m2n6q/3f9a1c.webp",
    "timezone": "Europe/Berlin",
    "created_at": "2026-10-02T08:12:44.000Z",
    "preferences": {
      "notify_on_failure": true,
      "daily_digest": false,
      "weekly_report": true,
      "anonymize_ip": true,
      "default_retention_days": 365
    },
    "plan": {
      "id": "pro",
      "name": "Pro",
      "subscription_status": "active",
      "cancel_at_period_end": false,
      "current_period_end": "2026-12-02T08:12:44.000Z",
      "limits": {
        "forms": 25,
        "flows": 25,
        "sources": 25,
        "destinations": 25,
        "members": 10,
        "api_keys": 10,
        "submissions_per_month": 10000,
        "retention_days": 365,
        "ai_drafts_per_day": 10
      }
    },
    "usage": {
      "forms": 4,
      "published_forms": 2,
      "flows": 6,
      "sources": 5,
      "destinations": 3,
      "members": 3,
      "api_keys": 2,
      "submissions_this_month": 812,
      "ai_drafts_today": 3,
      "ai_drafts_reset_at": "2026-11-22T00:00:00.000Z"
    },
    "key": { "id": "key_9w2e4r6t", "name": "Website backend", "access": "full" }
  }
}
```

- A limit of `null` means unlimited. `retention_days` of `0` means submissions are kept forever.
- `usage.sources` leaves out the share link sources of published forms, which never count toward the plan.
- `usage.ai_drafts_today` counts today's AI drafts against `limits.ai_drafts_per_day`. They come back at `usage.ai_drafts_reset_at`, midnight UTC.
- `key.access` is `read`, `full` or `admin`. See [Access levels](https://formpik.com/docs/api#access).
- Creating a form, flow, source, destination, API key or invitation past a limit answers `402` with the code `plan-limit`.

## Change workspace settings

`PATCH https://formpik.com/api/v1/workspace`

The same settings as the Settings page. Send only what changes. Needs a key with admin access.

**Body**

- `name` (string): Up to 60 characters.
- `timezone` (string): One of the timezones on the Settings page, such as `Europe/Berlin` or `America/New_York`.
- `preferences` (object): `notify_on_failure`, `daily_digest`, `weekly_report` and `anonymize_ip` (true or false), and `default_retention_days` (`30`, `90`, `365` or `0` for forever, within the plan). Only what you send changes.

*cURL*

```bash
curl -X PATCH "https://formpik.com/api/v1/workspace" \
  -H "Authorization: Bearer $FORMPIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"timezone": "America/New_York", "preferences": {"notify_on_failure": true}}'
```

The answer is the whole workspace, as `GET` returns it.

## Set the workspace logo

`POST https://formpik.com/api/v1/workspace/logo`

Send `{ "image": "data:image/png;base64,..." }`: a square PNG, JPEG or WebP, as base64 or a data URL, at most 512 KB. The answer holds the logo's public address. Needs a key with admin access.

`DELETE https://formpik.com/api/v1/workspace/logo`

Deletes the logo, so the workspace shows its initials again. Needs a key with admin access.

The logo's address is `logo` on the workspace, `null` without one. Crop the picture to a square first: it is shown as it is sent.

## Read the numbers

`GET https://formpik.com/api/v1/stats`

The overview of the dashboard: `?days=7` (the default), `14`, `30` or `90`. Test submissions are left out. Works with every key.

*cURL*

```bash
curl -X GET "https://formpik.com/api/v1/stats?days=7" \
  -H "Authorization: Bearer $FORMPIK_API_KEY"
```

*200 OK*

```json
{
  "data": {
    "days": 7,
    "since": "2026-11-14T09:00:00.000Z",
    "submissions": { "total": 182, "previous_period": 151, "delivered": 171, "received": 2, "failed": 3, "invalid": 1, "spam": 5 },
    "per_day": [{ "date": "2026-11-15", "submissions": 24 }, { "date": "2026-11-16", "submissions": 31 }],
    "per_form": [{ "form_id": "frm_q8w2e4r6t1", "submissions": 120 }],
    "per_source": [{ "source_id": "hst_q8w2e4r6t1", "submissions": 64 }],
    "flows": [{ "flow_id": "flw_7y3u5i9o", "name": "Route quote requests", "runs": 118, "outcomes": { "delivered": 116, "failed": 2 } }]
  }
}
```

- `previous_period` counts the same number of days before, for a comparison.
- `per_day` has one entry per day in UTC, with days without submissions at `0`.
- `flows` counts the runs of every flow by outcome: `delivered`, `failed`, `invalid` or `spam`.

---

Source: https://formpik.com/docs/api/workspace
