---
title: "Preview Vendor Contact Workos Users"
method: POST
path: "/backfills/preview-vendor-contact-workos-users"
tags: ["internal"]
---

# Preview Vendor Contact Workos Users

`POST /backfills/preview-vendor-contact-workos-users`

Dry run for the vendor-contact WorkOS backfill. Read-only on both sides:
lists every active vendor contact, checks which already exist in the
target WorkOS environment, and reports who the backfill would create.
Writes nothing to either the app database or WorkOS.

## Request body

- VendorWorkosCredentials — Credentials for the *vendor* WorkOS environment, supplied per request. backend/api/backfills.py is mounted on the main backend, whose module-level workos_client is bound to the main WorkOS environment. The identities this backfill creates need to land in the vendor environment instead, so the target environment's credentials travel with the request rather than living in a second set of env vars on the main service (see helpers/workos_auth.build_workos_client). SecretStr keeps the key out of logs and out of any response that happens to echo the request body.
  - `workos_api_key` string, password, required
  - `workos_client_id` string, required

## Response `200`

Successful Response

- VendorContactWorkosPreviewResponse — Dry run for the vendor-contact WorkOS backfill. Writes nothing.
  - `vendor_contact_count` integer, required
  - `already_in_workos_count` integer, required
  - `to_create_count` integer, required
  - `to_create_emails` string[], required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/kobaltlabs/apis/fastapi.md) · [All operations](https://skmtc.dev/kobaltlabs/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kobaltlabs/fastapi/revisions/425d5b8a3c17/schema)
