---
title: "Create a tenant-private Workflow draft"
method: POST
path: "/credits/workflows"
tags: ["Hosted Workflows"]
---

# Create a tenant-private Workflow draft

`POST /credits/workflows`

## Request

- Base URL: `https://api.paywithlocus.com/api`
- URL: `https://api.paywithlocus.com/api/credits/workflows`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Creates a private Workflow draft for the calling account from a source bundle. The draft is not runnable until it is checked and saved as an immutable version.

## Request body

- WorkflowCreateRequest
  - `source` union, required
    - object
      - `files` WorkflowFile[], required
        - `path` string, required
        - `content` string, required
    - object
      - `artifact_id` string, uuid, required
  - `idempotency_key` string

## Response `201`

Tenant-scoped Workflow definition envelope

- object
  - `success` unknown, required
  - `workflow` object, required

## Other responses

- `400`: Invalid source bundle
- `403`: Hosted Workflows unavailable or unauthorized

---

[API](https://skmtc.dev/paywithlocus/apis/locus-pro-api.md) - [All operations](https://skmtc.dev/paywithlocus/apis/locus-pro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paywithlocus/apis/locus-pro-api/revisions/aab8fa5d6cef?raw)
