# SmartSuite Developers > Developer documentation for SmartSuite: the SmartSuite MCP Server for AI tools, the REST API and webhooks, and Scripting. --- # SmartSuite for AI assistants Source: https://developers.smartsuite.com/docs/ai/ The SmartSuite MCP Server connects AI assistants such as Claude, ChatGPT, Claude Code and Cursor directly to your Workspace. An assistant can answer questions about your data, update Records, and build Solutions, Tables, Views, Forms and Automations, all through conversation. The assistant acts as the Member who connected it. It can only see and do what that Member's Role and Permissions allow, and Workspace Administrators decide whether assistants can read, write, or not reach a Workspace at all. ## What you can do ### Ask questions of your data Search, filter and summarize Records across Tables without building a View first. > "Which Critical incidents are still New, and who owns each one?" ### Update Records Create, update and delete Records, comment on them, and make the same change to many Records at once. Every change is recorded in the Record's activity history. > "Move every task in the Website Redesign project that's past due to next Friday, and comment on each one explaining why." ### Build Solutions Create Solutions, Tables, Fields, Views, dashboards, Forms and document templates, and arrange the Record layout into tabs and sections. Ask for a dry run first to see exactly what would change. > "Add a Software Licenses Table to IT Asset Management with Vendor, Seat Count, Renewal Date and Annual Cost, plus a calendar View of upcoming renewals." ### Draft and debug Automations Read existing Automations, build new ones, read their run history and retry runs that failed. > "Why did the onboarding Automation fail last night?" ### Audit and document what you already have Review a Solution against SmartSuite's design standards, explain how Tables are linked, or summarize what a dashboard shows. > "Review the Incident Management Solution against SmartSuite's design standards and list what to fix first." ## Connect your AI tool | Client | How to connect | | :-- | :-- | | [Claude](./mcp/connecting/claude-app.md) | Add the SmartSuite connector from Claude's connector directory | | [ChatGPT](./mcp/connecting/chatgpt.md) | SmartSuite app coming soon; add it manually as a custom MCP app today | | [Claude Code](./mcp/connecting/claude-code.md) | One command in your terminal | | [Cursor](./mcp/connecting/cursor.md) | One-click install link or `mcp.json` | | [VS Code](./mcp/connecting/vscode.md) | `mcp.json` or the **MCP: Add Server** command | | [Other clients](./mcp/connecting/other.md) | Any MCP client that supports remote servers and OAuth | Every client connects to the same server URL and signs in to SmartSuite with OAuth. There are no API keys to create or rotate. ```text https://app.smartsuite.com/v1/mcp ``` ## Stay in control - **Members choose** which Workspaces a connection can reach and whether it can make changes. - **Workspace Administrators set the ceiling** in the AI Control Center: Disabled, Read-Only (the default) or Read & Write. - **Permissions always apply.** An assistant never sees or changes more than the Member who connected it. - **Every change is attributed** in activity history to both the Member and the assistant. See [Controls](./mcp/controls.md) for the details, including IP restrictions and data residency. ## Next steps - [Quickstart](./quickstart.md): build a working Solution from a spreadsheet in one conversation. - [MCP Server Overview](./mcp/overview.md): how the server works and how authentication is handled. - [Tools Reference](./mcp/tools.mdx): every tool the server offers. --- # Quickstart Source: https://developers.smartsuite.com/docs/ai/quickstart The fastest way to see what the SmartSuite MCP Server can do is to build something from scratch. You don't need a data model or a single Table set up by hand. Describe what you want to track, hand your assistant whatever raw material you already have, and it builds a structured Solution for you. ## Start from scratch: turn a messy spreadsheet into a working Solution Imagine you're putting together a Solution to track the organizations your team works with, your contacts at each one, and the projects you're running for them. All you have is one flat tracking spreadsheet, with duplicate companies, inconsistent dates and a few gaps. ## What you'll need - A SmartSuite account. - A Workspace where assistants are allowed to make changes. A sandbox Workspace is ideal. - An MCP-compatible AI tool. This guide uses Claude, but [any supported client](./mcp/overview.md#supported-clients) works. ## Step 1: Allow changes in a sandbox Workspace Every Workspace starts with MCP Access set to **Read-Only**, so assistants can read but not build. A Workspace Administrator changes this: 1. Open **Workspace Administration**. 2. Go to **AI Control Center → MCP Access** and click **Edit**. 3. Choose **Read & Write** and click **Save Configuration**. :::tip Use a sandbox or build Workspace for this, not production. "Write" covers structure as well as Record values: in Read & Write, an assistant can create Tables, Fields, Views, Forms and Automations. See [Controls](./mcp/controls.md) for recommended setups. ::: ## Step 2: Connect SmartSuite to your AI tool Add the SmartSuite connector in your AI tool and sign in to SmartSuite. When asked, choose: - **Read and write** access, so the assistant can build. - **Only your sandbox Workspace.** One Workspace is plenty for this walkthrough. See the [connection guides](./mcp/overview.md#supported-clients) for client-specific steps. ## Step 3: Describe what you want and hand over your mess Describe what you want to track in plain language, and attach or paste the raw material you already have. You don't need to know anything about Fields or Field types. > Here's what I want to keep track of: the organizations we work with, our contacts at each one, and the projects we're running for them, with statuses, owners and due dates. > > And here's what I've got: our team's tracking spreadsheet, attached. Fair warning, it's messy: duplicate companies, inconsistent dates and a few gaps. > > Using SmartSuite, propose a Solution in my sandbox Workspace. Once I approve it, build it and load my data in. ## Step 4: Review the structure before anything is built Your assistant proposes the Tables, Fields and how they link, for example three linked Tables for Organizations, Contacts and Projects, with Status, Date and Assigned To Fields. Refine it in conversation until it's right. Ask for a dry run if you want to see exactly what the assistant would create. The tools that change structure can report what they would do without doing it. ## Step 5: Let it build the Solution and load your data Once you approve, the assistant creates the Solution, Tables, Fields and links, then reads your spreadsheet and writes clean, de-duplicated, linked Records rather than a flat copy. Ask it to flag rows it couldn't resolve instead of guessing. ## You've got a working Solution From here you can: - **Ask questions across your data.** "Which projects are due in the next two weeks, and who's our contact for each?" - **Keep feeding it new material** to add Records over time. - **Keep building.** Add Views, a dashboard, an intake Form or an Automation. - **Check the work.** Ask the assistant to [review the Solution against SmartSuite's design standards](./mcp/tools.mdx#check-schema). When you're happy with it, share the Solution with your team in SmartSuite. Teammates can use it directly, or connect their own AI tools to it. If the Workspace should go back to read-only for assistants, an Administrator can change MCP Access at any time, and existing connections follow within about a minute. --- # MCP Server Overview Source: https://developers.smartsuite.com/docs/ai/mcp The SmartSuite MCP Server lets AI tools work directly in your SmartSuite Workspace. Assistants can ask questions about your data, create and update Records, and build and manage Solutions, Tables, Views, Forms and Automations through natural conversation in Claude, ChatGPT, Cursor and more. The server is available to all customers on all plans, and any Member can connect. ## The SmartSuite MCP Server Model Context Protocol (MCP) is an open standard that lets AI tools connect securely to outside systems. SmartSuite hosts its MCP server at: ```text https://app.smartsuite.com/v1/mcp ``` An assistant connected to it acts as the Member who connected it. What it can do is decided by three things, and the strictest one applies: | Layer | Who sets it | What it decides | | :-- | :-- | :-- | | MCP Access | Workspace Administrators | Whether assistants can reach the Workspace at all, and whether they can make changes there | | The connection | The Member, when connecting | Which Workspaces the connection covers, and whether it can make changes | | Roles and Permissions | Solution and Workspace settings | What the Member can see and change, exactly as in the SmartSuite app | See [Controls](./controls.md) for how these combine. ## Supported clients These clients can connect to SmartSuite today. | Client | Setup | Guide | | :-- | :-- | :-- | | Claude (web, desktop and mobile) | SmartSuite connector in Claude's connector directory | [Claude](./connecting/claude-app.md) | | ChatGPT | SmartSuite app coming soon; custom MCP app for Business, Enterprise and Edu today | [ChatGPT](./connecting/chatgpt.md) | | Claude Code | `claude mcp add` | [Claude Code](./connecting/claude-code.md) | | Cursor | Install link or `mcp.json` | [Cursor](./connecting/cursor.md) | | VS Code | `mcp.json` or **MCP: Add Server** | [VS Code](./connecting/vscode.md) | | Anything else | Any client that supports remote MCP servers and OAuth | [Other clients](./connecting/other.md) | ## Using the server Once you've connected, ask about the data in your Workspace or start building. - **Be specific.** Name the Solution and Table you mean, especially in a large Workspace. - **Expect some discovery.** It's normal for an assistant to list your Workspaces and Solutions and read a Table's Fields before it answers. That's how it learns your structure. - **Use plain language.** You don't need to know Field names or ids. Describe what you want, and describe the Solution in more detail if the assistant picks the wrong one. - **Ask for a dry run** before large updates, deletions or structural changes. The tools that change structure can report what they would do without doing it. - **Ask for a summary of changes** after bulk updates, so you can check them. - **Build in a sandbox first.** Try structural changes in a sandbox Workspace before making them in production. - **Point at an example.** Ask the assistant to follow an existing Solution, View or Automation as a reference. - **Check permissions.** If something can't be read or changed, check the Member's Permissions and the Workspace's MCP Access setting. - **Think about what you connect.** The assistant reads and changes SmartSuite data on your behalf. Only use AI tools you trust, and be careful about combining SmartSuite with other connections in the same conversation. ## What the server can do At a high level, the server can: | Scenario | Example tools | | :-- | :-- | | Explore a Workspace | List Workspaces, Solutions and Tables; read a Table's Fields; search Members and Teams | | Read and change Records | Find, create, update, delete and restore Records; read activity history | | Work around a Record | Read and write comments, upload files, follow Records, manage My Work | | Build structure | Create and change Solutions, Tables, Fields and the Record layout; check a Solution against SmartSuite's design standards | | Build Views, dashboards and Forms | Create and change Views, dashboards and Forms; submit a Form; publish at a public link | | Create documents | Design document templates and generate PDFs from Records | | Build and debug Automations | Read, create and change Automations; read run history; retry failed runs | See the [Tools Reference](./tools.mdx) for every tool. ## Authentication The server uses OAuth. When you connect a client, it opens SmartSuite's sign-in page, where you: 1. Sign in to SmartSuite. Single sign-on and two-factor authentication apply if your organization uses them. 2. Choose whether the connection can only read or can also make changes. Read-only is the default. 3. Choose which Workspaces the connection can use: specific Workspaces (the default) or all of them, including Workspaces you join later. Workspaces whose MCP Access is Disabled aren't offered. To change those choices later, disconnect SmartSuite in your AI tool and connect again. See [Controls](./controls.md#change-or-revoke-a-connection). There are no API keys or personal access tokens for the MCP server. To use a SmartSuite API key instead, see the [REST API](../../authentication.md) or the [open-source local server](./connecting/other.md#open-source-local-server). ### For client developers | | | | :-- | :-- | | Server URL | `https://app.smartsuite.com/v1/mcp` | | Transport | Streamable HTTP. The server is stateless: requests are `POST`, and there is no SSE stream or session id. | | Authorization | OAuth 2.1 with PKCE. Protected resource metadata is at `https://app.smartsuite.com/.well-known/oauth-protected-resource/v1/mcp`, and an unauthenticated request returns `401` with a `WWW-Authenticate` header pointing to it. | | Client registration | Dynamic Client Registration. No pre-registered client id is needed. | | Scopes | `mcp:read`, plus `mcp:write` for a connection that can make changes. | | Workspaces | Every tool except `find-workspaces` takes a `workspaceId`, the 8-character Workspace Id from the SmartSuite URL. Assistants call `find-workspaces` first to learn which Workspaces the connection covers. | | Regions | One URL for every Workspace. Requests for EU-hosted Workspaces are routed to their region. See [data residency](./controls.md#data-residency-and-gdpr). | --- # Claude Source: https://developers.smartsuite.com/docs/ai/mcp/claude SmartSuite is in Claude's connector directory, so there's nothing to install. The connector works in Claude on the web, the desktop app and mobile. ## Using the SmartSuite connector 1. In Claude, open **Customize → Connectors**. 2. Search for **SmartSuite**, select it, and click to connect. 3. Sign in to SmartSuite. Single sign-on and two-factor authentication apply if your organization uses them. Two-factor authentication must already be set up in SmartSuite, and five incorrect codes end the sign-in. 4. Choose the connection's scope: - Which Workspaces Claude may use. - Read-only or read and write access. Read-only and specific Workspaces are the defaults. Workspaces whose MCP Access is Disabled don't appear. 5. Confirm. There are no keys to manage. :::note On Claude Team and Enterprise plans, an Owner may need to make the SmartSuite connector available to your organization before Members can connect it. ::: ## Changing or removing the connection Review, change or remove the connection from the same **Connectors** screen in Claude. To change which Workspaces it covers or whether it can make changes, disconnect SmartSuite and connect again. ## Adding SmartSuite as a custom connector If your organization adds connectors by URL instead of from the directory, add a custom connector with this URL and leave the OAuth settings empty: ```text https://app.smartsuite.com/v1/mcp ``` Claude registers itself with SmartSuite automatically and then signs you in as above. :::info IP restrictions Claude connects to SmartSuite from Anthropic's servers, not from your computer. If your Workspace has IP restrictions turned on, Claude's requests are refused unless their addresses are allowed. See [Controls](../controls.md#ip-restrictions). ::: --- # ChatGPT Source: https://developers.smartsuite.com/docs/ai/mcp/chatgpt :::info Coming soon The SmartSuite app for ChatGPT's app directory is coming soon. Until then, ChatGPT workspace admins can add SmartSuite as a custom MCP app in developer mode, as described below. ::: ## Before you start - Custom MCP apps are available on **ChatGPT Business, Enterprise and Edu** plans, on ChatGPT on the web. - **Developer mode** must be turned on, and only admins and owners can publish an app to the rest of the workspace. On Enterprise and Edu, admins can also grant developer mode to specific members. See OpenAI's [Developer mode and MCP apps in ChatGPT](https://help.openai.com/en/articles/12584461-developer-mode-and-mcp-apps-in-chatgpt) for the current plan details and menu locations. ## Adding SmartSuite as a custom MCP app 1. **Turn on developer mode.** - On **Business**, admins and owners turn it on for themselves under **Settings → Apps → Advanced settings → Developer mode**. - On **Enterprise and Edu**, an admin first allows it under **Workspace Settings → Permissions & Roles → Connected Data**. Members who have been granted access then turn it on under **Settings → Apps → Advanced settings**. 2. Go to **Settings → Apps → Create**. Admins can also use **Workspace settings → Apps → Create**. 3. Enter the app details: - **Name:** SmartSuite - **MCP server URL:** `https://app.smartsuite.com/v1/mcp` - **Authentication:** OAuth 4. Click **Scan Tools**. When SmartSuite's sign-in page opens, sign in and choose the connection's scope: which Workspaces ChatGPT may use, and whether it can only read or can also make changes. 5. When the scan finishes, click **Create**. The app appears under **Settings → Apps** with a **Dev** label. 6. Open a new chat, select **SmartSuite** from the tools menu, and try a prompt such as "What's assigned to me in SmartSuite?" ## Sharing the app with your workspace When you've tested it, an admin or owner publishes it from **Workspace settings → Apps → Drafts**. Published apps appear to members in their Apps settings. Each member then connects with their own SmartSuite account, so each one sees only what their own Permissions allow. On Enterprise and Edu, admins can also choose which groups can use the app and turn individual actions off before or after publishing. For example, you could turn off `delete-records` and `update-sharing`. See the [Tools Reference](../tools.mdx) for what each action does. ## Changing or removing the connection Manage or remove the connection from **Settings → Apps** in ChatGPT. To change which Workspaces it covers or whether it can make changes, disconnect SmartSuite and connect again. :::info IP restrictions ChatGPT connects to SmartSuite from OpenAI's servers, not from your computer. If your Workspace has IP restrictions turned on, ChatGPT's requests are refused unless their addresses are allowed. See [Controls](../controls.md#ip-restrictions). ::: --- # Claude Code Source: https://developers.smartsuite.com/docs/ai/mcp/claude-code ## Adding the server 1. Run this command in your terminal: ```bash claude mcp add --transport http --scope user smartsuite https://app.smartsuite.com/v1/mcp ``` `--scope user` makes SmartSuite available in every project. Use `--scope project` instead to save it in the project's `.mcp.json` and share it with everyone who works on the project. 2. Start Claude Code: ```bash claude ``` 3. Inside Claude Code, open the MCP menu: ```text /mcp ``` 4. Select **smartsuite**, then **Authenticate**. Sign in to SmartSuite in the browser window that opens, and choose which Workspaces Claude Code may use and whether it can make changes. ## Configuring it by file To add SmartSuite to a project by hand, put this in `.mcp.json` at the project root: ```json { "mcpServers": { "smartsuite": { "type": "http", "url": "https://app.smartsuite.com/v1/mcp" } } } ``` Each person who opens the project authenticates with their own SmartSuite account from `/mcp`. ## Changing or removing the connection Run `/mcp`, select **smartsuite**, and clear its authentication to sign out. Authenticate again to choose a different scope. To remove the server: ```bash claude mcp remove smartsuite ``` :::tip Claude Code connects from your own computer, so a Workspace with IP restrictions accepts it whenever you're on an allowed network. ::: --- # Cursor Source: https://developers.smartsuite.com/docs/ai/mcp/cursor ## Using the install link 1. Open the [SmartSuite install link for Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=smartsuite&config=eyJ1cmwiOiJodHRwczovL2FwcC5zbWFydHN1aXRlLmNvbS92MS9tY3AifQ%3D%3D). 2. Cursor opens and asks whether to install the SmartSuite MCP server. Click **Install**. 3. Sign in to SmartSuite when prompted, and choose which Workspaces Cursor may use and whether it can make changes. ## Connecting manually 1. Open `~/.cursor/mcp.json` to make SmartSuite available everywhere, or `.cursor/mcp.json` in a project to use it there only. 2. Add the SmartSuite server: ```json { "mcpServers": { "smartsuite": { "url": "https://app.smartsuite.com/v1/mcp" } } } ``` 3. SmartSuite appears in Cursor's list of MCP servers with a prompt to sign in. Select it, then sign in to SmartSuite and choose the connection's scope. Cursor registers itself with SmartSuite automatically, so you don't need a client id or the `auth` block that some other servers require. ## Changing or removing the connection Turn the server off or remove it from Cursor's MCP settings, or delete its entry from `mcp.json`. To change which Workspaces it covers or whether it can make changes, sign out and connect again. :::tip Cursor connects from your own computer, so a Workspace with IP restrictions accepts it whenever you're on an allowed network. ::: --- # VS Code Source: https://developers.smartsuite.com/docs/ai/mcp/vscode SmartSuite works with GitHub Copilot's agent mode in Visual Studio Code. ## Using the command palette 1. Open the command palette and run **MCP: Add Server**. 2. Choose **HTTP** as the server type. 3. Enter the server URL: ```text https://app.smartsuite.com/v1/mcp ``` 4. Name the server `smartsuite`, and choose whether to add it for your user (every workspace) or only the current workspace. 5. Start the server when VS Code offers to. Allow it to sign in, then sign in to SmartSuite and choose which Workspaces Copilot may use and whether it can make changes. ## Configuring it by file To share SmartSuite with everyone who opens a project, add it to `.vscode/mcp.json`: ```json { "servers": { "smartsuite": { "type": "http", "url": "https://app.smartsuite.com/v1/mcp" } } } ``` Each person authenticates with their own SmartSuite account the first time the server starts. ## Using SmartSuite in chat Open Copilot Chat, switch to **Agent** mode, and make sure the SmartSuite tools are selected in the tools picker. Then ask a question such as "What's assigned to me in SmartSuite?" ## Changing or removing the connection Run **MCP: List Servers**, select **smartsuite**, and stop or remove it. To change which Workspaces it covers or whether it can make changes, sign out of SmartSuite from VS Code's **Accounts** menu and start the server again. :::tip VS Code connects from your own computer, so a Workspace with IP restrictions accepts it whenever you're on an allowed network. ::: --- # Other Clients Source: https://developers.smartsuite.com/docs/ai/mcp/other If your AI tool isn't listed, you can still connect it. Any MCP client that supports remote servers over Streamable HTTP and OAuth can use the SmartSuite MCP Server. The server is available to all customers on all plans. ## Manual configuration Follow your client's instructions for adding a remote MCP server, and point it at: ```text https://app.smartsuite.com/v1/mcp ``` Many clients read a JSON file with an `mcpServers` block. The SmartSuite entry usually looks like this: ```json { "mcpServers": { "smartsuite": { "type": "http", "url": "https://app.smartsuite.com/v1/mcp" } } } ``` Where the file lives, and whether the `type` key is needed, varies by client. Check your client's documentation, or the client guides in this section. ## Authentication Clients authenticate with OAuth. The client registers itself with SmartSuite automatically through Dynamic Client Registration, so there is no client id or secret to configure. The first time it connects, the client opens SmartSuite's sign-in page, where you choose which Workspaces it may use and whether it can make changes. There are no API keys or personal access tokens for the hosted server, and no static OAuth clients to register. See the [MCP Server Overview](../overview.md#for-client-developers) for the technical details. ## Clients without remote server support A client that can only launch local MCP servers can reach SmartSuite through the open-source [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) bridge, which runs locally and handles the OAuth sign-in: ```json { "mcpServers": { "smartsuite": { "command": "npx", "args": ["-y", "mcp-remote", "https://app.smartsuite.com/v1/mcp"] } } } ``` `mcp-remote` is a third-party tool, not maintained by SmartSuite. ## Open-source local server SmartSuite also publishes an open-source MCP server that runs on your own machine and authenticates with a SmartSuite API key instead of OAuth. It's a separate product from the hosted server, with its own tools and its own access modes. It suits automated, scripted or server-side setups where nobody is present to sign in. See [SmartSuiteFoundry/smartsuite-mcp-server](https://github.com/SmartSuiteFoundry/smartsuite-mcp-server) on GitHub for installation and configuration. The hosted server is the recommended way to connect an AI assistant. --- # Controls Source: https://developers.smartsuite.com/docs/ai/mcp/controls Members and Workspace Administrators both decide what an AI assistant can do in SmartSuite. Members choose what each connection covers. Administrators set the ceiling for the whole Workspace. And every action stays within the connected Member's own Permissions. ## Member controls ### Choosing what a connection can reach Each connection is scoped when the Member connects it. On SmartSuite's sign-in page, the Member chooses: - **Access:** read-only, or read and write. Read-only is the default. - **Workspaces:** specific Workspaces (the default), or all of them, including Workspaces the Member joins later. A connection never reaches a Workspace outside its scope. If an assistant asks for one, it is told to reconnect and select that Workspace. ### Change or revoke a connection Connections are managed from the AI tool that holds them, for example Claude's **Connectors** screen or ChatGPT's **Apps** settings. To change a connection's Workspaces or access, disconnect SmartSuite there and connect again. Disconnecting ends the assistant's access. ### Permissions always apply The assistant acts as the Member who connected it. It can't see or change anything that the Member's Role and Permissions don't allow, and a Member with read-only Permissions on a Solution can only read it, whatever the connection allows. Requests through MCP get the same Permission checks as the same action in the SmartSuite app. ### Read-only, two ways A connection can be read-only for two reasons, and assistants see them differently: | Reason | What the assistant sees | | :-- | :-- | | The Member chose read-only when connecting | Tools that make changes aren't offered at all | | The Workspace's MCP Access is Read-Only | Tools that make changes are offered, but refused with a message that an Administrator must allow MCP writes | The [Tools Reference](./tools.mdx) marks which tools are read-only. ### Seeing what an assistant did Every change made through MCP is written to the Record's activity history under both the Member's name and the assistant's, using the name the AI tool registered with SmartSuite, such as "Claude". It's always clear what a person did directly and what an assistant did on their behalf. Changes send the same notifications as the same change made in the SmartSuite app. Assistants can read activity history too, with `find-record-history`, including whether a person, an assistant or an Automation made each change. ### Undoing changes - **Deleted Records, Fields, Tables and Solutions** go to the Workspace's recycle bin. Records can usually be restored for about 30 days after they are deleted, and longer on some plans. Assistants can list the recycle bin and restore from it. - **Updated values** stay in the Record's activity history. - **Deleted Views, dashboards, Forms, document templates and Automations** don't go to the recycle bin and can't be restored. - **Dry runs:** the tools that change structure can report what they would do without doing it. Ask for one before large changes. ## Workspace controls These controls are for Workspace Administrators and are available on all plans. ### MCP Access MCP Access decides what assistants can do in the Workspace. It applies to every connection, from every AI tool. 1. Open **Workspace Administration**. 2. Go to **AI Control Center → MCP Access** and click **Edit**. 3. Choose an option and click **Save Configuration**. | Option | What it allows | | :-- | :-- | | Disabled | No MCP access. The Workspace isn't offered when a Member connects an assistant, and every request to it is refused. | | Read-Only (default) | Assistants can read anything the connected Member can see, including Records, documents, structure and settings, but can't create, change or delete anything. | | Read & Write | Assistants can change data and structure: Records, Fields, Tables, Views, Forms and Automations, within the Member's own Permissions. | :::warning "Write" covers structure as well as Record values. In Read & Write, an assistant can create and delete Fields, Tables, Views, Forms and Automations. Choose it deliberately. ::: ### Two gates, and the stricter one wins The Workspace setting is the ceiling. A Member's choice when connecting can only narrow it. | Workspace setting | Member chose read-only | Member chose read & write | | :-- | :-- | :-- | | Disabled | No access | No access | | Read-Only | Read only | Read only | | Read & Write | Read only | Read & write, within the Member's own Permissions | Lowering the setting to Read-Only or Disabled narrows every existing connection within about a minute. Nobody has to reconnect. Raising it to Read & Write doesn't upgrade existing read-only connections: a Member who wants write access reconnects and chooses it. ### Recommended setups - **Build and sandbox Workspaces:** Read & Write, so builders can scaffold Tables, Fields, Views and Automations with an assistant. - **Production Workspaces:** Read-Only, so Members can ask questions of live data without any risk of changes. - **Workspaces no assistant should reach:** Disabled. ### IP restrictions If IP restrictions are turned on under **Workspace Administration → Security**, they apply to MCP requests too. The address checked is the one the request comes from, which depends on the AI tool: | AI tool | Where requests come from | | :-- | :-- | | Claude (web, desktop and mobile), ChatGPT and other hosted assistants | The AI provider's servers | | Claude Code, Cursor, VS Code and other tools running on your computer | Your own network | A request from an address that isn't on the allowlist is refused with a message naming the address. To use a hosted assistant with a restricted Workspace, an Administrator has to allow the provider's addresses. Otherwise, Members can use a tool that runs on their computer from an allowed network. ### Two-factor authentication If the Workspace requires two-factor authentication, the Member is asked for a code when they connect. A connection that hasn't answered that challenge is refused in that Workspace until the Member reconnects. Its other Workspaces keep working. ## Data privacy ### What SmartSuite receives The SmartSuite MCP Server receives only the tool calls an assistant makes, such as the Table to search and the values to write. It never receives your prompt or the rest of the conversation. SmartSuite logs metadata about each call: which tool was used, the Workspace, the AI tool and the address the request came from. It doesn't log tool arguments or results, though a call that fails may log its error message. Data the server reads and writes is handled under the same policies as the rest of SmartSuite. ### What the AI tool receives Whatever a tool returns, such as Records, comments or structure, is sent to the AI tool and processed by its provider under that provider's terms. Many AI tools show each tool call's arguments and results, so you can see exactly what was exchanged. Only connect SmartSuite to AI tools your organization has approved. ### Data residency and GDPR The SmartSuite MCP Server runs in the United States. Requests for EU-hosted Workspaces are routed to the EU, and Workspace data stays stored there. However, each tool call, and the data it reads or writes, passes through the server in the United States. The data is then processed by your AI tool's provider wherever that provider operates. :::warning GDPR If your Workspace is hosted in the EU and you're subject to the GDPR, using the MCP server can transfer personal data outside the EU. Review it with your data protection officer, or under your own transfer assessment, before you allow it. Until you have, consider setting MCP Access to **Disabled** for Workspaces that hold personal data. ::: --- # Tools Reference Source: https://developers.smartsuite.com/docs/ai/mcp/tools These are the tools the SmartSuite MCP Server offers at `https://app.smartsuite.com/v1/mcp`. You don't call them yourself: your AI tool chooses them from what you ask. Knowing what's here helps you ask for things the server can do. Each tool is labeled by what it can do: - Read-only reads and never changes anything. - Write creates or changes data or structure. - Destructive can delete or overwrite something, publish it, or start an Automation. A connection the Member made read-only doesn't offer the Write or Destructive tools at all. If the Workspace's MCP Access is Read-Only, they're offered but refused. See [Controls](./controls.md). ## Workspaces and directory ### Find workspaces `find-workspaces` · Read-only Lists the Workspaces this connection can use, who you are in each, and whether the connection can write there. Every other tool needs a Workspace Id, so assistants usually call this first. Example prompt: - “Which SmartSuite Workspaces can you reach?” ### Search the directory `search-directory` · Read-only Finds Members and Teams by name or email address, for assigning Records, filtering by person, or mentioning someone in a comment. Example prompt: - “Who on the Finance team can I assign this to?” ## Solutions, Tables and Fields ### Find solutions `find-solutions` · Read-only Lists Solutions with their Tables, the links between those Tables, and each Solution's Guide. This is the usual starting point for any question about how a Workspace is organized. Example prompt: - “What Solutions do we have, and how are the Tables in Project Management linked?” ### Find tables `find-tables` · Read-only Describes the Fields of one or more Tables: their types, options, help text and how each one is written. Example prompt: - “What Fields does the Vendors Table have?” ### Find tags `find-tags` · Read-only Lists the tags that Tags Fields offer in the Solutions you name, including tags shared across the Workspace. ### Check schema `check-schema` · Read-only Reviews a Solution against SmartSuite's design standards, such as Record titles, Record IDs, Field help text, the Record layout and links between Tables, and suggests fixes. It doesn't change anything. Example prompt: - “Review the Incident Management Solution against SmartSuite's design standards.” ### Update schema `update-schema` · Destructive Creates, changes, moves, deletes and restores Solutions, Tables and Fields. It also edits select and status options and arranges the Record layout with tabs, sections and display logic. Supports a dry run that reports what would change without changing it. Example prompt: - “Add a Software Licenses Table to IT Asset Management with Vendor, Seat Count, Renewal Date and Annual Cost Fields.” ## Records ### Find records `find-records` · Read-only Lists, searches, filters and sorts Records, or fetches specific Records by id, returning only the Fields asked for. Example prompts: - “Which Critical incidents are still New?” - “Show me the overdue tasks assigned to me.” ### Get one field's full value `get-record-value` · Read-only Reads one Field of one Record in full, a page at a time if needed. Assistants use it for values too long to return in a list, such as a long rich text document. ### Create records `create-records` · Write Creates one or more Records in a Table. Example prompt: - “Add a task called Review Q3 budget to the Tasks Table, due Friday.” ### Update record fields `update-records` · Write Updates Fields on one or more Records. A value can be replaced, added to, cleared or edited in place, and the previous value stays in the Record's activity history. Example prompt: - “Move the Data Leakage incident to In Progress and make me the Incident Manager.” ### Delete records `delete-records` · Destructive Deletes Records by id. Deleted Records go to the Workspace's recycle bin, where they can be restored. Example prompt: - “Delete the duplicate Acme Corp record.” ### Find deleted items `find-deleted` · Read-only Lists what is in the recycle bin, including deleted Solutions, Tables, Fields and Records, with who deleted each item, when, and until when it can be restored. Example prompt: - “What was deleted from the CRM Solution this week?” ### Restore records `restore-records` · Write Restores deleted Records from the recycle bin. Records can usually be restored for about 30 days after they are deleted, and longer on some plans. Example prompt: - “Restore the records I deleted from Vendors yesterday.” ### Find record history `find-record-history` · Read-only Reads a Record's activity history: Field changes with their before and after values, comments, emails, deletes and restores, and whether a person, an assistant or an Automation made each change. Example prompt: - “Who changed the status of this contract, and when?” ### Follow records `update-following` · Write Follows or unfollows Records for you, so you are notified when they change, are commented on or are assigned. Example prompt: - “Follow every open incident assigned to my team.” ## Comments and files ### Find record comments `find-record-comments` · Read-only Lists a Record's comments and replies. Example prompt: - “Summarize the comments on the Website Redesign project.” ### Create record comment `create-record-comment` · Write Adds a comment or a reply to a Record, with mentions of Members, Teams or other Records and optional attachments. Example prompt: - “Comment on the Data Leakage incident that the leaked files have been taken offline.” ### Create files `create-files` · Write Uploads files from a public URL or from file content, ready to attach to a file Field or a comment. Uploading doesn't attach a file to anything by itself. ## Views, dashboards and sharing ### Find views `find-views` · Read-only Lists a Table's Views, such as grids, cards, kanban boards, calendars, timelines, maps and charts, with the Fields, filters, sorts and grouping of each. Example prompt: - “What Views does the Tasks Table have, and how is each one filtered?” ### Update views `update-views` · Destructive Creates, changes, duplicates, reorders and deletes Views. Deleting a View is permanent. Example prompt: - “Add a calendar View of upcoming renewals to the Software Licenses Table.” ### Find dashboards `find-dashboards` · Read-only Lists a Table's dashboards with their tabs and widgets. Example prompt: - “Summarize what the Incident Dashboard shows on each tab.” ### Update dashboards `update-dashboard` · Destructive Builds and changes dashboards: their tabs, layout and widgets, such as metrics, charts, text and embedded Views. Example prompt: - “Build a dashboard of open incidents by severity, with the average time to resolve.” ### Share at a public link `update-sharing` · Destructive Publishes Views, dashboards and Forms at a public link that anyone can open without signing in, changes how the link behaves, or takes it down. The tool tells assistants to ask you before publishing anything. Example prompt: - “Share the Product Roadmap View at a password-protected public link.” ## Forms ### Find forms `find-forms` · Read-only Lists the Forms of a Table or Solution, or describes a Form in full: its pages, Fields, settings and what happens after it is submitted. Example prompt: - “What does the Service Request Form ask people to fill in?” ### Update forms `update-forms` · Destructive Creates, changes and deletes Forms, including their pages, sections, Fields, display logic, review page and thank-you page. Example prompt: - “Create an intake Form for new vendor requests, with a second page for compliance questions.” ### Submit form `submit-form` · Write Submits a Form as you, creating a Record the way a person sending the Form would, with the Form's own required checks and defaults. Example prompt: - “Submit the new-hire intake Form for Jordan Lee, starting next Monday.” ## Document templates ### Find document templates `find-document-templates` · Read-only Lists a Table's document templates, the Document Designer's invoices, quotes, contracts and reports, or describes a template in full. Example prompt: - “What document templates does the Invoices Table have?” ### Update document templates `update-document-templates` · Destructive Creates, changes and deletes document templates: their page size and orientation, text, shapes, images and Fields. Example prompt: - “Design an A4 invoice template for the Invoices Table with a table of line items.” ### Generate a document PDF `generate-document-pdf` · Write Draws a Record onto a document template and stores the result as a PDF, ready to attach to a file Field. Example prompt: - “Generate the invoice PDF for INV-1042 and attach it to the record.” ## Automations ### Find integrations `find-integrations` · Read-only Lists the triggers and actions that Automations can be built from, both SmartSuite's own and those of connected services. Example prompt: - “What can start an Automation in SmartSuite?” ### Find automations `find-automations` · Read-only Lists a Solution's Automations, whether each one is on and able to run, or describes Automations in full: the trigger and every step, loop and branch. Example prompt: - “What Automations run in the HR Solution?” ### Describe automation step `describe-automation-step` · Read-only Describes the inputs and outputs of a trigger or action while an Automation is being built. Nothing runs and nothing is saved. ### Update automations `update-automations` · Destructive Creates, changes, turns on or off, and deletes Automations. Deleting an Automation is permanent. Example prompt: - “When an incident is marked Critical, notify the Incident Manager and set the due date to tomorrow.” ### Find automation runs `find-automation-runs` · Read-only Shows an Automation's run history and, for any run, what happened step by step: the trigger's values, each step's inputs and outputs, and why a run failed. Example prompt: - “Why did the onboarding Automation fail last night?” ### Retry automation run `retry-automation-run` · Destructive Runs a failed Automation run again. Every step runs again, including any that succeeded the first time. Example prompt: - “Retry last night's failed run of the onboarding Automation.” ### Press a button `click-button` · Destructive Presses a button Field on a Record. A button that runs an Automation starts it. For other buttons the assistant tells you what the button would open or create. Example prompt: - “Press Send Welcome Pack on Jordan Lee's record.” ## AI Fields ### Find AI connections `find-ai-connections` · Read-only Lists the AI connections a Solution's AI Field Agents can use, and what the Workspace's AI Fields settings allow. Example prompt: - “Which AI connections can an AI Field in the CRM Solution use?” ## My Work and starred items ### Find my work `find-my-work` · Read-only Lists your My Work items, such as assigned Records, mentions and checklist items, with totals and how many are overdue. Example prompt: - “What's assigned to me, and what's overdue?” ### Update my work item `update-my-work` · Write Resolves or reopens one of your My Work items, or changes its due date or priority. Example prompt: - “Move my design review item to next Wednesday.” ### Find starred items `find-starred` · Read-only Lists the Solutions, Tables, Views and Records you have starred. Example prompt: - “What have I starred?” ### Update starred items `update-starred` · Write Stars or unstars Solutions, Tables, Views and Records for you. Starred items are yours alone. Example prompt: - “Star the Q4 Roadmap View.” ## Guides ### Read guides `read-guides` · Read-only Returns the server's reference guides. Assistants read the relevant guide before writing formulas, designing a Solution, or building dashboards, document templates or Automations. Some work needs more than a tool's description can say, such as the formula language or what makes a good dashboard. The server has guides for this, and assistants read the relevant one before that kind of work. Clients that support MCP resources can also read them directly as `skill://` resources. | Guide | What it covers | | :-- | :-- | | `automations` | How an automation is built: its shape, how a step reveals what it takes, what the SmartSuite triggers and actions need, and how a condition is written. | | `dashboards` | Every widget a dashboard can hold, what each one needs, how widgets drive one another, and what a dashboard worth handing to someone else looks like. | | `document-templates` | The page a record is drawn onto and exported as a PDF: its paper size and pixels, the elements that go on it, how a field's type decides the way it is drawn, and how to place what sits under something that grows. | | `formulas` | The SmartSuite formula language: every function and operator, and how a formula field is written through `update-schema`. | | `solution-design` | What a well-built solution looks like: record titles and IDs, field naming and types, help text, the record form, links between tables, and the Guide that explains it. | --- # Introduction Source: https://developers.smartsuite.com/docs/intro This is the reference for the SmartSuite API. Use the sidebar to explore the API and learn more about important concepts. The SmartSuite API can be used to integrate your data in SmartSuite with external systems. The API closely follows REST semantics, uses JSON to encode objects, and relies on standard HTTP codes to signal operation outcomes. :::tip Note We have recently re-named Apps to "Tables" and this documentation site has been updated to reflect that change. Note that many API endpoints still refer to "Applications" or "Apps" - you should know that these refer to the objects now known as Tables. ::: ## Base URLs | API | Base URL | | :-- | :-- | | REST API | `https://app.smartsuite.com/api/v1` | | Webhooks API | `https://webhooks.smartsuite.com` | REST endpoint paths end with a trailing slash, for example `https://app.smartsuite.com/api/v1/solutions/`. Every request must be authenticated; see [Authentication](./authentication.md). ## Learn More You can also read more about the API in the SmartSuite Help Center: - **[SmartSuite API Overview](https://help.smartsuite.com/en/articles/4356333-smartsuite-api-overview)** - **[Generating an API Key](https://help.smartsuite.com/en/articles/4855681-generating-an-api-key)** --- # Authentication Source: https://developers.smartsuite.com/docs/authentication ## Basics SmartSuite's API uses token-based authentication, allowing users to authenticate API requests by inputting their tokens into the HTTP authorization header. :::tip Note The header value should be formatted with the word Token, followed by a space, then the API token. ::: Every request must include two headers: | Header | Value | | :-- | :-- | | Authorization | Token YOUR_API_KEY | | ACCOUNT-ID | YOUR_WORKSPACE_ID | :::tip Note Your Workspace Id is the 8 characters that follow https://app.smartsuite.com/ in the SmartSuite URL when you’re logged in. Example: https://app.smartsuite.com/sv25cxf2/solution/62c4b… ::: Example: ```bash curl https://app.smartsuite.com/api/v1/solutions/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: YOUR_WORKSPACE_ID" ``` All API requests must be authenticated and made through HTTPS. ## Types of token We currently support using API tokens and OAuth access tokens during the authentication process. API tokens are for personal development, like building an integration for yourself, your client, or your company. They can be created and managed from your account profile menu, just select API key. API tokens act as your user account, and should be treated with the same care as passwords. :::tip Note Only users with the Administrator role see API Token listed as a menu item in their user profile, but they exist for all users. Simply scroll down to the API Token section to access your key. ::: OAuth access tokens are recommended for building an integration where other users grant your service access to SmartSuite’s API on their behalf. In this case, your integration is a third-party service with respect to SmartSuite. After registering your integration with SmartSuite, tokens are available via the OAuth grant flow. Any integrations that allow other users to grant access to SmartSuite should use OAuth. --- # Errors Source: https://developers.smartsuite.com/docs/errors The SmartSuite REST API follows HTTP status code semantics. 2xx codes signify success, 4xx mostly represent user error, 5xx generally correspond to a server error. Error responses return a JSON-encoded body, and its shape varies by error. The body provides specific error conditions and human-readable messages to identify the source of the error. For example, a field-validation error is keyed by field name, with an array of messages: ```json title="Example: validation error" { "page_size": ["\"5\" is not a valid choice."] } ``` Other errors can return a single message, for example: ```json title="Example: generic error" { "err": "Internal error" } ``` ## Success code | Code | Message | Description | | :-: | :-: | :-- | | 200 | OK | Request completed successfully. Delete endpoints also return 200, with the deleted object in the body. | | 201 | Created | A new object was created. Returned by Create Solution, Create Table, Create Record, Bulk Add Records, Add Comment and Create View. | ## User error codes | Code | Message | Description | | :-: | :-: | :-- | | 400 | Bad Request | The request was invalid or could not be parsed. | | 401 | Unauthorized | Provided credentials were invalid or do not have authorization to access the requested resource. | | 403 | Forbidden | Accessing a protected resource with API credentials that don’t have access to that resource. | | 404 | Not Found | Route or resource is not found. This error is returned when the request hits an undefined route, or if the resource doesn’t exist (e.g. has been deleted). | | 422 | Invalid Request | The request data is invalid. | | 429 | Too Many Requests | The rate limit was exceeded. See [Rate Limits](./rate-limits.md). | ## Server error codes | Code | Message | Description | | :-: | :-: | :-- | | 500 | Internal Server Error | The server encountered an unexpected condition. | | 502 | Bad Gateway | SmartSuite’s servers are restarting or an unexpected outage is in progress. You should rarely encounter this error, and should retry requests if it is generated. | | 503 | Service Unavailable | The server could not process your request in time. The server could be temporarily unavailable, or it could have timed out processing your request. You should retry the request with backoffs. | --- # Rate Limits Source: https://developers.smartsuite.com/docs/rate-limits The API is limited to 5 requests per second per API key. If you exceed this rate, you will receive a 429 status code and will need to wait 30 seconds before subsequent requests will succeed. SmartSuite may change the enforced API rate limits or enforce additional types of limits in our sole discretion. Upon receiving a 429 status code, API integrations should back-off and wait before retrying the API request. If you anticipate a higher read volume, we recommend using a caching proxy. This rate limit is the same for all plans and increased limits are not currently available. --- # List Records Source: https://developers.smartsuite.com/docs/solution-data/records/list-records ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/list/ // highlight-end ``` List records in an App. Note that you must use the Table (App) Id when referencing the App. Returned records do not include any fields with "empty" values, e.g. "", [], or false. ```text title="Example Request" curl -X POST 'https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/records/list/?offset=0&limit=3' \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "sort": [], "filter": {} }' ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Table (App) Id | ## Query Parameters | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | offset | number | Yes | For use in pagination - specify the offset value returned by the prior record response to retrieve the next page. | | limit | number | Yes | Number of records to return per request. If not set, defaults to 100. Note: Value must be less than or equal to 1000. See the Pagination section below for more information. | | all | boolean | Yes | Returns all records, including those marked as deleted. Defaults to false. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | sort | sort object | Yes | Object specifying sort parameters | | filter | filter object | Yes | Object specifying filter parameters | | hydrated | boolean | Yes | Returns text labels for id-type fields. Defaults to false. | ## Pagination If `limit` is not set, 100 records are returned per request. You can use the limit parameter to limit the number of records returned per request. When paginated, if there are more records than limit, the response will contain an offset. To fetch the next page of records, include offset in the next request parameters. ```text title="Example" https://app.smartsuite.com/api/v1/applications/[ID]/records/list/?limit=100 ``` This will have the effect of returning the first 100 items. You can retrieve subsequent pages by specifying an offset value: ```text https://app.smartsuite.com/api/v1/applications/[ID]/records/list/?limit=100&offset=100 ``` This will tell the API to ignore the first 100 items and send the next 100. The total number of results is contained in the total property: ```json title="Example" { "total": 5000, "offset": 0, "limit": 0, "items": [ ... ] } ``` ## Hydrating Records To return human-readable values for certain fields, you can include the following JSON in the request body: ``` {"hydrated": true} ``` Fields that will return additional information with this setting include: - Single Select - Multiple Select - Status - First Created - Last Updated - Assigned To - Tags - Vote - Time Tracking Log - Checklist - Lookup :::caution Hydration changes the shape of some values. With hydration on, `first_created.by` and `last_updated.by` are returned as member objects (`id`, `full_name`, `email`) instead of member Id strings. Clients that read hydrated records must accept both forms. ::: ## Deleted Records By default, only active (non-deleted) records are returned by this endpoint. To return deleted records along with active records, include the following parameter with your request: ``` ?all=true ``` ## Response Format | Param | Type | Description | | :-: | :-: | :-- | | total | number | Total number of records returned. | | offset | number | Current offset value. | | limit | number | Current limit value. | | items | Array of objects | Array of record objects. | ```json title="200 Response - Example" // highlight-start { "total": 1, "offset": 0, "limit": 0, "items": [ { "title": "Record 1", "description": { "data": {}, "html": "
\n \n
" }, "assigned_to": [ "5dd812b9d8b7863532d3ddd2", "5e6ec7dadc8a90f33bcb02c9" ], "status": { "value": "in_progress" }, "due_date": { "from_date": { "date": "2021-09-03T03:00:00Z", "include_time": true }, "to_date": { "date": "2021-09-04T03:15:00Z", "include_time": true }, "is_overdue": false }, "priority": "1", "first_created": { "on": "2020-06-05T22:46:20.336000Z", "by": "5ec1df770a8617c27a73e3c3" }, "last_updated": { "on": "2020-06-19T19:11:46.042000Z", "by": "5ec1df770a8617c27a73e3c3" }, "followed_by": [ "5dd812b9d8b7863532d3ddd2", "5e6ec7dadc8a90f33bcb02c9" ], "comments_count": 1, "autonumber": 1, "sef1a6a113": { "from_date": { "date": "2021-09-01T00:00:00Z", "include_time": false }, "to_date": { "date": "2021-09-03T00:00:00Z", "include_time": false } } } ] } // highlight-end ``` --- # Sorting and Filtering Records Source: https://developers.smartsuite.com/docs/solution-data/records/sort-filter The SmartSuite REST API gives you the ability to retrieve record data with the /records/list/ endpoint. The reason that this endpoint accepts POST requests (typically GET is used for retrieval) is that the body of the request can contain JSON representing sort and filter instructions for the request. :::tip Note SmartSuite does not consider adding keys to response objects as breaking changes, so the shape of objects may change without notice. Existing keys will not be removed without a deprecation warning and timeframe. ::: ___ ## Authorization Just like other REST API endpoints, SmartSuite uses token-based authentication for record requests. You can generate or manage your API key in your User Profile. All API requests must be authenticated and made over HTTPS. :::danger IMPORTANT! Your API key conveys the same privileges as the Member account it is generated in, so it should be treated as securely as a password. ::: You authenticate to the API by providing your API key in the Authorization header, as well as your Workspace Id in an Account-Id header, as shown below. | KEY | VALUE | | :-- | :-- | | Authorization | Token YOUR_API_KEY | | ACCOUNT-ID | WORKSPACE_ID | See [Authentication](/docs/authentication) for details. :::tip Note Your Workspace Id is the 8 characters that follow https://app.smartsuite.com/ in the SmartSuite URL when you’re logged in. Example: https://app.smartsuite.com/sv25cxf2/solution/62c4b… ::: ___ ## Retrieving Records There are two ways to retrieve records in the SmartSuite API: ### Retrieve a single record You can use the following endpoint to retrieve a single record: ```text GET https://app.smartsuite.com/api/v1/applications/[tableId]/records/[Record Id]/ ``` [tableId] is the Table (App) unique id This endpoint does not accept any sorting or filtering parameters, as a single record is retrieved per call. ### Retrieve a list of records This endpoint retrieves a list of records from SmartSuite: ```text POST https://app.smartsuite.com/api/v1/applications/[tableId]/records/list/ ``` [tableId] is the Table (App) unique id This endpoint supports sort and filter directives that are specified in the JSON body. :::tip Note You should set Content-Type to application/JSON when including sort and filter JSON as part of your request. ::: ## Specifying Sort and Filter Parameters Both sort and filter parameters are specified in the body of the POST request, and must be formatted as valid JSON. Sorting and filtering can be specified independently, or can be combined in the request. Here is an example of a JSON structure that includes a sort and a filter: ```json title="Example" { "filter": { "operator": "and", "fields": [ { "field": "title", "comparison": "is_not_empty", "value": "" } ] }, "sort": [ { "field": "title", "direction": "asc" } ] } ``` ### Sort Syntax The syntax for sort is simple - you specify a key value of "sort" and a value that is an array of sort objects. Each sort object contains two JSON object literals: | Key | Value | | :-- | :-- | | field | field id ("slug" value) to perform the sort on | | direction | direction of the sort, which varies by field type | You can include multiple sorts in the array. The sort should be returned as an array even if you are sorting by a single field. ```json title="Example of a single sort" "sort": [ { "field": "title", "direction": "desc" } ] ``` ```json title="Example of multiple sorts" "sort": [ { "field": "title", "direction": "asc" }, { "field": "s228acd4ea", "direction": "desc" } ] ``` Multiple sorts are applied in the order specified, so in the above example the records would first be sorted by title and then by the field with id s228acd4ea. ___ ### Filter Syntax Filter syntax resembles sort syntax as it consists of a key value "filter" which contains a filter object. The filter object contains a JSON literal with key "operator" that has a string value, and a second JSON literal with key "fields" that has an array of field objects as its value. | Key | Type | Value | | :-- | --- | :-- | | operator | string | Valid operators include:

| | fields | array of filter objects | An array of Filter objects that have the following JSON literals:

| :::tip Note The operator is required in the request body even if only a single filter is being applied, with a value of and or or being specified (both return the same records). ::: Example of an and filter: ```json title="Example" "filter": { "operator": "and", "fields": [ { "field": "status", "comparison": "is_not", "value": "Complete" }, { "field": "s251d4318b", "comparison": "is_equal_to", "value": 0 } ] } ``` ### Filter Values The value you pass in the filter corresponds to the field's type: + Text Type. Pass a double-quote enclosed string to the filter + Number Type. Pass a number or a number enclosed in quotes (number as string is interpreted properly) + Date Type. Pass a Date Value Object (see below) #### Date Value Object Dates differ from string and number type fields in that they require passing a Date Value Object as their value. They have two JSON literals: + date_mode + date_mode_value ```json title="Example" "value": { "date_mode": "exact_date", "date_mode_value": "2023-02-01" } ``` *See the Date Modes and Values section below for more details.* ___ ## Operators by Field Type The following table lists the valid sort and filter options by field type. A few notes: + For filters that do not require a value, specify null or an empty string "" for the value + The field "Type" is the name for the field type in the SmartSuite API. It is used when creating or modifying fields using the API. + Filter options are case sensitive. Ex: "is_not_empty" is valid while "Is_Not_Empty" isn't. | Field | Sort Options | Filter Options | | ----- | ------------ | -------------- | | Name: __Text__

Type: textfield

| | | | Name: __Address__

Type: addressfield

*Operations applied to the full string version of concatenated address*

| | | | Name: __Checklist__

Type: checklistfield

| | | | Name: __Color Picker__

Type: colorpickerfield

| | | | Name: __Email__

Type: emailfield

| | | | Name: __Full Name__

Type: fullnamefield

| | | | Name: __IP Address__

Type: ipaddressfield

| | | | Name: __Link__

Type: linkfield

| | | | Name: __Phone__

Type: phonefield

| | | | Name: __Record Title__

Type: recordtitlefield

| | | | Name: __SmartDoc__

Type: richtextareafield

| | | | Name: __Social Network__

Type: socialnetworkfield

| | | | Name: __Text Area__

Type: textareafield

| | | | Name: __Currency__

Type: currencyfield

| | | | Name: __Number__

Type: numberfield

| | | | Name: __Number Slider__

Type: numbersliderfield

| | | | Name: __Percent Complete__

Type: percentcompletefield

| | | | Name: __Percent__

Type: percentfield

| | | | Name: __Rating__

Type: ratingfield

| | | | Name: __Vote__

Type: votefield

| | | | Name: __Count__

Type: countfield

| | | | Name: __Single Select__

Type: singleselectfield

| | | | Name: __Multiple Select__

Type: multipleselectfield

| | | | Name: __Status__

Type: statusfield

| | | | Name: __Tag__

Type: tagsfield

| | | | Name: __Yes / No__

Type: yesnofield

| | | | Name: __Date__

Type: datefield

| | | | Name: __Date Range__

Type: daterangefield

Note: You have to refer to the two dates in date range in this way:

[Field Slug].from_date

[Field Slug].to_date

| | | | Name: __Due Date__

Type: duedatefield

| | | | Name: __Duration__

Type: durationfield

| | | | Name: __Time__

Type: field

| | | | Name: __Time Tracking Log__

Type: timetrackingfield

| | | | Name: __Formula__

Type: formulafield

| |

Formula can be filtered with operators that correspond to its return type.

Use the operators for Text, Number or Date based on the type it returns.

| | Name: __Lookup__

Type: lookupfield

| |

Lookup can be filtered with operators that correspond to its return type.

Use the operators for Text, Number or Date based on the type it returns.

| | Name: __Rollup__

Type: rollupfield

| | | | Name: __Files & Images__

Type: filefield

| |

Valid file types:

| | Name: __Signature__

Type: signaturefield

| | | | Name: __Record ID__

Type: recordidfield

| | | | Name: __First Created__

Type: firstcreatedfield

| | | | Name: __Last Updated__

Type: lastupdatedfield

| | | | Name: __Open Comments__

Type: commentscountfield

| | | | Name: __Linked Record__

Type: linkedrecordfield

| | | | Name: __Assigned To__

Type: userfield

| | | | Name: __Auto Number__

Type: autonumberfield

| | | | Name: __Sub-Items__

Type: subitemsfield

| | | ## Date Modes and Values The following date modes and corresponding values are supported: | Date Mode                  | Values | | --------- | :----- | | is | | | is_not | | | is_before | | | is_on_or_before | | | is_on_or_after | | | is_empty | null | | is_not_empty | null | --- # Get Record Source: https://developers.smartsuite.com/docs/solution-data/records/get-record ```text title="GET" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/[recordId]/ // highlight-end ``` Retrieve a single record from an App. Any "empty" fields (e.g. "", [], or false) in the record will not be returned. ```text title="Example Request" curl -X GET https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/records/645109df887911e1871054b7/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Table (App) Id | | recordId | string | The Record Id | ## Query Parameters | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | hydrated | boolean | Yes | Returns text labels for id-type fields. Defaults to false. | ## Hydrating the Record To return human-readable values for certain fields, you can include the following query parameter: ```text https://app.smartsuite.com/api/v1/applications/[tableId]/records/[recordId]/?hydrated=true ``` Fields that will return additional information with this setting include: - Single Select - Multiple Select - Status - First Created - Last Updated - Assigned To - Tags - Vote - Time Tracking Log - Checklist - Lookup :::caution Hydration changes the shape of some values. With hydration on, `first_created.by` and `last_updated.by` are returned as member objects (`id`, `full_name`, `email`) instead of member Id strings. Clients that read hydrated records must accept both forms. ::: ## Response Returns a single record object. ```json title="200 Response - Example" // highlight-start { "title": "Record 1", "description": { "data": {}, "html": "
\n \n
" }, "assigned_to": [ "5dd812b9d8b7863532d3ddd2", "5e6ec7dadc8a90f33bcb02c9" ], "status": { "value": "in_progress" }, "due_date": { "from_date": { "date": "2021-09-03T03:00:00Z", "include_time": true }, "to_date": { "date": "2021-09-04T03:15:00Z", "include_time": true }, "is_overdue": false }, "priority": "1", "sef1a6a113": { "from_date": { "date": "2021-09-01T00:00:00Z", "include_time": false }, "to_date": { "date": "2021-09-03T00:00:00Z", "include_time": false } } } // highlight-end ``` --- # Create Record Source: https://developers.smartsuite.com/docs/solution-data/records/create-record ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/ // highlight-end ``` Creates a record in the specified App. Note that you must include any required fields in the POST or the system will return error code 422 “Invalid Request” - a detailed error message will be included in the response body. ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/applications/646536cac79b49252b0f94f5/records/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "title": "Record 1", "description": { "data": {}, "html": "
\n \n
" }, "assigned_to": [ "5dd812b9d8b7863532d3ddd2", "5e6ec7dadc8a90f33bcb02c9" ], "status": { "value": "in_progress" }, "due_date": { "from_date": { "date": "2021-09-03T03:00:00Z", "include_time": true }, "to_date": { "date": "2021-09-04T03:15:00Z", "include_time": true }, "is_overdue": false }, "priority": "1", "sef1a6a113": { "from_date": { "date": "2021-09-01T00:00:00Z", "include_time": false }, "to_date": { "date": "2021-09-03T00:00:00Z", "include_time": false } } }' ``` The following SmartSuite Fields are system-generated, computed or set by aggregate user actions (ex. voting) and cannot be set via API: - Auto Number - Count - First Created - Formula - Last Updated - Record ID - Rollup - Vote ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table (App) in which to create the record. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | record object | object | No | A record object representing the new record to be created. | ## Response Returns `201 Created` with the new record object. ```json title="201 Response - Example" // highlight-start { "title": "Record 1", "description": { "data": {}, "html": "
\n \n
" }, "assigned_to": [ "5dd812b9d8b7863532d3ddd2", "5e6ec7dadc8a90f33bcb02c9" ], "status": { "value": "in_progress" }, "due_date": { "from_date": { "date": "2021-09-03T03:00:00Z", "include_time": true }, "to_date": { "date": "2021-09-04T03:15:00Z", "include_time": true }, "is_overdue": false }, "priority": "1", "sef1a6a113": { "from_date": { "date": "2021-09-01T00:00:00Z", "include_time": false }, "to_date": { "date": "2021-09-03T00:00:00Z", "include_time": false } } } // highlight-end ``` --- # Update Record Source: https://developers.smartsuite.com/docs/solution-data/records/update-record ```text title="PATCH or PUT" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/[recordId]/ // highlight-end ``` Updates a record in the specified App. ```text title="Example Request" curl -X PATCH https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/records/645109df887911e1871054b7/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "title": "Record 1" }' ``` The update endpoint supports two types of record updates, with a PUT request performing a “destructive” update that clears all values that are not specified in the update, and a PATCH request updating just those fields included in the request. To replace the whole record, send a PUT to the same URL. Any field you omit from a PUT body is cleared. ```text title="Example Request (PUT)" curl -X PUT https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/records/645109df887911e1871054b7/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "title": "Record 1" }' ``` The following SmartSuite Fields are system-generated, computed or set by aggregate user actions (ex. voting) and cannot be set via API: - Auto Number - Count - First Created - Formula - Last Updated - Record ID - Rollup - Vote ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table (App) that contains the record. | | recordId | string | The Id of the record to apply updates to. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | record object | object | No | A record object representing the new record to be updated. | ## Response ```json title="200 Response - Example" // highlight-start { "title": "Record 1", "description": { "data": {}, "html": "
\n \n
" }, "assigned_to": [ "5dd812b9d8b7863532d3ddd2", "5e6ec7dadc8a90f33bcb02c9" ], "status": { "value": "in_progress" }, "due_date": { "from_date": { "date": "2021-09-03T03:00:00Z", "include_time": true }, "to_date": { "date": "2021-09-04T03:15:00Z", "include_time": true }, "is_overdue": false }, "priority": "1", "sef1a6a113": { "from_date": { "date": "2021-09-01T00:00:00Z", "include_time": false }, "to_date": { "date": "2021-09-03T00:00:00Z", "include_time": false } } } // highlight-end ``` --- # Delete Record Source: https://developers.smartsuite.com/docs/solution-data/records/delete-record ```text title="DELETE" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/[recordId]/ // highlight-end ``` Deletes a record. ```text title="Example Request" curl -X DELETE https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/records/645109df887911e1871054b7/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table (App) that contains the record. | | recordId | string | The Id of the record to delete. | ## Response Returns `200 OK` with the deleted record object. The record is moved to the Solution's trash, and can be restored with [Restore Deleted Record](./restore-deleted-record.md). --- # Bulk Add Records Source: https://developers.smartsuite.com/docs/solution-data/records/bulk-add-records ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/bulk/ // highlight-end ``` Creates multiple records. Your request body should include an array (items) of up to 25 records. Each of those objects should be properly formed record objects. :::tip Notice Including more than 25 records will result in the server returning a 422 error. Note that the bulk endpoint does not currently enforce required fields and therefore does not return a 422 (as does the single record add) when a required field is missing. ::: ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/records/bulk/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "items": [ { "title":"record 1", "description":"test" }, { "title":"record 2", "description":"test2" }, { "title":"record 3", "description":"test3" } ] }' ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table (App) in which to create the records. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | items | array of objects | No | An Array of record objects | :::caution Bulk Add Records does not enforce required fields. A record missing a required field is created, where [Create Record](./create-record.md) would return `400`. Validate required values before you send them. ::: ## Response Returns `201 Created` with an array of the created record objects. ```json title="201 Response - Example" // highlight-start [ { "title": "record 1", "description": { "data": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "test" } ] } ] }, "html": "
\n

test

\n
", "preview": "test", "yjsData": null }, "assigned_to": [], "status": { "value": "backlog", "updated_on": null }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "is_overdue": false, "status_is_completed": false, "status_updated_on": null }, "priority": "", "first_created": { "on": "2024-08-15T22:04:15.887039Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "on": "2024-08-15T22:04:15.887122Z", "by": "63a1f65723aaf6bcb564b1f1" }, "followed_by": [], "comments_count": null, "autonumber": 3, "sf20bfec60": [], "s630009358": { "date": null, "include_time": false }, "sukadqxp": { "date": null, "include_time": false }, "id": "66be7b5fb8b730607ea959f4", "application_slug": "sbwchxhv", "application_id": "65f194001c0091a8180f8b2b", "ranking": { "default": "aaaaaabsjw" }, "deleted_date": { "date": null, "include_time": false }, "deleted_by": null } ] // highlight-end ``` --- # Bulk Update Records Source: https://developers.smartsuite.com/docs/solution-data/records/bulk-update-records ```text title="PATCH or PUT" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/bulk/ // highlight-end ``` Updates multiple records. Your request body should include an array (items) of up to 25 records. Each of those objects should be properly formed record objects and must include the record id. :::tip Notice Including more than 25 records will result in the server returning a 422 error. ::: ```text title="Example Request" curl -X PATCH https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/records/bulk/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "items": [ { "title":"record 1", "description":"test", "id":"646e62ac4a12462be0d6fb01" }, { "title":"record 2", "description":"test2", "id":"646e62ac7e11a5a6aa50e6e5" }, { "title":"record 3", "description":"test3", "id":"646e62ad5a47d462a9886b2e" } ] }' ``` The update endpoint supports two types of record updates, with a PUT request performing a “destructive” update that clears all values in all records that are not specified in the update, and a PATCH request updating just those fields in all records included in the request. :::tip Important The record id must be included for each object passed to this endpoint in the items array. ::: :::caution Items whose `id` does not match a record in the Table are skipped without an error, and the request still returns `200 OK`. Compare the ids in the response with the ids you sent. ::: The following SmartSuite Fields are system-generated, computed or set by aggregate user actions (ex. voting) and cannot be set via API: - Auto Number - Count - First Created - Formula - Last Updated - Record ID - Rollup - Vote ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table (App) that contains the records. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | items | array of objects | No | An array of record objects. | ## Response Returns `200 OK` with an array of the updated record objects. ```json title="200 Response - Example" // highlight-start [ { "title": "record 1", "description": { "data": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "test" } ] } ] }, "html": "
\n

test

\n
", "preview": "test", "yjsData": null }, "assigned_to": [], "status": { "value": "backlog", "updated_on": null }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "is_overdue": false, "status_is_completed": false, "status_updated_on": null }, "priority": "", "first_created": { "on": "2024-08-15T22:04:15.887039Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "on": "2024-08-15T22:04:15.887122Z", "by": "63a1f65723aaf6bcb564b1f1" }, "followed_by": [], "comments_count": null, "autonumber": 3, "sf20bfec60": [], "s630009358": { "date": null, "include_time": false }, "sukadqxp": { "date": null, "include_time": false }, "id": "66be7b5fb8b730607ea959f4", "application_slug": "sbwchxhv", "application_id": "65f194001c0091a8180f8b2b", "ranking": { "default": "aaaaaabsjw" }, "deleted_date": { "date": null, "include_time": false }, "deleted_by": null } ] // highlight-end ``` --- # Bulk Delete Records Source: https://developers.smartsuite.com/docs/solution-data/records/bulk-delete-records ```text title="PATCH" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/bulk_delete/?fields=id // highlight-end ``` Deletes multiple records. Your request body should include an array (items) of up to 25 record ids as strings. :::tip Notice Including more than 25 records will result in the server returning a 422 error. ::: ```text title="Example Request" curl -X PATCH https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/records/bulk_delete/?fields=id \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "items": [ "6418b7a1f2f4056dd0279a54", "6418b7a2fe6b4a731195c245", "6418b7a2db77680b279fd3f8" ] }' ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table (App) that contains the record. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | items | Array of strings | No | An array of strings containing the Ids of the records to delete. Send bare Id strings, not objects such as `{"id": "..."}`. | :::caution If `items` holds objects such as `[{"id": "..."}]`, the request returns `200 OK` but deletes nothing. There is no `DELETE` route for bulk deletes: `DELETE .../records/bulk/` returns `405`. ::: ## Query Parameters | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | fields | string | Yes | Limits which fields each returned record includes. The example uses `?fields=id`. Without it, each item in the response is the full deleted record object. | ## Response ```json title="200 Response - Example" // highlight-start [ { "application_id": "65f194001c0091a8180f8b2b", "id": "66be7b5fb8b730607ea959f4", "application_slug": "sbwchxhv", "deleted_date": { "date": "2024-08-15T22:11:57.259000Z", "include_time": true } }, { "application_id": "65f194001c0091a8180f8b2b", "id": "66be7b5fb8b730607ea959f5", "application_slug": "sbwchxhv", "deleted_date": { "date": "2024-08-15T22:11:57.259000Z", "include_time": true } }, { "application_id": "65f194001c0091a8180f8b2b", "id": "66be7b5fb8b730607ea959f6", "application_slug": "sbwchxhv", "deleted_date": { "date": "2024-08-15T22:11:57.259000Z", "include_time": true } } ] // highlight-end ``` --- # Attach File Source: https://developers.smartsuite.com/docs/solution-data/records/attach-file ```text title="PATCH" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/[recordId]/ // highlight-end ``` ```text title="Example Request" curl -X PATCH https://app.smartsuite.com/api/v1/applications/[tableId]/records/[recordId]/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{"":["https://picsum.photos/200/300"], "id": "record_id" }' ``` Attaches a file referenced by URL to the specified field. ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The field's Table (App) Id | | recordId | string | The record Id to attach the file to | ## Request Body | Param | Type | Description | | :-: | :-: | :-- | | field_slug | array of strings | Key is the Files and Images field slug; the value is an array of file URLs. | | id | string | The record id to update | ## Response Format Returns the updated record object. ```json title="Example Response" { "title": "test2", "description": { "data": { "type": "doc", "content": [] }, "html": "
\n \n
", "preview": "" }, "assigned_to": [], "status": { "value": "backlog", "updated_on": "2023-06-13T19:54:35.933000Z" }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "is_overdue": false, "status_is_completed": false, "status_updated_on": "2023-06-13T19:54:35.933000Z" }, "priority": "", "first_created": { "on": "2023-06-13T19:54:35.933000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "on": "2023-06-13T20:13:45.422361Z", "by": "63a1f65723aaf6bcb564b1f1" }, "followed_by": [], "comments_count": 0, "autonumber": 2, "safa1e3a3e": [ { "handle": "gR3sd5PITEqlK9GMaXXj", "metadata": { "container": "smart-suite-media", "filename": "chart (2).png", "key": "ErSAdUZHTEC8tMzsXZ4u_chart (2).png", "mimetype": "image/png", "size": 53736 }, "transform_options": {}, "icon": "image", "file_type": "image", "created_on": "2023-06-13T20:13:45.418056Z", "updated_on": "2023-06-13T20:13:45.418062Z", "description": "" } ], "sd69705038": null, "s604d7591c": "0.0", "id": "6488c97b56a5155f585e831b", "application_slug": "so358tdt", "application_id": "64405cb560eaf9646e5dd1e2", "ranking": { "default": "aagckvkhyq" }, "deleted_date": { "date": null, "include_time": false }, "deleted_by": null } ``` --- # Get File URL Source: https://developers.smartsuite.com/docs/solution-data/records/get-file-url ```text title="GET" // highlight-start https://app.smartsuite.com/api/v1/shared-files/[fileHandle]/url/ // highlight-end ``` ```text title="Example Request" curl -X GET https://app.smartsuite.com/api/v1/shared-files/[fileHandle]/url/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" ``` Returns a public URL to the specified file. Note that the Url lifetime is set to 20 years. ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | fileHandle | string | The file handle of the file you want to return a public URL for | ## Response Format | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | url | string | No | The public URL to the file | ```json title="Example Response" { "url": "https://…" } ``` --- # List Deleted Records Source: https://developers.smartsuite.com/docs/solution-data/records/list-deleted-records ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/deleted-records/?preview=true // highlight-end ``` List deleted records in an Solution. ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/deleted-records/?preview=true \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "solution_id": "{solutionId}" }' ``` ## Query Parameters | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | preview | boolean | Yes | True causes the system to return a limited number of fields, including the deletion information | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | solution_id | string | No | The Solution Id | ## Response Returns an array of deleted-record summaries. ```json title="200 Response - Example" // highlight-start [ { "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-08-15T22:13:07.816000Z" }, "title": "record 1a (Restored)", "deleted_by": "63a1f65723aaf6bcb564b1f1", "deleted_date": { "date": "2024-08-15T22:14:37.945000Z", "include_time": true }, "id": "66be7b5fb8b730607ea959f4", "application_slug": "sbwchxhv", "application_id": "65f194001c0091a8180f8b2b", "application_name": "Table 1", "application_record_term": "record", "solution_id": "65e62c77bb8beb915abaa9a2" } ] // highlight-end ``` --- # Restore Deleted Record Source: https://developers.smartsuite.com/docs/solution-data/records/restore-deleted-record ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records/[recordId]/restore/ // highlight-end ``` Restores a deleted record. The record's title will be appended with (Restored). ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/applications/65f194001c0091a8180f8b2b/records/66be7b5fb8b730607ea959f5/restore/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{}' ``` ## Query Parameters None ## Request Body Empty {} ```json title="200 Response - Example" // highlight-start { "title": "record 2a (Restored)", "description": { "data": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "test2a" } ] } ] }, "html": "
\n

test2a

\n
", "preview": "test2a", "yjsData": null }, "assigned_to": [], "status": { "value": "backlog", "updated_on": "2024-08-15T22:04:16.238000Z" }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "is_overdue": false, "status_is_completed": false, "status_updated_on": null }, "priority": "", "first_created": { "on": "2024-08-15T22:04:15.888000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "on": "2024-08-15T22:13:08.962000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "followed_by": [], "comments_count": null, "autonumber": 4, "sf20bfec60": [], "s630009358": { "date": null, "include_time": false }, "sukadqxp": { "date": null, "include_time": false }, "id": "66be7b5fb8b730607ea959f5", "application_slug": "sbwchxhv", "application_id": "65f194001c0091a8180f8b2b", "ranking": { "default": "aaaaaachem" }, "deleted_date": { "date": null, "include_time": false }, "deleted_by": null } // highlight-end ``` --- # Field Types and Properties Source: https://developers.smartsuite.com/docs/solution-data/fields/field-types ## SmartSuite API Field Type Guide This documents all of the currently supported SmartSuite field types and their corresponding value formats, as well as their option formats. :::tip Notice We may add more field types in the future and this will not be considered a breaking change. API consumers are expected to handle unknown field types gracefully. Further, object definitions are not meant to exhaustively describe the shape, new properties can be added and will not be considered a breaking change. ::: ## System Field Formats ### Auto Number The automatically generated number associated with the record. These numbers are unique within the Table. Note that this is a system field and is **read only**. ```number``` ```json title="Example" "autonumber": 1 ``` ___ ### Record Id A field that displays the record id. Note that this is a system field and is **read only**. ```string``` ```json title="Example" "record_id": "6455294a7715e71aecd9c56a" ``` ___ ### Application Slug The application slug is used internally by SmartSuite ```string``` ```json title="Example" "application_slug": "s4o4zlr7" ``` ___ ### Application Id A field that displays the record's Table (App) id. Note that this is a system field and is **read only**. ```string``` ```json title="Example" "application_id": "6418cd08b64e448d78141297" ``` ___ ### First Created The record creator and created date and time. Note that this is a system field and is **read only**. ```Object containing the following object literals``` | key | type |value | |---|---|---| | by | string or object | Id of user who created the record. With `hydrated=true`, an expanded member object (`id`, `full_name`, `email`) instead. | | on | Datetime in ISO format | Date record was created | ```json title="Example" "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2023-05-05T16:05:37.529000Z" } ``` ___ ### Followed By List of Members by Id who are following the record. ```array of strings``` ```json title="Example" "followed_by": [] ``` ___ ### Last Updated The user who last updated the record, and the date and time of the update. Note that this is a system field and is read only. ```Object containing the following object literals``` | key | type |value | |---|---|---| | by | string or object | Id of user who updated the record. With `hydrated=true`, an expanded member object (`id`, `full_name`, `email`) instead. | | on | datetime | Datetime (in ISO format) of last update | ```json title="Example" "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2023-05-05T16:05:37.529000Z" } ``` ___ ### Deleted Date Date the record was deleted. Note that this is a system field and is read only. The “deleted_by” field is also set to the user id of the deleting user. Date property and deleted_by fields are null if not deleted. ```Object containing the following object literals``` | key | type |value | |---|---|---| | date | datetime | Date (ISO format) the record was deleted, null if not deleted. | include_time | boolean | This value is always true. | ```json title="Example" "deleted_date": { "date": "2023-05-09T19:58:59.089000Z", "include_time": true }, "deleted_by": "63a1f65723aaf6bcb564b1f1" ``` ___ ### Comments Count Count of the open comments for the record. int ```json title="Example" "comments_count": 0 ``` ___ ## Text Field Formats ### Address An address that can be displayed on a map. ```Object containing the following object literals``` | key | type |value | |---|---|---| | location_address | string | Address line 1 | | location_address2 | string | Address line 2 | | location_city | string | Name of City | | location_state | string | Name of State | | location_zip | string | Zip/postal code | | location_country | string | Country | | location_longitude | string | Address longitude, as a numeric string | | location_latitude | string | Address latitude, as a numeric string | | sys_root | string | Concatenated Address string | ```json title="Example" "sd27e602f7": { "location_address": "123 Main Street", "location_address2": "", "location_city": "Springfield", "location_state": "Illinois", "location_zip": "62701", "location_country": "United States", "location_longitude": "-94.76601199999999", "location_latitude": "38.827365", "sys_root": "123 Main Street, Springfield, Illinois, 62701, United States" } ``` ___ ### Checklist Manage a list of things that need to get done. ```Object containing the following object literals``` | | | type |value | |---|---|---|---| |items
array| id | string | Item Id (UUID) | | | content | object | SmartDoc object:

data

html

preview

| | | completed | boolean | Whether the item is completed | | | assignee | string | Member Id of the assignee | | | due_date | date | Due date | | | completed_at | datetime | When the item was completed, or null | |total_items
number| | | Number of items | |completed_items
number| | | Number of completed items | ```json title="Example" "s1e50979f6": { "items": [ { "id": "483d963c-5454-4da0-a869-4043be0a4c69", "content": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "test" } ] } ] }, "html": "
\n

test

\n
", "preview": "test" }, "completed": true, "assignee": "63a1f65723aaf6bcb564b1f1", "due_date": "2023-05-10", "completed_at": "2023-05-09T16:21:03.892000Z" }, { "id": "6fe35a31-c69c-4120-af14-47b3ed692ec3", "content": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "test2" } ] } ] }, "html": "
\n

test2

\n
", "preview": "test2" }, "completed": false, "assignee": "63d43a8cab58a15ffdca6315", "due_date": "2023-05-12", "completed_at": null } ], "total_items": 2, "completed_items": 1 } ``` ___ ### Color Picker Allow the selection of a color palette in HEX, RGB or CMYK formats. ```Array of objects``` | key | type |value | |---|---|---| | name | string | Color name (optional) | | value | string | Color hex value | ```json title="Example - single" "s85fff4632": [ { "name": "reddish", "value": "#814C4C" } ] ``` ```json title="Example - multiple" "s021a2cd98": [ { "name": "", "value": "#AB5F5F" }, { "name": "", "value": "#4B1616" } ] ``` ___ ### Email Allows a user to store email values. Allows to store multiple emails per field. ```Array of strings``` ```json title="Example - single" "sdd0608960": [ "jane.doe@example.com" ] ``` ```json title="Example - multiple" "s9dc4f8924": [ "jane.doe@example.com", "jane.doe@example.org" ] ``` ___ ### Full Name Capture a person's full name and title. ```Object containing the following object literals``` | key | type |value | |---|---|---| | title | string | | | first_name | string | First Name | | middle_name | string | Middle Name | | last_name | string | Last Name | | sys_root | string | Full (concatenated) name | ```json title="Example" "sa60d0cace": { "title": "1", "first_name": "Jane", "middle_name": "N", "last_name": "Doe", "sys_root": "Mr. Jane Q Doe" } ``` ___ ### IP Address Allows a user to store multiple IPv4/IPv6 values with country codes. ```array of objects``` | key | type |value | |---|---|---| | country_code | string | 2 character country code | | address | string | IPv4 or IPv6 address | ```json title="Example" [ { "country_code": "", "address": "127.0.0.0" }, { "country_code": "us", "address": "2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d" }, { "country_code": "", "address": "::ffff:127.0.0.1" } ] ``` ___ ### Link Allows a user to store link values. Allow to store multiple links per field. ```Array of strings``` ```json title="Example - single" "s1a561b4ae": [ "www.smartsuite.com" ] ``` ```json title="Example - multiple" "s093436126": [ "www.google.com", "http://www.amazon.com" ] ``` ___ ### Phone Add one or more formatted phone numbers. ```Array of objects``` | key | type |value | |---|---|---| | phone_country | string | Country code | | phone_number | string | Phone number | | phone_extension | string | Extension | | phone_type |number |

phone number type:

| | sys_root | string | Unformatted phone number | | sys_title | string | Formatted phone number | ```json title="Example - single" "s4209c693e": [ { "phone_country": "US", "phone_number": "913 555 1212", "phone_extension": "", "phone_type": 1, "sys_root": "19135551212", "sys_title": "+1 913 555 1212" } ] ``` ```json title="Example - multiple" "s87hf1a0": [ { "phone_country": "US", "phone_number": "913 555 1212", "phone_extension": "", "phone_type": 1, "sys_root": "19135551212", "sys_title": "+1 913 555 1212" }, { "phone_country": "US", "phone_number": "708 555 1111", "phone_extension": "", "phone_type": 1, "sys_root": "17085551111", "sys_title": "+1 708 555 1111" } ] ``` ___ ### Record Title (Primary Field) System field that contains the title of a record, also known as the primary field. Note that Record Titles that are set to Auto-Generated are read only. Values sent in record creates or updates for Auto-Generated Titles are ignored without generating an error. ```string``` ```json title="Example" "title": "My Record" ``` ___ ### SmartDoc Create entire documents that combine free-form rich text, multimedia and much more. The SmartDoc data structure is described in a separate page. ```Object containing the following object literals``` | key | type |value | |---|---|---| | data | object | SmartDoc Object | | html | string | HTML representation of the SmartDoc's content | | preview | string | Text representation of the SmartDoc's content | ```json title="Example" "s325d95fa1": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "Hello " }, { "type": "text", "marks": [ { "type": "strong" } ], "text": "world" } ] } ] }, "html": "
\n

Hello world

\n
", "preview": "Hello world" } ``` ___ ### Social Network Add links to one or more social networks. ```Object containing the following object literals``` | key | type |value | |---|---|---| | Facebook_username | string | Facebook username | | twitter_username | string | Twitter username | | instagram_username | string | Instagram username | | linkedin_username | string | LinkedIn username | ```json title="Example" "s284633643": { "facebook_username": "myuser", "twitter_username": "", "instagram_username": "", "linkedin_username": "" } ``` ___ ### Text Area Add text that can span multiple lines. :::tip Note Use \n for line breaks. ::: ```string``` ```json title="Example" "sa1dd2f880": "test\n123\ntesting 1,2,3..." ``` ___ ### Text Add a single line of text like a name or a title. ```string``` ```json title="Example" "sa1dd2f880": "Hello World!" ``` ___ ## Date Field Formats ### Date Add a date with an option to include time. ```Date Object containing the following object literals``` | key | type |value | |---|---|---| | date | datetime | Date in ISO format | | include_time | boolean | Indicate whether time is to be included in the date’s display | ```json title="Example" "sb4c5ca5fc": { "date": "2023-05-09T06:00:00Z", "include_time": true } ``` ___ ### Date Range Add a date range. ```Date Range Object containing the following object literals``` | key | type |value | |---|---|---| | from_date | date object | Starting date of the range | | to_date | date object | End date of the range | ```json title="Example" "sd8f20e21a": { "from_date": { "date": "2023-05-09T00:00:00Z", "include_time": false }, "to_date": { "date": "2023-05-12T00:00:00Z", "include_time": false } } ``` ___ ### Due Date Visually track and manage due dates. ```Object containing the following object literals``` | key | type |value | |---|---|---| | from_date | date object | Start date (optional) | | to_date | date object | Due date | | is_overdue | boolean | True if overdue (read-only) | | status_is_completed | boolean | True if complete (read-only) | | status_updated_on | datetime | Date that the due date's linked status field was last updated (read-only) | ```json title="Example" "s1a23f61ca": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": "2023-05-12T00:00:00Z", "include_time": false }, "is_overdue": false, "status_is_completed": false, "status_updated_on": "2023-05-09T19:25:04.981000Z" } ``` ___ ### Duration Track a time duration in days, hours and minutes. :::tip Note Duration values are in seconds. ::: ```Number as text``` ```json title="Example" "s3031d9687": "94530.0" ``` ___ ### Time Add a specific time. :::tip Note Time is reflected in 24 hour format. ::: ```string``` ```json title="Example" "sff346911b": "21:15:00" ``` ___ ### Time Tracking Log Track time spent working on a specific task or project. ```Object containing the following object literals``` | key | type |value | |---|---|---| | time_track_logs | array of time log objects | Individual time entries | | total_duration | number | Total time in seconds | #### Time Log Object ```Object containing the following object literals``` | key | type |value | |---|---|---| | user_id | string | Id of the Member associated with the log entry | | date_time | datetime | Date and time of entry | | duration | number | Duration in seconds | | time_range | date range object |

Time range for the event (nullable)

Note: The include_time property should always be set to true

| | note | string | Note text attached to the time entry. | ```json title="Example" "s09ca45598": { "time_track_logs": [ { "user_id": "63a1f65723aaf6bcb564b1f1", "date_time": "2023-05-09T19:46:16.751000Z", "duration": 45000, "time_range": null, "timer_start": null, "note": "test note" }, { "user_id": "63a1f65723aaf6bcb564b1f1", "date_time": "2023-05-09T19:47:04.470000Z", "duration": 3600, "time_range": null, "timer_start": null, "note": "" }, { "user_id": "63a1f65723aaf6bcb564b1f1", "date_time": "2023-05-09T19:50:29.930000Z", "duration": 20400, "time_range": { "from_date": { "date": "2023-05-09T19:50:00Z", "include_time": true }, "to_date": { "date": "2023-05-10T01:30:00Z", "include_time": true } }, "timer_start": null, "note": "" }, { "user_id": "63a1f65723aaf6bcb564b1f1", "date_time": "2023-05-09T19:50:29.930000Z", "duration": 21, "time_range": { "from_date": { "date": "2023-05-09T19:50:50.391000Z", "include_time": true }, "to_date": { "date": "2023-05-09T19:51:11.496000Z", "include_time": true } }, "timer_start": "2023-05-09T19:50:50.391000Z", "note": "" } ], "total_duration": 69021 } ``` ___ ## Number Field Formats ### Currency Add a number that is displayed with currency formatting. ```number as string``` ```json title="Example" "s584654fd2": "19.95" ``` ___ ### Number Add a number with optional formatting. ```number as string``` ```json title="Example" "s6878322bd": "120" ``` ___ ### Number Slider Select a number within a range using a numeric slider. :::tip Note Specifying a number above the maximum value will set the maximum value, and specifying a number below the minimum value will set the minimum value. If a value increment is set, the value will be set to the nearest increment. ::: ```number``` ```json title="Example" "s35edcfdbc": 59 ``` ___ ### Percent Complete Track a completion percentage using a graphical slider. :::tip Note Specifying a number above the maximum value will set the maximum value, and specifying a number below the minimum value will set the minimum value. If a value increment is set, the value will be set to the nearest increment. ::: ```number``` ```json title="Example" "sd5758e92c": 72 ``` ___ ### Percent Add a number that is displayed as a percentage. ```number as a string``` ```json title="Example" "s95338b75f": "42" ``` ___ ### Rating Add a visual rating using a scale of your choice. :::tip Note Specifying a number above the maximum value will set the maximum value, and specifying a number below the minimum value will set the minimum value. If a value increment is set, the value will be set to the nearest increment. ::: ```number``` ```json title="Example" "s239cbad2a": 4 ``` ___ ### Vote Allow team members to vote on things like feature requests. ```Object containing the following object literals``` | key | type |value | |---|---|---| | total_votes | number | Total votes for the record | | votes | array of vote objects | Individual votes | #### Vote Object ```Object containing the following object literals``` | key | type |value | |---|---|---| | user_id | string | Member Id of the voter | | date | string | Date of the vote in YYYY-MM-DD format | ```json title="Example" "sacb0b6750": { "total_votes": 1, "votes": [ { "user_id": "63a1f65723aaf6bcb564b1f1", "date": "2023-05-09" } ] } ``` ___ ## List Field Formats ### Multiple Select Add a list where multiple choices can be selected. ```array of strings``` Strings are the ids of individual list items. ```json title="Example" "s710a06b7f": [ "120ed618-06bb-4acd-8880-05a0cea3e415", "1da865e2-48a6-4e1a-9158-de51cdf9f6b7", "0612b2a5-068e-450f-b850-703dfa1b1b9e" ] ``` ___ ### Single Select Add a list where only one choice can be selected. ```string``` String is the id of the selected list item. ```json title="Example" "se799fd212": "ace70ec5-b046-4ba6-80b8-cf39b6390fd6" ``` ___ ### Status Track the overall status of things like tasks, activities or projects. ```Object containing the following object literals``` | key | type |value | |---|---|---| | value | string | Id of the status value. | | updated_on | datetime | Date Status field was last updated (ISO format). | ```json title="Example" "s63d179f79": { "value": "backlog", "updated_on": "2023-05-09T22:58:48.291000Z" } ``` ___ ### Tag Allows a user to select tags from the list of tags. :::tip Note If a Tags Field is private, its tags are available to all private Tags Fields within a solution. If it's public, then every public field within an account can access its tags. ::: ```array of strings``` String is the id of the selected tag. ```json title="Example" "sccb7d6601": [ "645acfd07bb0b8858a01bf30", "645acfd07bb0b8858a01bf31", "645acfe3de5fba70e93c6e02", "645acfe3de5fba70e93c6e03" ] ``` ___ ### Yes / No Field type that is used to represent a selected / non selected state. ```Boolean``` ```json title="Example" "s227a7b29a": true ``` ___ ## Reference Field Formats ### Assigned To Assign a Member or Members to a record. ```array of strings``` :::tip Note Assigned To fields configured for either single and multiple values return an array. ::: ```json title="Example" "assigned_to": [ "63a1f65723aaf6bcb564b1f1" ] ``` ___ ### Button Create a button that triggers an action. ```string``` :::tip Note Buttons configured with a static URL will always return null. Dynamic buttons will return the generated URL value. ::: ```json title="Example" "s9d2ba74c3": "https://www.fakesite.com?id=test" ``` ___ ### Linked Record Add a link to a record or records in another Table. ```array of strings``` :::tip Note Linked Record fields configured for either single and multiple values return an array. ::: ```json title="Example" "s570c86b38": [ "6455294a7715e71aecd9c56a", "645c1dee9f83b887865d99ec" ] ``` ___ ## File Field Formats ### Files and Images Get information about the files attached to a Files and Images field. :::tip Note This endpoint cannot be used to attach files to the record. Please refer to this article for information on uploading and downloading file data. ::: ```array of file objects which contain the following object literals``` | key | type |value | |---|---|---| | handle | string | The file handle, which can be used to retrieve the file’s data. | | metadata | object | File Metadata object (see below). | | transform_options | object | Note: Always empty, this field is used internally by SmartSuite. | | icon | string | Name of the SmartSuite icon displayed for the file, if one exists. | | file_type | string | Short file type (if known to SmartSuite). | | created_on | datetime | Date file was added (ISO format). | | updated_on | datetime | Date file was last updated (ISO format). | | description | string | Reserved for future use (attaching a note to the file/image). | #### File Metadata object Object containing file information. | key | type |value | |---|---|---| | container | string | SmartSuite internal use | | filename | string | Name of the file | | key | string | SmartSuite internal use | | mimetype | string | MIME type of the file | | size | number | Size of the file in bytes | ```json title="Example" "see6d6120d": [ { "handle": "a4d988eCTCKZ62XMqUIj", "metadata": { "container": "smart-suite-media", "filename": "image (48).png", "key": "wK07pocQeibIB7oSWMya_image (48).png", "mimetype": "image/png", "size": 51443 }, "transform_options": {}, "icon": "image", "file_type": "image", "created_on": "2023-05-11T15:15:37.263000Z", "updated_on": "2023-05-11T15:15:37.263000Z", "description": "" } ] ``` ___ ### Signature ```object containing the following object literals``` | key | type |value | |---|---|---| | text | string | Text entered as signature. Empty string if signature was drawn. | | image_base64 | string | Base64-encoded drawn image data, null if text was entered as signature. | ```json title="Example" "s67210aeb8": { "text": null, "image_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVgAAABACAYAAABfnm8CAAAAAXNSR0IArs4c6QAABpZJREFUeF7tnT+r5kQUxp8t7bawVNzSwkI7O7XxCyyCVioIthaCWK3WClYWVmpnYeEXEBUEG0G/gQoWFjaCgoXg8kAOzsb8eZM7M+8k8wss73v3JmfO+c3Jcycnk8ktsUEAAhCAQBECt4pYxSgEIAABCAiBJQkgAAEIFCKAwBYCi1kIQAACCCw5AAEIQKAQAQS2EFjMQgACEEBgyQEIQAAChQggsIXAYhYCEIAAAksOQAACEChEAIEtBBazEIAABBBYcgACEIBAIQIIbCGwmIUABCCAwJIDEIAABAoRQGALgT2Y2WclvSXJn79JelXS1weLAXch0BwBBLa5Lqnm0B1JL0t6Z6LFHyU9Vc0TGoLASQkgsCft2JmwQlRflPT4SujkRl+5QbQFCHASFYDaoMml0eqUux7VvttgHLgEgUMRQGAP1V2bnA1RfU3SI8mRP0v6XtIfkh6V9PzIqmuvz21qiZ0hAIFJAgjsuRJjaqTqm1Z/S/pE0qeSLLDeXpH08Sh87/sSN7jOlRREcz0CCOz12Odqee7y30JqUf1S0rejxu7N3NyyuH6WybHw6wlJDw/C7v9Lt/g5PkP8vU989+c3yc/MbsjUQZgpTwCBLc+4RAtrompBmhOir4bpWGO/ctVdt9Z79/Cx6Do+f/4y/CHZY4djIFCUAAJbFG9W40uiGmKzdmNqqixgJ10aeHvwNh1FRgAxwnxsZgT6pCTvcztrxNuMpSPe8ejXlhj5buPJ3hkIILAZIBY0EaJqYRxfXlsw/G9NVFP3XHO1rdqb59V+MYycU/Gb8sMjUgu54419p0oL4/LCWkxhy8yi5IDorlHj9zcigMDeCF+xg9dKAFtENXXyTUnvFfP6QcNRA97r6xY3U7H19xBo2/DTaWOBDttRaoiSytTofYsf7AuBBwggsG0lhG8+TU2r8s2qHEJlofEo1qKTe/NMBZcaQrRy+JvLxxBYx/3MILhjBukI174jtrnod2wHgb1u58+VAEqP/txuCMyc4KRk7E8qQL6Mn6p5XpfmttbNIPinPGzlT0m/DzF6alvUuLe1wN7dE0Bgr5MCPqE9Wh3XQ30if5RxqtTe6NL6514bRzsuRPZ1SU9POJ+WE+L70WLE38oEENh6wEvVVetF0E9LaUnBC+JMlVRCZGOE2w8dIr2YAAJ7MardO86NVj3vdGm+6u4GOTA7gRjd+uaZxXaqfjt+Ui67Exg8HgEEtkyfXau2WiYarI4JhOC6fj0u84TQMgWMvBECmzcJ5soAPuk8WvUn27kIhNimpYS4SZmu/XCuqInmIgII7EWYFneKu9G+aZVeOpaeCXBzz7GQm8C4HEQO5CZ8MHsI7L4OW7pE9EnleZSMVvexPcNR6XzjfyT9OiwBydzaM/TuhhgQ2MthxeX/0k2OlibXXx4Ze5Yi4Cfn7g7TviyuXmcXkS1Fu0G7COxypyyJqo/0yfKhpPcb7FtcaoNAOprNtWJZG5HhxSoBBPb/iJYu/2NvamurqcUOCYFYZMdlI7+xl60TAgjsfx3t6TZT027SVEBYOzkxMof572Dvc0kvZLaNuYYJ9C6wc9OqprqMy7uGE7lh19K3RzCCbbijSrjWq8DOPV01ZsyItUTW9WUzRq+Omj/SffV9Vw8azD1dNdflnAydnQyZw51aGrLXAU1mtMcx10OHbykDMMo4Tu627Klzzu8+i0VjyKuWe6ugb2cW2Kkkn0NJKaBgknVoOi0LOHyvS+A5sGydETirwM69lnrcvU58T5th8ndniV8w3A8kvZHY58ZWQditmz6bwMYi1uml2dyNKxbiaD07j+nfD5L8ll1vfo3OQ8cMA69zEDiDwF5aY6UMkCNjsLFG4LvRGxHi8ViuktbInfD3RxbYtalWIah/SfIEbxL8hAncYEhz5SnKUQ12VmmXjiqwfurKjx/OXf6z6ErpzMH+EoGfZl4VztS/zvLmqALrFa08DcYbl/6dJe0Bwp2aA2u3EdgDdF5OF48qsOlrlll3NWdGYCsnAQ8EYn2LKBHktI+txgkcVWAbx4p7EIAABNTVo7L0NwQgAIGqBBjBVsVNYxCAQE8EENieeptYIQCBqgQQ2Kq4aQwCEOiJAALbU28TKwQgUJUAAlsVN41BAAI9EUBge+ptYoUABKoSQGCr4qYxCECgJwIIbE+9TawQgEBVAghsVdw0BgEI9EQAge2pt4kVAhCoSgCBrYqbxiAAgZ4IILA99TaxQgACVQkgsFVx0xgEINATgfv6H/BBMpJS6gAAAABJRU5ErkJggg==", "drawing": [] } ``` ___ --- # Field Object Source: https://developers.smartsuite.com/docs/solution-data/fields/field-object ```text title="Example" { "slug": "random_10_digit_alphanumeric_value", "label": "Field Name", "field_type": "field_type", "params": { ...field_specific_params }, "is_new": true } ``` [Add Field](/docs/solution-data/fields/add-field) wraps this object in a `field` key. ## Object Literals | Param | Type | Optional | Description | | :---- | :-: | :-: | :-- | | slug | string | No | A random 10 digit alphanumeric value. | | label | string | No | The field name. | | field_type | string | No | The field type (see below). | | params | object | No | field-specific parameters. | | is_new | boolean | No | Set to true for new fields. | ## Common params These `params` appear on many field types. Several of them can be null, so don't assume a value is always present. | Param | Type | Nullable | Description | | :---- | :-: | :-: | :-- | | required | boolean | No | Whether a value is required. | | unique | boolean | No | Whether values must be unique. | | hidden | boolean | No | Whether the field is hidden. | | help_text | string | Yes | Plain-text help for the field. | | help_doc | object | Yes | Field help as a SmartDoc object. Null on most fields. | | width | number | Yes | Record layout width: 1 = half width, 2 = full width. Null on system fields and fields that have not been placed in the layout. | | linked_application | string | Yes | The target Table of a Linked Record, Lookup, Rollup or Count field. Usually a Table Id, but system tables are referenced by slug, e.g. `members`, so don't assume a 24-character Id. | | linked_field_slug | string | Yes | The mirrored field on the linked Table. Null when there is no mirror. | | target_field_structure | object | Yes | The shape of the value a Formula, Lookup or Rollup field produces. Null when there is no resolved target. | ## Field Types The following is a list of the field type values for each supported SmartSuite field. | Field Name | Field Type | Notes | | :--------- | :--------- | :----------| | Single Select | singleselectfield | | | Multiple Select | multipleselectfield | | | Status | statusfield | | | Tag | tagsfield | | | Text | textfield | | | Address | addressfield | | | Date | datefield | | | Date Range | daterangefield | | | Due Date | duedatefield | | | Duration | durationfield | | | Time | timefield | | | Time Tracking Log | timetrackingfield | Bulk add unsupported. | | Checklist | checklistfield | Bulk add unsupported. | | Color Picker | colorpickerfield | | | Email | emailfield | | | Full Name | fullnamefield | | | IP Address | ipaddressfield | | | Link | linkfield | | | Phone | phonefield | | | Title (Primary) | recordtitlefield | System Field, cannot be added via API | | SmartDoc | richtextareafield | | | Social Network | socialnetworkfield | Bulk add unsupported. | | Text Area | textareafield | | | Currency | currencyfield | | | Number | numberfield | | | Number Slider | numbersliderfield | | | Percent Complete | percentcompletefield | | | Percent | percentfield | | | Rating | ratingfield | | | Yes / No | yesnofield | | | Vote | votefield | Bulk add unsupported. | | Count | countfield | Bulk add unsupported. | | Files and Images | filefield | Bulk add unsupported. | | Signature | signaturefield | Bulk add unsupported. | | Formula | formulafield | Bulk add unsupported. | | Lookup | lookupfield | | | Rollup | rollupfield | Bulk add unsupported. | | Record Id | recordidfield | Bulk add unsupported. | | First Created | firstcreatedfield | System Field, cannot be added via API | | Last Updated | lastupdatedfield | System Field, cannot be added via API | | Sub-Items | subitemsfield | Bulk add unsupported. | | Open Comments | commentscountfield | System Field, cannot be added via API | | Button | buttonfield | Bulk add unsupported. | | Linked Record | linkedrecordfield | | | Assigned To | userfield | | | Auto Number | autonumberfield | System Field, cannot be added via API | | Availability Status | availabilitystatusfield | | --- # Add Field Source: https://developers.smartsuite.com/docs/solution-data/fields/add-field ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/add_field/ // highlight-end ``` Creates a field in the specified Table (App). ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/applications/646536cac79b49252b0f94f5/add_field/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "field": { "slug": "[Random 10 digit alphanumeric value]", "label": "[Field Name]", "field_type": "[Field Type]", "params": { [Field-Specific Parameters] }, "is_new": true }, "field_position": { "prev_sibling_slug": "[Previous Field Slug (or null)]" }, "auto_fill_structure_layout": true }' ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table in which to create the field. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | field | object | No | A field object. [See Definition](/docs/solution-data/fields/field-object) | | field_position | object | No |

Required. Omitting it returns 400.

Object with the following literal:

prev_sibling_slug string - the previous field's slug value. Note: this value is currently ignored, and new fields are always added at the end of the Table's fields.

"prev_sibling_slug": "[Previous Field Slug (or null)]" | | auto_fill_structure_layout | boolean | Yes | | :::tip Note The field definition is wrapped in a `field` key. [Update Field](./update-field.md) is different: it takes the bare field object, with no wrapper. ::: ## Response Returns `200 OK` with an empty body. The new field is not echoed back; use [Get Table](/docs/solution-data/tables/get-table) to read the stored field definition. --- # Bulk Add Fields Source: https://developers.smartsuite.com/docs/solution-data/fields/bulk-add-fields Add multiple fields to a Table (App). ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/bulk-add-fields/ // highlight-end ``` Creates multiple fields in the specified Table in a single call. Some field types can't be bulk added; see [Field Types](/docs/solution-data/fields/field-object#field-types). ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/applications/646536cac79b49252b0f94f5/bulk-add-fields/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "fields": [ { "slug": "123asd456z", "label": "Peter Text", "field_type": "textfield", "icon": "text", "params": { "help_text": "This is help text", "display_format": "importance" }, "is_new": true } ], "set_as_visible_fields_in_reports": [] }' ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table (App) in which to create the field. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | fields | array of objects | No | Array of field objects to bulk add. | | set_as_visible_fields_in_reports | array of strings | Yes | Array of view (report) ids the added fields should be appended to in the View(s) "fields to display" | ## Response Empty body. --- # Update Field Source: https://developers.smartsuite.com/docs/solution-data/fields/update-field ```text title="PUT" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/change_field/ // highlight-end ``` Updates a field in the specified Table (App). ```text title="Example Request" curl -X PUT https://app.smartsuite.com/api/v1/applications/646536cac79b49252b0f94f5/change_field/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "slug": "[Existing Field Slug]", "label": "[Field Name]", "field_type": "[Field Type]", "params": { [Field-Specific Parameters] } }' ``` ```field object``` [See Definition](/docs/solution-data/fields/field-object) ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table (App) in which to update the field. | ## Query Parameters | Param | Type | Optional | Description | | :---- | :-: | :-: | :-- | | set_is_migrating | number | Yes | Set to `1` when the change affects how existing values are stored, such as changing the field type. | :::caution Without `set_is_migrating=1`, a change of field type returns `200 OK` but is not applied. Check the result with [Get Table](/docs/solution-data/tables/get-table). ::: ## Request Body | Param | Type | Optional | Description | | :---- | :-: | :-: | :-- | | slug | string | No | The slug of the existing field to update. | | label | string | No | The field name. | | field_type | string | No | The field type (see [Field Types](/docs/solution-data/fields/field-object#field-types)). | | params | object | No | field-specific parameters. | :::tip Note The request body is the bare field object. [Add Field](./add-field.md) is different: it wraps the definition in a `field` key. Send the complete field definition, including all `params`. ::: ## Response Returns `200 OK` with an empty body. Use [Get Table](/docs/solution-data/tables/get-table) to read the stored field definition. --- # Delete Field Source: https://developers.smartsuite.com/docs/solution-data/fields/delete-field ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/delete_field/ // highlight-end ``` Deletes a field in the specified Table (App). ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/applications/{tableId}/delete_field/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "slug": "due_date" }' ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Id of the Table (App) in which to delete the field. | ## Request Body | Param | Type | Optional | Description | | :---- | :-: | :-: | :-- | | slug | string | No | The slug value of the field to delete. | ## Response Returns `200 OK` with the updated Table object, not the deleted field. The deleted field no longer appears in the Table's `structure`. ```json title="200 Response" {table_object} ``` ```table object``` [See Definition](/docs/solution-data/tables/table-object) --- # Comment Object Source: https://developers.smartsuite.com/docs/solution-data/comments/comment-object ```json title="Example" { "solution": "640a3811c9d3ea77099331e2", "application": "640a3811c9d3ea77099331e7", "record": "640a385d0a86e2924f8dd382", "member": "63a1f65723aaf6bcb564b1f1", "message": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "test" } ] } ] }, "html": "
\n

test

\n
", "preview": "test" }, "parent_comment": null, "created_on": "2023-03-20T12:49:05.832000Z", "deleted_on": null, "updated_on": null, "reactions": [], "key": 1, "assigned_to": null, "resolved_by": null, "followers": [ "63a1f65723aaf6bcb564b1f1" ], "type": "comment", "email": null, "id": "64185642174d214da05fa9c2" } ``` ## Object Literals | Param | Type | Nullable | Description | | :-: | :-: | :-: | :-- | | solution | string | No | Id of the Solution that contains the record. | | application | string | No | The Table (app) Id. | | record | string | No | Id of the record the comment belongs to. | | member | string | No | Member Id of the comment's author. | | message | object | No | A SmartDoc object containing the comment body. | | parent_comment | string | Yes | Id of the parent comment when this comment is a reply, otherwise null. | | created_on | string | No | Date and time the comment was created. | | deleted_on | string | Yes | Date and time the comment was deleted, or null. | | updated_on | string | Yes | Date and time the comment was last updated, or null. | | reactions | array of strings | No | Array of reactions to the comment. | | key | number | No | Numeric key of the comment. | | assigned_to | string | Yes | Member Id the comment is assigned to, or null. | | resolved_by | string | Yes | Member Id of the Member who resolved the comment, or null. | | followers | array of strings | No | Array of following Member Ids. | | type | string | No | Set to "comment" or "email" | | email | string | Yes | Email address (if email comment) | | id | string | No | Unique Id of the comment. | --- # List Comments Source: https://developers.smartsuite.com/docs/solution-data/comments/list-comments ```text title="GET" // highlight-start https://app.smartsuite.com/api/v1/comments/?record=[Record_Id] // highlight-end ``` Gets a record's comments. Returns an object whose `results` array holds the comment objects. ```text title="Example Request" curl -X GET https://app.smartsuite.com/api/v1/comments/?record=640a385d0a86e2924f8dd382 \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" ``` ## Query Parameters | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | record | string | Yes | Record id to retrieve comments for. | | application | string | Yes | Table (App) id to retrieve comments for. | | solution | string | Yes | Solution id to retrieve comments for. | :::tip Note Query parameters are optional, and serve to restrict the scope for returned comments. A GET made without any query parameters will return all comments for the Workspace. ::: ## Response Format | Param | Type | Description | | :-: | :-: | :-- | | count | number or null | Number of comments. May be null. | | next | string or null | URL of the next page of results, or null. | | previous | string or null | URL of the previous page of results, or null. | | results | Array of objects | Array of comment objects. | ```json title="200 Response - Example" // highlight-start { "count": null, "next": null, "previous": null, "results": [ { "solution": "640a3811c9d3ea77099331e2", "application": "640a3811c9d3ea77099331e7", "record": "640a385d0a86e2924f8dd382", "member": "63a1f65723aaf6bcb564b1f1", "message": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "test" } ] } ] }, "html": "
\n

test

\n
", "preview": "test" }, "parent_comment": null, "created_on": "2023-03-20T12:49:05.832000Z", "deleted_on": null, "updated_on": null, "reactions": [], "key": 1, "assigned_to": null, "resolved_by": null, "followers": [ "63a1f65723aaf6bcb564b1f1" ], "type": "comment", "email": null, "id": "64185642174d214da05fa9c2" } ] } // highlight-end ``` --- # Add Comment Source: https://developers.smartsuite.com/docs/solution-data/comments/add-comment ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/comments/?record=[Record_Id] // highlight-end ``` Creates a comment. Returns a comment object. ```text title="Example Request using SmartDoc object" curl -X POST "https://app.smartsuite.com/api/v1/comments/?record=[Record_Id]" \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "assigned_to": "[Member Id]", "message": { "data": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "[Comment Text]" } ] } ] } }, "parent_comment": "[Parent Comment Id if applicable]", "application": "[Table_Id]", "record": "[Record_Id]" }' ``` ```text title="Example Request using HTML" curl -X POST "https://app.smartsuite.com/api/v1/comments/?record=[Record_Id]" \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "assigned_to": "[Member Id]", "message": { "html": "A test" }, "application": "[Table_Id]", "record": "[Record_Id]" }' ``` ## Request Parameter | Param | Type | Description | | :-: | :-: | :-- | | record | string | Record Id of the record to attach comment to | ## Request Body | Param | Type | Nullable | Description | | :-: | :-: | :-: | :-- | | assigned_to | string | Yes | Member Id, or null for unassigned | | message | comment content object | No | An object containing either data (a SmartDoc object) or html (an HTML string). Send an object: a bare string returns `400` ("Expected a dictionary, but got str.").

data (SmartDoc Object)

html (string)

| | parent_comment | string | Yes | Id of the comment this is a reply to; omit or null for a top-level comment. | | application | string | No | Record's Table Id | | record | string | No | Id of the record the comment should be associated with | ## Response Returns `201 Created` with the new [comment object](./comment-object.md). --- # Table Object Source: https://developers.smartsuite.com/docs/solution-data/tables/table-object ```text title="Example" { "id": "63a1f65623aaf6bcb564b00b", "name": "Teams", "solution": "63a1f65523aaf6bcb564b00a", "slug": "teams", "status": "active", "structure": [ { "slug": "name", "label": "Name", "field_type": "textfield", "params": { ... } } ], "primary_field": "name", "order": 100, "structure_layout": null, "show_all_reports_members": [], "fields_metadata": {}, "permissions": { "level": "all_members", "members": [], "teams": [] }, "field_permissions": [], "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2022-12-20T17:52:22.646000Z" }, "settings": { "emails": false, "meeting_notes": false, "call_log": false } } ``` ## Object Literals | Param | Type | Nullable | Description | | :---- | :-: | :-: | :-- | | id | string | No | The unique Table Id. | | name | string | No | The Table (App) display name. | | solution | string | No | The Id of the Table's Solution. | | slug | string | No | The Table slug (SmartSuite internal use). | | status | string | No | The Table's status. | | structure | array of objects | No | Array of field objects (see [Field Object](/docs/solution-data/fields/field-object)). | | primary_field | string | No | Slug of the Table's Title (Primary) field. | | order | number | No | Sort position of the Table within its Solution's table list. | | structure_layout | object | Yes | | | show_all_reports_members | array | No | | | fields_metadata | object | No | | | permissions | object | Yes | [Permissions object](/docs/permissions/permissions-object), or null when the Table inherits its Solution's permissions. | | field_permissions | array | No | Array of field permissions objects. | | first_created | object | No | First created object `{by, on}`. `on` may be null; `by` is a member Id, or an expanded member object when `hydrated` is requested. | | settings | object | No | Table settings object | --- # Get Table Source: https://developers.smartsuite.com/docs/solution-data/tables/get-table ```text title="GET" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/ // highlight-end ``` Retrieves a Table, including its full field `structure` and record layout. ```text title="Example Request" curl -X GET https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | tableId | string | The Table Id | ## Query Parameters | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | fields | string | Yes | Specifies a field slug to include in the response. This parameter can be repeated to add multiple fields. If at least one field is specified, the response will only contain fields referenced by the fields parameter. | ## Response Format ```Table object``` The `permissions` object has the shape described in the [Permissions object](/docs/permissions/permissions-object): `members` and `teams` hold `{entity, access}` grant objects, and `owners` holds member Ids. `permissions` is null when the Table inherits its Solution's permissions (see [Table Object](/docs/solution-data/tables/table-object)). ```json title="200 Response - Example" // highlight-start { "id": "63a1f65623aaf6bcb564b00b", "name": "Teams", "solution": "63a1f65523aaf6bcb564b00a", "slug": "teams", "status": "active", "structure": [ { "slug": "name", "label": "Name", "field_type": "textfield", "params": { "primary": true, "restore_application_id": null, "linked_field_slug": null, "max_length": null, "composite": null, "delimiter": ", ", "required": true, "unique": true, "hidden": false, "help_text": "", "help_text_display_format": "tooltip", "placeholder": "Write here", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Name" } }, { "slug": "color", "label": "Color", "field_type": "colorpickerfield", "params": { "required": true, "unique": false, "hidden": false, "help_text": "", "help_text_display_format": "tooltip", "placeholder": "Select color", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Availability Status", "display_format": "hex", "entries_allowed": "single" } }, { "slug": "type", "label": "Type", "field_type": "singleselectfield", "params": { "display_format": "importance", "control_type": "dropdown", "edit_values": false, "edit_help_texts": false, "new_choices_allowed": true, "choices": [ { "value": "2", "label": "Public", "value_help_text": null, "value_color": "#0C41F3", "value_order": 0 } ], "required": true, "unique": false, "hidden": false, "help_text": "", "help_text_display_format": "tooltip", "placeholder": "Select Value", "default_value": "", "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Type" } }, { "slug": "status", "label": "Status", "field_type": "statusfield", "params": { "choices": [ { "value": "1", "label": "Active", "value_help_text": null, "value_color": "#0C41F3", "value_order": 0, "is_complete": false }, { "value": "2", "label": "Inactive", "value_help_text": null, "value_color": "#00B3FA", "value_order": 1, "is_complete": false } ], "required": true, "unique": false, "hidden": false, "help_text": "", "help_text_display_format": "tooltip", "placeholder": "", "default_value": { "value": "", "updated_on": null }, "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Status" } }, { "slug": "owners", "label": "Owners", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_name", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "multiple", "linked_field_slug": null, "required": true, "unique": false, "hidden": false, "help_text": "", "help_text_display_format": "tooltip", "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Owners" } }, { "slug": "members", "label": "Members", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_name", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "multiple", "linked_field_slug": null, "required": false, "unique": false, "hidden": false, "help_text": "", "help_text_display_format": "tooltip", "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Members" } }, { "slug": "first_created", "label": "First Created", "field_type": "firstcreatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text": "", "help_text_display_format": "tooltip", "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "last_updated", "label": "Last Updated", "field_type": "lastupdatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text": "", "help_text_display_format": "tooltip", "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } } ], "primary_field": "name", "order": 100, "structure_layout": null, "show_all_reports_members": [], "fields_metadata": {}, "permissions": { "level": "all_members", "members": [], "teams": [], "permissions_metadata": {} }, "field_permissions": [], "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2022-12-20T17:52:22.646000Z" }, "settings": { "emails": false, "meeting_notes": false, "call_log": false }, "record_term": "record" } // highlight-end ``` --- # List Tables Source: https://developers.smartsuite.com/docs/solution-data/tables/list-tables ```text title="GET" // highlight-start https://app.smartsuite.com/api/v1/applications/ // highlight-end ``` Lists all Tables (Apps) in the Workspace. ```text title="Example Request" curl -X GET https://app.smartsuite.com/api/v1/applications/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" ``` ## Query Parameters | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | fields | string | Yes | Specifies a field slug to include in the response. This parameter can be repeated to add multiple fields. If at least one field is specified, the response will only contain fields referenced by the fields parameter. | | solution | string | Yes | Specifies a Solution Id to limit the returned Tables by. | ## Response Format Returns an array of [Table objects](/docs/solution-data/tables/table-object). The `permissions` object has the shape described in the [Permissions object](/docs/permissions/permissions-object): `members` and `teams` hold `{entity, access}` grant objects, and `owners` holds member Ids. ```json title="200 Response - Example" // highlight-start [ { "first_created": { "on": "2022-12-20T17:52:22.646000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "solution": "63a1f65523aaf6bcb564b00a", "name": "Teams", "slug": "teams", "order": 100, "show_all_reports_members": [], "fields_metadata": {}, "permissions": { "level": "all_members", "members": [], "teams": [] }, "id": "63a1f65623aaf6bcb564b00b", "structure": [ { "slug": "name", "label": "Name", "field_type": "textfield", "params": { "primary": true, "restore_application_id": null, "linked_field_slug": null, "max_length": null, "composite": null, "delimiter": ", ", "required": true, "unique": true, "hidden": false, "help_text": "", "placeholder": "Write here", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Name" } }, { "slug": "color", "label": "Color", "field_type": "colorpickerfield", "params": { "required": true, "unique": false, "hidden": false, "help_text": "", "placeholder": "Select color", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Availability Status", "display_format": "hex", "entries_allowed": "single" } }, { "slug": "type", "label": "Type", "field_type": "singleselectfield", "params": { "display_format": "importance", "control_type": "dropdown", "edit_values": false, "edit_help_texts": false, "new_choices_allowed": true, "choices": [ { "value": "2", "label": "Public", "value_help_text": null, "value_color": "#0C41F3", "value_order": 0 } ], "required": true, "unique": false, "hidden": false, "help_text": "", "placeholder": "Select Value", "default_value": "", "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Type" } }, { "slug": "status", "label": "Status", "field_type": "statusfield", "params": { "choices": [ { "value": "1", "label": "Active", "value_help_text": null, "value_color": "#0C41F3", "value_order": 0, "is_complete": false }, { "value": "2", "label": "Inactive", "value_help_text": null, "value_color": "#00B3FA", "value_order": 1, "is_complete": false } ], "required": true, "unique": false, "hidden": false, "help_text": "", "placeholder": "", "default_value": { "value": "", "updated_on": null }, "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Status" } }, { "slug": "owners", "label": "Owners", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_name", "linked_application": "members", "entries_allowed": "multiple", "linked_field_slug": null, "required": true, "unique": false, "hidden": false, "help_text": "", "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Owners" } }, { "slug": "members", "label": "Members", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_name", "linked_application": "members", "entries_allowed": "multiple", "linked_field_slug": null, "required": false, "unique": false, "hidden": false, "help_text": "", "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false, "system_label": "Members" } }, { "slug": "first_created", "label": "First Created", "field_type": "firstcreatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text": "", "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "last_updated", "label": "Last Updated", "field_type": "lastupdatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text": "", "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } } ], "structure_layout": { "single_column": { "rows": null } }, "primary_field": "name" }, ... ] // highlight-end ``` --- # Create Table Source: https://developers.smartsuite.com/docs/solution-data/tables/create-table ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/applications/ // highlight-end ``` Creates a new Table (App). At least one field must be included in the structure object. ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/applications/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "name": "New Table", "solution": "645d47f8246b73b264b78a9a", "structure": [ { "slug": "name", "label": "Name", "field_type": "textfield" } ] }' ``` ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | name | string | No | The name of the Table. | | solution | string | No | The new Table's Solution Id. | | structure | array of objects | No | An array of Table Structure objects. | ## Response Format Returns `201 Created` with the new [Table object](/docs/solution-data/tables/table-object). --- # Solution Object Source: https://developers.smartsuite.com/docs/solution-data/solutions/solution-object ```json title="200 - Example Response" { "name": "Untitled Solution 1", "slug": "s61az3ub", "logo_color": "#0C41F3", "logo_icon": "calendar", "description": { "data": {}, "html": "", "preview": "" }, "permissions": { "level": "all_members", "members": [], "teams": [], "owners": [ "63a1f65723aaf6bcb564b1f1" ] }, "hidden": false, "created": "2023-05-05T21:11:14.165000Z", "created_by": "63a1f65723aaf6bcb564b1f1", "updated": "2023-05-05T21:11:14.165000Z", "updated_by": "63a1f65723aaf6bcb564b1f1", "has_demo_data": false, "status": "in_development", "automation_count": 0, "records_count": 0, "members_count": 7, "sharing_hash": "kmvtUH5B66", "sharing_password": null, "sharing_enabled": false, "sharing_allow_copy": false, "applications_count": 1, "last_access": "2023-05-15T16:04:45.652000Z", "id": "645570f23f026ab0fbd0f60c", "delete_date": null, "deleted_by": null, "template": null } ``` ## Object Literals | Param | Type | Optional | Description | | :---- | :-: | :-: | :---------- | | name | string | No | The name of the Solution. | | slug | string | No | Slug value of the Solution (Internal SmartSuite Use). | | logo_color | string | No | The Solution color in hex. | | logo_icon | string | No | The material design icon for the Solution. | | description | object | Yes | SmartDoc object containing the Solution Guide content. | | permissions | object | Yes | [Permissions object](/docs/permissions/permissions-object) defining the permissions assigned to the Solution. `members` and `teams` hold `{entity, access}` grant objects; `owners` holds member Ids. | | hidden | boolean | Yes | Whether the Solution is hidden from display. | | created | datetime | No | ISO Date the Solution was created. | | created_by | string | No | Member Id of the Solution creator. | | updated | datetime | No | ISO Date the Solution was last updated. | | updated_by | string | Yes | Member Id of the last updater. May be null. | | has_demo_data | boolean | Yes | Toggles whether to show the demo data keep / remove options. | | status | string | Yes | Legacy value - this is always set to "in_development" | | automation_count | number | Yes | Number of configured automations in the Solution. | | records_count | number | Yes | Number of records in the Solution. | | members_count | number | Yes | Number of Members with at least viewer access to the Solution. | | sharing_hash | string | Yes | Hash used in constructing the Shared Solution URL. | | sharing_password | string | Yes | The passcode specified for a Shared Solution. | | sharing_enabled | boolean | Yes | True if Solution share is enabled. | | sharing_allow_copy | boolean | Yes | True if Shared Solution copy function is enabled. | | applications_count | number | Yes | Number of active Apps in the Solution. | | last_access | datetime | Yes | ISO Date the Solution was last accessed. Null if it has never been accessed. | | id | string | No | The Solution's Id. | | delete_date | datetime | Yes | ISO Date the Solution was deleted. Null if not deleted. | | deleted_by | string | No | Id of the Member who deleted the Solution. Null if not deleted. | | template | string | No | Id of the Solution's template. Null if no template used. | --- # Get Solution Source: https://developers.smartsuite.com/docs/solution-data/solutions/get-solution ```text title="GET" // highlight-start https://app.smartsuite.com/api/v1/solutions/[solutionId]/ // highlight-end ``` Retrieves a single Solution. ```text title="Example Request" curl -X GET https://app.smartsuite.com/api/v1/solutions/645570f23f026ab0fbd0f60c/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" ``` ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | solutionId | string | The Solution Id | ## Response Format ```solution object``` The `permissions` object has the shape described in the [Permissions object](/docs/permissions/permissions-object): `members` and `teams` hold `{entity, access}` grant objects, and `owners` holds member Ids. ```json title="200 - Example Response" { "name": "Untitled Solution 1", "slug": "s61az3ub", "logo_color": "#0C41F3", "logo_icon": "calendar", "description": { "data": {}, "html": "", "preview": "" }, "permissions": { "level": "all_members", "members": [], "teams": [], "owners": [ "63a1f65723aaf6bcb564b1f1" ] }, "hidden": false, "created": "2023-05-05T21:11:14.165000Z", "created_by": "63a1f65723aaf6bcb564b1f1", "updated": "2023-05-05T21:11:14.165000Z", "updated_by": "63a1f65723aaf6bcb564b1f1", "has_demo_data": false, "status": "in_development", "automation_count": 0, "records_count": 0, "members_count": 7, "sharing_hash": "kmvtUH5B66", "sharing_password": null, "sharing_enabled": false, "sharing_allow_copy": false, "applications_count": 1, "last_access": "2023-05-15T16:04:45.652000Z", "id": "645570f23f026ab0fbd0f60c", "delete_date": null, "deleted_by": null, "template": null } ``` --- # List Solutions Source: https://developers.smartsuite.com/docs/solution-data/solutions/list-solutions ```text title="GET" // highlight-start https://app.smartsuite.com/api/v1/solutions/ // highlight-end ``` Lists all Solutions in the Workspace. ```text title="Example Request" curl -X GET https://app.smartsuite.com/api/v1/solutions/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" ``` ## Query Parameters | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | fields | string | Yes | Specifies a field slug to include in the response. This parameter can be repeated to add multiple fields. If at least one field is specified, the response will only contain fields referenced by the fields parameter. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | sort | sort object | Yes | Object specifying sort parameters | | filter | filter object | Yes | Object specifying filter parameters | ## Response Format ```array of solution objects``` The `permissions` object has the shape described in the [Permissions object](/docs/permissions/permissions-object): `members` and `teams` hold `{entity, access}` grant objects, and `owners` holds member Ids. ```json title="Example Response" [ { "name": "Test 1", "slug": "s4xfvqdr", "logo_color": "#199A27", "logo_icon": "yen-sign", "description": { "data": {}, "html": "", "preview": "" }, "permissions": { "level": "all_members", "members": [], "teams": [], "owners": [ "63a1f65723aaf6bcb564b1f1" ] }, "hidden": false, "created": "2023-06-07T21:55:52.928000Z", "created_by": "63a1f65723aaf6bcb564b1f1", "updated": "2023-06-07T21:56:01.999000Z", "updated_by": "63a1f65723aaf6bcb564b1f1", "has_demo_data": false, "status": "in_development", "automation_count": 0, "records_count": 0, "members_count": 7, "sharing_hash": "9l5szFukYK", "sharing_password": null, "sharing_enabled": false, "sharing_allow_copy": false, "applications_count": 1, "last_access": "2023-06-07T21:55:54.072000Z", "id": "6480fce848b4ebb6f17a8fd1", "delete_date": null, "deleted_by": null, "template": null }, { "name": "Test 2", "slug": "si3vrl9o", "logo_color": "#FF702E", "logo_icon": "file-image", "description": { "data": {}, "html": "", "preview": "" }, "permissions": { "level": "all_members", "members": [], "teams": [], "owners": [ "63a1f65723aaf6bcb564b1f1" ] }, "hidden": false, "created": "2023-06-08T14:52:18.578000Z", "created_by": "63a1f65723aaf6bcb564b1f1", "updated": "2023-06-08T14:52:27.401000Z", "updated_by": "63a1f65723aaf6bcb564b1f1", "has_demo_data": false, "status": "in_development", "automation_count": 1, "records_count": 6, "members_count": 7, "sharing_hash": "R4sf4ZchiJ", "sharing_password": null, "sharing_enabled": false, "sharing_allow_copy": false, "applications_count": 2, "last_access": "2023-06-08T21:15:17.366000Z", "id": "6481eb225ff4fbcabde3c3fc", "delete_date": null, "deleted_by": null, "template": null } ] --- # Create Solution Source: https://developers.smartsuite.com/docs/solution-data/solutions/create-solution ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/solutions/ // highlight-end ``` Creates a new Solution. ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/solutions/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "name": "New Solution", "logo_icon": "overline", "logo_color": "#3A86FF" }' ``` ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | name | string | No | The name of the Solution. | | logo_icon | string | Yes | Material Design icon name. If omitted, SmartSuite assigns a default. | | logo_color | string | Yes | Hex color for the icon, including the leading `#` (see list below). A value outside the list, or without `#`, returns `400`. If omitted, SmartSuite assigns a default. | ### Valid Solution Colors ```text Primary Blue = "#3A86FF" Primary Light Blue = "#4ECCFD" Primary Green = "#3EAC40" Primary Red = "#FF5757" Primary Orange = "#FF9210" Primary Yellow = "#FFB938" Primary Purple = "#883CD0" Primary Pink = "#EC506E" Primary Teal = "#17C4C4" Primary Grey = "#6A849B" Dark Primary Blue = "#0C41F3" Dark Primary Light Blue = "#00B3FA" Dark Primary Green = "#199A27" Dark Primary Red = "#F1273F" Dark Primary Orange = "#FF702E" Dark Primary Yellow = "#FDA80D" Dark Primary Purple = "#673DB6" Dark Primary Pink = "#CD286A" Dark Primary Teal = "#00B2A8" Dark Primary Grey = "#50515B" ``` ## Response Returns `201 Created` with the new [Solution object](/docs/solution-data/solutions/solution-object). --- # Validate Solution Name Source: https://developers.smartsuite.com/docs/solution-data/solutions/validate-solution-name ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/solutions/validate_name_uniqueness/ // highlight-end ``` Validates the uniqueness of a potential new Solution name. This function should be called prior to creating a new Solution to verify that the Solution's name is unique within the target Workspace. ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | name | string | No | The proposed name of the new Solution. | ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/solutions/validate_name_uniqueness/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "name": "Test 1" }' ``` ## Response (200) | Param | Type | Description | | :-: | :-: | :-- | | is_unique | boolean | true if unique, false if not unique. | ```json title="Example Response (200)" { "is_unique":true } ``` --- # Duplicate Solution Source: https://developers.smartsuite.com/docs/solution-data/solutions/duplicate-solution ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/solutions/duplicate/ // highlight-end ``` Copies a Solution. Use the parameters below to set the new Solution's name, the source and target Workspaces, and whether records and comments are copied. ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | solution_id | string | No | The 24-character Id of the Solution to copy. | | name | string | No | The name of the new Solution. | | from_workspace | string | No | The 8 character Id of the Workspace to copy from. | | to_workspace | string | No | The 8 character Id of the Workspace to copy to. | | copy_records | boolean | No | true to copy records, false to create an empty Solution. | | copy_comments | boolean | No | true to copy comments, false to ignore comments. | ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/solutions/duplicate/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "solution_id": "{solution_id}", "name": "Test 1 Copy", "from_workspace": "WORKSPACE_ID", "to_workspace": "s25rfeyv", "copy_records": true, "copy_comments": true }' ``` ## Response (200) ```Empty Response Body``` ```json title="Example Response (200)" {} ``` --- # Create View Source: https://developers.smartsuite.com/docs/solution-data/views/create-view ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/reports/ // highlight-end ``` Creates a new View. ```text title="Example Request (Simple Grid View)" curl -X POST https://app.smartsuite.com/api/v1/reports/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "application": "[app_id]", "autosave": false, "description": "", "is_dirty": false, "is_locked": false, "is_password_protected": false, "is_private": false, "map_state": {}, "sharing_allow_all_fields": false, "sharing_allow_copy": false, "sharing_allow_export": false, "sharing_allow_open_record": false, "sharing_enabled": false, "sharing_hash": "", "sharing_password": "", "sharing_show_toolbar": false, "solution": "641b70cb0d94c969a49983aa", "state": { "filterWindow": { "opened": false, "filter": { "operator": "and", "fields": [] } }, "fieldsWindow": { "visibleFields": [ "title" ], "fixedFieldsCount": 1, "columnsWidth": {}, "collapsed": [] } }, "label": "TEST", "view_mode": "grid", "order": 2 }' ``` ## Request Body Only `application`, `solution`, `label` and `view_mode` are required. SmartSuite fills in defaults for the other properties. | Param | Type | Optional | Description | | :-- | :-- | :-: | :-- | | application | string | No | Id of the App where you want to create the View | | autosave | boolean | Yes | Autosave state for the new View | | description | string | Yes | Optional description for the View | | is_dirty | boolean | Yes | -Internal Use- | | is_locked | boolean | Yes | View locked status | | is_password_protected | boolean | Yes | View password protect status | | is_private | boolean | Yes | View private status | | map_state | map state object | Yes | Map View type configuration | | sharing_allow_all_fields | boolean | Yes | Allow all fields when sharing | | sharing_allow_copy | boolean | Yes | Allow copy when sharing | | sharing_allow_export | boolean | Yes | Allow export when sharing | | sharing_allow_open_record | boolean | Yes | Allow opening record details when sharing | | sharing_enabled | boolean | Yes | Sharing state enabled or disabled | | sharing_hash | string | Yes | Shared View hash value | | sharing_password | string | Yes | Shared View password value | | sharing_show_toolbar | boolean | Yes | Shared View toolbar toggle | | solution | string | No | Id of the App Solution containing the View | | state | view state object | Yes | View state configuration | | label | string | No | Display name of the View | | view_mode | string | No | View mode | | order | number | Yes | Display order of the View in the View list | ## Response Returns `201 Created` with the new View object, including its `id`. ___ ## state object ### state object properties | Property | Data Type | Description | |------------------------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | filterWindow | Object | The filter window settings. | | filterWindow.opened | Boolean | Indicates if the filter window is opened or closed. | | filterWindow.filter | Object | The filter settings within the filter window. | | filterWindow.filter.operator | String | The operator used for filtering. | | filterWindow.filter.fields | Array | The array of fields used for filtering. | | fieldsWindow | Object | The fields window settings. | | fieldsWindow.visibleFields | Array | The array of fields that are visible in the fields window. | | fieldsWindow.fixedFieldsCount | Number | The number of fixed fields in the fields window. | | fieldsWindow.columnsWidth | Object | The object containing the widths of columns in the fields window. | | fieldsWindow.collapsed | Array | The array of collapsed fields in the fields window. | | aggregates | Object | Aggregate settings settings. | | coverWindow | null | Indicates that the cover window is null (not applicable). | | sortWindow | Object | The sort window settings. | | sortWindow.sort | Array | The array of sort settings. | | groupbyWindow | Object | The group by window settings. | | groupbyWindow.collapsed | Object | The object containing collapsed settings for group by fields. | | groupbyWindow.group | Array | The array of group by fields. | | spotlightWindow | Object | The spotlight window settings. | | spotlightWindow.spotlights | Array | The array of spotlights. | | cardSizeWindow | Object | The card size window settings. | | cardSizeWindow.size | String | The size of the card. | | rowSizeWindow | Object | The row size window settings. | | rowSizeWindow.size | String | The size of the row. | | rowSizeWindow.previousSize | null | The previous size of the row (not applicable). | | stackByWindow | Object | The stack by window settings. | | stackByWindow.columnFieldSlug | null | The slug of the column field in the stack by window (not applicable). | | stackByWindow.swimlaneFieldSlug | null | The slug of the swimlane field in the stack by window (not applicable). | | stackByWindow.collapsedColumns | Array | The array of collapsed columns in the stack by window. | | stackByWindow.collapsedSwimlanes | Array | The array of collapsed swimlanes in the stack by window. | | stackByWindow.columnsValues | Array | The array of column values in the stack by window. | | locationByWindow | Object | The location by window settings. | | locationByWindow.selectedFieldSlug | null | The selected field slug in the location by window (not applicable). | | calendarFieldsWindow | Object | The calendar fields window settings. | | calendarFieldsWindow.fields | Array | | | calendarFieldsWindow.showRecordsList | Boolean | Indicates whether the records list is shown in the calendar fields window. | | calendarFieldsWindow.viewType | String | The type of view displayed in the calendar fields window. | | calendarFieldsWindow.externalReportsInfo | Array | The array of external reports information in the calendar fields window. | | calendarFieldsWindow.displayWeekends | Boolean | Indicates whether weekends are displayed in the calendar fields window. | | timelineFieldsWindow | Object | The timeline fields window settings. | | timelineFieldsWindow.fields | Array | The array of fields in the timeline fields window. | | timelineFieldsWindow.viewMode | String | The mode of the timeline view in the timeline fields window. | | timelineFieldsWindow.showRecordsList | Boolean | Indicates whether the records list is shown in the timeline fields window. | | timelineFieldsWindow.periods | Array | The array of periods in the timeline fields window. | | chartSettings | Object | The chart settings. | | chartSettings.sidebarActive | Boolean | Indicates whether the sidebar is active in the chart settings. | | chartSettings.selectedFields | Array | The array of selected fields in the chart settings. | | chartSettings.selectedChart | String | The selected chart type in the chart settings. | | chartSettings.checkedLegends | Array | The array of checked legends in the chart settings. | | chartSettings.sortedLegends | Array | The array of sorted legends in the chart settings. | | chartSettings.customSortApplied | Boolean | Indicates whether a custom sort is applied in the chart settings. | | chartSettings.groupByField | Object | The group by field settings in the chart settings. | | chartSettings.groupByField.slug | null | The slug of the group by field (not applicable). | | chartSettings.groupByField.nestedOption | null | The nested option of the group by field (not applicable). | | chartSettings.groupByField.additionalOption | null | The additional option of the group by field (not applicable). | | chartSettings.dynamicFilterField | Object | The dynamic filter field settings in the chart settings. | | chartSettings.dynamicFilterField.slug | null | The slug of the dynamic filter field (not applicable). | | chartSettings.dynamicFilterField.nestedOption | null | The nested option of the dynamic filter field (not applicable). | | chartSettings.dynamicFilterField.fieldOptions | Array | The array of field options in the dynamic filter field. | | chartSettings.dynamicFilterField.selectedOption | null | The selected option of the dynamic filter field (not applicable). | | chartSettings.dynamicFilterSectionExpanded | Boolean | Indicates whether the dynamic filter section is expanded in the chart settings. | | chartSettings.advancedChartOptions | Object | The advanced chart options in the chart settings. | | chartSettings.advancedChartOptions.showDataLabels | Boolean | Indicates whether data labels are shown on the chart. | | chartSettings.advancedChartOptions.showValueAxisLabel | Boolean | Indicates whether the value axis label is shown on the chart. | | chartSettings.advancedChartOptions.showCategoryAxisLabel | Boolean | Indicates whether the category axis label is shown on the chart. | | chartSettings.advancedChartOptions.showXAxisLabel | Boolean | Indicates whether the X-axis label is shown on the chart. | | chartSettings.advancedChartOptions.showYAxisLabel | Boolean | Indicates whether the Y-axis label is shown on the chart. | | chartSettings.advancedChartOptions.showBubbleLegend | Boolean | Indicates whether the bubble legend is shown on the chart. | | chartSettings.categories | Array | The array of categories in the chart settings. | | chartSettings.drillIn | Object | The drill-in settings in the chart settings. | | chartSettings.drillIn.visibleFields| null | The visible fields in the drill-in settings (not applicable). | | chartSettings.benchmarkLines | Array | The array of benchmark lines in the chart settings. | | chartSettings.benchmarkLinesSectionExpanded | Boolean | Indicates whether the benchmark lines section is expanded in the chart settings. | | chartSettings.totals | Array | The array of totals in the chart settings. | | chartSettings.totalsSectionExpanded | Boolean | Indicates whether the totals section is expanded in the chart settings. | | isToolbarVisible | Boolean | Indicates whether the toolbar is visible. | ### state object example ```json title="Example" { "filterWindow": { "opened": false, "filter": { "operator": "and", "fields": [] } }, "fieldsWindow": { "visibleFields": [ "title" ], "fixedFieldsCount": 1, "columnsWidth": {}, "collapsed": [] }, "aggregates": {}, "coverWindow": null, "sortWindow": { "sort": [] }, "groupbyWindow": { "collapsed": {}, "group": [] }, "spotlightWindow": { "spotlights": [] }, "cardSizeWindow": { "size": "s" }, "rowSizeWindow": { "size": "compact", "previousSize": null }, "stackByWindow": { "columnFieldSlug": null, "swimlaneFieldSlug": null, "collapsedColumns": [], "collapsedSwimlanes": [], "columnsValues": [] }, "locationByWindow": { "selectedFieldSlug": null }, "calendarFieldsWindow": { "fields": [], "showRecordsList": false, "viewType": "dayGridMonth", "externalReportsInfo": [], "displayWeekends": true }, "timelineFieldsWindow": { "fields": [], "viewMode": "day", "showRecordsList": false, "periods": [] }, "chartSettings": { "sidebarActive": true, "selectedFields": [], "selectedChart": "bar", "checkedLegends": [], "sortedLegends": [], "customSortApplied": false, "groupByField": { "slug": null, "nestedOption": null, "additionalOption": null }, "dynamicFilterField": { "slug": null, "nestedOption": null, "fieldOptions": [], "selectedOption": null }, "dynamicFilterSectionExpanded": false, "advancedChartOptions": { "showDataLabels": false, "showValueAxisLabel": false, "showCategoryAxisLabel": false, "showXAxisLabel": false, "showYAxisLabel": false, "showBubbleLegend": false }, "categories": [], "drillIn": { "visibleFields": null }, "benchmarkLines": [], "benchmarkLinesSectionExpanded": false, "totals": [], "totalsSectionExpanded": false }, "isToolbarVisible": true } ``` ___ ## map_state object ### map_state object properties | Property | Data Type | Description | |--------------------------|-----------|-------------------------------------------------------| | settings | Object | | | settings.mapTypeId | String | The type of the map to be displayed.

Options:

| | settings.locationRadius | Object | The radius around a location for search or display. | | settings.locationRadius.enabled | Boolean | Indicates if the location radius is enabled or disabled. | | settings.locationRadius.meters | Number | The radius distance in meters. | | settings.locationRadius.measureUnit | String | The unit of measurement for the radius. | | settings.locationMarker | Object | The marker settings for a specific location. | | settings.locationMarker.iconType | String | The type of icon for the location marker. | | settings.locationMarker.iconSizeType | String | The size type of the location marker icon. | | settings.locationMarker.iconColor | String | The color of the location marker icon. | | settings.displayElements | Object | The display elements settings for different map types. | | settings.displayElements.roadmap | Object | The display elements settings for the roadmap map type. | | settings.displayElements.roadmap.labels | Number | The level of label visibility on the roadmap. | | settings.displayElements.roadmap.terrain | Number | The level of terrain visibility on the roadmap. | | settings.displayElements.roadmap.highways | Number | The level of highway visibility on the roadmap. | | settings.displayElements.roadmap.roads | Number | The level of road visibility on the roadmap. | | settings.displayElements.roadmap.transit | Number | The level of transit visibility on the roadmap. | | settings.displayElements.roadmap.poi | Number | The level of point of interest (POI) visibility on the roadmap. | | settings.displayElements.roadmap.water | Number | The level of water visibility on the roadmap. | | settings.displayElements.satellite | Object | The display elements settings for the satellite map type. | | settings.displayElements.satellite.labels | Number | The level of label visibility on the satellite view. | | settings.displayElements.satellite.terrain | Number | The level of terrain visibility on the satellite view. | | settings.displayElements.satellite.highways | Number | The level of highway visibility on the satellite view. | | settings.displayElements.satellite.roads | Number | The level of road visibility on the satellite view. | | settings.displayElements.satellite.transit | Number | The level of transit visibility on the satellite view. | | settings.displayElements.satellite.poi | Number | The level of point of interest (POI) visibility on the satellite view. | | settings.displayElements.satellite.water | Number | The level of water visibility on the satellite view. | | settings.displayElements.hybrid | Object | The display elements settings for the hybrid map type. | | settings.displayElements.hybrid.labels | Number | The level of label visibility on the hybrid map. | | settings.displayElements.hybrid.terrain | Number | The level of terrain visibility on the hybrid map. | | settings.displayElements.hybrid.highways | Number | The level of highway visibility on the hybrid map. | | settings.displayElements.hybrid.roads | Number | The level of road visibility on the hybrid map | | settings.displayElements.hybrid.transit | Number | The level of transit visibility on the hybrid map. | | settings.displayElements.hybrid.poi | Number | The level of point of interest (POI) visibility on the hybrid map. | | settings.displayElements.hybrid.water | Number | The level of water visibility on the hybrid map. | | settings.displayElements.silver | Object | The display elements settings for the silver map type. | | settings.displayElements.silver.labels | Number | The level of label visibility on the silver map. | | settings.displayElements.silver.terrain | Number | The level of terrain visibility on the silver map. | | settings.displayElements.silver.highways | Number | The level of highway visibility on the silver map. | | settings.displayElements.silver.roads | Number | The level of road visibility on the silver map. | | settings.displayElements.silver.transit | Number | The level of transit visibility on the silver map. | | settings.displayElements.silver.poi | Number | The level of point of interest (POI) visibility on the silver map. | | settings.displayElements.silver.water | Number | The level of water visibility on the silver map. | | settings.displayElements.retro | Object | The display elements settings for the retro map type. | | settings.displayElements.retro.labels | Number | The level of label visibility on the retro map. | | settings.displayElements.retro.terrain | Number | The level of terrain visibility on the retro map. | | settings.displayElements.retro.highways | Number | The level of highway visibility on the retro map. | | settings.displayElements.retro.roads | Number | The level of road visibility on the retro map. | | settings.displayElements.retro.transit | Number | The level of transit visibility on the retro map. | | settings.displayElements.retro.poi | Number | The level of point of interest (POI) visibility on the retro map. | | settings.displayElements.retro.water | Number | The level of water visibility on the retro map. | | sidebarActive | Boolean | Indicates whether the map sidebar is active. | ### map_state object example ```json title="Example Structure" { "settings": { "mapTypeId": "roadmap", "locationRadius": { "enabled": false, "meters": 0, "measureUnit": "miles" }, "locationMarker": { "iconType": "pin", "iconSizeType": "m", "iconColor": "#3A86FF" }, "displayElements": { "roadmap": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 1, "water": 2 }, "satellite": { "labels": 1, "terrain": 1, "highways": 2, "roads": 0, "transit": 0, "poi": 0, "water": 2 }, "hybrid": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 0, "water": 2 }, "silver": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 }, "retro": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 } } }, "sidebarActive": false } ``` --- # Get Records for View Source: https://developers.smartsuite.com/docs/solution-data/views/records-for-view ```text title="GET" // highlight-start https://app.smartsuite.com/api/v1/applications/[tableId]/records-for-report/?report=[reportId]&with_empty_values=false // highlight-end ``` Gets the records for a specified View. ```text title="Example Request" curl -X GET "https://app.smartsuite.com/api/v1/applications/[tableId]/records-for-report/?report=[reportId]&with_empty_values=false" \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" ``` ## Query Parameters | Param | Type | Description | | :-- | :-: | :-- | | report | string | The View Id. Required. | | with_empty_values | boolean | Optional. Include fields whose value is empty instead of omitting them. Defaults to false. | ## Response | Param | Type | Description | | :-- | :-: | :-- | | records | array of record objects | An array containing SmartSuite record objects | | related_records | array of objects | Records referenced by linked record fields, each as `{id, title, application_id, application_slug}` | | fields | array of strings | An array containing the field slugs visible in the View | | filter | filter object | The filter applied to the view, if any | | unfiltered | boolean | true if the View has no filter applied | | sort | array of sort objects | The sort applied to the View, if any | | total_records_count | number | Total number of records matching the View, before any paging | | lazy_fields | array of strings | Slugs of fields the View loads on demand rather than up front | ```json title="Example Response" { "records": [ { "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2023-01-06T20:00:15.470000Z" }, "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2023-01-06T20:00:15.470000Z" }, "autonumber": 1, "title": "Sample record", "comments_count": 0, "deleted_date": { "date": null, "include_time": false }, "ranking": { "default": "aagckvjtea" }, "assigned_to": [], "status": { "value": "backlog", "updated_on": "2023-01-06T20:00:15.470000Z" }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "is_overdue": false, "status_is_completed": false, "status_updated_on": "2023-01-06T20:00:15.470000Z" }, "priority": "", "id": "63b87dcf7acde19eac1fe42a", "application_slug": "ssb9kaxn", "application_id": "63b87cad645b3949631b55c1" }, { "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2023-06-21T21:14:06.247000Z" }, "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2023-06-21T21:14:06.247000Z" }, "autonumber": 2, "title": "test", "comments_count": 0, "deleted_date": { "date": null, "include_time": false }, "ranking": { "default": "aagckvkhyq" }, "assigned_to": [], "status": { "value": "backlog", "updated_on": "2023-06-21T21:14:06.248000Z" }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "is_overdue": false, "status_is_completed": false, "status_updated_on": "2023-06-21T21:14:06.248000Z" }, "priority": "", "id": "6493681eba09b400816eb754", "application_slug": "ssb9kaxn", "application_id": "63b87cad645b3949631b55c1" } ], "related_records": [], "fields": [ "title", "due_date", "comments_count", "status", "priority", "assigned_to" ], "filter": {}, "unfiltered": true } ``` --- # Webhooks Overview Source: https://developers.smartsuite.com/docs/solution-data/webhooks/webhooks-overview Webhooks are a mechanism for getting user-configurable programmatic notifications of changes to data or metadata within SmartSuite. :::tip Notice We may add more field types in the future and this will not be considered a breaking change. API consumers are expected to handle unknown field types gracefully. Further, object definitions are not meant to exhaustively describe the shape, new properties can be added and will not be considered a breaking change. ::: ## Authorization The webhooks API uses token-based authentication. Send the same two headers as for other API calls (see [Authentication](/docs/authentication)): | Header | Value | | :-- | :-- | | Authorization | Token YOUR_API_KEY | | ACCOUNT-ID | YOUR_WORKSPACE_ID | We currently support using API tokens and OAuth access tokens (coming soon) during the authentication process. Finally, please perform all requests to these endpoints server-side. Client-side requests are not allowed because they would expose the user's API token. ## Rate Limits The webhooks API has the same rate limits as the rest of the SmartSuite API. See [Rate Limits](/docs/rate-limits). ## Webhook Notifications When an event matching one of your configured webhook's specifications occurs, SmartSuite will send a notification via a POST to the associated webhook's notification URL containing the Solution Id and the webhook Id. The request will include the following payload: ```json title="Example Webhook Payload" { "webhookId": "f0bd5e90-02bb-4017-9294-f885e3e94559", "locator": { "accountId": "WORKSPACE_ID", "solutionId": "63b87cad645b3949631b55bf" } } ``` You should respond to this request with an HTTP 200 status code. The response body should be empty. You are then responsible for retrieving the contents of the updates from the SmartSuite API in separate HTTP requests. :::tip Note: Updates Planned Currently the webhook payload includes the webhookId and a locator object. This object will contain accountId and solutionId. We have a planned enhancement to add additional locator information (applicationId (table Id) and fields that are being tracked by the webhook), as well as a timestamp. Please be aware of these planned changes when you incorporate these webhooks into your code. ::: You will receive at least one notification ping, but we do not guarantee that duplicate notifications will not be sent under some circumstances. The ping carries no event data, so de-duplicate on each event's event_id from List Events. At times we may consolidate notifications into a single ping (for example when a large number of events happen in rapid succession). You can still call List Events to retrieve all new events. If our notification ping fails for some reason (timeout, failure to connect, etc.) we will retry using an exponential backoff for a period of approximately one day. If the ping is still failing after those retries we will disable it and you will need to toggle it back on to again receive notification pings. Note that this does not disable event collection, you can still get all events from the API that were missed during a period of downtime. ## Webhook Expiration You must call [List Events](/docs/solution-data/webhooks/list-events) at least once every 7 days for the webhook to stay active. After 7 days of inactivity we will disable notifications for your webhook. Webhooks in this state for a further 7 days will be deleted, along with their events. Calling List Events during the 7 day inactive period will re-enable the webhook and extend the timeout period an additional 7 days. --- # List Webhooks Source: https://developers.smartsuite.com/docs/solution-data/webhooks/list-webhooks ```text title="POST" // highlight-start https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/ListWebhooks // highlight-end ``` Lists a Solution's webhooks. Note that you will receive data in batches according to the specified page_size. Use page_token to retrieve the next page of webhooks. ```text title="Example Request" curl -X POST https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/ListWebhooks \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "solution_id": "{{solution_id}}", "page_size": "50", "page_token": "" }' ``` ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | solution_id | string | No | Specifies the Solution to return webhooks for. | | page_size | string | Yes | Number of webhooks per page, as a string, e.g. "50" | | page_token | string | Yes | Leave empty for the first page. Pass the next_page_token from the previous response to get the next page | ## Response | Param | Type | Description | | :-- | :-: | :-- | | webhooks | array of webhook objects | The webhooks. See [Get Webhook](/docs/solution-data/webhooks/get-webhook) for the webhook object | | next_page_token | string | Token used to request the next page of webhooks | ```json title="Example Response - 200" { "webhooks": [ { "webhook_id": "3c8a1835-a39a-43ba-ba9c-6fbce5581e34", "locator": { "account_id": "WORKSPACE_ID", "solution_id": "641b70cb0d94c969a49983aa" }, "filter": { "solution": {} }, "kinds": [ "RECORD_CREATED" ], "created_at": { "by": "Peter Novosel", "at": "2023-06-20T14:26:47.192Z" }, "updated_at": { "by": "Peter Novosel", "at": "2023-06-20T14:26:47.192Z" }, "notification_status": { "enabled": { "url": "https://sswebhooks.requestcatcher.com/" } }, "system_status": { "enabled": { "expires_at": "2023-11-02T14:21:43Z" } } } ] } ``` --- # List Events Source: https://developers.smartsuite.com/docs/solution-data/webhooks/list-events ```text title="POST" // highlight-start https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/ListEvents // highlight-end ``` Lists a webhook's events. Note that you will receive data in batches according to the specified page_size. Use page_token to retrieve the next page of events. ```text title="Example Request" curl -X POST https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/ListEvents \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "webhook_id": "{{webhook_id}}", "page_size": "50", "page_token": "" }' ``` ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | webhook_id | string | No | Specifies a webhook Id to return events for. Omitting it returns `400`. | | page_size | string | Yes | Number of records per page | | page_token | string | Yes | Use next_page_token to fetch the next page of events | ## Response | Param | Type | Description | | :-- | :-: | :-: | | events | array of event objects | Array of events | | next_page_token | string | Token used to request the next page of event data | ### event object structure | Param | Type | Description | | :-- | :-: | :-: | | webhook_id | string | The event's webhook Id | | locator | locator object | Contains workspace and Solution information | | event_id | string | The event's Id | | kind | string | The event type | | event_at | datetime | Event's ISO datetime | | record_event_data | event data object | Event's record data | | ctx | ctx object | information about the event | #### locator object | Param | Type | Description | | :-- | :-: | :-- | | locator.account_id | string | The Workspace Id | | locator.solution_id | string | The Solution Id | | locator.application_id | string | The Table (App) Id, where applicable | #### event_data object | Param | Type | Description | | :-- | :-: | :-: | | record_id | string | The record Id | | locator | locator object | Contains workspace and Solution information | | data | field data object | Event data | | previous | field data object | Prior values of fields when event type is RECORD_UPDATED | #### field data object | Param | Type | Description | | :-- | :-: | :-: | | 1-n... *field_slug* | field object | SmartSuite field objects and their data | #### ctx object | Param | Type | Description | | :-- | :-: | :-: | | change_id | string | id of the change event | | change_size | number | size of the change event | | batch_id | string | id of the event batch | | batch_size | number | size of the event batch | | source | string | Source of the change event | | handler | string | change event handler name | --- ```json title="Example Response - 200" { "events": [ { "webhook_id": "2f7cc6e0-b709-4b04-964a-3706c89c78e3", "locator": { "account_id": "WORKSPACE_ID", "solution_id": "63b87cad645b3949631b55bf" }, "event_id": "2f7cc6e0-b709-4b04-964a-3706c89c78e3.994", "kind": "RECORD_CREATED", "event_at": "2023-06-21T21:14:06.263Z", "record_event_data": { "record_id": "6493681eba09b400816eb754", "locator": { "account_id": "WORKSPACE_ID", "solution_id": "63b87cad645b3949631b55bf", "application_id": "63b87cad645b3949631b55c1" }, "data": { "last_updated": { "on": "2023-06-21T21:14:06.247000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "due_date": { "is_overdue": false, "status_updated_on": "2023-06-21T21:14:06.248000Z", "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "status_is_completed": false }, "description": { "data": { "type": "doc", "content": [] }, "preview": "", "html": "
\n \n
" }, "deleted_by": null, "title": "test", "priority": "", "application_id": "63b87cad645b3949631b55c1", "followed_by": [], "application_slug": "ssb9kaxn", "deleted_date": { "date": null, "include_time": false }, "comments_count": 0, "autonumber": 2, "ranking": { "default": "aagckvkhyq" }, "id": "6493681eba09b400816eb754", "first_created": { "on": "2023-06-21T21:14:06.247000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "assigned_to": [], "status": { "updated_on": "2023-06-21T21:14:06.248000Z", "value": "backlog" } }, "previous": {} }, "ctx": { "change_id": "ba1ffa93-0c51-48ab-aff2-64d9128d6c35", "change_size": 1, "batch_id": "65832e55206fdfd247b84abd", "batch_size": 1, "source": "UNKNOWN", "handler": "INTERACTIVE" } } ], "next_page_token": "8991625" } ``` --- # Create Webhook Source: https://developers.smartsuite.com/docs/solution-data/webhooks/create-webhook ```text title="POST" // highlight-start https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/CreateWebhook // highlight-end ``` Creates a new webhook with the specified filter criteria. Three levels of filtering are available: - Solution. Receive events for the entire SmartSuite Solution. - Application (Table). Receive events for one or more Tables (Apps) in a Solution. - Application (Table) fields. Limit events to specific fields in a Table (App). :::tip Note You can currently create any number of webhooks, but be aware that this may be limited in the future. ::: You must call [List Events](/docs/solution-data/webhooks/list-events) at least once every 7 days for the webhook to stay active. After 7 days of inactivity we will disable notifications for your webhook. Webhooks in this state for a further 7 days will be deleted, along with their events. Calling List Events during the 7 day inactive period will re-enable the webhook and extend the timeout period an additional 7 days. ## Request Body All request parameters are nested under a top-level webhook object, as shown in the examples. A filter with no level, or with more than one, returns `400`. In a field-level filter, `field_ids` are field slugs; a slug that does not exist in the Table returns `403`. | Param | Type | Optional | Description | | :-- | :-- | :-: | :-- | | filter | filter object | No | Specifies filters for the returned webhooks. | | kinds | array of strings | No | One of the following types of events:

| | locator | object | No | Contains workspace and Solution information | | webhook_id | string | Yes | leave blank or omit when creating | | notification_status | notification_status object | Yes | | ## filter object | Param | Type | Optional | Description | | :-- | :-- | :-: | :-- | | solution | object | Yes* | Pass an empty object to filter at the Solution level | | applications | applications filter object | Yes* | Object containing application (table) ids to filter by | | application | application fields filter object | Yes* | Object containing one Table (App) Id (`application_id`) and the fields to watch (`field_ids`) | ```json title="Filter: Solution level - no tables/fields" "filter": { "solution": {} } ``` ```json title="Filter: Table (application) level" "filter": { "applications": { "application_ids": ["some application id"] } } ``` ```json title="Filter: Field level" "filter": { "application": { "application_id": "some application id", "field_ids": [ "some field id 1", "some field id 2" ] } } ``` :::tip Note: Filter object The filter object must contain one (and only one) of the formats listed above. When creating a webhook that monitors changes at the solution level, include the solution filter with an empty object {} as the request requires the filter object to be populated. ::: ```json title="Example Request (Solution filter)" { "webhook": { "filter": { "solution": {} }, "kinds": [ "RECORD_CREATED" ], "locator": { "account_id": "{{accountId}}", "solution_id": "{{solutionId}}" }, "notification_status": { "enabled": { "url": "https://hook.us1.make.com/pgbpclvi5y9aix2g5cu421paeeq2izzz" } } } } ``` ```json title="Example Request (application (table) filter)" { "webhook": { "filter": { "applications": { "application_ids": ["some application id"] } }, "kinds": [ "RECORD_CREATED" ], "locator": { "account_id": "{{accountId}}", "solution_id": "{{solutionId}}" }, "webhook_id": "", "notification_status": { "enabled": { "url": "https://sswebhooks.requestcatcher.com/" } } } } ``` ```json title="Example Request (Field filter)" { "webhook": { "filter": { "application": { "application_id": "some application id", "field_ids": ["some field id 1", "some field id 2"] } }, "kinds": [ "RECORD_CREATED", "RECORD_UPDATED" ], "locator": { "account_id": "{{accountId}}", "solution_id": "{{solutionId}}" }, "webhook_id": "", "notification_status": { "enabled": { "url": "https://sswebhooks.requestcatcher.com/" } } } } ``` ```text title="Example Request - Solution Filter" curl -X POST https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/CreateWebhook \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "webhook": { "filter": { "solution": {} }, "kinds": [ "RECORD_CREATED" ], "locator": { "account_id": "{{accountId}}", "solution_id": "{{solutionId}}" }, "webhook_id": "", "notification_status": { "enabled": { "url": "https://sswebhooks.requestcatcher.com/" } } } }' ``` --- ## Response Returns the created webhook wrapped in a webhook object, as in the example below. | Param | Type | Description | | :-- | :-- | :-- | | webhook_id | string | Webhook Id | | locator | locator object | Contains workspace and Solution information | | filter | filter object | Scope of the events to watch. See the filter object below. | | kinds | array of strings | One of the following types of events:

| | created_at | created_at object | Created time information | | updated_at | updated_at object | Updated time information | | notification_status | notification_status object | Webhook notification status | | system_status | system_status object | Webhook status | #### locator object | Param | Type | Description | | :-- | :-: | :-- | | locator.account_id | string | The Workspace Id | | locator.solution_id | string | The Solution Id | | locator.application_id | string | The Table (App) Id, where applicable | ### created_at object | Param | Type | Description | | :-- | :-: | :-- | | by | string | Creating user name | | at | string | ISO date created | ### updated_at object | Param | Type | Description | | :-- | :-: | :-- | | by | string | Updating user name | | at | string | ISO date updated | ### notification_status object | Param | Type | Description | | :-- | :-: | :-- | | enabled | notification_enabled object | Enables webhook notifications | | disabled | object | Pass an empty object to turn webhook notifications off. Events are still collected and can be read with List Events. | #### notification_enabled object | Param | Type | Description | | :-- | :-: | :-- | | url | string | The webhook notification URL | ### system_status object | Param | Type | Description | | :-- | :-: | :-- | | enabled | enabled object | if exists, webhook is enabled | | disabled | disabled object | if exists, webhook is disabled | #### enabled_object object | Param | Type | Description | | :-- | :-: | :-- | | expires_at | string | ISO date when webhook expires | #### disabled_object object | Param | Type | Description | | :-- | :-: | :-- | | expires_at | string | ISO date when webhook will be deleted | ```json title="Example Response - 200" { "webhook": { "webhook_id": "3c8a1835-a39a-43ba-ba9c-6fbce5581e34", "locator": { "account_id": "WORKSPACE_ID", "solution_id": "641b70cb0d94c969a49983aa" }, "filter": { "solution": {} }, "kinds": [ "RECORD_CREATED" ], "created_at": { "by": "Peter Novosel", "at": "2023-06-20T14:26:47.192Z" }, "updated_at": { "by": "Peter Novosel", "at": "2023-06-20T14:26:47.192Z" }, "notification_status": { "enabled": { "url": "https://sswebhooks.requestcatcher.com/" } }, "system_status": { "enabled": { "expires_at": "2023-12-28T19:06:02Z" } } } } ``` --- # Get Webhook Source: https://developers.smartsuite.com/docs/solution-data/webhooks/get-webhook ```text title="POST" // highlight-start https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/GetWebhook // highlight-end ``` Gets a webhook. ```text title="Example Request" curl -X POST https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/GetWebhook \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "webhook_id": "{{webhook_id}}" }' ``` ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | webhook_id | string | No | Id of the webhook you want to retrieve. | ## Response Returns the webhook wrapped in a webhook object, as in the example below. An unknown `webhook_id` returns `404`. | Param | Type | Description | | :-- | :-- | :-- | | webhook_id | string | Webhook Id | | locator | locator object | Contains workspace and Solution information | | filter | filter object | Scope of the events to watch. See the filter object below. | | kinds | array of strings | One of the following types of events:

| | created_at | created_at object | Created time information | | updated_at | updated_at object | Updated time information | | notification_status | notification_status object | Webhook notification status | | system_status | system_status object | Webhook status | #### locator object | Param | Type | Description | | :-- | :-: | :-- | | locator.account_id | string | The Workspace Id | | locator.solution_id | string | The Solution Id | | locator.application_id | string | The Table (App) Id, where applicable | ## filter object | Param | Type | Optional | Description | | :-- | :-- | :-: | :-- | | solution | object | Yes* | Pass an empty object to filter at the Solution level | | applications | applications filter object | Yes* | Object containing application (table) ids to filter by | | application | application fields filter object | Yes* | Object containing one Table (App) Id (`application_id`) and the fields to watch (`field_ids`) | ```json title="Filter: Solution level - no tables/fields" "filter": { "solution": {} } ``` ```json title="Filter: Table (application) level" "filter": { "applications": { "application_ids": ["some application id"] } } ``` ```json title="Filter: Field level" "filter": { "application": { "application_id": "some application id", "field_ids": [ "some field id 1", "some field id 2" ] } } ``` ### created_at object | Param | Type | Description | | :-- | :-: | :-- | | by | string | Creating user name | | at | string | ISO date created | ### updated_at object | Param | Type | Description | | :-- | :-: | :-- | | by | string | Updating user name | | at | string | ISO date updated | ### notification_status object | Param | Type | Description | | :-- | :-: | :-- | | enabled | notification_enabled object | Enables webhook notifications | | disabled | object | Pass an empty object to turn webhook notifications off. Events are still collected and can be read with List Events. | #### notification_enabled object | Param | Type | Description | | :-- | :-: | :-- | | url | string | The webhook notification URL | ### system_status object | Param | Type | Description | | :-- | :-: | :-- | | enabled | enabled object | if exists, webhook is enabled | | disabled | disabled object | if exists, webhook is disabled | #### enabled_object object | Param | Type | Description | | :-- | :-: | :-- | | expires_at | string | ISO date when webhook expires | #### disabled_object object | Param | Type | Description | | :-- | :-: | :-- | | expires_at | string | ISO date when webhook will be deleted | ```json title="Example Response - 200" { "webhook": { "webhook_id": "3c8a1835-a39a-43ba-ba9c-6fbce5581e34", "locator": { "account_id": "WORKSPACE_ID", "solution_id": "641b70cb0d94c969a49983aa" }, "filter": { "solution": {} }, "kinds": [ "RECORD_CREATED" ], "created_at": { "by": "Peter Novosel", "at": "2023-06-20T14:26:47.192Z" }, "updated_at": { "by": "Peter Novosel", "at": "2023-06-20T14:26:47.192Z" }, "notification_status": { "enabled": { "url": "https://sswebhooks.requestcatcher.com/" } }, "system_status": { "enabled": { "expires_at": "2023-12-28T19:06:02Z" } } } } ``` --- # Update Webhook Source: https://developers.smartsuite.com/docs/solution-data/webhooks/update-webhook ```text title="POST" // highlight-start https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/UpdateWebhook // highlight-end ``` Updates a webhook. Send the complete webhook object, including `webhook_id`, `locator`, `kinds` and `filter`. A partial body returns `400` (for example "Webhook locator is required"). ```text title="Example Request" curl -X POST https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/UpdateWebhook \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "webhook": { "webhook_id": "2f7cc6e0-b709-4b04-964a-3706c89c78e3", "kinds": [ "RECORD_CREATED" ], "locator": { "account_id": "{{accountId}}", "solution_id": "{{solutionId}}" }, "filter": { "solution": {} }, "notification_status": { "disabled": {} } } }' ``` ## Request Body All request parameters are nested under a top-level webhook object, as shown in the examples. | Param | Type | Optional | Description | | :-- | :-- | :-: | :-- | | webhook_id | string | No | Id of webhook to update | | kinds | array of strings | No | One of the following types of events:

| | locator | object | No | Contains workspace and Solution information | | filter | object | No | Scope of the events to watch. See the filter object below. | | notification_status | notification_status object | Yes | | #### locator object | Param | Type | Description | | :-- | :-: | :-- | | locator.account_id | string | The Workspace Id | | locator.solution_id | string | The Solution Id | | locator.application_id | string | The Table (App) Id, where applicable | ## filter object | Param | Type | Optional | Description | | :-- | :-- | :-: | :-- | | solution | object | Yes* | Pass an empty object to filter at the Solution level | | applications | applications filter object | Yes* | Object containing application (table) ids to filter by | | application | application fields filter object | Yes* | Object containing one Table (App) Id (`application_id`) and the fields to watch (`field_ids`) | ```json title="Filter: Solution level - no tables/fields" "filter": { "solution": {} } ``` ```json title="Filter: Table (application) level" "filter": { "applications": { "application_ids": ["some application id"] } } ``` ```json title="Filter: Field level" "filter": { "application": { "application_id": "some application id", "field_ids": [ "some field id 1", "some field id 2" ] } } ``` ### notification_status object | Param | Type | Description | | :-- | :-: | :-- | | enabled | notification_enabled object | Enables webhook notifications | | disabled | object | Pass an empty object to turn webhook notifications off. Events are still collected and can be read with List Events. | #### notification_enabled object | Param | Type | Description | | :-- | :-: | :-- | | url | string | The webhook notification URL | --- ## Response ```json title="Example Response - 200" { "webhook_id": "3c8a1835-a39a-43ba-ba9c-6fbce5581e34", "locator": { "account_id": "WORKSPACE_ID", "solution_id": "641b70cb0d94c969a49983aa" }, "filter": { "solution": {} }, "kinds": [ "RECORD_CREATED" ], "created_at": { "by": "Peter Novosel", "at": "2023-06-20T14:26:47.192Z" }, "updated_at": { "by": "Peter Novosel", "at": "2023-06-20T14:26:47.192Z" }, "notification_status": { "enabled": { "url": "https://sswebhooks.requestcatcher.com/" } }, "system_status": { "enabled": { "expires_at": "2023-12-28T19:06:02Z" } } } ``` --- # Delete Webhook Source: https://developers.smartsuite.com/docs/solution-data/webhooks/delete-webhook ```text title="POST" // highlight-start https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/DeleteWebhook // highlight-end ``` Deletes a webhook. :::danger Note Deleting a webhook will also delete all stored events associated with it. ::: ## Request Body | Param | Type | Optional | Description | | :-- | :-- | :-: | :-- | | webhook_id | string | No | Id of the webhook to delete | ```text title="Example Request" curl -X POST https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/DeleteWebhook \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "webhook_id": "2f7cc6e0-b709-4b04-964a-3706c89c78e3" }' ``` ## Response Returns `200 OK` with an empty JSON object (`{}`). --- # Permissions Object Source: https://developers.smartsuite.com/docs/permissions/permissions-object The Permissions object describes who can access a Solution or a Table. It is returned in the `permissions` property of the [Solution object](/docs/solution-data/solutions/solution-object) and the [Table object](/docs/solution-data/tables/table-object). ```json title="Example" { "level": "specific_members", "members": [ { "entity": "63a1f65723aaf6bcb564b1f1", "access": "full_access" } ], "teams": [], "owners": [ "63a1f65723aaf6bcb564b1f1" ] } ``` | Property | Type | Description | | :-- | :-: | :-- | | level | string | Sharing level, e.g. `all_members` or `specific_members`. | | members | array of grant objects | Members granted access, each as a grant object (see below). | | teams | array of grant objects | Teams granted access, each as a grant object (see below). | | owners | array of strings | Member Ids of the owners. | :::caution `members` and `teams` hold grant objects, but `owners` holds bare member Id strings. Don't parse the three arrays the same way. ::: ## Grant object | Property | Type | Description | | :-- | :-: | :-- | | entity | string | Id of the member or team the grant applies to. | | access | string | The access level granted, e.g. `full_access`. | --- # Member Object Source: https://developers.smartsuite.com/docs/org_management/members/member-object ## Object Literals | Param | Type | Nullable | Description | | :---- | :-: | :-: | :-- | | application_id | string | No | Id of Members application | | availability_status | availability status object | No | Member's availability status | | comments_count | number | No | Total comments made by the Member | | first_created | first created object | No | Date and Member who created the Member record. `by` is a Member Id; with `hydrated=true`, an expanded member object (`id`, `full_name`, `email`) instead. | | last_updated | last updated object | No | Date and Member who last updated the Member record. `by` is a Member Id; with `hydrated=true`, an expanded member object (`id`, `full_name`, `email`) instead. | | ranking | ranking object | No | | | id | string | No | Member's record id | | application_slug | string | No | Always set to **members** | | deleted_date | date object | Yes | Date Member was deleted | | full_name | full name object | No | Name of the Member | | company_name | string | No | Member's company name | | department | string | No | Member's department name | | about_me | string | No | Member's about text | | job_title | string | No | Member's job title | | email | array of strings | No | Member's email address | | type | string | No | Member's user type, as a numeric string

| | role | string | No | Member's role type, as a numeric string

| | locale | string | No | Member's locale | | timezone | string | No | Member's time zone | | language | string | No | Member's language (2 character abbreviation) | | office_location | office location object | No | Member's office location | | work_anniversary | date object | No | Member's work anniversary | | certifications | array of strings | No | Member's professional certifications | | skills | array of strings | No | Member's skills | | hobbies | array of strings | No | Member's hobbies | | linkedin | array of strings | No | Member's linkedin | | twitter | array of strings | No | Member's twitter | | facebook | array of strings | No | Member's facebook | | instagram | array of strings | No | Member's instagram | | theme | string | No | Member's selected theme | | dob | date object | No | Member's date of birth | | profile_image | array of file objects | No | Member's profile image | | cover_image | array of file objects | No | Member's cover image | | cover_template | string | No | Member's cover template id (as string) | | biography | array of file objects | No | Member's biography document | | phone | array of phone objects | No | Member's phone number | | teams | array of strings | No | Ids of Member's Teams | | ip_address | array of ip address field objects | No | Member's IP address | | last_login | last login object | No | Date and time Member last logged in | | status | member status object | No | Member status | For the paginated list response that wraps member objects, see [List Members](/docs/org_management/members/list-members). ```json title="Example" { "application_id": "63a1f65723aaf6bcb564b1f0", "availability_status": { "emoji": "", "status": "", "selected_interval": "", "clear_after": { "date": null, "include_time": false } }, "comments_count": 0, "first_created": { "on": "2022-12-20T17:52:23.867000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-06-06T18:58:58.862000Z" }, "ranking": { "default": "aagckvjtea" }, "id": "63a1f65723aaf6bcb564b1f1", "application_slug": "members", "deleted_date": { "date": null }, "full_name": { "title": "", "first_name": "Jane", "middle_name": "", "last_name": "Doe", "sys_root": "Jane Doe" }, "company_name": "Example Company", "department": "Engineering", "about_me": "Jane leads the engineering team.", "job_title": "Engineering Manager", "email": [ "jane.doe@example.com" ], "status": { "value": "1", "updated_on": "2022-12-20T17:52:24.804000Z" }, "type": "1", "role": "1", "locale": "en-US", "timezone": "America/Chicago", "language": "en", "office_location": { "location_address": "123 Main Street", "location_address2": "", "location_city": "Springfield", "location_state": "Illinois", "location_zip": "62701", "location_country": "United States", "location_longitude": "-89.6501", "location_latitude": "39.7817", "sys_root": "" }, "work_anniversary": { "date": "2019-03-04T00:00:00Z", "include_time": false }, "certifications": [], "skills": [ "63f7a91e2ffc5a4ceaf051c4", "63f7a91f2ffc5a4ceaf051c5", "63f7a9202ffc5a4ceaf051c6", "63f7a9212ffc5a4ceaf051c7" ], "hobbies": [ "63f7a9222ffc5a4ceaf051c8", "666206f268af3ed2602380ef" ], "linkedin": [ "https://linkedin.com/in/janedoe" ], "twitter": [ "https://twitter.com/janedoe" ], "facebook": [ "https://www.facebook.com/janedoe" ], "instagram": [ "" ], "theme": "smartsuite_primary", "dob": { "date": "1990-01-01T00:00:00Z", "include_time": false }, "profile_image": [ { "handle": "aBcDeFgHiJkLmNoPqRsT", "metadata": { "container": "smart-suite-media", "filename": "profile.jpg", "key": "aBcDeFgHiJkLmNoPqRsT_profile.jpg", "mimetype": "image/jpeg", "size": 204800 }, "transform_options": { "crop": { "dim": [ 332, 161, 2302, 2302 ] } }, "file_type": "image", "created_on": "2024-06-06T18:58:59.037000Z", "updated_on": "2024-06-06T18:58:59.037000Z" } ], "cover_image": [], "cover_template": "245", "biography": [], "phone": [ { "phone_country": "US", "phone_number": "+1 555 010 0100", "phone_extension": "", "phone_type": 2, "sys_root": "15550100100", "sys_title": "+1 555 010 0100" } ], "teams": [ "63a1f65b23aaf6bcb564b1fd", "63d1a954195ca92df675e5c9", "64bad7fcab28cca9fcc0ea01", "65ce93e5e6bd79eeaf37045d" ], "ip_address": [ { "address": "203.0.113.10", "country_code": "US" } ], "last_login": { "date": "2024-06-11T19:52:31.386000Z", "include_time": true } } ``` --- # List Members Source: https://developers.smartsuite.com/docs/org_management/members/list-members ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/members/list/ // highlight-end ``` List Workspace Members (users). Responses are similar to List Records responses. Returned records do not include any fields with "empty" values, e.g. "", [], or false. ```text title="Example Request" curl -X POST "https://app.smartsuite.com/api/v1/members/list/?offset=0&limit=3" \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "sort": [], "filter": {} }' ``` ## Query Parameters | Param | Type | Optional | Description | | :---- | :-: | :-: | :-- | | offset | number | Yes | For use in pagination - specify the offset value returned by the prior record response to retrieve the next page. | | limit | number | Yes | Number of records to return per request. If not set, defaults to 100. Note: Value must be less than or equal to 1000. See the [Pagination section](/docs/solution-data/records/list-records#pagination) of List Records for more information. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | sort | sort object | Yes | Object specifying sort parameters | | filter | filter object | Yes | Object specifying filter parameters | ## Response Format | Param | Type | Description | | :---- | :-: | :-- | | items | array of objects | Array of member objects. | | total | number | Total number of Members returned. | | offset | number | Offset value for returned data. | | limit | number | Limit value for returned data. | | time | timestamp | ISO datetime of response. | ```json title="200 - Example Response" { "items": [ { "application_id": "63a1f65723aaf6bcb564b1f0", "availability_status": { "emoji": "", "status": "", "selected_interval": "", "clear_after": { "date": null, "include_time": false } }, "comments_count": 0, "first_created": { "on": "2022-12-20T17:52:23.867000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2023-05-01T21:44:32.557000Z" }, "deleted_date": { "date": null, "include_time": false }, "ranking": { "default": "aagckvjtea" }, "full_name": { "title": "", "first_name": "Jane", "middle_name": "", "last_name": "Doe", "sys_root": "Jane Doe" }, "company_name": "SmartSuite", "department": "Executive Team", "about_me": "Jane leads the engineering team.", "job_title": "Co-Founder / CTO", "email": [ "jane.doe@example.com" ], "type": "1", "role": "1", "locale": "en-US", "timezone": "America/Chicago", "language": "en", "office_location": { "location_address": "123 Main Street", "location_address2": "", "location_city": "Springfield", "location_state": "Illinois", "location_zip": "62701", "location_country": "United States", "location_longitude": "-89.6501", "location_latitude": "39.7817", "sys_root": "123 Main Street, Springfield, Illinois, 62701, United States" }, "work_anniversary": { "date": "2019-03-04T00:00:00Z", "include_time": false }, "certifications": [], "skills": [ "63f7a91e2ffc5a4ceaf051c4", "63f7a91f2ffc5a4ceaf051c5", "63f7a9202ffc5a4ceaf051c6", "63f7a9212ffc5a4ceaf051c7" ], "hobbies": [ "63f7a9222ffc5a4ceaf051c8", "645032bf4c3997e5288036ca" ], "linkedin": [ "https://linkedin.com/in/janedoe" ], "twitter": [ "https://twitter.com/janedoe" ], "facebook": [ "https://www.facebook.com/janedoe" ], "instagram": [ "" ], "theme": "smartsuite_primary", "dob": { "date": "1990-01-01T00:00:00Z", "include_time": false }, "profile_image": [ { "handle": "AMhkSKBSyiIBIj8ei0ll", "metadata": { "container": "smart-suite-media", "filename": "profile.jpg", "key": "Wju9hFnmRLeo99wCSS0n_profile.jpg", "mimetype": "image/jpeg", "size": 1171191 }, "transform_options": { "crop": { "dim": [ 319, 288, 2302, 2302 ] } }, "file_type": "image", "created_on": "2023-05-01T21:44:32.558000Z", "updated_on": "2023-05-01T21:44:32.558000Z" } ], "cover_image": [], "cover_template": "245", "biography": [], "phone": [ { "phone_country": "US", "phone_number": "+1 555 010 0100", "phone_extension": "", "phone_type": 2, "sys_root": "15550100100", "sys_title": "+1 555 010 0100" } ], "teams": [ "63a1f65b23aaf6bcb564b1fd", "63d1a954195ca92df675e5c9" ], "ip_address": [ { "address": "203.0.113.10", "country_code": "us" } ], "last_login": { "date": "2023-05-30T22:47:38.837000Z", "include_time": true, "_cls": "DateDocument" }, "id": "63a1f65723aaf6bcb564b1f1", "application_slug": "members", "status": { "value": "1", "updated_on": "2022-12-20T17:52:24.804000Z" } } ], "total": 1, "offset": 0, "limit": 0, "time": "2023-05-30T23:08:27.324200Z" } ``` --- # Update Member Profile Source: https://developers.smartsuite.com/docs/org_management/members/update-member ```text title="PUT or PATCH" // highlight-start https://app.smartsuite.com/api/v1/members/{memberId}/ // highlight-end ``` Update a Member profile. Responses are similar to List Records responses. ```text title="Example Request" curl -X PATCH https://app.smartsuite.com/api/v1/members/63a1f65723aaf6bcb564b2f1/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "language": "en" }' ``` The update endpoint supports two types of record updates, with a PUT request performing a “destructive” update that clears all values that are not specified in the update, and a PATCH request updating just those fields included in the request. ## Path Parameters | Param | Type | Description | | :-: | :-: | :-- | | memberId | string | The Id of the Member to apply updates to. | ## Request Body | Param | Type | Description | | :-: | :-: | :-- | | member object | object | A record object representing the Member to be updated. | ## Response ```json title="200 - Example Response" { "full_name": { "title": "", "first_name": "Joe", "middle_name": "", "last_name": "User", "sys_root": "Joe User" }, "company_name": "SmartSuite", "department": "Testing", "about_me": "This is a test user", "job_title": "Tester", "email": [ "test@smartsuite.com" ], "status": { "value": "1", "updated_on": "2022-12-20T17:52:24.804000Z" }, "type": "1", "role": "1", "locale": "en-US", "timezone": "America/Chicago", "language": "en", "office_location": { "location_address": "123 Main Street", "location_address2": "", "location_zip": "62701", "location_country": "United States", "location_state": "Illinois", "location_city": "Springfield", "location_longitude": "-89.6501", "location_latitude": "39.7817", "sys_root": "" }, "work_anniversary": { "date": "2019-03-04T00:00:00Z", "include_time": false }, "certifications": [], "skills": [ "63f7a91e2ffc5a4ceaf051c4", "63f7a91f2ffc5a4ceaf051c5", "63f7a9202ffc5a4ceaf051c6", "63f7a9212ffc5a4ceaf051c7" ], "hobbies": [ "63f7a9222ffc5a4ceaf051c8", "666206f268af3ed2602380ef" ], "linkedin": [ "https://linkedin.com/in/janedoe" ], "twitter": [ "https://twitter.com/janedoe" ], "facebook": [ "https://www.facebook.com/janedoe" ], "instagram": [ "" ], "theme": "smartsuite_primary", "dob": { "date": "1990-01-01T00:00:00Z", "include_time": false }, "profile_image": [ { "handle": "vZHaSuzwRGG8Mzf2OMrz", "metadata": { "container": "smart-suite-media", "filename": "profile.jpg", "key": "XBwDgeqToKjfKC5N1jeO_profile.jpg", "mimetype": "image/jpeg", "size": 1171191 }, "transform_options": { "crop": { "dim": [ 332, 161, 2302, 2302 ] } }, "created_on": "2024-06-06T18:58:59.037000Z", "updated_on": "2024-06-06T18:58:59.037000Z", "description": "", "video_conversion_status": "", "video_thumbnail_handle": "", "converted_video_handle": "", "file_type": "image", "icon": "image" } ], "cover_image": [], "cover_template": "245.0", "biography": [], "phone": [ { "phone_country": "US", "phone_number": "+1 555 010 0100", "phone_extension": "", "phone_type": 2, "sys_root": "15550100100", "sys_title": "+1 555 010 0100" } ], "teams": [ "63a1f65b23aaf6bcb564b1fd", "63d1a954195ca92df675e5c9", "64bad7fcab28cca9fcc0ea01", "65ce93e5e6bd79eeaf37045d" ], "ip_address": [ { "address": "203.0.113.10", "country_code": "US" } ], "last_login": { "date": "2024-06-11T21:34:30.124000Z", "include_time": true }, "availability_status": { "emoji": "", "status": "", "selected_interval": "", "clear_after": { "date": null, "include_time": false } }, "first_created": { "on": "2022-12-20T17:52:23.867000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "on": "2024-06-06T18:58:58.862000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "id": "63a1f65723aaf6bcb564b2f1", "application_slug": "members", "application_id": "63a1f65723aaf6bcb564b1f0", "title": null, "comments_count": 0, "autonumber": null, "ranking": { "default": "aagckvjtea" }, "deleted_date": { "date": null, "include_time": false }, "deleted_by": null } ``` --- # Team Object Source: https://developers.smartsuite.com/docs/org_management/teams/team-object ## Object Literals | Param | Type | Nullable | Description | | :---- | :-: | :-: | :-- | | first_created | first created object | No | Date and Team who created the Team record | | last_updated | last updated object | No | Date and Team who last updated the Team record | | application_id | string | No | Id of Teams application | | ranking | ranking object | No | | | id | string | No | Team's record id | | application_slug | string | No | Always set to **teams** | | deleted_date | date object | Yes | Date Team was deleted | | name | string | No | Name of the Team | | color | array of color objects | No | Array of color objects, each with `value` (hex color) and `name`. | | type | string | No | Team's type

Note: This value should always be "2" at this time. Additional values may be added in future releases.

| | status | team status object | No | Team status. Its `value` is a string

| | owners | array of strings | No | List of owner ids | | members | array of strings | No | List of member ids | ```text title="Example" { "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-02-15T22:44:53.016000Z" }, "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-02-20T20:29:00.715000Z" }, "application_id": "63a1f65623aaf6bcb564b00b", "ranking": { "default": "aamevqverw" }, "id": "65ce93e5e6bd79eeaf37045d", "application_slug": "teams", "deleted_date": { "date": null }, "name": "Project Team: Website Project", "color": [ { "value": "#0C41F3" } ], "type": "2", "status": { "value": "1", "updated_on": "2024-02-15T22:44:53.041000Z" }, "owners": [ "63a1f65723aaf6bcb564b1f1" ], "members": [ "64591b7288d2ea5cfc582944", "63a1f65723aaf6bcb564b1f1", "6495c857c7458025319a5f8d", "64b8c20796e378b3d57dbcee", "65d50b8bc7dae42729d6b4ad" ] } ``` --- # List Teams Source: https://developers.smartsuite.com/docs/org_management/teams/list-teams ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/teams/list/ // highlight-end ``` List Workspace Teams (groups). Responses are similar to List Records responses. Returned records do not include any fields with "empty" values, e.g. "", [], or false. ```text title="Example Request" curl -X POST "https://app.smartsuite.com/api/v1/teams/list/?offset=0&limit=3" \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "sort": [], "filter": {} }' ``` ## Query Parameters | Param | Type | Optional | Description | | :---- | :-: | :-: | :-- | | offset | number | Yes | For use in pagination - specify the offset value returned by the prior record response to retrieve the next page. | | limit | number | Yes | Number of records to return per request. If not set, defaults to 100. Note: Value must be less than or equal to 1000. See the [Pagination section](/docs/solution-data/records/list-records#pagination) of List Records for more information. | ## Request Body | Param | Type | Optional | Description | | :-: | :-: | :-: | :-- | | sort | sort object | Yes | Object specifying sort parameters | | filter | filter object | Yes | Object specifying filter parameters | ## Response Format | Param | Type | Description | | :---- | :-: | :-- | | items | array of objects | Array of team objects. | | total | number | Total number of Teams returned. | | offset | number | Offset value for returned data. | | limit | number | Limit value for returned data. | | time | timestamp | ISO datetime of response. | ```json title="200 - Example Response" { "items": [ { "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-02-15T22:44:53.016000Z" }, "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-02-20T20:29:00.715000Z" }, "application_id": "63a1f65623aaf6bcb564b00b", "ranking": { "default": "aamevqverw" }, "id": "65ce93e5e6bd79eeaf37045d", "application_slug": "teams", "deleted_date": { "date": null }, "name": "Project Team: Website Project", "color": [ { "value": "#0C41F3" } ], "type": "2", "status": { "value": "1", "updated_on": "2024-02-15T22:44:53.041000Z" }, "owners": [ "63a1f65723aaf6bcb564b1f1" ], "members": [ "64591b7288d2ea5cfc582944", "63a1f65723aaf6bcb564b1f1", "6495c857c7458025319a5f8d", "64b8c20796e378b3d57dbcee", "65d50b8bc7dae42729d6b4ad" ] } ], "total": 1, "offset": 0, "limit": 0, "time": "2024-06-11T22:57:18.107986Z" } ``` --- # Add Team Source: https://developers.smartsuite.com/docs/org_management/teams/add-team ```text title="POST" // highlight-start https://app.smartsuite.com/api/v1/teams/ // highlight-end ``` Creates a Team. Team names must be unique. ```text title="Example Request" curl -X POST https://app.smartsuite.com/api/v1/teams/ \ -H "Authorization: Token YOUR_API_KEY" \ -H "ACCOUNT-ID: WORKSPACE_ID" \ -H "Content-Type: application/json" \ --data '{ "id": null, "name": "My New Team", "type": "2", "status": { "value": "1", "updated_on": null }, "color": [ { "value": "#0C41F3", "name": "" } ], "owners": [ "63a1f65723aaf6bcb564b1f1" ], "members": [], "first_created": null, "last_updated": null, "comments_count": 0, "followed_by": [] }' ``` ## Request Body | Param | Type | Nullable | Description | | :-: | :-: | :-: | :-- | | id | string | Yes | Set value to null when adding team | | name | string | No | Name of the new team. NOTE: Must be unique | | type | string | No | Always set this value to "2" (PUBLIC) | | status | status object | No | Team status | | color | color object | No | Color associated with the team | | owners | array of strings | No | List of the team's owner ids | | members | array of strings | No | List of team members' ids | | first_created | date object | Yes | set to null | | last_updated | date object | Yes | set to null | | comments_count | number | No | set to 0 | | followed_by | array of strings | No | List of follower ids (set to empty array) | ### Status Object | Param | Type | Description | | :-: | :-: | :-- | | value | string | Status value

| | updated_on | ISO date | Date status last updated | ### Color Object | Param | Type | Description | | :-: | :-: | :-- | | value | string | Hex color value associated with the Team | | name | string | color name or "" | ## Response ```json title="200 - Example Response" { "name": "My New Team", "color": [ { "value": "#0C41F3" } ], "type": "2", "status": { "value": "1", "updated_on": "2024-06-12T15:37:31.904982Z" }, "owners": [ "63a1f65723aaf6bcb564b1f1" ], "members": [], "first_created": { "on": "2024-06-12T15:37:31.881579Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "on": "2024-06-12T15:37:31.881652Z", "by": "63a1f65723aaf6bcb564b1f1" }, "id": "6669c0bb3c4a0cff67a91a4c", "application_slug": "teams", "application_id": "63a1f65623aaf6bcb564b00b", "title": null, "comments_count": null, "autonumber": null, "ranking": { "default": "aamevqvtmm" }, "deleted_date": { "date": null, "include_time": false }, "deleted_by": null } ``` --- # Overview Source: https://developers.smartsuite.com/docs/scripting/intro SmartSuite's scripting feature empowers you to automate tasks, enhance data analysis, and create custom workflows. With scripting, you can: - Create a script to analyze records in a view and calculate a custom metric, storing the result in a specified field. - Validate data integrity by identifying records that don't comply with specific rules (e.g., ensuring that no individual is assigned more than three high-priority tasks at once). - Combine information from duplicate records based on custom criteria, ensuring your data remains clean and consolidated. - Retrieve data from external APIs, such as live stock prices or weather updates, and save the results to relevant fields in your records. - Prompt the user for input, such as a project title, and automatically generate all associated records, such as tasks and deadlines, based on a predefined template. ## Getting Started To begin scripting in SmartSuite, a basic understanding of JavaScript is recommended. You can explore example scripts in our documentation or visit our community forum for inspiration and guidance. In your script, you can use any part of the JavaScript standard library, and when creating a script for an interactive element in SmartSuite (such as the Custom Code widget or a button action) you can create and update HTML to present data or allow the user to interact with your script. SmartSuite's scripting engine also provides specific methods for accessing and updating data in your records. You will find documentation of these methods and their data structures on this site. To reference the SmartSuite scripting SDK, you need to point to window.SmartSuite.[method] in your script. For example, to get the current Member you would call the getCurrentMember function like this: ```javascript ``` Because you can also include HTML in your script (essentially a Web page displayed in an iFrame), enclode your script in script tags, as shown above. You can use standard javascript selectors to interact with HTML elements on the script's page. An example: ```javascript SmartSuite Member Info

Current Member Information

Loading...
``` # Additional Resources - **[MDN JavaScript Guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide):** A comprehensive introduction to JavaScript fundamentals. - **[Codecademy Introduction to JavaScript](https://www.codecademy.com/learn/introduction-to-javascript):** A free interactive course for learning JavaScript basics. - **Community Forum:** Connect with other SmartSuite users to share ideas, showcase scripts, and get support for your scripting needs. --- # Quick Reference Source: https://developers.smartsuite.com/docs/scripting/quick_reference For those of you who just want to jump right in, here are the basic definitions of the SmartSuite scripting SDK functions and a short example. Please explore the full scripting SDK documentation of each function for more details. ```javascript Title="Examples" ``` --- # Configuration Settings Source: https://developers.smartsuite.com/docs/scripting/quick_reference copy The Script Widget settings panel supports the ability to define key-value pairs. Those values can be referenced within the script, making it easier to update scripts and their settings without altering code. In the image below you can see the key/value pair definitions. You'll use the "key" to reference the "value" in your code, just like a constant. You can also **Add New** to create a new pair, or click the trash bin to remove a value. Reference these values in your code like this: ```javascript ``` ![Alt Text](../../static/img/value_configuration.png) --- # Solution Object Source: https://developers.smartsuite.com/docs/scripting/api_reference/solution/ A Solution is a collection of data in SmartSuite, designed to contain all the information related to a business process or workflow. Solutions appear on your Homepage in the form of square icons with a title and an emoji/icon. Solutions are a part of a Workspace. | Parameter | Type | Description | | :---- | :-- | :-- | | name | string | The name of the solution. | | slug | string | Unique slug for the solution (not used). | | logo_color | string | Hex color associated with the Solution. | | logo_icon | string | Material icon for the solution. | | description | SmartDoc object | Solution Description. | | permissions | Permissions object | Solution Permissions. | | hidden | boolean | Hidden state of the Solution. | | created| string | Date created in ISO format. | | created_by| string | Member Id of Solution creator. | | updated| string | Date updated in ISO format. | | updated_by| string | Member Id of last Solution updater. | | automation_count | number | Number of automations in the Solution. | | has_demo_data| boolean | True if Solution contains demo data from a Solution Template | | records_count| number | Number of records in the Solution. | | members_count| number | Number of Members with access to the Solution. | | sharing_hash| string | Sharing hash code of the Solution. | | applications_count| number | Number of automations in the Solution. | | sharing_enabled| boolean | True if sharing is enabled for the Solution. | | last_access| string | Date of last access in ISO format. | | id | string | Unique Id of the Solution. | | delete_date| string | Date deleted in ISO format. | | deleted_by| string | Id of Member who deleted the Solution | | template | string | Id of template if originally installed from Solution Templates. | ```json title="Example Solution JSON" { "name": "Software Development", "slug": "45s89thz", "logo_color": "#FF9210", "logo_icon": "alarm-clock", "description": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": null } } ] }, "html": "
\n

\n
", "preview": "…" }, "permissions": { "level": "all_members", "members": [ { "access": "commenter", "entity": "5fa010408febf5497e38c211" }, { "access": "full_access", "entity": "5fa01e2d612bc42ac32c675c" } ], "teams": [ { "access": "full_access", "entity": "5fcfc2fd781389b52d6f6eb5" }, { "access": "full_access", "entity": "5fcfc38c2a42a9390f8812f2" } ], "owners": [ "5fa01deeaa4e41222745cbb2", "6400d319b19098db8e2b55df" ], "private_to": null }, "hidden": false, "created": "2020-11-18T14:49:18.333000Z", "created_by": "5fa010408febf5497e38c211", "updated": "2024-04-04T09:16:03.663000Z", "updated_by": "5fa010408febf5497e38c211", "automation_count": 2, "has_demo_data": false, "records_count": 25289, "members_count": 76, "sharing_hash": "SoJTWi3e8O", "applications_count": 11, "sharing_enabled": true, "last_access": "2024-07-03T15:53:18.803000Z", "id": "5f0cce5150d9f289ad1fce3e", "delete_date": null, "deleted_by": null, "template": null } ``` ```text title="Get Solution" ``` ```text title="List Solutions" ``` --- # Retrieving Solutions Source: https://developers.smartsuite.com/docs/scripting/api_reference/solution/retrieve_solutions You can retrieve all of a workspace's Solutions, or get a specific Solution by it's unique ID. ## Get Solution Get a single Solution by its Id. ```javascript get_solution(solutionId: string, options?: RequestOptions | string[]): Promise ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | solutionId | string | The Id of the solution. | ```javascript title="Example Script - Get Solution" ``` ### Response ```json title="200 response" {Solution Object} ``` ## List Solutions Get all Solutions. ``` list_solutions(fieldSlugs?: string[]): Promise ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | fieldSlugs | array of strings | (optional) Array of solution object keys to return. | ```javascript title="List Solutions" ``` ### Response ```json title="200 response" [ { "name": "System", "slug": "system", "logo_color": "#0C41F3", "logo_icon": "calendar", "description": { "data": {}, "html": "", "preview": "" }, "permissions": { "level": "all_members", "members": [], "teams": [], "owners": [] }, "hidden": false, "created": "2022-12-20T17:52:21.298000Z", "updated": "2022-12-20T17:52:21.298000Z", "has_demo_data": false, "status": "in_development", "automation_count": 0, "records_count": 27, "members_count": 15, "sharing_hash": "D2h5hdsBSc", "applications_count": 2, "last_access": "2024-10-17T22:47:00.840000Z", "id": "63a1f65523aaf6bcb564b00a", "delete_date": null, "deleted_by": null, "updated_by": null, "template": null }, ... ] ``` --- # Create Solution Source: https://developers.smartsuite.com/docs/scripting/api_reference/solution/create_solution Create a new Solution. ```javascript create_solution( name: string, applicationsToCreate?: PartialApplicationModel[], memberId?: string, status?: string ): Promise ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | name | string | The name for the new Solution. Must be unique in the workspace. | | applicationsToCreate | array of table objects | (optional) Array of table objects to create in the new Solution. By default a "Table 1" with standard default fields will be created. | | memberId | string | Member Id for the owner of the Solution. Defaults to the current user. | | status | string | Status of the Solution. Defaults to active which is the active state. | ## PartialApplicationModel ```javascript export interface PartialApplicationModel { id?: ID; name: string; structure?: AppStructureField[]; report?: PartialReport; solution?: ID; } ``` ```javascript title="Example Script - Create Solution" ``` ## Response ```json title="200 response" { "id": "6765ee6e51edab10072a0826", "name": "DEMO9", "slug": "stsgh6du", "logo_color": "#0C41F3", "logo_icon": "calendar", "description": { "data": {}, "html": "", "preview": "" }, "permissions": { "level": "private_to_me", "members": [], "teams": [], "owners": [ "63a1f65723aaf6bcb564b1f1" ], "private_to": "63a1f65723aaf6bcb564b1f1" }, "hidden": false, "template": null, "created": "2024-12-20T22:23:42.354523Z", "created_by": null, "updated": "2024-12-20T22:23:42.354532Z", "updated_by": "63a1f65723aaf6bcb564b1f1", "delete_date": null, "deleted_by": null, "status": "active", "automation_count": 0, "applications_count": 0, "last_access": null, "has_demo_data": false, "records_count": 0, "members_count": 8, "sharing_hash": "Kh1Kb3TElU", "sharing_enabled": false, "sharing_password": null, "sharing_allow_copy": false, "applications": [ { "id": "6765ee6e51edab10072a0828", "name": "Table 1", "icon": "no-icon", "solution": "6765ee6e51edab10072a0826", "slug": "snq0ovvx", "status": "active", "structure": [ { "slug": "title", "label": "Title", "field_type": "recordtitlefield", "params": { "is_auto_generated": false, "template": "", "primary": true, "max_length": null, "required": true, "unique": true, "placeholder": "Enter record title", "width": 1, "is_migrating": false, "valid": true, "indexed": false, "help_doc": null, "help_text_display_format": "tooltip" } }, { "slug": "description", "label": "Description", "field_type": "richtextareafield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": { "data": {}, "html": "", "preview": "" }, "width": 2, "system": false, "valid": true, "is_migrating": false } }, { "slug": "assigned_to", "label": "Assigned To", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_only", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "status", "label": "Status", "field_type": "statusfield", "params": { "choices": [ { "label": "Backlog", "value": "backlog", "value_order": 1, "value_color": "#6A849B", "is_complete": false }, { "label": "In Process", "value": "in_progress", "value_order": 2, "value_color": "#FFB938" }, { "label": "Ready for Review", "value": "ready_for_review", "value_order": 3, "value_color": "#FF9210", "is_complete": false }, { "label": "Complete", "value": "complete", "value_order": 4, "value_color": "#3EAC40", "is_complete": true } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": { "value": "backlog", "updated_on": null }, "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "due_date", "label": "Due Date", "field_type": "duedatefield", "params": { "display_format": "standard", "linked_field": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, { "slug": "priority", "label": "Priority", "field_type": "singleselectfield", "params": { "display_format": "importance", "control_type": "dropdown", "edit_values": false, "edit_help_texts": false, "new_choices_allowed": true, "choices": [ { "label": "Urgent", "value": "urgent", "value_color": "#FF5757", "value_order": 0, "icon_type": "icon", "weight": 1 }, { "label": "High", "value": "high", "value_color": "#FFB938", "value_order": 1, "icon_type": "icon", "weight": 1 }, { "label": "Normal", "value": "normal", "value_color": "#3EAC40", "value_order": 2, "icon_type": "icon", "weight": 1 }, { "label": "Low", "value": "low", "value_color": "#6A849B", "value_order": 3, "icon_type": "icon", "weight": 1 } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Value", "default_value": "", "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "first_created", "label": "First Created", "field_type": "firstcreatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "last_updated", "label": "Last Updated", "field_type": "lastupdatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "followed_by", "label": "Followed by", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_name", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": null, "required": false, "unique": false, "hidden": true, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": true, "valid": true, "is_migrating": false } }, { "slug": "comments_count", "label": "Open Comments", "field_type": "commentscountfield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter number", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "autonumber", "label": "Auto Number", "field_type": "autonumberfield", "params": { "include_labels": true, "suffix": "", "prefix": "#", "starting_number": 1, "leading_zeros": 2, "primary": false, "required": false, "unique": true, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 0, "system": true, "valid": true, "is_migrating": false } } ], "primary_field": "title", "order": 219125, "structure_layout": { "mode": "fifty_fifty", "fifty_fifty": { "rows": [ [ "title", "" ], [ "description", "" ], [ "assigned_to", "status" ], [ "due_date", "priority" ] ], "sections": [] }, "seventy_thirty": { "seventy": [ "description" ], "thirty": [ "title", "assigned_to", "status", "due_date", "priority" ], "seventy_sections": [], "thirty_sections": [] }, "hidden_fields": null, "single_column": { "rows": [ "title", "description", "assigned_to", "status", "due_date", "priority" ], "sections": [] } }, "show_all_reports_members": [], "fields_metadata": {}, "permissions": { "level": "all_members", "members": [], "teams": [], "permissions_metadata": {} }, "field_permissions": [], "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-12-20T22:23:42.566000Z" }, "settings": { "emails": false, "meeting_notes": false, "call_log": false }, "record_term": "record", "fields_count": { "total": 10 }, "record_avatar_field_slug": null, "hidden": false } ] } ``` --- # Duplicate Solution Source: https://developers.smartsuite.com/docs/scripting/api_reference/solution/duplicate_solution Duplicate a Solution. You can duplicate the Solution into the current Workspace or another Workspace the user has Administrator or Solution Creator permissions in. Note that the name of the duplicated Solution must be unique in the destination Workspace. ```javascript duplicate_solution(solutionDuplicateRequest: SolutionDuplicateRequest): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | SolutionDuplicateRequest | SolutionDuplicateRequest object | Parameters for Solution duplication. Duplicate Solution name must be unique. | ## SolutionDuplicateRequest Interface ```javascript ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | copy_comments | boolean | True to copy comments. | | copy_records | boolean | True to copy records. | | from_workspace | string | Source Workspace Id. | | name | string | Name of new (duplicated) Solution. Must be unique in the destination Workspace. | | solution_id | string | Id of the Solution to duplicate. | | to_workspace | string | Destination Workspace Id. | ```javascript title="Example Script - Duplicate Solution" ``` ## Response ```204 No Response``` --- # Table Object Source: https://developers.smartsuite.com/docs/scripting/api_reference/table/ Each Solution can have one or more Tables, which are similar to a single worksheet tab in a spreadsheet. Tables in SmartSuite hold information about one type of item; for example, projects, tasks, campaigns, and products. Each Solution needs at least one Table. Tables appear as their own tab in a Solution. :::tip Note You can have a maximum of 25 Tables within a single Solution ::: | Param | Type | Description | | :---- | :-- | :-- | | id | string | Unique Id of the Table. | | name | string | The name of the Table. | | solution | string | The Table's Solution Id. | | slug | string | Unique slug for the Table (not used). | | status | string | Status of the table. | | structure | array of Field objects | The fields contained in the Table. | | primary_field | string | Slug of the table's primary (title) field. | | order | number | Numeric value used to order tables. | ```json title="Example Table JSON" { "id": "6716999c6b87f8d761d72bdf", "name": "Reg Change", "solution": "670591d10d49cf96bf74c49a", "slug": "st5ogy0y", "status": "active", "structure": [ { "slug": "title", "label": "Title", "field_type": "recordtitlefield", "params": { "is_auto_generated": false, "template": "", "primary": true, "max_length": null, "required": true, "unique": true, "placeholder": "Enter record title", "width": 1, "is_migrating": false, "valid": true, "indexed": false, "help_doc": null, "help_text_display_format": "tooltip" } }, { "slug": "description", "label": "Description", "field_type": "textareafield", "params": { "restore_application_id": null, "max_length": null, "composite": null, "delimiter": ", ", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Write here", "default_value": null, "width": 2, "system": false, "valid": true, "is_migrating": false } }, { "slug": "assigned_to", "label": "Assigned To", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_only", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "status", "label": "Status", "field_type": "statusfield", "params": { "choices": [ { "label": "Backlog", "value": "backlog", "value_order": 1, "value_color": "#6A849B", "is_complete": false }, { "label": "In Process", "value": "in_progress", "value_order": 2, "value_color": "#FFB938" }, { "label": "Ready for Review", "value": "ready_for_review", "value_order": 3, "value_color": "#FF9210", "is_complete": false }, { "label": "Complete", "value": "complete", "value_order": 4, "value_color": "#3EAC40", "is_complete": true } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": { "value": "backlog", "updated_on": null }, "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "due_date", "label": "Due Date", "field_type": "duedatefield", "params": { "display_format": "standard", "linked_field": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, { "slug": "priority", "label": "Priority", "field_type": "singleselectfield", "params": { "display_format": "importance", "control_type": "dropdown", "edit_values": false, "edit_help_texts": false, "new_choices_allowed": true, "choices": [ { "label": "Urgent", "value": "urgent", "value_color": "#FF5757", "value_order": 0, "icon_type": "icon", "weight": 1 }, { "label": "High", "value": "high", "value_color": "#FFB938", "value_order": 1, "icon_type": "icon", "weight": 1 }, { "label": "Normal", "value": "normal", "value_color": "#3EAC40", "value_order": 2, "icon_type": "icon", "weight": 1 }, { "label": "Low", "value": "low", "value_color": "#6A849B", "value_order": 3, "icon_type": "icon", "weight": 1 } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Value", "default_value": "", "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "first_created", "label": "First Created", "field_type": "firstcreatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "last_updated", "label": "Last Updated", "field_type": "lastupdatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "followed_by", "label": "Followed by", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_name", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": null, "required": false, "unique": false, "hidden": true, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": true, "valid": true, "is_migrating": false } }, { "slug": "comments_count", "label": "Open Comments", "field_type": "commentscountfield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter number", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "autonumber", "label": "Auto Number", "field_type": "autonumberfield", "params": { "include_labels": true, "suffix": "", "prefix": "#", "starting_number": 1, "leading_zeros": 2, "primary": false, "required": false, "unique": true, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 0, "system": true, "valid": true, "is_migrating": false } } ], "primary_field": "title", "order": 401975 } ``` --- # Retrieving Tables Source: https://developers.smartsuite.com/docs/scripting/api_reference/table/retrieve_tables You can retrieve all of a Solution's Tables, or get a specific Table by it's unique ID. ## Get Table Get a single Table by its Id. ``` get_table(tableId: string, fieldSlugs: string[]): Promise ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table. | | fieldSlugs | array of strings | (optional) Array of table object keys to return. | ```javascript title="Example Script - Get Table" ``` ### Response ```json title="200 response" {table_object} ``` ## List Tables for Solution Get all Tables in a Solution by Solution Id. ``` list_tables( solutionId?: ID, fieldSlugs?: string[]): Promise ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | solutionId | string | The Id of the Solution. | | fieldSlugs | array of strings | (optional) Array of solution (Application) object keys to return. | ```javascript title="List Tables" ``` ### Response ```json title="200 response" [ { "name": "Table 1", "id": "67647d9b7a03fad7da12d9f2" }, { "name": "new name 2", "id": "6765f05267d08e6360c7cdda" } ] ``` --- # Create Table Source: https://developers.smartsuite.com/docs/scripting/api_reference/table/create_table Create a new Table in a specific Solution. ```javascript create_table( name: string, solutionId: ID, structure?: TableStructureField[], ) => Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | name | string | The name for the new Table. Must be unique in the Solution. | | solutionId | string | Id of the Solution to create the table in. | | structure? | TableStructureField | Status of the Solution. Defaults to active which is the active state. | ## TableStructureField ```javascript export interface TableStructureField { slug: string; label: string; field_type: Fields; params: TParams; nested?: AppStructureField[]; id?: ID; } ``` :::tip Field Types & Params See a list of valid field types and params **[here](/docs/scripting/api_reference/field/)**. ::: ```javascript title="Example Script - Create Table" ``` ## Response ```json title="200 response" { "id": "6776dd9e5e15c4ae92872c7a", "name": "New Table", "icon": "no-icon", "solution": "67647d9b7a03fad7da12d9f0", "slug": "sf6uf5ie", "status": "active", "structure": [ { "slug": "title", "label": "Title", "field_type": "recordtitlefield", "params": { "is_auto_generated": false, "template": "", "primary": true, "max_length": null, "required": true, "unique": true, "placeholder": "Enter record title", "width": 1, "is_migrating": false, "valid": true, "indexed": false, "help_doc": null, "help_text_display_format": "tooltip" } }, { "slug": "description", "label": "Description", "field_type": "richtextareafield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": { "data": {}, "html": "", "preview": "" }, "width": 2, "system": false, "valid": true, "is_migrating": false } }, { "slug": "assigned_to", "label": "Assigned To", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_only", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "status", "label": "Status", "field_type": "statusfield", "params": { "choices": [ { "label": "Backlog", "value": "backlog", "value_order": 1, "value_color": "#6A849B", "is_complete": false }, { "label": "In Process", "value": "in_progress", "value_order": 2, "value_color": "#FFB938" }, { "label": "Ready for Review", "value": "ready_for_review", "value_order": 3, "value_color": "#FF9210", "is_complete": false }, { "label": "Complete", "value": "complete", "value_order": 4, "value_color": "#3EAC40", "is_complete": true } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": { "value": "backlog", "updated_on": null }, "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "due_date", "label": "Due Date", "field_type": "duedatefield", "params": { "display_format": "standard", "linked_field": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, { "slug": "priority", "label": "Priority", "field_type": "singleselectfield", "params": { "display_format": "importance", "control_type": "dropdown", "edit_values": false, "edit_help_texts": false, "new_choices_allowed": true, "choices": [ { "label": "Urgent", "value": "urgent", "value_color": "#FF5757", "value_order": 0, "icon_type": "icon", "weight": 1 }, { "label": "High", "value": "high", "value_color": "#FFB938", "value_order": 1, "icon_type": "icon", "weight": 1 }, { "label": "Normal", "value": "normal", "value_color": "#3EAC40", "value_order": 2, "icon_type": "icon", "weight": 1 }, { "label": "Low", "value": "low", "value_color": "#6A849B", "value_order": 3, "icon_type": "icon", "weight": 1 } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Value", "default_value": "", "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "first_created", "label": "First Created", "field_type": "firstcreatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "last_updated", "label": "Last Updated", "field_type": "lastupdatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "followed_by", "label": "Followed by", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_name", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": null, "required": false, "unique": false, "hidden": true, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": true, "valid": true, "is_migrating": false } }, { "slug": "comments_count", "label": "Open Comments", "field_type": "commentscountfield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter number", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "autonumber", "label": "Auto Number", "field_type": "autonumberfield", "params": { "include_labels": true, "suffix": "", "prefix": "#", "starting_number": 1, "leading_zeros": 2, "primary": false, "required": false, "unique": true, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 0, "system": true, "valid": true, "is_migrating": false } } ], "primary_field": "title", "order": 219225, "structure_layout": { "mode": "fifty_fifty", "fifty_fifty": { "rows": [ [ "title", "" ], [ "description", "" ], [ "assigned_to", "status" ], [ "due_date", "priority" ] ], "sections": [] }, "seventy_thirty": { "seventy": [ "description" ], "thirty": [ "title", "assigned_to", "status", "due_date", "priority" ], "seventy_sections": [], "thirty_sections": [] }, "hidden_fields": null, "single_column": { "rows": [ "title", "description", "assigned_to", "status", "due_date", "priority" ], "sections": [] } }, "show_all_reports_members": [], "fields_metadata": {}, "permissions": { "level": "all_members", "members": [], "teams": [], "permissions_metadata": {} }, "field_permissions": [], "first_created": { "by": "676ef5543d1b070aaff642ae", "on": "2025-01-02T18:40:30.909396Z" }, "settings": { "emails": false, "meeting_notes": false, "call_log": false }, "record_term": "record", "fields_count": { "total": 10 }, "record_avatar_field_slug": null, "hidden": false } ``` --- # Delete Table Source: https://developers.smartsuite.com/docs/scripting/api_reference/table/delete_table Delete a Table by its Table Id. ## Delete Table Delete a table by Table Id. ```javascript delete_table (tableId: string): Promise ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table. | ```javascript title="Example Script - Delete Table" ``` ### Response ```204 No Response``` --- # Duplicate Table Source: https://developers.smartsuite.com/docs/scripting/api_reference/table/duplicate_table Duplicate a Table. Duplicated Tables are added to the source Table's Solution. Note that the name of the duplicated Table must be unique in the Solution. ``` duplicate_table( tableId: ID, duplicateApplicationRequest: ApplicationDuplicateRequest): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | ApplicationDuplicateRequest | ApplicationDuplicateRequest object | Parameters for Table duplication. Duplicate Table name must be unique. | ## SolutionDuplicateRequest Interface ```javascript ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | duplicate_records | boolean | True to copy records. | | name | string | Name of new (duplicated) Table. Must be unique in the Solution. | ```javascript title="Example Script - Duplicate Table" ``` ## Response ```json title="200 response" { "application": { "id": "6765f05267d08e6360c7cdda", "name": "new name 2", "icon": "no-icon", "solution": "67647d9b7a03fad7da12d9f0", "slug": "srhjb9lq", "status": "in_process_of_duplication", "structure": [ { "slug": "title", "label": "Title", "field_type": "recordtitlefield", "params": { "is_auto_generated": false, "template": "", "primary": true, "max_length": null, "required": true, "unique": true, "placeholder": "Enter record title", "width": 1, "is_migrating": false, "valid": true, "indexed": false, "help_doc": null, "help_text_display_format": "tooltip" } }, { "slug": "description", "label": "Description", "field_type": "richtextareafield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": { "data": {}, "html": "", "preview": "" }, "width": 2, "system": false, "valid": true, "is_migrating": false } }, { "slug": "assigned_to", "label": "Assigned To", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_only", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "status", "label": "Status", "field_type": "statusfield", "params": { "choices": [ { "label": "Backlog", "value": "backlog", "value_order": 1, "value_color": "#6A849B", "is_complete": false }, { "label": "In Process", "value": "in_progress", "value_order": 2, "value_color": "#FFB938" }, { "label": "Ready for Review", "value": "ready_for_review", "value_order": 3, "value_color": "#FF9210", "is_complete": false }, { "label": "Complete", "value": "complete", "value_order": 4, "value_color": "#3EAC40", "is_complete": true } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": { "value": "backlog", "updated_on": null }, "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "due_date", "label": "Due Date", "field_type": "duedatefield", "params": { "display_format": "standard", "linked_field": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, { "slug": "priority", "label": "Priority", "field_type": "singleselectfield", "params": { "display_format": "importance", "control_type": "dropdown", "edit_values": false, "edit_help_texts": false, "new_choices_allowed": true, "choices": [ { "label": "Urgent", "value": "urgent", "value_color": "#FF5757", "value_order": 0, "icon_type": "icon", "weight": 1 }, { "label": "High", "value": "high", "value_color": "#FFB938", "value_order": 1, "icon_type": "icon", "weight": 1 }, { "label": "Normal", "value": "normal", "value_color": "#3EAC40", "value_order": 2, "icon_type": "icon", "weight": 1 }, { "label": "Low", "value": "low", "value_color": "#6A849B", "value_order": 3, "icon_type": "icon", "weight": 1 } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Value", "default_value": "", "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "first_created", "label": "First Created", "field_type": "firstcreatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "last_updated", "label": "Last Updated", "field_type": "lastupdatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "followed_by", "label": "Followed by", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_name", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": null, "required": false, "unique": false, "hidden": true, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": true, "valid": true, "is_migrating": false } }, { "slug": "comments_count", "label": "Open Comments", "field_type": "commentscountfield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter number", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "autonumber", "label": "Auto Number", "field_type": "autonumberfield", "params": { "include_labels": true, "suffix": "", "prefix": "#", "starting_number": 1, "leading_zeros": 2, "primary": false, "required": false, "unique": true, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 0, "system": true, "valid": true, "is_migrating": false } }, { "slug": "sab60f5c5b", "label": "Text", "field_type": "textfield", "params": { "primary": false, "restore_application_id": null, "max_length": null, "composite": null, "delimiter": ", ", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Write here", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "s048e67ec8", "label": "Text Area", "field_type": "textareafield", "params": { "restore_application_id": null, "max_length": null, "composite": null, "delimiter": ", ", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Write here", "default_value": null, "width": 2, "system": false, "valid": true, "is_migrating": false } }, { "slug": "s8f119717f", "label": "Files and Images", "field_type": "filefield", "params": { "view_mode": "list", "items_in_row": 3, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Add Attachment", "default_value": null, "width": 2, "system": false, "valid": true, "is_migrating": false } }, { "slug": "se0df7d290", "label": "Record ID", "field_type": "recordidfield", "params": { "required": false, "unique": true, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 1, "system": true, "valid": true, "is_migrating": false, "primary": false, "include_labels": false, "prefix": "", "suffix": "" } } ], "primary_field": "title", "order": 219025, "structure_layout": { "mode": "fifty_fifty", "fifty_fifty": { "rows": [ [ "title", "" ], [ "description", "" ], [ "assigned_to", "status" ], [ "due_date", "priority" ], [ "sab60f5c5b", "" ], [ "s048e67ec8", "" ], [ "s8f119717f", "" ], [ "se0df7d290", "" ] ], "sections": [] }, "seventy_thirty": { "seventy": [ "description", "s048e67ec8", "s8f119717f" ], "thirty": [ "title", "assigned_to", "status", "due_date", "priority", "sab60f5c5b", "se0df7d290" ], "seventy_sections": [], "thirty_sections": [] }, "hidden_fields": null, "single_column": { "rows": [ "title", "description", "assigned_to", "status", "due_date", "priority", "sab60f5c5b", "s048e67ec8", "s8f119717f", "se0df7d290" ], "sections": [] } }, "show_all_reports_members": [], "fields_metadata": {}, "permissions": { "level": "all_members", "members": [], "teams": [], "permissions_metadata": {} }, "field_permissions": [], "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-12-20T22:31:46.469000Z" }, "settings": { "emails": false, "meeting_notes": false, "call_log": false }, "record_term": "record", "fields_count": { "total": 14 }, "record_avatar_field_slug": null, "hidden": false }, "reports": [] } ``` --- # Retrieving Views Source: https://developers.smartsuite.com/docs/scripting/api_reference/view/retrieve_views Retrieve all of a table's views or a specific View by Id. ## Get View Get a single View by View Id. ``` get_view(viewId: ID, fieldSlugs?: readonly string[]): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | viewId | string | The Id of the View. | | fieldSlugs | array of strings | (optional) Array of field slugs to return. | ```javascript title="Get View" ``` ### Response ```json title="200 Response" { "application": "6703f250f8f758cd80dbade4", "autosave": true, "description": null, "form_state": null, "id": "6703f250f8f758cd80dbade5", "is_description_inline": true, "is_description_enabled": false, "is_locked": false, "is_password_protected": false, "is_private": false, "label": "Grid View", "map_state": { "settings": { "mapTypeId": "roadmap", "locationRadius": { "enabled": false, "meters": 0, "measureUnit": "miles" }, "locationMarker": { "iconType": "pin", "iconSizeType": "m", "iconColor": "#3A86FF" }, "displayElements": { "roadmap": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 1, "water": 2 }, "satellite": { "labels": 1, "terrain": 1, "highways": 2, "roads": 0, "transit": 0, "poi": 0, "water": 2 }, "hybrid": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 0, "water": 2 }, "silver": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 }, "retro": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 } } }, "sidebarActive": false }, "order": 0, "owner": "5fa01dedaa4e41222745cbab", "parent_folder": null, "private_member": null, "sharing_allow_all_fields": false, "sharing_allow_copy": false, "sharing_allow_export": true, "sharing_allow_open_record": false, "sharing_enabled": false, "sharing_password": null, "sharing_show_toolbar": true, "sharing_hash": "M3axcVGdAO", "solution": "6703f24ff8f758cd80dbade2", "state": { "filterWindow": { "opened": false, "filter": { "operator": "and", "fields": [] }, "new_filters": { "operator": "and", "conditions": [] } }, "fieldsWindow": { "visibleFields": [ "title", "due_date", "status", "s10952ef8a", "dependency" ], "fixedFieldsCount": 1, "columnsWidth": {}, "collapsed": [] }, "aggregates": {}, "coverWindow": null, "sortWindow": { "sort": [] }, "groupbyWindow": { "collapsed": {}, "group": [] }, "spotlightWindow": { "spotlights": [], "by_field_colors": null }, "cardSizeWindow": { "size": "s" }, "rowSizeWindow": { "size": "compact", "previousSize": null }, "stackByWindow": { "columnFieldSlug": null, "swimlaneFieldSlug": null, "collapsedColumns": [], "collapsedSwimlanes": [], "columnsValues": [] }, "locationByWindow": { "selectedFieldSlug": null }, "calendarFieldsWindow": { "fields": [], "showRecordsList": false, "viewType": "dayGridMonth", "externalReportsInfo": [], "displayWeekends": true }, "timelineFieldsWindow": { "fields": [], "viewMode": "day", "showRecordsList": false, "periods": [] }, "chartSettings": { "sidebarActive": true, "selectedFields": [], "selectedChart": "bar", "checkedLegends": [], "sortedLegends": [], "customSortApplied": false, "groupByField": { "slug": null, "nestedOption": null, "additionalOption": null }, "dynamicFilterField": { "slug": null, "nestedOption": null, "fieldOptions": [], "selectedOption": null }, "dynamicFilterSectionExpanded": false, "advancedChartOptions": { "showDataLabels": false, "showValueAxisLabel": false, "showCategoryAxisLabel": false, "showXAxisLabel": false, "showYAxisLabel": false, "showBubbleLegend": false }, "advancedChartOptionsExpanded": false, "categories": [], "drillIn": { "visibleFields": null }, "benchmarkLines": [], "benchmarkLinesSectionExpanded": false, "totals": [], "totalsSectionExpanded": false }, "ganttFieldsWindow": { "viewPreset": "weekAndDayLetter", "showDependencyArrows": true, "showTaskLabels": true, "highlightCriticalPath": false, "showProjectStartAndEndPoints": false, "highlightNonWorkingDays": false, "showColumnLines": true, "showTodayLine": true }, "isToolbarVisible": true }, "view_mode": "grid", "dashboard": { "tabs": { "enabled": false, "position": "left", "tabs": [], "logo": null, "logo_size": null, "action_buttons": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "icon": null, "text_color": "light" }, "footer": { "enabled": false, "layout": "simple", "logo": null, "logo_size": null, "links": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "social_networks": [], "tagline": { "primary": "", "secondary": "" }, "text_color": "dark", "background": { "color": "#FFFFFF", "image": { "file": null, "fit": "cover" }, "background_type": "color" } }, "style": { "width": "auto", "background_color": "#FFFFFF" } } } ``` ## List Views Get all Views in a Table by Table Id. ``` ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table. | | fieldSlugs | array of strings | (optional) Array of field slugs to return. | ```javascript title="List Views" ``` ### Response ```json title="200 Response" [ { "label": "Grid View", "description": null, "is_description_inline": true, "is_description_enabled": false, "solution": "670591d10d49cf96bf74c49a", "application": "6716999c6b87f8d761d72bdf", "state": { "filterWindow": { "opened": false, "filter": { "operator": "and", "fields": [] }, "new_filters": { "operator": "and", "conditions": [] } }, "fieldsWindow": { "visibleFields": [ "title", "description", "status" ], "fixedFieldsCount": 1, "columnsWidth": {}, "collapsed": [] }, "aggregates": {}, "coverWindow": null, "sortWindow": { "sort": [] }, "groupbyWindow": { "collapsed": {}, "group": [] }, "spotlightWindow": { "spotlights": [], "by_field_colors": null }, "cardSizeWindow": { "size": "s" }, "rowSizeWindow": { "size": "compact", "previousSize": null }, "stackByWindow": { "columnFieldSlug": null, "swimlaneFieldSlug": null, "collapsedColumns": [], "collapsedSwimlanes": [], "columnsValues": [] }, "locationByWindow": { "selectedFieldSlug": null }, "calendarFieldsWindow": { "fields": [], "showRecordsList": false, "viewType": "dayGridMonth", "externalReportsInfo": [], "displayWeekends": true }, "timelineFieldsWindow": { "fields": [], "viewMode": "day", "showRecordsList": false, "periods": [] }, "chartSettings": { "sidebarActive": true, "selectedFields": [], "selectedChart": "bar", "checkedLegends": [], "sortedLegends": [], "customSortApplied": false, "groupByField": { "slug": null, "nestedOption": null, "additionalOption": null }, "dynamicFilterField": { "slug": null, "nestedOption": null, "fieldOptions": [], "selectedOption": null }, "dynamicFilterSectionExpanded": false, "advancedChartOptions": { "showDataLabels": false, "showValueAxisLabel": false, "showCategoryAxisLabel": false, "showXAxisLabel": false, "showYAxisLabel": false, "showBubbleLegend": false }, "advancedChartOptionsExpanded": false, "categories": [], "drillIn": { "visibleFields": null }, "benchmarkLines": [], "benchmarkLinesSectionExpanded": false, "totals": [], "totalsSectionExpanded": false }, "ganttFieldsWindow": { "viewPreset": "weekAndDayLetter", "showDependencyArrows": true, "showTaskLabels": true, "highlightCriticalPath": false, "showProjectStartAndEndPoints": false, "highlightNonWorkingDays": false, "showColumnLines": true, "showTodayLine": true }, "isToolbarVisible": true }, "map_state": { "settings": { "mapTypeId": "roadmap", "locationRadius": { "enabled": false, "meters": 0, "measureUnit": "miles" }, "locationMarker": { "iconType": "pin", "iconSizeType": "m", "iconColor": "#3A86FF" }, "displayElements": { "roadmap": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 1, "water": 2 }, "satellite": { "labels": 1, "terrain": 1, "highways": 2, "roads": 0, "transit": 0, "poi": 0, "water": 2 }, "hybrid": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 0, "water": 2 }, "silver": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 }, "retro": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 } } }, "sidebarActive": false }, "form_state": null, "autosave": true, "is_locked": false, "view_mode": "grid", "order": 0, "owner": "5fa01dedaa4e41222745cbab", "is_private": false, "parent_folder": null, "sharing_hash": "mmKAarVQNB", "sharing_password": null, "sharing_allow_copy": false, "sharing_allow_all_fields": false, "sharing_allow_export": true, "sharing_allow_open_record": false, "sharing_enabled": false, "sharing_show_toolbar": true, "dashboard": { "tabs": { "enabled": false, "position": "left", "tabs": [], "logo": null, "logo_size": null, "action_buttons": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "icon": null, "text_color": "light" }, "footer": { "enabled": false, "layout": "simple", "logo": null, "logo_size": null, "links": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "social_networks": [], "tagline": { "primary": "", "secondary": "" }, "text_color": "dark", "background": { "color": "#FFFFFF", "image": { "file": null, "fit": "cover" }, "background_type": "color" } }, "style": { "width": "auto", "background_color": "#FFFFFF" } }, "is_password_protected": false, "id": "6716999c6b87f8d761d72be0" } ] ``` --- # Create View Source: https://developers.smartsuite.com/docs/scripting/api_reference/view/create_view Creates a View. ## Create Voew Creates a View in a specified Table and Solution. ```javascript create_view( tableId: ID, solutionId: ID, label: string, viewMode: ViewMode, rest?: Partial ): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to create the View in. | | solutionId | string | The Id of the Solution that corresponds with the target Table. | | label | string | The display name of the View. | | viewMode | string | The view mode. Options: grid, card, kanban, map, timeline, chart, form, dashboard, calendar | ```javascript title="Create View" ``` ### Response ```json title="200 Response" { "application": "6703f250f8f758cd80dbade4", "autosave": true, "description": null, "form_state": null, "id": "6703f250f8f758cd80dbade5", "is_description_inline": true, "is_description_enabled": false, "is_locked": false, "is_password_protected": false, "is_private": false, "label": "Grid View", "map_state": { "settings": { "mapTypeId": "roadmap", "locationRadius": { "enabled": false, "meters": 0, "measureUnit": "miles" }, "locationMarker": { "iconType": "pin", "iconSizeType": "m", "iconColor": "#3A86FF" }, "displayElements": { "roadmap": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 1, "water": 2 }, "satellite": { "labels": 1, "terrain": 1, "highways": 2, "roads": 0, "transit": 0, "poi": 0, "water": 2 }, "hybrid": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 0, "water": 2 }, "silver": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 }, "retro": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 } } }, "sidebarActive": false }, "order": 0, "owner": "5fa01dedaa4e41222745cbab", "parent_folder": null, "private_member": null, "sharing_allow_all_fields": false, "sharing_allow_copy": false, "sharing_allow_export": true, "sharing_allow_open_record": false, "sharing_enabled": false, "sharing_password": null, "sharing_show_toolbar": true, "sharing_hash": "M3axcVGdAO", "solution": "6703f24ff8f758cd80dbade2", "state": { "filterWindow": { "opened": false, "filter": { "operator": "and", "fields": [] }, "new_filters": { "operator": "and", "conditions": [] } }, "fieldsWindow": { "visibleFields": [ "title", "due_date", "status", "s10952ef8a", "dependency" ], "fixedFieldsCount": 1, "columnsWidth": {}, "collapsed": [] }, "aggregates": {}, "coverWindow": null, "sortWindow": { "sort": [] }, "groupbyWindow": { "collapsed": {}, "group": [] }, "spotlightWindow": { "spotlights": [], "by_field_colors": null }, "cardSizeWindow": { "size": "s" }, "rowSizeWindow": { "size": "compact", "previousSize": null }, "stackByWindow": { "columnFieldSlug": null, "swimlaneFieldSlug": null, "collapsedColumns": [], "collapsedSwimlanes": [], "columnsValues": [] }, "locationByWindow": { "selectedFieldSlug": null }, "calendarFieldsWindow": { "fields": [], "showRecordsList": false, "viewType": "dayGridMonth", "externalReportsInfo": [], "displayWeekends": true }, "timelineFieldsWindow": { "fields": [], "viewMode": "day", "showRecordsList": false, "periods": [] }, "chartSettings": { "sidebarActive": true, "selectedFields": [], "selectedChart": "bar", "checkedLegends": [], "sortedLegends": [], "customSortApplied": false, "groupByField": { "slug": null, "nestedOption": null, "additionalOption": null }, "dynamicFilterField": { "slug": null, "nestedOption": null, "fieldOptions": [], "selectedOption": null }, "dynamicFilterSectionExpanded": false, "advancedChartOptions": { "showDataLabels": false, "showValueAxisLabel": false, "showCategoryAxisLabel": false, "showXAxisLabel": false, "showYAxisLabel": false, "showBubbleLegend": false }, "advancedChartOptionsExpanded": false, "categories": [], "drillIn": { "visibleFields": null }, "benchmarkLines": [], "benchmarkLinesSectionExpanded": false, "totals": [], "totalsSectionExpanded": false }, "ganttFieldsWindow": { "viewPreset": "weekAndDayLetter", "showDependencyArrows": true, "showTaskLabels": true, "highlightCriticalPath": false, "showProjectStartAndEndPoints": false, "highlightNonWorkingDays": false, "showColumnLines": true, "showTodayLine": true }, "isToolbarVisible": true }, "view_mode": "grid", "dashboard": { "tabs": { "enabled": false, "position": "left", "tabs": [], "logo": null, "logo_size": null, "action_buttons": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "icon": null, "text_color": "light" }, "footer": { "enabled": false, "layout": "simple", "logo": null, "logo_size": null, "links": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "social_networks": [], "tagline": { "primary": "", "secondary": "" }, "text_color": "dark", "background": { "color": "#FFFFFF", "image": { "file": null, "fit": "cover" }, "background_type": "color" } }, "style": { "width": "auto", "background_color": "#FFFFFF" } } } ``` ## List Views Get all Views in a Table by Table Id. ``` ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table. | | fieldSlugs | array of strings | (optional) Array of field slugs to return. | ```javascript title="List Views" ``` ### Response ```json title="200 Response" [ { "label": "Grid View", "description": null, "is_description_inline": true, "is_description_enabled": false, "solution": "670591d10d49cf96bf74c49a", "application": "6716999c6b87f8d761d72bdf", "state": { "filterWindow": { "opened": false, "filter": { "operator": "and", "fields": [] }, "new_filters": { "operator": "and", "conditions": [] } }, "fieldsWindow": { "visibleFields": [ "title", "description", "status" ], "fixedFieldsCount": 1, "columnsWidth": {}, "collapsed": [] }, "aggregates": {}, "coverWindow": null, "sortWindow": { "sort": [] }, "groupbyWindow": { "collapsed": {}, "group": [] }, "spotlightWindow": { "spotlights": [], "by_field_colors": null }, "cardSizeWindow": { "size": "s" }, "rowSizeWindow": { "size": "compact", "previousSize": null }, "stackByWindow": { "columnFieldSlug": null, "swimlaneFieldSlug": null, "collapsedColumns": [], "collapsedSwimlanes": [], "columnsValues": [] }, "locationByWindow": { "selectedFieldSlug": null }, "calendarFieldsWindow": { "fields": [], "showRecordsList": false, "viewType": "dayGridMonth", "externalReportsInfo": [], "displayWeekends": true }, "timelineFieldsWindow": { "fields": [], "viewMode": "day", "showRecordsList": false, "periods": [] }, "chartSettings": { "sidebarActive": true, "selectedFields": [], "selectedChart": "bar", "checkedLegends": [], "sortedLegends": [], "customSortApplied": false, "groupByField": { "slug": null, "nestedOption": null, "additionalOption": null }, "dynamicFilterField": { "slug": null, "nestedOption": null, "fieldOptions": [], "selectedOption": null }, "dynamicFilterSectionExpanded": false, "advancedChartOptions": { "showDataLabels": false, "showValueAxisLabel": false, "showCategoryAxisLabel": false, "showXAxisLabel": false, "showYAxisLabel": false, "showBubbleLegend": false }, "advancedChartOptionsExpanded": false, "categories": [], "drillIn": { "visibleFields": null }, "benchmarkLines": [], "benchmarkLinesSectionExpanded": false, "totals": [], "totalsSectionExpanded": false }, "ganttFieldsWindow": { "viewPreset": "weekAndDayLetter", "showDependencyArrows": true, "showTaskLabels": true, "highlightCriticalPath": false, "showProjectStartAndEndPoints": false, "highlightNonWorkingDays": false, "showColumnLines": true, "showTodayLine": true }, "isToolbarVisible": true }, "map_state": { "settings": { "mapTypeId": "roadmap", "locationRadius": { "enabled": false, "meters": 0, "measureUnit": "miles" }, "locationMarker": { "iconType": "pin", "iconSizeType": "m", "iconColor": "#3A86FF" }, "displayElements": { "roadmap": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 1, "water": 2 }, "satellite": { "labels": 1, "terrain": 1, "highways": 2, "roads": 0, "transit": 0, "poi": 0, "water": 2 }, "hybrid": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 0, "water": 2 }, "silver": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 }, "retro": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 } } }, "sidebarActive": false }, "form_state": null, "autosave": true, "is_locked": false, "view_mode": "grid", "order": 0, "owner": "5fa01dedaa4e41222745cbab", "is_private": false, "parent_folder": null, "sharing_hash": "mmKAarVQNB", "sharing_password": null, "sharing_allow_copy": false, "sharing_allow_all_fields": false, "sharing_allow_export": true, "sharing_allow_open_record": false, "sharing_enabled": false, "sharing_show_toolbar": true, "dashboard": { "tabs": { "enabled": false, "position": "left", "tabs": [], "logo": null, "logo_size": null, "action_buttons": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "icon": null, "text_color": "light" }, "footer": { "enabled": false, "layout": "simple", "logo": null, "logo_size": null, "links": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "social_networks": [], "tagline": { "primary": "", "secondary": "" }, "text_color": "dark", "background": { "color": "#FFFFFF", "image": { "file": null, "fit": "cover" }, "background_type": "color" } }, "style": { "width": "auto", "background_color": "#FFFFFF" } }, "is_password_protected": false, "id": "6716999c6b87f8d761d72be0" } ] ``` --- # Duplicate View Source: https://developers.smartsuite.com/docs/scripting/api_reference/view/duplicate_view Creates a View. ## Duplicate View Duplicates an existing View by Id. ```javascript duplicate_view(originalViewId: ID, view: Report): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | originalViewId | string | The Id of the View to duplicate. | | view | Report | A Report object that specifies configuration for the duplicated View. | ### Report ```javascript export interface Report { id: ID; label: string; solution: ID; application: ID; view_mode: ViewMode; order: number; } ``` View Mode Options: grid, card, kanban, map, timeline, chart, form, dashboard, calendar ```javascript title="Duplicate View" ``` ### Response ```json title="200 Response" { "application": "6703f250f8f758cd80dbade4", "autosave": true, "description": null, "form_state": null, "id": "6703f250f8f758cd80dbade5", "is_description_inline": true, "is_description_enabled": false, "is_locked": false, "is_password_protected": false, "is_private": false, "label": "Grid View", "map_state": { "settings": { "mapTypeId": "roadmap", "locationRadius": { "enabled": false, "meters": 0, "measureUnit": "miles" }, "locationMarker": { "iconType": "pin", "iconSizeType": "m", "iconColor": "#3A86FF" }, "displayElements": { "roadmap": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 1, "water": 2 }, "satellite": { "labels": 1, "terrain": 1, "highways": 2, "roads": 0, "transit": 0, "poi": 0, "water": 2 }, "hybrid": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 0, "water": 2 }, "silver": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 }, "retro": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 } } }, "sidebarActive": false }, "order": 0, "owner": "5fa01dedaa4e41222745cbab", "parent_folder": null, "private_member": null, "sharing_allow_all_fields": false, "sharing_allow_copy": false, "sharing_allow_export": true, "sharing_allow_open_record": false, "sharing_enabled": false, "sharing_password": null, "sharing_show_toolbar": true, "sharing_hash": "M3axcVGdAO", "solution": "6703f24ff8f758cd80dbade2", "state": { "filterWindow": { "opened": false, "filter": { "operator": "and", "fields": [] }, "new_filters": { "operator": "and", "conditions": [] } }, "fieldsWindow": { "visibleFields": [ "title", "due_date", "status", "s10952ef8a", "dependency" ], "fixedFieldsCount": 1, "columnsWidth": {}, "collapsed": [] }, "aggregates": {}, "coverWindow": null, "sortWindow": { "sort": [] }, "groupbyWindow": { "collapsed": {}, "group": [] }, "spotlightWindow": { "spotlights": [], "by_field_colors": null }, "cardSizeWindow": { "size": "s" }, "rowSizeWindow": { "size": "compact", "previousSize": null }, "stackByWindow": { "columnFieldSlug": null, "swimlaneFieldSlug": null, "collapsedColumns": [], "collapsedSwimlanes": [], "columnsValues": [] }, "locationByWindow": { "selectedFieldSlug": null }, "calendarFieldsWindow": { "fields": [], "showRecordsList": false, "viewType": "dayGridMonth", "externalReportsInfo": [], "displayWeekends": true }, "timelineFieldsWindow": { "fields": [], "viewMode": "day", "showRecordsList": false, "periods": [] }, "chartSettings": { "sidebarActive": true, "selectedFields": [], "selectedChart": "bar", "checkedLegends": [], "sortedLegends": [], "customSortApplied": false, "groupByField": { "slug": null, "nestedOption": null, "additionalOption": null }, "dynamicFilterField": { "slug": null, "nestedOption": null, "fieldOptions": [], "selectedOption": null }, "dynamicFilterSectionExpanded": false, "advancedChartOptions": { "showDataLabels": false, "showValueAxisLabel": false, "showCategoryAxisLabel": false, "showXAxisLabel": false, "showYAxisLabel": false, "showBubbleLegend": false }, "advancedChartOptionsExpanded": false, "categories": [], "drillIn": { "visibleFields": null }, "benchmarkLines": [], "benchmarkLinesSectionExpanded": false, "totals": [], "totalsSectionExpanded": false }, "ganttFieldsWindow": { "viewPreset": "weekAndDayLetter", "showDependencyArrows": true, "showTaskLabels": true, "highlightCriticalPath": false, "showProjectStartAndEndPoints": false, "highlightNonWorkingDays": false, "showColumnLines": true, "showTodayLine": true }, "isToolbarVisible": true }, "view_mode": "grid", "dashboard": { "tabs": { "enabled": false, "position": "left", "tabs": [], "logo": null, "logo_size": null, "action_buttons": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "icon": null, "text_color": "light" }, "footer": { "enabled": false, "layout": "simple", "logo": null, "logo_size": null, "links": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "social_networks": [], "tagline": { "primary": "", "secondary": "" }, "text_color": "dark", "background": { "color": "#FFFFFF", "image": { "file": null, "fit": "cover" }, "background_type": "color" } }, "style": { "width": "auto", "background_color": "#FFFFFF" } } } ``` ## List Views Get all Views in a Table by Table Id. ``` ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table. | | fieldSlugs | array of strings | (optional) Array of field slugs to return. | ```javascript title="List Views" ``` ### Response ```json title="200 Response" [ { "label": "Grid View", "description": null, "is_description_inline": true, "is_description_enabled": false, "solution": "670591d10d49cf96bf74c49a", "application": "6716999c6b87f8d761d72bdf", "state": { "filterWindow": { "opened": false, "filter": { "operator": "and", "fields": [] }, "new_filters": { "operator": "and", "conditions": [] } }, "fieldsWindow": { "visibleFields": [ "title", "description", "status" ], "fixedFieldsCount": 1, "columnsWidth": {}, "collapsed": [] }, "aggregates": {}, "coverWindow": null, "sortWindow": { "sort": [] }, "groupbyWindow": { "collapsed": {}, "group": [] }, "spotlightWindow": { "spotlights": [], "by_field_colors": null }, "cardSizeWindow": { "size": "s" }, "rowSizeWindow": { "size": "compact", "previousSize": null }, "stackByWindow": { "columnFieldSlug": null, "swimlaneFieldSlug": null, "collapsedColumns": [], "collapsedSwimlanes": [], "columnsValues": [] }, "locationByWindow": { "selectedFieldSlug": null }, "calendarFieldsWindow": { "fields": [], "showRecordsList": false, "viewType": "dayGridMonth", "externalReportsInfo": [], "displayWeekends": true }, "timelineFieldsWindow": { "fields": [], "viewMode": "day", "showRecordsList": false, "periods": [] }, "chartSettings": { "sidebarActive": true, "selectedFields": [], "selectedChart": "bar", "checkedLegends": [], "sortedLegends": [], "customSortApplied": false, "groupByField": { "slug": null, "nestedOption": null, "additionalOption": null }, "dynamicFilterField": { "slug": null, "nestedOption": null, "fieldOptions": [], "selectedOption": null }, "dynamicFilterSectionExpanded": false, "advancedChartOptions": { "showDataLabels": false, "showValueAxisLabel": false, "showCategoryAxisLabel": false, "showXAxisLabel": false, "showYAxisLabel": false, "showBubbleLegend": false }, "advancedChartOptionsExpanded": false, "categories": [], "drillIn": { "visibleFields": null }, "benchmarkLines": [], "benchmarkLinesSectionExpanded": false, "totals": [], "totalsSectionExpanded": false }, "ganttFieldsWindow": { "viewPreset": "weekAndDayLetter", "showDependencyArrows": true, "showTaskLabels": true, "highlightCriticalPath": false, "showProjectStartAndEndPoints": false, "highlightNonWorkingDays": false, "showColumnLines": true, "showTodayLine": true }, "isToolbarVisible": true }, "map_state": { "settings": { "mapTypeId": "roadmap", "locationRadius": { "enabled": false, "meters": 0, "measureUnit": "miles" }, "locationMarker": { "iconType": "pin", "iconSizeType": "m", "iconColor": "#3A86FF" }, "displayElements": { "roadmap": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 1, "water": 2 }, "satellite": { "labels": 1, "terrain": 1, "highways": 2, "roads": 0, "transit": 0, "poi": 0, "water": 2 }, "hybrid": { "labels": 1, "terrain": 1, "highways": 2, "roads": 2, "transit": 0, "poi": 0, "water": 2 }, "silver": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 }, "retro": { "labels": 2, "terrain": 1, "highways": 2, "roads": 2, "transit": 1, "poi": 1, "water": 2 } } }, "sidebarActive": false }, "form_state": null, "autosave": true, "is_locked": false, "view_mode": "grid", "order": 0, "owner": "5fa01dedaa4e41222745cbab", "is_private": false, "parent_folder": null, "sharing_hash": "mmKAarVQNB", "sharing_password": null, "sharing_allow_copy": false, "sharing_allow_all_fields": false, "sharing_allow_export": true, "sharing_allow_open_record": false, "sharing_enabled": false, "sharing_show_toolbar": true, "dashboard": { "tabs": { "enabled": false, "position": "left", "tabs": [], "logo": null, "logo_size": null, "action_buttons": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "icon": null, "text_color": "light" }, "footer": { "enabled": false, "layout": "simple", "logo": null, "logo_size": null, "links": { "size": "medium", "alignment": "left", "items": [], "columns": [] }, "social_networks": [], "tagline": { "primary": "", "secondary": "" }, "text_color": "dark", "background": { "color": "#FFFFFF", "image": { "file": null, "fit": "cover" }, "background_type": "color" } }, "style": { "width": "auto", "background_color": "#FFFFFF" } }, "is_password_protected": false, "id": "6716999c6b87f8d761d72be0" } ] ``` --- # Delete View Source: https://developers.smartsuite.com/docs/scripting/api_reference/view/delete_view Deletes a View. ## Delete View Deletes an existing View by Id. ```javascript delete_view(viewId: ID): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | viewId | string | The Id of the View to delete. | ```javascript title="Delete View" ``` ### Response ```204 No Response``` --- # Field Object Source: https://developers.smartsuite.com/docs/scripting/api_reference/field/ ```json title="Example" "field": { "slug": "random_10_digit_alphanumeric_value", "label": "Field Name", "field_type": "field_type", "params": { ...field_specific_params }, "is_new": true } ``` ## Object Literals | Param | Type | Optional | Description | | :---- | :-: | :-: | :-- | | slug | string | No | A random 10 digit alphanumeric value. | | label | string | No | The field name. | | field_type | string | No | The field type (see below). | | params | object | No | field-specific parameters. | | is_new | boolean | No | Set to true for new fields. | ### Field Types The following is a list of the field type values for each supported SmartSuite field. | Field Name | Field Type | Notes | | :--------- | :--------- | :----------| | Single Select | singleselectfield | | | Multiple Select | multipleselectfield | | | Status | statusfield | | | Tag | tagsfield | | | Text | textfield | | | Address | addressfield | | | Date | datefield | | | Date Range | daterangefield | | | Due Date | duedatefield | | | Duration | durationfield | | | Time | timefield | | | Time Tracking Log | timetrackingfield | Bulk add unsupported. | | Checklist | checklistfield | Bulk add unsupported. | | Color Picker | colorpickerfield | | | Email | emailfield | | | Full Name | fullnamefield | | | IP Address | ipaddressfield | | | Link | linkfield | | | Phone | phonefield | | | Title (Primary) | recordtitlefield | System Field, cannot be added via API | | SmartDoc | richtextareafield | | | Social Network | socialnetworkfield | Bulk add unsupported. | | Text Area | textareafield | | | Currency | currencyfield | | | Number | numberfield | | | Number Slider | numbersliderfield | | | Percent Complete | percentcompletefield | | | Percent | percentfield | | | Rating | ratingfield | | | Vote | votefield | Bulk add unsupported. | | Count | countfield | Bulk add unsupported. | | Files and Images | filefield | Bulk add unsupported. | | Signature | signaturefield | Bulk add unsupported. | | Formula | formulafield | Bulk add unsupported. | | Lookup | lookupfield | | | Rollup | rollupfield | Bulk add unsupported. | | Record Id | recordidfield | Bulk add unsupported. | | First Created | firstcreatedfield | System Field, cannot be added via API | | Last Updated | lastupdatedfield | System Field, cannot be added via API | | Sub-Items | subitemsfield | Bulk add unsupported. | | Open Comments | commentscountfield | System Field, cannot be added via API | | Button | buttonfield | Bulk add unsupported. | | Linked Record | linkedrecordfield | | | Assigned To | userfield | | | Auto Number | autonumberfield | System Field, cannot be added via API | ### Field Params The shared (base) field params include the following: ```javascript export interface BaseFieldParams { required?: boolean; unique?: boolean; hidden?: boolean; help_text?: string; help_doc?: any; placeholder?: string; default_value?: TValue; width?: 0 | 1 | 2 | null; system?: boolean; delete_date?: string; delete_by?: string; application_id?: ID; primary?: boolean; } ``` --- # Create Field Source: https://developers.smartsuite.com/docs/scripting/api_reference/field/create_field Create a new Field in a specified Table. ```javascript create_field(tableId: ID, field: AppStructureField): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to create the field in. | | field | AppStructureField | A field structure object. | ## AppStructureField Object used to define the new fields to be added in bulk. ```javascript export interface AppStructureField { slug: string; label: string; field_type: Fields; params: TParams; id?: ID; is_new?: boolean; } ``` | Property Name | Type | Description | | :--------- | :-- | :--------- | | slug | string | The slug (unique Id) of the field. | | label | string | The field display name. | | field_type | string | The SmartSuite field type. | | params | field params object | The field's configuration parameters. | | id? | string | Field Id (should be null or omitted for create). | | is_new? | boolean | A true value indicates that the field is new. | ## AppStructureFieldParams ```javascript export interface AppStructureFieldParams { required?: boolean; unique?: boolean; hidden?: boolean; help_text?: string; help_doc?: any; placeholder?: string; default_value?: TValue; width?: 0 | 1 | 2 | null; } ``` | Property Name | Type | Description | | :--------- | :-- | :--------- | | required? | boolean | true if field is required. | | unique? | boolean | true if field value must be unique. | | hidden? | boolean | true if field is hidden in the UI. | | help_text? | string | Field help text. | | placeholder? | string | Field placeholder text. | | default_value? | string | Field default text. | | width? | number | Field column width in edit record mode. | ```javascript title="Example Script - Create Field" ``` --- # Update Field Source: https://developers.smartsuite.com/docs/scripting/api_reference/field/update_field Update a new Field in a specified Table. ```javascript update_field(tableId: ID, field: AppStructureField): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to Update the record in. | | field | AppStructureField | An object specifying the fields parameters. | ## AppStructureField Object used to define the new fields to be added in bulk. ```javascript export interface AppStructureField { slug: string; label: string; field_type: Fields; params: TParams; id?: ID; is_new?: boolean; } ``` | Property Name | Type | Description | | :--------- | :-- | :--------- | | slug | string | The slug (unique Id) of the field. | | label | string | The field display name. | | field_type | string | The SmartSuite field type. | | params | field params object | The field's configuration parameters. | | id? | string | Field Id (should be null or omitted for create). | | is_new? | boolean | A true value indicates that the field is new. | ## AppStructureFieldParams ```javascript export interface AppStructureFieldParams { required?: boolean; unique?: boolean; hidden?: boolean; help_text?: string; help_doc?: any; placeholder?: string; default_value?: TValue; width?: 0 | 1 | 2 | null; } ``` | Property Name | Type | Description | | :--------- | :-- | :--------- | | required? | boolean | true if field is required. | | unique? | boolean | true if field value must be unique. | | hidden? | boolean | true if field is hidden in the UI. | | help_text? | string | Field help text. | | placeholder? | string | Field placeholder text. | | default_value? | string | Field default text. | | width? | number | Field column width in edit record mode. | ```javascript title="Example Script - Update Field" ``` --- # Delete Field Source: https://developers.smartsuite.com/docs/scripting/api_reference/field/update_field copy Delete a new Field in a specified Table. ```javascript delete_field(tableId: ID, fieldSlug: string): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to delete the field from. | | fieldSlug | string | The field slug value to delete. | ```javascript title="Example Script - Delete Field" ``` ## Response ```json title="200 response" { "id": "67647d9b7a03fad7da12d9f2", "name": "Table 1", "icon": "no-icon", "solution": "67647d9b7a03fad7da12d9f0", "slug": "swp6a6sm", "status": "active", "structure": [ { "slug": "title", "label": "Title", "field_type": "recordtitlefield", "params": { "is_auto_generated": false, "template": "", "primary": true, "max_length": null, "required": true, "unique": true, "placeholder": "Enter record title", "width": 1, "is_migrating": false, "valid": true, "indexed": false, "help_doc": null, "help_text_display_format": "tooltip" } }, { "slug": "description", "label": "Description", "field_type": "richtextareafield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": { "data": {}, "html": "", "preview": "" }, "width": 2, "system": false, "valid": true, "is_migrating": false } }, { "slug": "assigned_to", "label": "Assigned To", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_only", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "status", "label": "Status", "field_type": "statusfield", "params": { "choices": [ { "label": "Backlog", "value": "backlog", "value_order": 1, "value_color": "#6A849B", "is_complete": false }, { "label": "In Process", "value": "in_progress", "value_order": 2, "value_color": "#FFB938" }, { "label": "Ready for Review", "value": "ready_for_review", "value_order": 3, "value_color": "#FF9210", "is_complete": false }, { "label": "Complete", "value": "complete", "value_order": 4, "value_color": "#3EAC40", "is_complete": true } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": { "value": "backlog", "updated_on": null }, "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "due_date", "label": "Due Date", "field_type": "duedatefield", "params": { "display_format": "standard", "linked_field": "status", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, "nested": [ { "slug": "from_date", "label": "Start Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } }, { "slug": "to_date", "label": "End Date", "field_type": "datefield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Date Range", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false, "display_format": "standard" } } ] }, { "slug": "priority", "label": "Priority", "field_type": "singleselectfield", "params": { "display_format": "importance", "control_type": "dropdown", "edit_values": false, "edit_help_texts": false, "new_choices_allowed": true, "choices": [ { "label": "Urgent", "value": "urgent", "value_color": "#FF5757", "value_order": 0, "icon_type": "icon", "weight": 1 }, { "label": "High", "value": "high", "value_color": "#FFB938", "value_order": 1, "icon_type": "icon", "weight": 1 }, { "label": "Normal", "value": "normal", "value_color": "#3EAC40", "value_order": 2, "icon_type": "icon", "weight": 1 }, { "label": "Low", "value": "low", "value_color": "#6A849B", "value_order": 3, "icon_type": "icon", "weight": 1 } ], "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Select Value", "default_value": "", "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "first_created", "label": "First Created", "field_type": "firstcreatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "last_updated", "label": "Last Updated", "field_type": "lastupdatedfield", "params": { "display_format": "avatar_date", "date_format": "standard", "include_time": false, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "followed_by", "label": "Followed by", "field_type": "userfield", "params": { "include_filter": false, "field_filter": {}, "display_format": "image_name", "notifications_enabled": true, "linked_application": "members", "entries_allowed": "single", "linked_field_slug": null, "required": false, "unique": false, "hidden": true, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter assign to", "default_value": [], "width": 1, "system": true, "valid": true, "is_migrating": false } }, { "slug": "comments_count", "label": "Open Comments", "field_type": "commentscountfield", "params": { "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Enter number", "default_value": null, "width": null, "system": true, "valid": true, "is_migrating": false } }, { "slug": "autonumber", "label": "Auto Number", "field_type": "autonumberfield", "params": { "include_labels": true, "suffix": "", "prefix": "#", "starting_number": 1, "leading_zeros": 2, "primary": false, "required": false, "unique": true, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 0, "system": true, "valid": true, "is_migrating": false } }, { "slug": "sab60f5c5b", "label": "Text", "field_type": "textfield", "params": { "primary": false, "restore_application_id": null, "max_length": null, "composite": null, "delimiter": ", ", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Write here", "default_value": null, "width": 1, "system": false, "valid": true, "is_migrating": false } }, { "slug": "s048e67ec8", "label": "Text Area", "field_type": "textareafield", "params": { "restore_application_id": null, "max_length": null, "composite": null, "delimiter": ", ", "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Write here", "default_value": null, "width": 2, "system": false, "valid": true, "is_migrating": false } }, { "slug": "s8f119717f", "label": "Files and Images", "field_type": "filefield", "params": { "view_mode": "list", "items_in_row": 3, "required": false, "unique": false, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "Add Attachment", "default_value": null, "width": 2, "system": false, "valid": true, "is_migrating": false } }, { "slug": "se0df7d290", "label": "Record ID", "field_type": "recordidfield", "params": { "required": false, "unique": true, "hidden": false, "help_text_display_format": "tooltip", "help_doc": null, "placeholder": "", "default_value": null, "width": 1, "system": true, "valid": true, "is_migrating": false, "primary": false, "include_labels": false, "prefix": "", "suffix": "" } } ], "primary_field": "title", "order": 219025, "structure_layout": { "mode": "fifty_fifty", "fifty_fifty": { "rows": [ [ "title", "" ], [ "description", "" ], [ "assigned_to", "status" ], [ "due_date", "priority" ], [ "sab60f5c5b", "" ], [ "s048e67ec8", "" ], [ "s8f119717f", "" ], [ "se0df7d290", "" ] ], "sections": [] }, "seventy_thirty": { "seventy": [ "description", "s048e67ec8", "s8f119717f" ], "thirty": [ "title", "assigned_to", "status", "due_date", "priority", "sab60f5c5b", "se0df7d290" ], "seventy_sections": [], "thirty_sections": [] }, "hidden_fields": null, "single_column": { "rows": [ "title", "description", "assigned_to", "status", "due_date", "priority", "sab60f5c5b", "s048e67ec8", "s8f119717f", "se0df7d290" ], "sections": [] } }, "show_all_reports_members": [], "fields_metadata": {}, "permissions": { "level": "all_members", "members": [], "teams": [], "permissions_metadata": {} }, "field_permissions": [], "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-12-19T20:10:03.926000Z" }, "settings": { "emails": false, "meeting_notes": false, "call_log": false }, "record_term": "record", "fields_count": { "total": 14 }, "record_avatar_field_slug": null, "hidden": false } ``` --- # Bulk Add Fields Source: https://developers.smartsuite.com/docs/scripting/api_reference/field/bulk_add_fields Create multiple new Fields in a specified Table. ```javascript bulk_add_fields( tableId: ID, memberId: ID, fields: AppStructureField[], reportIds?: ID[] ): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to create the fields in. | | memberId | string | Member Id of the creating Member. | | fields | AppStructureField[] | Member Id of the creating Member. | | reportIds | string[] | Array of View (report) Ids to add the new fields to. | ## AppStructureField Object used to define the new fields to be added in bulk. ```javascript export interface AppStructureField { slug: string; label: string; field_type: Fields; params: TParams; id?: ID; is_new?: boolean; } ``` | Property Name | Type | Description | | :--------- | :-- | :--------- | | slug | string | The slug (unique Id) of the field. | | label | string | The field display name. | | field_type | string | The SmartSuite field type. | | params | field params object | The field's configuration parameters. | | id? | string | Field Id (should be null or omitted for create). | | is_new? | boolean | A true value indicates that the field is new. | ## AppStructureFieldParams ```javascript export interface AppStructureFieldParams { required?: boolean; unique?: boolean; hidden?: boolean; help_text?: string; help_doc?: any; placeholder?: string; default_value?: TValue; width?: 0 | 1 | 2 | null; } ``` | Property Name | Type | Description | | :--------- | :-- | :--------- | | required? | boolean | true if field is required. | | unique? | boolean | true if field value must be unique. | | hidden? | boolean | true if field is hidden in the UI. | | help_text? | string | Field help text. | | placeholder? | string | Field placeholder text. | | default_value? | string | Field default text. | | width? | number | Field column width in edit record mode. | ```javascript title="Example Script - Bulk Add Fields" ``` --- # Record Object Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/ A Record is an individual item in a Table. Records are the basic unit of data that are pulled into various views and dashboards. Each Record can include data in multiple fields. The Records in a Table pull everything together, holding a series of values - one for each Field in the Table. Every Record has a Title Field, which acts like a label or identifier. All the Record's Fields can be viewed and edited by users with appropriate permissions. ## System Fields The following fields are included in every record's structure. Additional fields added to the Table are identified by their slug value as the key, with values varying by field type. | Param | Type | Description | | :---- | :-- | :-- | | id | string | (read only) Unique Id of the Record. | | application_id | string | (read only) The Table Id. | | title | string | The primary (title) field. | | first_created | date object | (read only) object containing by (Member Id) and on (ISO datetime) values indicating when the record was first created. | | last_updated | date object | (read only) object containing by (Member Id) and on (ISO datetime) values indicating when the record was last updated. | | autonumber | number | The record's auto number value. | | ranking | ranking object | (read only) Record's "rank" which is used to order records in the grid. | | order | number | Numeric value used to order tables. | | application_slug | string | (read only) The Table slug value. | | deleted_date | deleted date object | Date record was deleted. object containing date (ISO datetime), null if not deleted. | | comments_count | number | Count of record comments. | | followed_by | array of strings | Array containing Ids of Members who follow the record. | ```json title="Example Record JSON" { "first_created": { "by": "5fa01dedaa4e41222745cbab", "on": "2024-12-05T18:39:25.961000Z" }, "last_updated": { "by": "5fa01dedaa4e41222745cbab", "on": "2024-12-05T18:40:31.804000Z" }, "application_id": "6716999c6b87f8d761d72bdf", "autonumber": 2, "ranking": { "default": "aaaaaabdpg" }, "id": "6751f35d3f08d70b76217f1e", "application_slug": "st5ogy0y", "deleted_date": { "date": null }, "title": "test2", "comments_count": 0, "description": "test text", "assigned_to": [], "status": { "value": "backlog", "updated_on": "2024-12-05T18:39:26.446000Z" }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "status_is_completed": false, "status_updated_on": null }, "priority": "", "followed_by": [] } ``` ## SimpleRecord Interface ```javascript export interface SimpleRecord { id: ID; title: string; [key: string]: any; } ``` --- # Retrieve Records Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/retrieve_records You can retrieve all of a table's records, or get a specific record by it's unique ID. ## Get Record Get a Record in a specified Table. ``` get_record(tableId: string, recordId: string, options?: GetRecordOptions): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to get the record from. | | recordId | string | A record Id. | | options | object | Get record options. | ```javascript title="Example Script - Get Record" ``` ## List Records Gets Records from a specified Table. ``` list_records( appId: ID, options?: ListRecordsOptions | GroupFilter): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to get the records from. | | listRecordsOptions | object | List records options. | ### ListRecordOptions ```javascript export interface RecordOptions { skipValidation?: boolean; } ``` ### GroupFilter The GroupFilter object is identical to the filters defined in SmartSuite's API. Please refer to the [Filter Syntax](https://developers.smartsuite.com/docs/solution-data/records/sort-filter#filter-syntax) documentation. ```javascript title="Example Script - List Records" ``` --- # Create Record Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/create_record Create a new Record in a specified Table. ```javascript create_record(tableId: ID, body: SimpleRecord, options?: UpdateRecordOptions): Promise ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to create the record in. | | Record | SimpleRecord | A record object. | | options | object | Record update options. | ## SimpleRecord A simplified representation of a SmartSuite record. ```javascript export interface SimpleRecord { id: ID; title: string; [key: string]: any; } ``` ## Update Record Options Optional parameters for record creation. ``` interface RecordOptions { skipValidation?: boolean; } ``` ```javascript title="Example Script - Create Record" ``` ## Response ```json title="200 response" { "title": "new title test", "description": { "data": { "type": "doc", "content": [] }, "html": "", "preview": "" }, "assigned_to": [], "status": { "value": "ready_for_review", "updated_on": "2024-12-20T22:16:16.766850Z" }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "status_is_completed": false, "status_updated_on": null }, "priority": "", "first_created": { "on": "2024-12-20T22:16:16.635150Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "on": "2024-12-20T22:16:16.635234Z", "by": "63a1f65723aaf6bcb564b1f1" }, "followed_by": [], "comments_count": null, "autonumber": 8, "sab60f5c5b": "", "s048e67ec8": "", "s8f119717f": [], "se0df7d290": "6765ecb0e74da2e4072a0836", "id": "6765ecb0e74da2e4072a0836", "application_slug": "swp6a6sm", "application_id": "67647d9b7a03fad7da12d9f2", "ranking": { "default": "aaaaaaeoiy" }, "deleted_date": { "date": null, "include_time": false }, "deleted_by": null } ``` --- # Bulk Create Records Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/bulk_create_records Creates multiple new Records in a specified Table. Note that batches are limited to 25. ```javascript bulk_create_records(tableId: ID, records: Array>): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to create the record in. | | Records | SimpleRecord[] | An array of simple record objects. | ## SimpleRecord A simplified representation of a SmartSuite record. ```javascript export interface SimpleRecord { id: ID; title: string; [key: string]: any; } ``` ```javascript title="Example Script - Bulk Create Records" ``` --- # Update Record Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/update_record Update a new Record in a specified Table. ``` update_records(tableId: ID, id: ID, body: SimpleRecord, options?: UpdateRecordOptions ): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to Update the record in. | | id | string | A record Id. | | options | object | Record update options. | ## Update Record Options Optional parameters for record update. ``` interface RecordOptions { skipValidation?: boolean; } ``` ```javascript title="Example Script - Update Record" ``` --- # Delete Record Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/delete_record Delete one or more Records in a specified Table. ```javascript delete_records(tableId: ID, ids: ID[]): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to Delete the record in. | | ids | array of strings | An array of record Ids to delete. | | options | object | Record Delete options. | ## Delete Record Options Optional parameters for record Delete. ``` interface RecordOptions { skipValidation?: boolean; } ``` ```javascript title="Example Script - Delete Record" ``` ## Response ```json title="200 Ok" [ { "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-12-20T22:16:16.635000Z" }, "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-12-20T22:16:16.635000Z" }, "application_id": "67647d9b7a03fad7da12d9f2", "autonumber": 8, "ranking": { "default": "aaaaaaeoiy" }, "deleted_by": "63a1f65723aaf6bcb564b1f1", "id": "6765ecb0e74da2e4072a0836", "application_slug": "swp6a6sm", "deleted_date": { "date": "2024-12-20T22:17:48.416000Z", "include_time": true }, "title": "new title test", "comments_count": 0, "description": { "data": { "type": "doc", "content": [] }, "html": "", "preview": "" }, "assigned_to": [], "status": { "value": "ready_for_review", "updated_on": "2024-12-20T22:16:16.913000Z" }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "status_is_completed": false, "status_updated_on": null }, "priority": "", "followed_by": [], "sab60f5c5b": "", "s048e67ec8": "", "s8f119717f": [], "se0df7d290": "6765ecb0e74da2e4072a0836" } ] ``` --- # Bulk Delete Records Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/bulk_delete_records Delete one or more Records in a specified Table. ```javascript delete_record(tableId: ID, ids: ID[], options?: DeleteRecordsOptions): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table to Delete the record in. | | ids | array of strings | An array of record Ids to delete. | | options | object | Record Delete options. | ```javascript title="Example Script - Delete Record" ``` ## Response ```json title="200 Ok" [ { "first_created": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-12-19T20:58:29.656000Z" }, "last_updated": { "by": "63a1f65723aaf6bcb564b1f1", "on": "2024-12-19T20:58:29.657000Z" }, "application_id": "67458368f64e11aadd7a7513", "autonumber": 4, "ranking": { "default": "aaaaaachem" }, "deleted_by": "63a1f65723aaf6bcb564b1f1", "id": "67458368f64e11aadd7a7513", "application_slug": "swp6a6sm", "deleted_date": { "date": "2024-12-20T21:51:50.375000Z", "include_time": true }, "title": "", "comments_count": 0, "description": { "data": { "type": "doc", "content": [] }, "html": "", "preview": "" }, "assigned_to": [], "status": { "value": "", "updated_on": null }, "due_date": { "from_date": { "date": null, "include_time": false }, "to_date": { "date": null, "include_time": false }, "status_is_completed": false, "status_updated_on": null }, "priority": "", "followed_by": [], "sab60f5c5b": "", "s048e67ec8": "", "s8f119717f": [] }, ... ] ``` --- # List Record Comments Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/list_comments Retrieve all of a record's comments by record Id. ## List Comments Get a Record's comments from a specified Table and Record Id. ```javascript list_comments(appId: ID, recordId: ID): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | The Id of the Table containing the record. | | recordId | string | The record Id to retrieve comments from. | ```javascript title="Example Script - Get Comments" ``` ## Response ```json title="200 response" { "count": null, "next": null, "previous": null, "results": [ { "solution": "67647d9b7a03fad7da12d9f0", "application": "67647d9b7a03fad7da12d9f2", "record": "67647dd4b4761f19a7b55692", "member": "63a1f65723aaf6bcb564b1f1", "message": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": "left", "size": "medium" }, "content": [ { "type": "text", "text": "This is a test" } ] } ] }, "html": "
\n

This is a test

\n
", "preview": "" }, "parent_comment": null, "created_on": "2024-12-19T22:30:20.422000Z", "deleted_on": null, "updated_on": null, "reactions": [], "key": 1, "assigned_to": null, "resolved_by": "63a1f65723aaf6bcb564b1f1", "followers": [ "63a1f65723aaf6bcb564b1f1" ], "type": "comment", "email": null, "field_slug": null, "id": "67649e7c9d8ae62e23b556ba" }, { "solution": "67647d9b7a03fad7da12d9f0", "application": "67647d9b7a03fad7da12d9f2", "record": "67647dd4b4761f19a7b55692", "member": "63a1f65723aaf6bcb564b1f1", "message": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": "left", "size": "medium" }, "content": [ { "type": "text", "text": "test!" } ] } ] }, "html": "
\n

test!

\n
", "preview": "" }, "parent_comment": null, "created_on": "2024-12-20T22:18:36.756000Z", "deleted_on": null, "updated_on": null, "reactions": [], "key": 2, "assigned_to": null, "resolved_by": null, "followers": [ "63a1f65723aaf6bcb564b1f1" ], "type": "comment", "email": null, "field_slug": null, "id": "6765ed3c1ca2a7affd31c2e9" }, { "solution": "67647d9b7a03fad7da12d9f0", "application": "67647d9b7a03fad7da12d9f2", "record": "67647dd4b4761f19a7b55692", "member": "63a1f65723aaf6bcb564b1f1", "message": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": "left", "size": "medium" }, "content": [ { "type": "text", "text": "test2!" } ] } ] }, "html": "
\n

test2!

\n
", "preview": "" }, "parent_comment": null, "created_on": "2024-12-20T22:18:40.446000Z", "deleted_on": null, "updated_on": null, "reactions": [], "key": 3, "assigned_to": null, "resolved_by": null, "followers": [ "63a1f65723aaf6bcb564b1f1" ], "type": "comment", "email": null, "field_slug": null, "id": "6765ed40c9a94aa718e14738" } ] } ``` --- # Add Record Comment Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/add_comment Add a comment to a record. ## Add Comment Get a Record's comments from a specified Table and Record Id. ```javascript add_comment(comment: CommentForm): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | CommentForm | CommentForm object | A CommentForm object with new comment details. | ### CommentForm ```javascript export interface CommentForm { application: ID; record: ID; message: CommentMessage; parent_comment?: ID | null; assigned_to?: ID | null; resolved_by?: ID | null; reaction?: string | null; } ``` ### CommentMessage The comment message can either be a SmartDoc object or HTML. Include only one or the other in your request. ```javascript export interface CommentMessage { data: Doc; // SmartDoc Object html: string; // HTML Body Content for Comment } ``` ```javascript title="Example Script - Create Comment" ``` --- # Resolve a Comment Source: https://developers.smartsuite.com/docs/scripting/api_reference/record/resolve_comment Resolve a comment. ## Resolve Comment Resolves a comment associated with a record. ```javascript resolve_comment(commentId: ID, status: boolean): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | commentId | string | The Comment Id. | | status | boolean | Set true to resolve the comment. | ```javascript title="Example Script - Resolve Comment" ``` ## Response ```json title="200 Ok" { "id": "67649e7c9d8ae62e23b556ba", "application": "67647d9b7a03fad7da12d9f2", "assigned_to": null, "created_on": "2024-12-19T22:30:20.422000Z", "deleted_on": null, "followers": [ "63a1f65723aaf6bcb564b1f1" ], "key": 1, "member": "63a1f65723aaf6bcb564b1f1", "message": { "data": { "type": "doc", "content": [ { "type": "paragraph", "attrs": { "textAlign": "left", "size": "medium" }, "content": [ { "type": "text", "text": "This is a test" } ] } ] }, "html": "
\n

This is a test

\n
", "preview": "" }, "parent_comment": null, "reactions": [], "record": "67647dd4b4761f19a7b55692", "resolved_by": "63a1f65723aaf6bcb564b1f1", "solution": "67647d9b7a03fad7da12d9f0", "updated_on": null, "type": "comment", "email": null, "field_slug": null } ``` --- # Upload Files Source: https://developers.smartsuite.com/docs/scripting/api_reference/File/upload_files Upload one or more files and attach them to a record's Files and Images field. ## Upload File Makes one or more files uploaded from the user's browser available to the function of your choice, such as update_record. ``` upload_file(files: FileBulk[]): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | files | FileBulk array | An array of file data formatted for consumption by Files and Images fields. | ```javascript title="Example Script - Upload Files" ``` ## Response ```json title="200 Ok - File Upload" [ { "handle": "C1cuxxxxxxxxxxxxxxxF", "metadata": { "container": "smart-suite-media", "filename": "download.png", "key": "7Yx4hdxxxxxxxxxx3sbw_download.png", "mimetype": "image/png", "size": 6273 }, "transform_options": {}, "author": 10368, "security": { "policy": "eyJjYWxsIjogWyJyZWFkIiwgImNvbnZlcnQiXSwgImV4cGlyeSI6IDE3MzQ3MzU2MzkuNDAwMjM2LCAiaGFuZGxlIjogIkMxY3VRck9QUWcybFlyRTdGT3dGIiwgIm1heFNpemUiOiA1MDAwMDAwMDAwfQ==", "signature": "ba6280xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5c47f1de6080308c7" }, "file_type": "image", "icon": "image", "video_conversion_status": "none", "video_thumbnail_handle": "", "converted_video_handle": null } ] ``` --- # Download File Source: https://developers.smartsuite.com/docs/scripting/api_reference/File/download_file Download a file from a record's Files and Images field. ## Download File Downloads a file by file handle. ``` download_file(handler: string): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | handler | string | Handle of the file to download. | :::tip Use the handle value from the Files and Images field. Note that the value returned by Files and Images is an array. ::: ```javascript title="Example Script - Download Files" ``` ## Response File will be downloaded to the user's web browser. --- # Team Properties Source: https://developers.smartsuite.com/docs/scripting/api_reference/team/team_constants Several Team properties are constant values, which are enumerated below. ## Team Status | Value | Status | | :-- | :-- | | 1 | Active | | 2 | Inactive | ## Team Type | Value | Type | | :-- | :-- | | 1 | Private (this is for future use) | | 2 | Public | ## Team Provisioning | Value | Provisioning Type | | :-- | :-- | | 1 | Manual | | 2 | SCIM | --- # Retrieving Teams Source: https://developers.smartsuite.com/docs/scripting/api_reference/team/retrieve_teams Retrieve all of a table's Teams. ## List Teams Get all Teams in a Table by Table Id. ``` ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | filter | string | (optional) Group filter | | fieldSlugs | array of strings | (optional) Array of field slugs to return. | ### GroupFilter ``` interface GroupFilter { operator: FilterOperator; fields: FilterField[]; } type FilterOperator = "and" | "or"; ``` ```javascript title="List Teams" ``` ### Response ```json title="200 Response" { "response": { "items": [ { "application_id": "5fa0103f8febf5497e38c200", "autonumber": 8, "first_created": { "by": "5fa01e1813e8c61db39a79f2", "on": "2021-03-01T08:50:18.409000Z" }, "last_updated": { "by": "5fa010408febf5497e38c211", "on": "2024-02-13T09:35:58.362000Z" }, "id": "603caacae74147bb0c4348c0", "application_slug": "teams", "deleted_date": { "date": null }, "name": "QA", "color": [ { "value": "#4ECCFD", "name": "" } ], "status": { "value": "1" }, "owners": [ "5fa01e1813e8c61db39a79f2", "5fa3c22163a6b21f142e67ab", "5fa3c22363a6b21f142e67c0" ], "members": [ "5fa3c22363a6b21f142e67c0", "5fbce90819a00ec0871aca3a", "5fa3c22563a6b21f142e67ce", "60b60069cf034fefc209084c", "5faa9a9424a8f4ddd2ce6c0a", "5fa3c22763a6b21f142e67d7", "5fa3c22b63a6b21f142e67fa", "5fbcdda1b517d40b3ee1baed", "613f103c18b8e2aa02c2b730", "6267f3f00779d4bef33a38d4", "62a9dd2fecf0727716766687", "61136ffaf8b3141326295e1c", "6598265920699c2b2ba68315" ], "type": "2", "followed_by": [], "provisioning": "", "external_id": "" }, { "application_id": "5fa0103f8febf5497e38c200", "autonumber": 1, "first_created": { "by": "5fa010408febf5497e38c211", "on": "2020-11-02T13:57:20.873000Z" }, "last_updated": { "by": "5fa010408febf5497e38c211", "on": "2024-09-10T10:18:15.640000Z" }, "id": "5fa010408febf5497e38c214", "application_slug": "teams", "deleted_date": { "date": null }, "name": "Everyone", "color": [ { "value": "#1D4E89", "name": "" } ], "status": { "value": "1", "updated_on": "2020-11-02T13:57:20.873000Z" }, "owners": [ "5fa010408febf5497e38c211" ], "members": [ "5fa01e1a13e8c61db39a7a00", "5fa01e1413e8c61db39a79c1", "5fa3c22563a6b21f142e67ce", "5fa01df3aa4e41222745cbf1", "5fa3c22263a6b21f142e67b2", "5fa01e1613e8c61db39a79dd", "5fa3c21863a6b21f142e6762", "5fa3c21b63a6b21f142e677e" ], "type": "2", "followed_by": [], "provisioning": "", "external_id": "" } ], "total": 2, "limit": 0, "offset": 0, "time": "" } } ``` --- # Add Team Source: https://developers.smartsuite.com/docs/scripting/api_reference/team/add_team Adds a new Team (group of Members / users) to SmartSuite. ## Add Team Adds a new Team to the Team table in the System solution. ```javascript add_team(tableId: ID, team: Team): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | Id of the Team table in the System solution. | | team | Team object | Object that specifies parameters for the new team. | ### Team object ```javascript interface Team { id: ID; name: string; color: ColorPickerFieldValue; status: StatusFieldValue | StatusAsStringValue; type: string; owners: AssignedToFieldValue; members: AssignedToFieldValue; created_on?: string; updated_on?: string; sys_title?: string; sys_target?: ID; } ``` ```javascript title="Add Team" ``` ### Response ```json title="200 Response" { "name": "Scripting team", "color": [ { "value": "#0C41F3" } ], "type": "2", "status": { "value": "1", "updated_on": "2024-12-19T21:18:03.511081Z" }, "owners": [ "63a1f65723aaf6bcb564b1f1" ], "members": [ "63a1f65723aaf6bcb564b1f1" ], "first_created": { "on": "2024-12-19T21:18:03.506684Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "on": "2024-12-19T21:18:03.506820Z", "by": "63a1f65723aaf6bcb564b1f1" }, "external_id": "", "provisioning": "", "followed_by": [], "id": "67648d8bf86bf7df09bd5870", "application_slug": "teams", "application_id": "63a1f65623aaf6bcb564b00b", "title": null, "comments_count": null, "autonumber": null, "ranking": { "default": "aamevqxlwi" }, "deleted_date": { "date": null, "include_time": false }, "deleted_by": null } ``` --- # Update Team Source: https://developers.smartsuite.com/docs/scripting/api_reference/team/update_team Updates an existing Team in SmartSuite. ## Update Team Updates an existing Team with new properties. ```javascript update_team(tableId: ID, teamId:ID, team: Team): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | tableId | string | Id of the Team table in the System solution. | | teamId | string | Id of the Team. | | team | Team object | Object that specifies parameters for the updated team. | ### Team object ```javascript interface Team { id: ID; name: string; color: ColorPickerFieldValue; status: StatusFieldValue | StatusAsStringValue; type: string; owners: AssignedToFieldValue; members: AssignedToFieldValue; created_on?: string; updated_on?: string; sys_title?: string; sys_target?: ID; } ``` ```javascript title="Update Team" ``` ### Response ```json title="200 Response" { "name": "RENAMED team", "color": [ { "value": "#0C41F3" } ], "type": "2", "status": { "value": "1", "updated_on": "2024-12-19T21:13:41.109000Z" }, "owners": [ "63a1f65723aaf6bcb564b1f1" ], "members": [ "63a1f65723aaf6bcb564b1f1" ], "first_created": { "on": "2024-12-19T21:13:40.553000Z", "by": "63a1f65723aaf6bcb564b1f1" }, "last_updated": { "on": "2024-12-19T21:31:09.862316Z", "by": "63a1f65723aaf6bcb564b1f1" }, "external_id": "", "provisioning": "", "followed_by": [], "id": "67648c8465269207fd4def78", "application_slug": "teams", "application_id": "63a1f65623aaf6bcb564b00b", "title": null, "comments_count": null, "autonumber": null, "ranking": { "default": "aamevqwxbs" }, "deleted_date": { "date": null, "include_time": false }, "deleted_by": null } ``` --- # Members Properties Source: https://developers.smartsuite.com/docs/scripting/api_reference/member/member_constants Several Member properties are constant values, which are enumerated below. ## Member Roles | Value | Role Type | | :-- | :-- | | 1 | Administrator | | 2 | Solution Manager | | 3 | General | | 4 | System | | 5 | Guest | ## Member Status | Value | Status | | :-- | :-- | | 1 | Active | | 2 | Inactive | | 3 | Deleted | | 4 | Invited | ## Member Type | Value | Type | | :-- | :-- | | 1 | Employee | | 2 | Contractor | | 3 | Consultant | | 4 | Client | | 5 | Vendor | | 6 | Other | ## Member Provisioning | Value | Provisioning Type | | :-- | :-- | | 1 | Manual | | 2 | SCIM | | 3 | Auto | --- # Retrieving Members Source: https://developers.smartsuite.com/docs/scripting/api_reference/member/retrieve_members Retrieve all of a table's Members or the current member. ## Get Current Member Gets the current member who is viewing the script. ``` get_current_member(): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | filter | string | (optional) Group filter | | fieldSlugs | array of strings | (optional) Array of field slugs to return. | ```javascript title="List Members" ``` ## List Members Get all Members in a workspace. ``` list_members(filter?: GroupFilter, fieldSlugs?: string[]): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | filter | string | (optional) Group filter | | fieldSlugs | array of strings | (optional) Array of field slugs to return. | ### GroupFilter ``` interface GroupFilter { operator: FilterOperator; fields: FilterField[]; } type FilterOperator = "and" | "or"; ``` ```javascript title="List Members" ``` ### Response ```json title="200 Response" { "response": { "items": [ { "application_id": "5fa0103f8febf5497e38c201", "autonumber": 9, "availability_status": { "emoji": "", "status": "", "selected_interval": "" }, "first_created": { "by": "5fa010408febf5497e38c211", "on": "2020-11-02T14:55:41.858000Z" }, "last_updated": { "by": "5fa01dedaa4e41222745cbab", "on": "2023-04-21T20:57:26.208000Z" }, "id": "5fa01dedaa4e41222745cbab", "application_slug": "members", "deleted_date": { "date": null }, "full_name": { "title": "", "first_name": "Jane", "middle_name": "", "last_name": "Doe", "sys_root": "Jane Doe" }, "company_name": "SmartSuite", "department": "Executive Team", "about_me": "Jane leads the engineering team.", "job_title": "Co-Founder / CTO", "email": [ "jane.doe@example.com" ], "status": { "value": "1", "updated_on": "2020-11-02T22:34:56.626000Z" }, "type": "1", "role": "1", "timezone": "America/Los_Angeles", "office_location": { "location_address": "123 Main Street", "location_address2": "", "location_city": "Springfield", "location_state": "Illinois", "location_zip": "62701", "location_country": "United States", "location_longitude": "-89.6501", "location_latitude": "39.7817", "sys_root": "123 Main Street, Springfield, Illinois, 62701, United States" }, "work_anniversary": { "date": "2019-03-04T00:00:00Z", "include_time": false }, "certifications": [ "63f7aac252f25ca47cb95faa" ], "skills": [ "63f7aac252f25ca47cb95fab", "63f7aac252f25ca47cb95fac", "63f7aac252f25ca47cb95fad", "63f7aac352f25ca47cb95fae" ], "hobbies": [ "5fe1d46ada1e62463e0807bc", "5fd27830f18f42a73c0b3263" ], "linkedin": [ "https://linkedin.com/in/janedoe" ], "twitter": [ "https://twitter.com/janedoe" ], "facebook": [ "https://www.facebook.com/janedoe" ], "instagram": [ "" ], "theme": "smartsuite_primary", "dob": { "date": "1990-01-01T00:00:00Z", "include_time": false }, "profile_image": [ { "handle": "AMhkSKBSyiIBIj8ei0ll", "metadata": { "container": "smart-suite-media", "filename": "profile.jpg", "key": "Wju9hFnmRLeo99wCSS0n_profile.jpg", "mimetype": "image/jpeg", "size": 1171191 }, "transform_options": { "crop": { "dim": [ 319, 288, 2302, 2302 ] } }, "file_type": "image", "created_on": "2023-04-01T21:26:14.560000Z", "updated_on": "2023-04-01T21:26:14.560000Z" } ], "cover_image": [], "biography": [], "phone": [ { "phone_country": "US", "phone_number": "+1 555 010 0100", "phone_extension": "", "phone_type": 2, "sys_root": "15550100100", "sys_title": "+1 555 010 0100" } ], "teams": [ "5fa010408febf5497e38c214", "5fcfc5012a42a9390f881302", "624410e6ba53bfa279dfbe40", "6442f8b51a1d1a7181d48965" ], "ip_address": [ { "address": "15.158.11.55", "country_code": "us" } ], "last_login": { "date": "2023-04-25T13:03:24.864000Z", "include_time": true }, "cover_template": "245", "locale": "en-US", "language": "en", "followed_by": [], "manager_id": "", "external_id": "", "provisioning": "" } ], "total": 1, "limit": 0, "offset": 0, "time": "" } } ``` --- # Update Member Source: https://developers.smartsuite.com/docs/scripting/api_reference/member/update_member Update your Member account information. ## Update Member Updates the information associated with a Member. You can only update the current member (yourself). ``` update_member( member: Member): Promise; ``` | Parameter Name | Type | Description | | :--------- | :-- | :--------- | | member | Member object | Invitation details | ### Member The Member object :::danger A Note about Email You cannot use this function to change your email at this time. ::: ```javascript export interface Member { id?: ID; email: string; (DO NOT MODIFY) first_name: string; last_name: string; language: string; timezone: string; locale: string; image_url: string; title: string; linkedin?: string; twitter?: string; facebook?: string; instagram?: string; company_name: string; department: string; about_me?: string; dob?: string; work_anniversary?: string; skills?: string[]; hobbies?: string[]; certifications?: string[]; accounts_num?: number; profile_image?: File; cover_image?: File; cover_template?: number; biography?: File; } ``` ```javascript title="Update Member" update_member( member: Member): Promise;--> ``` ## Response ```json title="200 success" { "email": "jane.doe@example.com", "first_name": "Jane", "last_name": "Doe", "title": "Co-Founder & CTO", "company_name": "SmartSuite", "department": "Product Management", "about_me": "new about", "cover_template": 245, "dob": "XXXX-11-01", "work_anniversary": "2019-03-04", "location_country": "United States", "location_country_code": "", "location_state": "Illinois", "location_city": "Springfield", "location_zip": "62701", "location_address": "XXXXX West 166th Street", "location_address2": "", "location_point": { "type": "Point", "coordinates": [ "-89.6501", "39.7817" ] }, "linkedin": "https://linkedin.com/in/janedoe", "twitter": "https://twitter.com/janedoe", "facebook": "https://www.facebook.com/janedoe", "instagram": "", "skills": [ "Software as a Service (SaaS)", "New Product Development", "Executive Leadership", "C#" ], "hobbies": [ "Scuba Diving", "64503233f462e75cb891dbce" ], "certifications": [], "biography": null, "profile_image": { "handle": "vZHaSuzwRGG8Mzf2OMrz", "metadata": { "container": "smart-suite-media", "filename": "profile.jpg", "key": "XBwDgeqToKjfKC5N1jeO_profile.jpg", "mimetype": "image/jpeg", "size": 1171191 }, "transform_options": { "crop": { "dim": [ 332, 161, 2302, 2302 ] } }, "security": { "policy": "eyJjYWxsIjogWyJyZWFkIiwgImNvbnZlcnQiXSwgImV4cGlyeSI6IDE3MzQ3MzQ2NDEuMzQzOTE3LCAiaGFuZGxlIjogInZaSGFTdXp3UkdHOE16ZjJPTXJ6IiwgIm1heFNpemUiOiA1MDAwMDAwMDAwfQ==", "signature": "fc6047513713a9afcddXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" } }, "cover_image": null, "locale": "en-US", "timezone": "America/Chicago", "language": "en", "theme": "smartsuite_primary", "file_security": { "policy": "eyJjYWxsIjogWyJyZWFkIiwgImNvbnZlcnQiLCAicGljayIsICJzdG9yZSJdLCAiZXhwaXJ5IjogMTczNDczNDY0MS4zNDQ0NTJ9", "signature": "7b1a888680aeba6XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" } } ``` --- # Simple Calculator Source: https://developers.smartsuite.com/docs/scripting/examples/calculator This script uses javascript to create a simple calculator. No external API connection required. ```javascript Title="Example" Basic Calculator
``` --- # List Members Source: https://developers.smartsuite.com/docs/scripting/examples/list_members This script gets a list of workspace members and displays them in a table. Clicking a table row will display the json for the complete member record. ```javascript Title="Example" Members Table

Members Table

Name Job Title Last Login
``` --- # List Solutions Source: https://developers.smartsuite.com/docs/scripting/examples/list_solutions This script gets a list of solutions in the current workspace and displays them in a table. ```javascript Title="Example" Solutions Table

All Solutions

Name Applications Count Automation Count Records Count Created Date
```