---
title: "Generate Plugin Key"
method: POST
path: "/api/v1/plugin/websites/{website_id}/generate-key"
tags: ["plugin"]
---

# Generate Plugin Key

`POST /api/v1/plugin/websites/{website_id}/generate-key`

## Request

- Base URL: `https://api.seoproai.co`
- URL: `https://api.seoproai.co/api/v1/plugin/websites/{website_id}/generate-key`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/authorize`, token URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/token`)

Generate a new plugin API key for a website.

This key is used by the WordPress plugin to authenticate with SEOPro AI.

## Path parameters

- `website_id` integer, required

## Headers

- `X-User-Id` string, nullable
- `X-Organization-Id` string, nullable
- `Authorization` string, nullable

## Response `200`

Successful Response

- GeneratePluginKeyResponse: Response after generating a plugin API key.
  - `success` boolean, required
  - `api_key` string, required
  - `message` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/seoproai/apis/seopro-ai.md) · [All operations](https://skmtc.dev/seoproai/apis/seopro-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/seoproai/apis/seopro-ai/revisions/5b4b6391ddc9?raw)
