---
title: "Create Access Key"
method: POST
path: "/access-keys"
tags: ["Access Key"]
---

# Create Access Key

`POST /access-keys`

## Request

- Base URL: `https://example.app.liongard.com/api/v1`
- URL: `https://example.app.liongard.com/api/v1/access-keys`
- Auth: one of:
  - API key in header `X-ROAR-API-KEY`
  - API key in header `X-Auth-Token`

Create an Access Token with the permission of user or with only 'Add Agent' permission

## Request body

- object
  - `isAgentInstallKey` boolean
  - `daysUntilExpiration` '30' | '90' | '180' | '360' | 'Unlimited'

## Response `200`

- object[]
  - `AccessKeyId` string
  - `Status` integer
  - `Visible` boolean
  - `CreatedOn` string
  - `LastUsedOn` string
  - `DeletedOn` string
  - `isAgentInstallKey` boolean
  - `ExpirationDate` string
  - `AccessKeySecret` string

---

[API](https://skmtc.dev/liongard/apis/liongard-v1-endpoints.md) - [All operations](https://skmtc.dev/liongard/apis/liongard-v1-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/liongard/apis/liongard-v1-endpoints/revisions/7efdc24166c1?raw)
