---
title: "Create a delegate token"
method: POST
path: "/entities/{entityDID}/delegateToken"
tags: ["Entity"]
---

# Create a delegate token

`POST /entities/{entityDID}/delegateToken`

Creates a delegate token for an entity. The delegate token is a JWT that allows a delegate to act on behalf of the entity. If a delegate DID already exists for the given delegateId, it will be reused.

## Path parameters

- `entityDID` string, did, required — Decentralized Identifier (DID)

## Request body

- CreateDelegateTokenBody
  - `entityDID` string, required — The entity DID (must match URL parameter)
  - `delegateId` string, required — Unique identifier for the delegate

## Response `200`

Delegate token created successfully

- CreateDelegateTokenOutput
  - `access_token` string, required — JWT access token for the delegate
  - `token_type` 'Bearer', required — Token type (always Bearer)
  - `delegateDid` string, required — DID of the created/retrieved delegate

## Other responses

- `400` — Bad Request - The server could not process the request due to a client error.
- `401` — Unauthorized - Authentication information is missing or invalid.
- `403` — Forbidden - The server understood the request but refuses to authorize it.
- `404` — Not Found - The requested resource could not be found.
- `409` — Conflict - The request could not be completed due to a conflict with the current state of the resource.
- `500` — Internal Server Error - An unexpected condition was encountered on the server.

---

[API](https://skmtc.net/notabene/apis/notabene-api.md) · [All operations](https://skmtc.net/notabene/apis/notabene-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/notabene/notabene-api/versions/70056745a433/schema)
