---
title: "Create data-type"
method: POST
path: "/data-types"
tags: ["DataTypes"]
---

# Create data-type

`POST /data-types`

Create data-type. The create request must contain all the file types which are to be associated with the data-type. For example, if the data-type was to allow the use of JSON documents then the request would list it as a file specification.

## Headers

- `slb-data-partition-id` string, required

## Request body

- CreateDataType — Create data-type request.
  - `id` string — The optional id of the specification. The id should be of the form '{authority}:{spec-type}:{id}', where '{authority}' is the owning authority of the specification, '{spec-type}' is one of 'data-types', 'computation-specs' or 'workflow-specs'.
  - `name` string, required — The name of the specification.
  - `description` string, required — The description of the specification.
  - `fileSpecs` FileSpec[]
    - `extension` string — The file extension e.g. 'xlsx'
    - `schemaRef` SchemaRef — A schema reference.
      - `id` string, required — The unique idenitifer for the schema.
      - `type` 'JSON', required — The type of schema, for instance JSON schema.
    - `defaultFilename` string — The optional default filename for this file specification. This field is useful when the file specification defines a single file which always has the same filename. (e.g. filename.json). Note that the extension of the default filename should match the file specification extension.

## Response `201`

Data-type created successfully.

- DataType — An evaluation data-type.
  - `id` string, required — The ID of the specification.
  - `name` string, required — The name of the specification.
  - `version` integer, required — The version of the specification definition.
  - `latest` boolean, required — Whether this is the latest version of the given specification.
  - `archived` boolean, required — Whether this specification has been marked as archived.
  - `description` string, required — The description of the specification.
  - `createdBy` string, required — The ID of the user who created the specification.
  - `createdAt` string, date-time, required — The date the specification was created.
  - `fileSpecs` FileSpec[] — Specification of the file types allowed to be used with this container.
    - `extension` string — The file extension e.g. 'xlsx'
    - `schemaRef` SchemaRef — A schema reference.
      - `id` string, required — The unique idenitifer for the schema.
      - `type` 'JSON', required — The type of schema, for instance JSON schema.
    - `defaultFilename` string — The optional default filename for this file specification. This field is useful when the file specification defines a single file which always has the same filename. (e.g. filename.json). Note that the extension of the default filename should match the file specification extension.

## Other responses

- `401` — Unauthorized.
- `default` — Unexpected error.

---

[API](https://skmtc.net/slb/apis/evaluation.md) · [All operations](https://skmtc.net/slb/apis/evaluation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/slb/evaluation/revisions/b563a2fae7de/schema)
