---
title: "Create a new authentication token to use within the 'renterd_auth' cookie"
method: POST
path: "/api/auth"
tags: ["authentication"]
---

# Create a new authentication token to use within the 'renterd_auth' cookie

`POST /api/auth`

Creates a new authentication token that is returned via the 'renterd_auth' cookie which is set by the server

## Query parameters

- `validity` integer, required

## Response `204`

Successfully created a new token

## Other responses

- `400` — Bad request

## Changes

- **2025-01-14** `7239a7e351de` — 1 info
  - endpoint added
- **2024-12-09** `f062c35d8f47` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/siafoundation/apis/renterd-api/changes/api/auth/post.md)

---

[API](https://skmtc.dev/siafoundation/apis/renterd-api.md) · [All operations](https://skmtc.dev/siafoundation/apis/renterd-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/siafoundation/renterd-api/revisions/7239a7e351de/schema)
