> ## Documentation Index
> Fetch the complete documentation index at: https://developers.dock.us/llms.txt
> Use this file to discover all available pages before exploring further.

# Data model

> A quick overview of how Dock's data model is structured.

export const ResponseValueFormat = ({exampleValue}) => <div>
    Example format: <code>{exampleValue}</code>
  </div>;

export const ResponseAvailableOptions = ({options}) => <div>
    Available options:{' '}
    {options.map((option, index) => <>
        <code key={index}>{option}</code>
        {index < options.length - 1 && ', '}
      </>)}
  </div>;

export const CommonResponse = ({prefix, objectType}) => <>
    <ResponseField name={prefix ? `${prefix}.id` : 'id'} type="string" required>
      The unique ID of the resource.
    </ResponseField>

    <ResponseField name={prefix ? `${prefix}.url` : 'url'} type="string" required>
      The URL of the resource.
    </ResponseField>

    <ResponseField name={prefix ? `${prefix}.object` : 'object'} type="enum" required>
      The type of the resource.
      <ResponseAvailableOptions options={[objectType]} />
    </ResponseField>

    <ResponseField name={prefix ? `${prefix}.createdAt` : 'createdAt'} type="string">
      The date and time when the resource was created.
      <div>
        Example format: <code>"2021-01-01T00:00:00.000Z"</code>
      </div>
    </ResponseField>

    <ResponseField name={prefix ? `${prefix}.updatedAt` : 'updatedAt'} type="string">
      The date and time when the resource was last updated.
      <div>
        Example format: <code>"2021-01-01T00:00:00.000Z"</code>
      </div>
    </ResponseField>

  </>;

Whether you are using Dock's [API](/api-reference/introduction) or not, this page is a quick way to understand how Dock's data is structured.

When interacting with Dock's API, you'll also need to create an [API key](/api-reference/tokens) to authenticate your requests.

## Account

Account represents any external relationships, typically another company. The most common use case for an Account is your customer or sales prospect.
Integration with external systems like Salesforce and HubSpot allows for seamless synchronization of account data, enhancing the management of client relationships and related business processes.
All the accounts are associated with a company that can be accessed via the [API](/api-reference/endpoint/accounts/retrieve-a-list-of-accounts). An account can also be [created](/api-reference/endpoint/accounts/create-an-account), [updated](/api-reference/endpoint/accounts/update-an-account) via the API.

<Accordion title="Account model">
  <CommonResponse objectType="account" />

  <ResponseField name="name" type="string">
    The name of the account.
  </ResponseField>

  <ResponseField name="website" type="string | null">
    The website of the account.
  </ResponseField>

  <ResponseField name="ownerId" type="string | null">
    The ID of the user who owns the account.
  </ResponseField>

  <ResponseField name="logo" type="string | null">
    The logo of the account.
  </ResponseField>

  <ResponseField name="salesforceAccountId" type="string | null">
    The ID of the Salesforce account.
  </ResponseField>

  <ResponseField name="hubspotCompanyId" type="string | null">
    The ID of the Hubspot company.
  </ResponseField>
</Accordion>

## Deal

Deals are a way to track and manage your sales pipeline. If you have a CRM integration,
you can sync your deals(HubSpot deals, Salesforce opportunities, etc.) with Dock.

<Accordion title="Deal model">
  <CommonResponse objectType="deal" />

  <ResponseField name="name" type="string | null">
    The name of the deal.
  </ResponseField>

  <ResponseField name="hubspotDealId" type="string | null">
    The Hubspot deal ID (when deal is from Hubspot).
  </ResponseField>

  <ResponseField name="salesforceOpportunityId" type="string | null">
    The Salesforce opportunity ID (when deal is from Salesforce).
  </ResponseField>

  <ResponseField name="amount" type="number | null">
    Monetary value of the deal.
  </ResponseField>

  <ResponseField name="closeDate" type="string | null">
    Expected or actual closing date of the deal.

    <div>
      Example format: <code>"2021-01-01T00:00:00.000Z"</code>
    </div>
  </ResponseField>

  <ResponseField name="createdDate" type="string | null">
    Date when the deal was created in the source system.

    <div>
      Example format: <code>"2021-01-01T00:00:00.000Z"</code>
    </div>
  </ResponseField>

  <ResponseField name="stage" type="string | null">
    Current stage of the deal.
  </ResponseField>

  <ResponseField name="type" type="string | null">
    Type of the deal.
  </ResponseField>
</Accordion>

## User

User represents an individual who interacts with the Dock platform. Each user can be associated with a [company](/data-model#company), create or manage [workspaces](/data-model#workspace),
and perform various tasks within the system. Users have roles, permissions,
and can participate in collaborations, making them key actors in the product’s ecosystem.

<Accordion title="User model">
  <CommonResponse objectType="user" />

  <ResponseField name="firstName" type="string | null">
    The first name of the user.
  </ResponseField>

  <ResponseField name="lastName" type="string | null">
    The last name of the user.
  </ResponseField>

  <ResponseField name="avatar" type="string | null">
    The avatar of the user.
  </ResponseField>

  <ResponseField name="email" type="string">
    The email of the user.
  </ResponseField>

  <ResponseField name="name" type="string">
    The name of the user.
  </ResponseField>
</Accordion>

## Template

Template represents a pre-defined group of pages & sections. Templates can be turned into [Workspaces](/data-model#workspace).
Templates are a powerful way to build scalable processes across the organization. As your team members start to create their own [Workspaces](/data-model#workspace),
templates can help them save time configuring and ultimately help ensure that everyone is following a similar framework.
Read more about [templates](https://help.dock.us/en/articles/8404524-what-are-templates).

<Accordion title="Template model">
  <CommonResponse objectType="template" />

  <ResponseField name="types" type="enum<string>[] | null">
    The types of the template.

    <ResponseAvailableOptions
      options={[
  'sales',
  'implementation',
  'renewal',
  'portal',
  'project',
  'internal',
]}
    />
  </ResponseField>

  <ResponseField name="title" type="string | null">
    The title of the template.
  </ResponseField>

  <ResponseField name="slackChannelEnabled" type="boolean" default="true">
    Whether a Slack channel is enabled for the template.
  </ResponseField>

  <ResponseField name="messagesEnabled" type="boolean" default="true">
    Whether messages are enabled for the template.
  </ResponseField>

  <ResponseField name="stagesEnabled" type="boolean" default="true">
    Whether stages are enabled for the template.
  </ResponseField>
</Accordion>

## Workspace

Workspaces are a shared space between your organization and an external organization. Since they are built on a flexible editor, they can be used for a variety of cases.
You can create a workspace with a [template](/data-model#template) too. Workspaces can be managed with the [Workspaces API](/api-reference/endpoint/workspaces/retrieve-a-list-of-workspaces).
Read more about [workspaces](https://help.dock.us/en/articles/6867240-what-are-workspaces).

<Accordion title="Workspace model">
  <CommonResponse objectType="workspace" />

  <ResponseField name="name" type="string">
    The name of the workspace.
  </ResponseField>

  <ResponseField name="workspaceUrl" type="string">
    The URL of the workspace.
  </ResponseField>

  <ResponseField name="templateId" type="string | null">
    The ID of the template.
  </ResponseField>

  <ResponseField name="startDate" type="string | null">
    The start date of the workspace.

    <ResponseValueFormat exampleValue="2024-01-01" />
  </ResponseField>

  <ResponseField name="targetEndDate" type="string | null">
    The target end date of the workspace.

    <ResponseValueFormat exampleValue="2024-01-01" />
  </ResponseField>

  <ResponseField name="actualEndDate" type="string | null">
    The actual end date of the workspace.

    <ResponseValueFormat exampleValue="2024-01-01" />
  </ResponseField>

  <ResponseField name="projectAge" type="number">
    The age of the project.
  </ResponseField>

  <ResponseField name="taskProgress" type="string">
    The progress of the task.
  </ResponseField>

  <ResponseField name="lastClientView" type="string">
    The last client view of the workspace.

    <ResponseValueFormat exampleValue="2024-01-01T00:00:00Z" />
  </ResponseField>

  <ResponseField name="totalViews" type="number">
    The total views of the workspace.
  </ResponseField>

  <ResponseField name="totalActions" type="number">
    The total actions of the workspace.
  </ResponseField>

  <ResponseField name="totalTimeSpent" type="number">
    The total time spent of the workspace.
  </ResponseField>

  <ResponseField name="clientsPerWorkspace" type="number">
    The number of clients per workspace.
  </ResponseField>

  <ResponseField name="account" type="object | null">
    The account associated with the workspace.

    <Expandable title="properties">
      <CommonResponse objectType="account" prefix="account" />

      <ResponseField name="account.name" type="string">
        The name of the account.
      </ResponseField>

      <ResponseField name="account.website" type="string | null">
        The website of the account.
      </ResponseField>

      <ResponseField name="account.ownerId" type="string | null">
        The ID of the user who owns the account.
      </ResponseField>

      <ResponseField name="account.logo" type="string | null">
        The logo of the account.
      </ResponseField>

      <ResponseField name="account.salesforceAccountId" type="string | null">
        The ID of the Salesforce account.
      </ResponseField>

      <ResponseField name="account.hubspotCompanyId" type="string | null">
        The ID of the Hubspot company.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="workspaceDomains" type="object[]">
    Workspace domains associated with the workspace.

    <Expandable title="properties">
      <CommonResponse objectType="workspaceDomain" prefix="workspaceDomain" />

      <ResponseField name="workspaceDomain.domain" type="string">
        The domain name in the email addresses that are associated with this
        workspace.
      </ResponseField>

      <ResponseField name="workspaceUser.role" type="string">
        The role of the user in the workspace.

        <ResponseAvailableOptions options={['owner', 'editor', 'collaborator', 'viewer', 'commenter']} />
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="workspaceUsers" type="object[]">
    Workspace users associated with the workspace.

    <Expandable title="properties">
      <CommonResponse objectType="workspaceUser" prefix="workspaceUser" />

      <ResponseField name="workspaceUser.role" type="string">
        The role of the user in the workspace.

        <ResponseAvailableOptions options={['owner', 'editor', 'collaborator', 'viewer', 'commenter']} />
      </ResponseField>

      <ResponseField name="workspaceUser.user" type="object">
        The user associated with the workspace user.

        <Expandable title="properties">
          <CommonResponse objectType="user" prefix="workspaceUser.user" />

          <ResponseField name="workspaceUser.user.firstName" type="string | null">
            The first name of the user.
          </ResponseField>

          <ResponseField name="workspaceUser.user.lastName" type="string | null">
            The last name of the user.
          </ResponseField>

          <ResponseField name="workspaceUser.user.avatar" type="string | null">
            The avatar of the user.
          </ResponseField>

          <ResponseField name="workspaceUser.user.email" type="string">
            The email of the user.
          </ResponseField>

          <ResponseField name="workspaceUser.user.name" type="string">
            The name of the user.
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="deal" type="object | null">
    The deal associated with the workspace.

    <Expandable title="properties">
      <CommonResponse objectType="deal" prefix="deal" />

      <ResponseField name="deal.name" type="string">
        The name of the deal.
      </ResponseField>

      <ResponseField name="deal.amount" type="number">
        The amount of the deal.
      </ResponseField>

      <ResponseField name="deal.closeDate" type="string | null">
        The close date of the deal.

        <div>
          Example format: <code>"2021-01-01T00:00:00.000Z"</code>
        </div>
      </ResponseField>

      <ResponseField name="deal.createdDate" type="string | null">
        The created date of the deal.

        <div>
          Example format: <code>"2021-01-01T00:00:00.000Z"</code>
        </div>
      </ResponseField>

      <ResponseField name="deal.type" type="string | null">
        The type of the deal.
      </ResponseField>

      <ResponseField name="deal.stage" type="string | null">
        The stage of the deal.
      </ResponseField>

      <ResponseField name="deal.hubspotDealId" type="string | null">
        The ID of the Hubspot deal. Cannot be used together with salesforceOpportunityId.
      </ResponseField>

      <ResponseField name="deal.salesforceOpportunityId" type="string | null">
        The ID of the Salesforce opportunity. Cannot be used together with hubspotDealId.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Accordion>

## Workspace user

Workspace users are users who are associated with a workspace.

<Accordion title="Workspace user model">
  <CommonResponse objectType="workspaceUser" />

  <ResponseField name="role" type="enum<string>">
    The role of the user in the workspace.

    <ResponseAvailableOptions options={['owner', 'editor', 'collaborator', 'viewer', 'commenter']} />
  </ResponseField>

  <ResponseField name="user" type="object[]">
    The user associated with the workspace user.

    <Expandable title="properties">
      <CommonResponse objectType="user" prefix="user" />

      <ResponseField name="user.firstName" type="string | null">
        The first name of the user.
      </ResponseField>

      <ResponseField name="user.lastName" type="string | null">
        The last name of the user.
      </ResponseField>

      <ResponseField name="user.avatar" type="string | null">
        The avatar of the user.
      </ResponseField>

      <ResponseField name="user.email" type="string">
        The email of the user.
      </ResponseField>

      <ResponseField name="user.name" type="string">
        The name of the user.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Accordion>

## Workspace domain

Workspace domains are domains that are associated with a workspace.

<Accordion title="Workspace domain model">
  <CommonResponse objectType="workspaceDomain" />

  <ResponseField name="domain" type="string">
    The domain name in the email addresses that are associated with this
    workspace.
  </ResponseField>

  <ResponseField name="role" type="enum<string>">
    The role of the user in the workspace.

    <ResponseAvailableOptions options={['owner', 'editor', 'collaborator', 'viewer', 'commenter']} />
  </ResponseField>
</Accordion>

## Workspace page

[Workspaces](/data-model#workspace) can be composed of multiple pages to help you organize your content.
Each tab at the top of a [workspace](/data-model#workspace) is a page. Workspace pages can be ordered, hidden, and have custom names.
This allows you to organize your [workspace](/data-model#workspace) in a way that makes sense for your team.
Read more about [workspace pages](https://help.dock.us/en/articles/8253951-pages-in-a-workspace).

<Accordion title="Workspace page model">
  <CommonResponse objectType="workspacePage" />

  <ResponseField name="name" type="string | null">
    The name of the workspace page.
  </ResponseField>

  <ResponseField name="navigationName" type="string | null">
    The navigation name of the workspace page.
  </ResponseField>

  <ResponseField name="hidden" type="boolean" default="false">
    Whether the workspace page is hidden.
  </ResponseField>

  <ResponseField name="index" type="number" default="0">
    The index of the workspace page.
  </ResponseField>
</Accordion>

## Workspace section

Workspace pages are made up of a collection of Workspace Sections. Sections contain text, PDFs, images, links, widgets, and embeds. Sections are the building blocks of a workspace.
Read more about [workspace sections](https://help.dock.us/en/articles/6867258-creating-sections).

<Accordion title="Workspace section model">
  <CommonResponse objectType="workspaceSection" />

  <ResponseField name="name" type="string | null">
    The name of the workspace section.
  </ResponseField>

  <ResponseField name="navigationName" type="string | null">
    The navigation name of the workspace section.
  </ResponseField>

  <ResponseField name="hidden" type="boolean" default="false">
    Whether the workspace section is hidden.
  </ResponseField>

  <ResponseField name="index" type="number" default="1">
    The index of the workspace section.
  </ResponseField>

  <ResponseField name="synced" type="boolean" default="false">
    Whether the workspace section is synced.
  </ResponseField>

  <ResponseField name="isCollaborative" type="boolean" default="false">
    Whether the workspace section is collaborative.
  </ResponseField>

  <ResponseField name="hideFromNavigation" type="boolean">
    Whether the workspace section is hidden from navigation.
  </ResponseField>
</Accordion>

## Workspace plan

Workspace plan is a project plan that organizes a group of tasks. Dock enables you to collaborate hands-on with
customers and prospects through mutual action plans. You can customize Checklists, Timelines and Kanbans to help
ensure you're moving that customer relationship forward.
You can also using them internally within a [Workspace](/data-model#workspace), to make sure you're aligned with your team on your to-do's!
Read more about [workspace plans](https://help.dock.us/en/articles/6858708-what-are-project-plans).

<Accordion title="Workspace plan model">
  <CommonResponse objectType="workspacePlan" />

  <ResponseField name="status" type="string" default="No status">
    The status of the workspace plan.
  </ResponseField>

  <ResponseField name="title" type="string | null">
    The title of the workspace plan.
  </ResponseField>

  <ResponseField name="collaborate" type="boolean" default="true">
    Whether the workspace plan allows collaboration.
  </ResponseField>

  <ResponseField name="collapse" type="boolean" default="false">
    Whether the workspace plan allows collapse.
  </ResponseField>

  <ResponseField name="viewType" type="enum<string>">
    The view type of the workspace plan.

    <ResponseAvailableOptions options={['list', 'card']} />
  </ResponseField>
</Accordion>

## Workspace plan task

Workspace plan tasks represent an action item. These checklists are composed of tasks and can be helpful in assigning out responsibilities or tracking a "to-do" list of sorts.
They are highly customizable — you can assign ownership, update the status of that item, and add a due date that sends out notifications automatically.
Tasks include assignees, due dates, start dates, action buttons, descriptions, and comments.
Read more about [workspace plan tasks](https://help.dock.us/en/articles/6858715-tasks-in-project-plans).

<Accordion title="Workspace plan task model">
  <CommonResponse objectType="workspacePlanTask" />

  <ResponseField name="isInternal" type="boolean" default="false">
    Whether the task is internal.
  </ResponseField>

  <ResponseField name="status" type="string" default="No status">
    The status of the task.
  </ResponseField>

  <ResponseField name="completedAt" type="string | null">
    The date and time when the task was completed.
  </ResponseField>

  <ResponseField name="actionLinkUrl" type="string | null">
    The URL of the action link.
  </ResponseField>

  <ResponseField name="actionLinkName" type="string | null">
    The name of the action link.
  </ResponseField>

  <ResponseField name="actionText" type="string | null">
    The text of the action.
  </ResponseField>

  <ResponseField name="actionType" type="enum<string> | null">
    The type of the action.

    <ResponseAvailableOptions
      options={[
  'link',
  'fileDownload',
  'fileUpload',
  'form',
  'video',
  'calendar',
  'pdf',
  'embedAnything',
  'embedCode',
]}
    />
  </ResponseField>

  <ResponseField name="showActionText" type="boolean" default="true">
    Whether the action text is shown.
  </ResponseField>

  <ResponseField name="startDate" type="string | null">
    The start date of the task.
  </ResponseField>

  <ResponseField name="title" type="string | null">
    The title of the task.
  </ResponseField>

  <ResponseField name="dueDate" type="string | null">
    The due date of the task.
  </ResponseField>

  <ResponseField name="index" type="number | null">
    The index of the task.
  </ResponseField>
</Accordion>

## Custom field

Custom fields are a way to add custom data to your deals, accounts, and workspaces.

<Accordion title="Custom field model">
  <CommonResponse objectType="customField" />

  <ResponseField name="name" type="string">
    The name of the custom field.
  </ResponseField>

  <ResponseField name="variableName" type="string">
    The variable name of the custom field.
  </ResponseField>

  <ResponseField name="type" type="enum<string>">
    The type of the custom field.

    <ResponseAvailableOptions
      options={[
  'number',
  'date',
  'singleLineText',
  'multiLineText',
  'singleCheckbox',
  'multiCheckboxes',
  'dropdownSelect',
  'radioSelect',
]}
    />
  </ResponseField>

  <ResponseField name="options" type="object[] | null">
    The options of the custom field.

    <Expandable title="properties">
      <ResponseField name="options.index" type="number">
        The index of the option.
      </ResponseField>

      <ResponseField name="options.label" type="string">
        The label of the option.
      </ResponseField>

      <ResponseField name="options.value" type="string">
        The value of the option.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Accordion>

## Asset

Assets are typically a piece of content (PDFs, links, images, or videos). Assets are found in Dock’s content library and can be tagged.
Read more about [assets](https://help.dock.us/en/articles/6885248-intro-to-content-management).

<Accordion title="Asset model">
  <CommonResponse objectType="asset" />

  <ResponseField name="object" type="enum<string>" required>
    The type of the resource.

    <ResponseAvailableOptions options={['asset']} />
  </ResponseField>

  <ResponseField name="name" type="string">
    The name of the asset.
  </ResponseField>

  <ResponseField name="description" type="string | null">
    The description of the asset.
  </ResponseField>

  <ResponseField name="views" type="number" default="0">
    The number of views of the asset.
  </ResponseField>

  <ResponseField name="shares" type="number" default="0">
    The number of shares of the asset.
  </ResponseField>

  <ResponseField name="assetType" type="enum<string>" required>
    The type of the asset.

    <ResponseAvailableOptions options={['image', 'pdf', 'link', 'video']} />
  </ResponseField>

  <ResponseField name="assetUrl" type="string">
    The URL of the asset.
  </ResponseField>

  <ResponseField name="tags" type="object[]">
    The tags associated with the asset.

    <Expandable title="properties">
      <CommonResponse objectType="tag" prefix="tags" />

      <ResponseField name="tags.title" type="string">
        The name of the tag.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Accordion>

## File

Files represent uploaded files and downloadable attachments in Dock.
You can retrieve a file with the [Files API](/api-reference/endpoint/files/retrieve-a-file).

<Accordion title="File model">
  <CommonResponse objectType="file" />

  <ResponseField name="name" type="string | null">
    The name of the file.
  </ResponseField>

  <ResponseField name="thumbnail" type="string | null">
    The thumbnail URL of the file when available.
  </ResponseField>

  <ResponseField name="size" type="number | null">
    The size of the file in bytes.
  </ResponseField>

  <ResponseField name="expiresAt" type="string | null">
    The expiration date and time of the signed download URL.

    <div>
      Example format: <code>"2021-01-01T00:00:00.000Z"</code>
    </div>
  </ResponseField>
</Accordion>

## Tag

Tags are labels you can use to organize and filter your content [assets](/data-model#asset).
For example, you might have a tag called "Integrations."
Searching for a tag returns all content [assets](/data-model#asset) associated with it.
You can create and manage tags with the [Tags API](/api-reference/endpoint/tags/create-a-tag).
Read more about content management in Dock's Help Center.

<Accordion title="Tag model">
  <CommonResponse objectType="tag" />

  <ResponseField name="title" type="string">
    The title of the tag.
  </ResponseField>
</Accordion>
