Skip to main content
GET
/
validate
Validate API Key
curl --request GET \
  --url https://server.promptwatch.com/api/v1/validate \
  --header 'X-API-Key: <api-key>'
{
  "valid": true,
  "keyType": "project",
  "organization": {
    "id": "<string>",
    "name": "<string>",
    "slug": "<string>"
  },
  "apiKey": {
    "id": "<string>",
    "name": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "lastUsedAt": "2023-11-07T05:31:56Z"
  },
  "project": {
    "id": "<string>",
    "name": "<string>",
    "slug": "<string>"
  },
  "availableProjects": [
    {
      "id": "<string>",
      "name": "<string>",
      "slug": "<string>"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get yours from the Promptwatch dashboard under Settings > API Keys.

Headers

x-project-id
string<uuid>

Project ID to validate (required for organization-level keys when accessing project resources)

Response

Default Response

valid
boolean
required

Whether the API key is valid

keyType
enum<string>
required

Type of API key - project-level or organization-level

Available options:
project,
organization
organization
object
required
apiKey
object
required
project
object

Project details. For org keys, only present when X-Project-Id header is provided.

availableProjects
object[] | null

List of available projects. Only present for organization-level keys when no X-Project-Id header is provided.