---
title: "Validate Connection State"
method: POST
path: "/vault/connections/{unified_api}/{service_id}/validate"
tags: ["Connections"]
---

# Validate Connection State

`POST /vault/connections/{unified_api}/{service_id}/validate`

This endpoint validates the current state of a given connection. This will perform different checks based on the connection auth type. For basic and apiKey auth types, the presence of required fields is checked.
For connectors that implement OAuth2, this operation forces the refresh flow for an access token regardless of its expiry.

Note:
  - Do not include any credentials in the request body. This operation does not persist changes, but only triggers the validation of connection state.
  - If a refresh token flow was performed and successful, the new access token will then be used for subsequent API requests.

## Path parameters

- `service_id` string, required
- `unified_api` string, required

## Headers

- `x-apideck-consumer-id` string, required
- `x-apideck-app-id` string, required

## Request body

- object

## Response `200`

Connection access token refreshed

- ValidateConnectionStateResponse
  - `status_code` integer, required — HTTP Response Status Code
  - `status` string, required — HTTP Response Status
  - `data` object, required
    - `id` string — The unique identifier of the connection.
    - `state` 'available' | 'callable' | 'added' | 'authorized' | 'invalid' — [Connection state flow](#section/Connection-state)
  - `_raw` Raw, nullable — Raw response from the integration when raw=true query param is provided

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `404` — The specified resource was not found
- `422` — Unprocessable
- `default` — Unexpected error

---

[API](https://skmtc.net/apideck-libraries/apis/vault-api.md) · [All operations](https://skmtc.net/apideck-libraries/apis/vault-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apideck-libraries/vault-api/versions/1b8e8b6feb36/schema)
