---
title: "Create a session resource"
method: POST
path: "/sessions"
tags: ["Session"]
---

# Create a session resource

`POST /sessions`

Create a session resource.

## Request body

- SessionCreate
  - `serviceId` string
  - `tags` Tags
  - `type` 'Dial' | 'Bind' | 'Invalid'

## Response `201`

The create request was successful and the resource has been added at the following location

- SessionCreateEnvelope
  - `data` SessionDetail — Fields shared by all Edge API entities
    - `_links` object, required — A map of named links
    - `createdAt` string, date-time, required
    - `id` string, required
    - `tags` Tags
    - `updatedAt` string, date-time, required
    - `apiSession` EntityRef, required — A reference to another resource and links to interact with it
      - `_links` object — A map of named links
      - `entity` string
      - `id` string
      - `name` string
    - `apiSessionId` string, required
    - `edgeRouters` SessionEdgeRouter[], required
      - `appData` Tags
      - `cost` integer, nullable, required
      - `disabled` boolean, required
      - `hostname` string, required
      - `isOnline` boolean, required
      - `name` string, required
      - `noTraversal` boolean, nullable, required
      - `supportedProtocols` object, required
      - `syncStatus` string, required
      - `urls` object, required
    - `identityId` string, required
    - `service` EntityRef, required — A reference to another resource and links to interact with it
      - `_links` object — A map of named links
      - `entity` string
      - `id` string
      - `name` string
    - `serviceId` string, required
    - `token` string, required
    - `type` 'Dial' | 'Bind' | 'Invalid', required
  - `meta` Meta
    - `apiEnrollmentVersion` string
    - `apiVersion` string
    - `filterableFields` string[]
    - `pagination` Pagination
      - `limit` number, required
      - `offset` number, required
      - `totalCount` number, required

## Other responses

- `400` — The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information
- `401` — The supplied session does not have the correct access rights to request this resource
- `404` — The requested resource does not exist
- `429` — The resource requested is rate limited and the rate limit has been exceeded
- `503` — The request could not be completed due to the server being busy or in a temporarily bad state

---

[API](https://skmtc.net/openziti/apis/ziti-edge-client.md) · [All operations](https://skmtc.net/openziti/apis/ziti-edge-client/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openziti/ziti-edge-client/versions/25da9a73a095/schema)
