---
title: "Create a vertex"
method: POST
path: "/_fabric/{fabric}/_api/graph/{graph}/vertex/{collection}"
tags: ["Graphs"]
---

# Create a vertex

`POST /_fabric/{fabric}/_api/graph/{graph}/vertex/{collection}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_fabric/:fabric/_api/graph/:graph/vertex/:collection/post.ts> (a function with typed inputs; its response is checked against the schema)

Adds a vertex to the given collection.

**Note:** Requires *Read Only* permissions to access the GeoFabric and *Write* permissions to access the collection.

## Path parameters

- `fabric` string, string, required
- `graph` string, string, required
- `collection` string, string, required

## Query parameters

- `returnNew` boolean

## Request body

- object

## Response `201`

Successfuly added the vertex when *waitForSync* is enabled.

- GraphVertexCreateHttpExamplesRc201
  - `code` integer: HTTP response code.
  - `error` boolean, required: Flag if there is an error in response. *False* for this response.
  - `new` ExampleIdKeyRev
    - `_id` string: ID of the collection.
    - `_key` string: _key details of collection.
    - `_rev` string: _rev details of collection.
  - `vertex` ExampleIdKeyRev
    - `_id` string: ID of the collection.
    - `_key` string: _key details of collection.
    - `_rev` string: _rev details of collection.

## Other responses

- `202`: Successfuly added the vertex when *waitForSync* is disabled.
- `403`: Failed to validate because you do not have access to the server.
- `404`: Failed to find specified graph or collection.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
