---
title: "Delegate Access to Another Agent"
method: POST
path: "/auth/delegate"
tags: ["Authentication"]
---

# Delegate Access to Another Agent

`POST /auth/delegate`

Allow an authenticated agent to generate a temporary, scoped credential (macaroon)
and delegate it to another agent for specific resources and permissions.

## Request body

- DelegationRequest
  - `target_agent_id` string, required
  - `resource` string, required
  - `permissions` string[], required
  - `ttl_seconds` integer, required — Time-to-live for the delegation in seconds

## Response `200`

Delegation token created successfully

- DelegationResponse
  - `delegation_token` string — Macaroon delegation token

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing authentication
- `403` — Not authorized to delegate this resource
- `500` — Internal Server Error - Unexpected server error

---

[API](https://skmtc.net/deeptrail/apis/deepsecure-api-dual-service-architecture.md) · [All operations](https://skmtc.net/deeptrail/apis/deepsecure-api-dual-service-architecture/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeptrail/deepsecure-api-dual-service-architecture/revisions/78627360c082/schema)
