---
search:
  tags:
    - agents
    - POST
seo:
  description: >-
    Create a guidance pack. scope=workspace applies to every lane;… Reference
    for the POST /workspaces/{organizationId}/agent/guidance endpoint in the
    Pile API.
sidebar:
  label: Create agent guidance
  badge: POST
title: Create agent guidance
type: openapi-operation
---
Create a guidance pack. scope=workspace applies to every lane; team/status/step packs match scopeKey against the issue's teamId, its workflow status, and the session's stepKey.

`POST /workspaces/{organizationId}/agent/guidance`

**Request body** (`application/json`)

- `name` (string, required)
- `scope` (string, required)
- `scopeKey` (string | null)
- `body` (string, required)
- `links` (object[])

Request body example:

```json
{
  "name": "string",
  "scope": "workspace",
  "scopeKey": "string",
  "body": "string",
  "links": [
    {
      "label": "string",
      "url": "string"
    }
  ]
}
```

**Responses**

- `201` — Guidance pack created (version 1)

Response example, 201:

```json
{
  "id": "string",
  "organizationId": "string",
  "name": "string",
  "scope": "workspace",
  "scopeKey": "string",
  "body": "string",
  "links": [
    {
      "label": "string",
      "url": "string"
    }
  ],
  "version": 0,
  "createdBy": "string",
  "updatedBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```
