> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iblueprint.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an iBlueprint blueprint with a node graph

> Create a new iBlueprint blueprint by posting a title, description, status, tags, node graph, environment variables, and an optional organization ID.

The `blueprint.create` procedure creates a new blueprint and returns the persisted record. New blueprints always start with `visibility: private` regardless of what you pass, so you can safely build and test before sharing. If you do not supply an `organization_id`, iBlueprint automatically assigns the blueprint to your personal workspace organization.

## Request

**Procedure type:** mutation (HTTP `POST`)

**Endpoint:**

```
POST https://api.iblueprint.ai/api/trpc/blueprint.create
Content-Type: application/json
```

**Body shape:**

```json theme={null}
{ "json": { ...parameters... } }
```

### Parameters

<ParamField body="json.title" type="string" required>
  Display name for the blueprint.
</ParamField>

<ParamField body="json.description" type="string">
  Short description shown in listings and the marketplace.
</ParamField>

<ParamField body="json.status" type="string">
  Initial status. Accepted values: `draft` (default), `published`.
</ParamField>

<ParamField body="json.tags" type="array">
  Array of tag strings for filtering and discovery.
</ParamField>

<ParamField body="json.blueprint_map" type="object">
  The node graph that defines the blueprint's logic. Must contain a `nodes` array. Each node requires at minimum `id`, `type`, `title`, and `config`.

  ```json theme={null}
  {
    "nodes": [
      {
        "id": "node-1",
        "type": "ai-prompt",
        "title": "Summarize Text",
        "config": { "prompt": "Summarize the following: {{input}}" }
      }
    ]
  }
  ```
</ParamField>

<ParamField body="json.environment_variables" type="array">
  Declared environment variable definitions available to nodes at runtime.
</ParamField>

<ParamField body="json.organization_id" type="string">
  UUID of the organization to assign this blueprint to. You must be a member of the organization. Defaults to your personal workspace if omitted.
</ParamField>

## Response

Returns the created Blueprint object as persisted in the database.

<ResponseField name="id" type="string">UUID assigned to the new blueprint.</ResponseField>
<ResponseField name="title" type="string">Title as provided.</ResponseField>
<ResponseField name="description" type="string">Description as provided.</ResponseField>
<ResponseField name="status" type="string">`draft` or `published`.</ResponseField>
<ResponseField name="visibility" type="string">Always `private` for newly created blueprints.</ResponseField>
<ResponseField name="version" type="string">Initial version, e.g. `1.0.0`.</ResponseField>
<ResponseField name="tags" type="array">Tags as provided.</ResponseField>
<ResponseField name="created_by" type="string">UUID of the authenticated user who created the blueprint.</ResponseField>
<ResponseField name="organization_id" type="string">UUID of the assigned organization.</ResponseField>
<ResponseField name="created_at" type="string">ISO 8601 creation timestamp.</ResponseField>
<ResponseField name="updated_at" type="string">ISO 8601 timestamp, equal to `created_at` on creation.</ResponseField>
<ResponseField name="environment_variables" type="array">Environment variable definitions as provided.</ResponseField>
<ResponseField name="blueprint_map" type="object">Node graph as provided, or `null` if not supplied.</ResponseField>

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST "https://api.iblueprint.ai/api/trpc/blueprint.create" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "json": {
        "title": "Email Summarizer",
        "description": "Reads an email thread and produces a one-paragraph summary.",
        "status": "draft",
        "tags": ["email", "summarization"],
        "environment_variables": [],
        "blueprint_map": {
          "nodes": [
            {
              "id": "node-1",
              "type": "ai-prompt",
              "title": "Summarize Email",
              "config": {
                "prompt": "Summarize this email thread in one paragraph: {{email_body}}"
              }
            }
          ]
        }
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.iblueprint.ai/api/trpc/blueprint.create',
    {
      method: 'POST',
      headers: {
        Authorization: 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        json: {
          title: 'Email Summarizer',
          description: 'Reads an email thread and produces a one-paragraph summary.',
          status: 'draft',
          tags: ['email', 'summarization'],
          environment_variables: [],
          blueprint_map: {
            nodes: [
              {
                id: 'node-1',
                type: 'ai-prompt',
                title: 'Summarize Email',
                config: {
                  prompt: 'Summarize this email thread in one paragraph: {{email_body}}',
                },
              },
            ],
          },
        },
      }),
    }
  );

  const { result } = await response.json();
  const newBlueprint = result.data.json;
  console.log('Created blueprint:', newBlueprint.id);
  ```
</CodeGroup>

### Sample response

```json theme={null}
{
  "result": {
    "data": {
      "json": {
        "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "title": "Email Summarizer",
        "description": "Reads an email thread and produces a one-paragraph summary.",
        "status": "draft",
        "visibility": "private",
        "version": "1.0.0",
        "tags": ["email", "summarization"],
        "created_by": "user-uuid",
        "organization_id": "org-uuid",
        "created_at": "2024-12-01T10:00:00Z",
        "updated_at": "2024-12-01T10:00:00Z",
        "environment_variables": [],
        "blueprint_map": {
          "nodes": [
            {
              "id": "node-1",
              "type": "ai-prompt",
              "title": "Summarize Email",
              "config": {
                "prompt": "Summarize this email thread in one paragraph: {{email_body}}"
              }
            }
          ]
        }
      }
    }
  }
}
```

<Note>
  Blueprint limits are enforced per plan. If you have reached your blueprint limit, the API returns `HTTP 400` with a message indicating the limit has been exceeded.
</Note>
