---
title: "Test provider credentials before saving"
method: POST
path: "/api/v1/providers/test-connection"
tags: ["Credentials"]
---

# Test provider credentials before saving

`POST /api/v1/providers/test-connection`

## Request

- Base URL: `https://dev.noveum.ai`
- URL: `https://dev.noveum.ai/api/v1/providers/test-connection`
- Auth: API key in cookie `apiKeyCookie` and HTTP bearer

Attempts a lightweight provider request with draft credentials. For existing providers, stored credentials are decrypted and merged with any provided credential updates before testing.

## Query parameters

- `organizationSlug` string

## Request body

- object
  - `type` 'openai' | 'anthropic' | 'google' | 'aws' | 'azure' | 'noveum'
  - `credentials` object
  - `existingProviderId` string

## Response `200`

Connection test completed.

- object
  - `valid` boolean, required
  - `message` string, required
  - `testedAt` string, required

## Other responses

- `201`: Created
- `400`: Bad request - Missing provider type or required credential fields.
- `401`: Unauthorized - Authentication required
- `403`: Forbidden
- `404`: Provider not found with the specified ID
- `409`: Conflict
- `422`: Unprocessable entity
- `500`: Internal server error

---

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