# Check a storage connection

`POST https://api-vod-express.syncwords.com/v1/account/storage-connections/{id}/check`

Check a storage connection

Lists the bucket with the stored keys again, and answers the connection with the outcome in `lastCheck` — `200` whether it worked or not. What to call after changing a key or a bucket policy on your side.

**Guide:** [Your own bucket](/vod-express/uploads/own-bucket)

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The connection’s id. |

## Responses

### 200

OK

Example:

```json
{
  "data": {
    "id": "01k81e5m3xq0h7wq2c5r8vj2s9",
    "name": "Newsroom media (R2)",
    "bucket": "newsroom-media",
    "endpoint": "https://c4b5023c93121161674870cf69a92519.r2.cloudflarestorage.com",
    "region": null,
    "accessKeyId": "c643baba59d6b976a27dd97a064a06fd",
    "s3Uri": "s3://newsroom-media/",
    "isDefault": true,
    "projectsUsing": 2,
    "lastCheck": {
      "ok": true,
      "checkedAt": "2026-10-20T16:02:11.000Z",
      "error": null
    },
    "createdBy": "user 42 <jane@acme.test> via unifiedJwt",
    "createdAt": "2026-10-20T16:02:11.000Z",
    "updatedAt": "2026-10-20T16:02:11.000Z"
  }
}
```

Schema:

```json
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/StorageConnection"
    }
  }
}
```

### 401

No token, or an expired or unknown one: `unauthenticated`.

Example:

```json
{
  "message": "Unauthenticated.",
  "code": "unauthenticated"
}
```

Schema:

```json
{
  "$ref": "#/components/schemas/Error"
}
```

### 403

VOD Express is not available to the account: switched off for it (`vod_express_not_enabled`), or the account is restricted — its access revoked, its trial expired or used up (`account_restricted`, with the reason in `message`).

Example:

```json
{
  "message": [
    "VOD Express is not enabled for your account."
  ],
  "code": "vod_express_not_enabled"
}
```

Schema:

```json
{
  "$ref": "#/components/schemas/Error"
}
```

### 404

No such storage connection in your account: `storage_connection_not_found`.

Example:

```json
{
  "message": "Storage connection not found.",
  "code": "storage_connection_not_found"
}
```

Schema:

```json
{
  "$ref": "#/components/schemas/Error"
}
```

### 429

Rate limited: `too_many_requests`. Wait the seconds `Retry-After` says, then repeat the call.

Example:

```json
{
  "message": [
    "Too Many Attempts."
  ],
  "code": "too_many_requests"
}
```

Schema:

```json
{
  "$ref": "#/components/schemas/Error"
}
```

## Schemas

### StorageConnection

`#/components/schemas/StorageConnection`

```json
{
  "type": "object",
  "required": [
    "id",
    "name",
    "bucket",
    "endpoint",
    "region",
    "accessKeyId",
    "s3Uri",
    "isDefault",
    "projectsUsing",
    "lastCheck",
    "createdBy",
    "createdAt",
    "updatedAt"
  ],
  "description": "One of your own buckets, with the keys the service reads and writes it with. The secret access key is never answered.",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "Your name for it, unique in your account."
    },
    "bucket": {
      "type": "string"
    },
    "endpoint": {
      "type": [
        "string",
        "null"
      ],
      "description": "The S3-compatible endpoint, `https://…` with no path (Cloudflare R2: `https://<account id>.r2.cloudflarestorage.com`). Null: AWS S3."
    },
    "region": {
      "type": [
        "string",
        "null"
      ],
      "description": "The signing region. Null: `auto` with an endpoint, `us-east-1` without."
    },
    "accessKeyId": {
      "type": "string"
    },
    "s3Uri": {
      "type": "string",
      "description": "`s3://<bucket>/`."
    },
    "isDefault": {
      "type": "boolean",
      "description": "A project created without `storage` uses it (`PATCH /account/settings`)."
    },
    "projectsUsing": {
      "type": "integer",
      "description": "How many of your projects use it; it cannot be deleted while any does."
    },
    "lastCheck": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "ok",
        "checkedAt",
        "error"
      ],
      "description": "The last time the bucket was listed with the keys — on create, on a change to them, and on `POST …/check` — and how it went. Null before any.",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "checkedAt": {
          "type": "string",
          "format": "date-time"
        },
        "error": {
          "type": [
            "string",
            "null"
          ],
          "description": "The store’s own words when `ok` is false."
        }
      }
    },
    "createdBy": {
      "type": "string",
      "description": "Who added it: a user, an API key, or SyncWords staff."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}
```

### Error

`#/components/schemas/Error`

```json
{
  "type": "object",
  "required": [
    "message",
    "code"
  ],
  "properties": {
    "message": {
      "description": "For people. A string, or an array of one string on some statuses: read it as `Array.isArray(m) ? m[0] : m`.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "code": {
      "description": "For programs: stable, one per situation. See the Errors guide.",
      "enum": [
        "bad_request",
        "invalid_output_path",
        "invalid_idempotency_key",
        "unauthenticated",
        "invalid_credentials",
        "forbidden",
        "vod_express_not_enabled",
        "account_restricted",
        "not_found",
        "project_not_found",
        "file_not_found",
        "file_meta_not_found",
        "output_not_found",
        "feed_not_found",
        "upload_not_found",
        "webhook_not_found",
        "webhook_delivery_not_found",
        "aws_access_not_provisioned",
        "storage_connection_not_found",
        "method_not_allowed",
        "conflict",
        "file_exists",
        "project_reads_feed",
        "project_reads_folder",
        "file_processing",
        "project_config_locked",
        "idempotency_in_progress",
        "storage_connection_in_use",
        "payload_too_large",
        "unsupported_media_type",
        "validation_failed",
        "service_start_failed",
        "idempotency_key_reused",
        "webhook_limit_reached",
        "storage_failed",
        "storage_connection_check_failed",
        "storage_connection_folder_only",
        "storage_prefix_taken",
        "build_without_storage_connections",
        "build_has_no_schema",
        "too_many_requests",
        "internal_error",
        "bad_gateway",
        "service_stop_failed",
        "aws_access_failed",
        "platform_unavailable",
        "service_unavailable",
        "build_list_unavailable"
      ]
    },
    "errors": {
      "type": "object",
      "description": "On a 422: each field’s messages, keyed by field name, or by JSON pointer inside `config`.",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    }
  }
}
```
