---
search:
  tags:
    - agents
    - POST
seo:
  description: >-
    Create dispatch pile. Reference for the POST /dispatch/pile endpoint in the
    Pile API.
sidebar:
  label: Create dispatch pile
  badge: POST
title: Create dispatch pile
type: openapi-operation
---
`POST /dispatch/pile`

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

- `sessionId` (string)
- `agent` (string)
- `organizationId` (string, required)
- `issue` (object, required)
- `profile` (object | null)
- `conversationKey` (string | null)

Request body example:

```json
{
  "sessionId": "string",
  "agent": "string",
  "organizationId": "string",
  "issue": {
    "id": "string",
    "identifier": "string",
    "title": "string",
    "description": "string",
    "repo": "string",
    "branch": "string",
    "status": "string",
    "priority": 0,
    "labelIds": [
      "string"
    ],
    "property1": null,
    "property2": null
  },
  "profile": {
    "slug": "string",
    "name": "string",
    "jobSpec": "string",
    "toolScope": "string",
    "providerAgentId": "string",
    "model": "string",
    "prompt": "string",
    "property1": null,
    "property2": null
  },
  "conversationKey": "string"
}
```

**Responses**

- `200` — Dispatch admitted — conversationId is the session id
- `401` — Invalid dispatch token

Response example, 200:

```json
{
  "ok": true,
  "conversationId": "string"
}
```
