---
title: "Create a Static Data Map"
method: POST
path: "/data_maps"
tags: ["Data Maps"]
---

# Create a Static Data Map

`POST /data_maps`

## Request

- Base URL: `https://dataops.nexla.io/nexla-api`
- URL: `https://dataops.nexla.io/nexla-api/data_maps`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nexla/apis/nexla-rest-api/docs/data_maps/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new static data map in the authenticated user's account. Dynamic data maps can only be created by creating a Destination (Sink) of the type `data_map`. 

For statically assigned data maps, you can choose to add data rows to the data map by either of the following methods:
1. Send data map entries with this request. In this case, the rows of data are sent as a `data_map` array of objects.
2. Send data map entries as a separate call to add/update entries. 

You must include `map_primary_key` to specify which map attribute should be used for data matching.

## Request body

- DataMapCreate
  - `name` string, required
  - `description` string
  - `map_primary_key` string: Key name which should be used as the primary key for looking up rows in this data map.
  - `data_defaults` object: The default values to use for any key if the key is not present in the corresponding row.
  - `emit_data_default` boolean: This property defines whether a lookup query should return values with applicable default values for missing properties in the row.
  - `tags` string[]
  - `data_map` object[]: Enter an array of data map entries if you wish to seed this data map with some rows of data while creating the data map. You can also update data map rows by calling the endpoint for updating entries.

## Response `200`

Success

- DataMap
  - `id` integer
  - `name` string
  - `description` string
  - `public` boolean
  - `managed` boolean
  - `data_type` string
  - `data_format` string, nullable
  - `data_sink_id` string, nullable
  - `emit_data_default` boolean
  - `use_versioning` boolean
  - `map_primary_key` string
  - `data_defaults` object
  - `updated_at` string, date-time
  - `created_at` string, date-time
  - `owner` object
    - `id` integer
    - `full_name` string
    - `email` string, email
  - `org` OrgSimplified
    - `id` integer
    - `name` string
    - `email_domain` string
    - `email` string
    - `client_identifier` string
    - `org_webhook_host` string
  - `access_roles` string[]: This property reflects all the permissions the user/team/organization has to this resource. 1. `collaborator`: The user/team/organization can view the resource but not make any modifications to it. 2. `operator`: The user/team/organization can view the resource and can activate/pause it, but not make any other modifications to it. 3. `administrator`: The user/team/organization has complete administrative rights to this resource. 4. `owner`: This user created the resource and so has complete administrative rights to it.
  - `data_set_id` integer
  - `map_entry_count` integer
  - `map_entry_schema` object
  - `tags` string[]

## Other responses

- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/nexla/apis/nexla-rest-api.md) - [All operations](https://skmtc.dev/nexla/apis/nexla-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nexla/apis/nexla-rest-api/revisions/ef02be92fe7b?raw)
