Publish a dashboard or list view by public link

Creates or revokes the public link of one of the caller's dashboard or list views. Anyone with the link sees it live, read-only and without signing in, calculated with the caller's access: a dashboard shows its charts and numbers and opens the records behind a chart (calendar, map and activity widgets are left out); a list shows its table with only the view's visible columns, its saved filters and sorting, and paging. Records never open and no hidden column leaves the server. Publishing also shares the view with the whole workspace. Publishing a view that already has a link keeps that link and only changes its end date; public false revokes it at once, as does sharing the view privately or with roles, and publishing afterwards creates a new link. Requires the publicLinks create permission and public links allowed in the workspace settings.

Requires: read access to the surface's page: read access to the record type for a records:<typeId> surface, read on users for Members and Roles, read all on api for Webhooks, read all on activityLog for Activity, read on routines for Routines, and read on inboxMessages plus the messaging entitlement for Inbox. Dashboard and record timeline views need no extra permission. Saved views are private until shared: list also returns views teammates shared with the caller (marked with sharedBy), which can be selected but only their owner can change, delete or share.

POST
/v1/data-views/publish

Authorization

apiKeyAuth
x-api-key<token>

API key authentication. Create an API key in your user profile and include it in the x-api-key header.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://customermates.com/api/v1/data-views/publish" \  -H "Content-Type: application/json" \  -d '{    "surfaceKey": "dashboard",    "viewKey": "6f1c2d3e-4b5a-4c6d-8e7f-1a2b3c4d5e6f",    "public": true,    "expiresAt": "2026-12-31"  }'
{
  "action": "surfaces",
  "surfaceKey": "users-card-store",
  "label": "string",
  "path": "string",
  "section": "overview",
  "total": 9007199254740991,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1,
  "items": [
    {
      "id": "string",
      "surfaceKey": "users-card-store",
      "name": "string",
      "label": "string",
      "path": "string",
      "position": -9007199254740991,
      "state": {
        "filters": [
          {
            "field": "string",
            "operator": "equals",
            "value": "string"
          }
        ],
        "searchTerm": "string",
        "sortDescriptor": {
          "field": "string",
          "direction": "asc"
        },
        "pageSize": 5,
        "viewMode": "table",
        "grouping": {
          "field": "string",
          "bucket": "day",
          "hidden": [
            "string"
          ],
          "hideEmpty": true,
          "summaries": [
            {
              "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
              "aggregation": "sum"
            }
          ]
        },
        "columnOrder": [
          "string"
        ],
        "columnWidths": {
          "property1": 0,
          "property2": 0
        },
        "hiddenColumns": [
          "string"
        ],
        "calendar": {
          "dateFieldId": "0e1d975e-73f3-487e-ac80-14e9e130620e",
          "endDateFieldId": "258b375b-74ed-4b5e-99a1-3f54c6fea6e5",
          "colorFieldId": "fb3508bd-25c6-4412-a3bc-eb958a7aa449",
          "mode": "month"
        }
      },
      "field": "string",
      "operators": [
        "string"
      ],
      "property1": null,
      "property2": null
    }
  ],
  "totals": {
    "property1": 9007199254740991,
    "property2": 9007199254740991
  },
  "supportsSearch": true,
  "viewModes": [
    "table"
  ],
  "writableStateFields": [
    "string"
  ],
  "activeViewKey": "string",
  "allState": {
    "filters": [
      {
        "field": "string",
        "operator": "equals",
        "value": "string"
      }
    ],
    "searchTerm": "string",
    "sortDescriptor": {
      "field": "string",
      "direction": "asc"
    },
    "pageSize": 5,
    "viewMode": "table",
    "grouping": {
      "field": "string",
      "bucket": "day",
      "hidden": [
        "string"
      ],
      "hideEmpty": true,
      "summaries": [
        {
          "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
          "aggregation": "sum"
        }
      ]
    },
    "columnOrder": [
      "string"
    ],
    "columnWidths": {
      "property1": 0,
      "property2": 0
    },
    "hiddenColumns": [
      "string"
    ],
    "calendar": {
      "dateFieldId": "0e1d975e-73f3-487e-ac80-14e9e130620e",
      "endDateFieldId": "258b375b-74ed-4b5e-99a1-3f54c6fea6e5",
      "colorFieldId": "fb3508bd-25c6-4412-a3bc-eb958a7aa449",
      "mode": "month"
    }
  },
  "viewKey": "__all__",
  "id": "string",
  "name": "string",
  "position": -9007199254740991,
  "state": {
    "filters": [
      {
        "field": "string",
        "operator": "equals",
        "value": "string"
      }
    ],
    "searchTerm": "string",
    "sortDescriptor": {
      "field": "string",
      "direction": "asc"
    },
    "pageSize": 5,
    "viewMode": "table",
    "grouping": {
      "field": "string",
      "bucket": "day",
      "hidden": [
        "string"
      ],
      "hideEmpty": true,
      "summaries": [
        {
          "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
          "aggregation": "sum"
        }
      ]
    },
    "columnOrder": [
      "string"
    ],
    "columnWidths": {
      "property1": 0,
      "property2": 0
    },
    "hiddenColumns": [
      "string"
    ],
    "calendar": {
      "dateFieldId": "0e1d975e-73f3-487e-ac80-14e9e130620e",
      "endDateFieldId": "258b375b-74ed-4b5e-99a1-3f54c6fea6e5",
      "colorFieldId": "fb3508bd-25c6-4412-a3bc-eb958a7aa449",
      "mode": "month"
    }
  },
  "link": "string",
  "selected": true,
  "deleted": true,
  "proposed": true,
  "trashBatchId": "f9ad794f-414e-4d2a-bff7-4eedbaa196bb",
  "visibility": "private",
  "roleIds": [
    "string"
  ],
  "publicLink": {
    "url": "string",
    "expiresAt": "2019-08-24",
    "openCount": -9007199254740991,
    "lastOpenedAt": "string",
    "createdAt": "string"
  },
  "property1": null,
  "property2": null
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
Empty