---
title: "Generate API key for Whitelabel User"
method: PATCH
path: "/v0/w/brands/{brandId}/users/{userId}/api-key"
tags: ["Whitelabel"]
deprecated: true
---

# Generate API key for Whitelabel User

`PATCH /v0/w/brands/{brandId}/users/{userId}/api-key`

## Request

- Base URL: `https://sitegpt.ai/api`
- URL: `https://sitegpt.ai/api/v0/w/brands/{brandId}/users/{userId}/api-key`
- Auth: HTTP bearer

> **Deprecated.**

Generate API key for a user of your whitelabel brand.

Pre-requisities: 
1. You have to be a whitelabel customer in SiteGPT.
2. You need to create and configure your own brand in SiteGPT dashboard.

## Response `200`

OK

- object
  - `success` boolean: Indicates whether this is success response or error response
  - `message` string: Overall message regarding the operation performed
  - `data` object: Data returned from the server
    - `userId` string: Id of the whitelabel user
    - `userEmail` string: Email of the whitelabel user
    - `apiKey` string: API key of the whitelabel user

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `500`: Internal Server Error

---

[API](https://skmtc.dev/sitegpt/apis/sitegpt-api-collection.md) · [All operations](https://skmtc.dev/sitegpt/apis/sitegpt-api-collection/llms.txt) · [OpenAPI document](https://skmtc.dev/sitegpt/apis/sitegpt-api-collection/revisions/aec0de1a00af?raw)
