---
title: "Create a new license for an agent"
method: POST
path: "/api/v1/projects/{projectId}/licenses"
tags: ["Agent Licenses"]
---

# Create a new license for an agent

`POST /api/v1/projects/{projectId}/licenses`

Creates a new license for a specific agent.

## Path parameters

- `projectId` integer, required

## Request body

- object
  - `name` string — The name of the license

## Response `201`

Agent license

- object
  - `status` 'error' | 'success' — The status of the response
  - `data` object
    - `license` ProjectLicense
      - `name` string — License Name
      - `key` string, uuid — License Key
      - `project_id` integer — Agent ID this license belongs to
      - `created_at` string, date-time — Date and time when the license was created
      - `updated_at` string, date-time — Date and time when the license was last updated
    - `licenseKey` string, uuid — The license key

## Other responses

- `401` — API Token is either missing or invalid
- `422` — Bad Argument
- `500` — Internal Server Error

---

[API](https://skmtc.net/poll-the-people/apis/customgpt-ai.md) · [All operations](https://skmtc.net/poll-the-people/apis/customgpt-ai/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/poll-the-people/customgpt-ai/revisions/b80e6dfcf78d/schema)
