---
title: "Create a definition"
method: POST
path: "/{workspace}/definitions"
---

# Create a definition

`POST /{workspace}/definitions`

## Request

- Base URL: `https://modeanalytics.com/api`
- URL: `https://modeanalytics.com/api/{workspace}/definitions`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/thoughtspot/apis/mode/docs/:workspace/definitions/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a `Definition`

## Path parameters

- `workspace` string, required

## Response `200`

`Definition` response

- Definition
  - `id` string, required
  - `token` string, required
  - `name` string, required
  - `description` string, required
  - `source` string, required
  - `data_source_id` string, required
  - `created_at` string, required
  - `updated_at` string, required
  - `last_successful_sync_at` string, required
  - `github_link` string
  - `last_saved_at` string, required
  - `_links` DefinitionLinks, required
    - `self` Link, required
      - `href` string, required
      - `templated` boolean
    - `last_run` Link, required
      - `href` string, required
      - `templated` boolean
    - `last_successful_github_sync` Link, required
      - `href` string, required
      - `templated` boolean
    - `web_edit` Link, required
      - `href` string, required
      - `templated` boolean
    - `creator` Link
      - `href` string, required
      - `templated` boolean
  - `_embedded` unknown

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: `DataSource` not found

---

[API](https://skmtc.dev/thoughtspot/apis/mode.md) - [All operations](https://skmtc.dev/thoughtspot/apis/mode/llms.txt) - [OpenAPI document](https://skmtc.dev/thoughtspot/apis/mode/revisions/4c694c3fdeb1?raw)
