---
title: "Create Map Annotation"
method: POST
path: "/openapi/v2.0/map/element"
tags: ["Map/Map Annotation/Annotation Creation", "Map/Map Annotation/Annotation CRUD"]
---

# Create Map Annotation

`POST /openapi/v2.0/map/element`

## Request

- Base URL: `` (relative, and it does not resolve against the document’s source URL)
- URL: `/openapi/v2.0/map/element`
- Auth: none required

Create map annotation. Supports creating point, line, and polygon annotations.

## Headers

- `X-User-Token` string, required
- `X-Project-Uuid` string, uuid, required
- `X-Request-Id` string
- `X-Language` string

## Request body

- object
  - `id` string: Element ID (optional, generated by backend)
  - `name` string: Annotation Name
  - `source` 0 | 1: Annotation source: 0=openApi, 1=geo
  - `element_source` integer: Reserved field, no need to pass
  - `desc` string: Annotation Description
  - `resource` object, required: Resource Object
    - `type` 1 | 2 | 3, required: Annotation type, 0: point, 1: line, 2: polygon
    - `remark` string: Remark
    - `content` object, required: Annotation Content
      - `type` string: Default value: Feature
      - `properties` object: Annotation Attributes
        - `color` string: Annotation Color
        - `clampToGround` boolean: Ground-Following or Not
      - `geometry` object: GeoJSON Geometry Object
        - `type` string: Annotation type: Point, LineString, Polygon
        - `coordinates` unknown[]: Coordinate List
          - unknown

## Response `200`

success

- object
  - `code` integer: Non-zero Indicates Exception
  - `message` string: Message Prompt
  - `data` object: New Annotation Element Info
    - `id` string: UUID of Newly Created Annotation Element

## Other responses

- `400`: Parameter Error
- `401`: Authentication Failed
- `403`: Insufficient Permission
- `404`: Resource Not Found
- `500`: Service Exception

---

[API](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-public-cloud.md) - [All operations](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-public-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-public-cloud/revisions/aeef0010be34?raw)
