---
title: "Send async message"
method: POST
path: "/session/{sessionID}/prompt_async"
---

# Send async message

`POST /session/{sessionID}/prompt_async`

Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.

## Path parameters

- `sessionID` string, required

## Query parameters

- `directory` string

## Request body

- object
  - `messageID` string
  - `model` object
    - `providerID` string, required
    - `modelID` string, required
  - `agent` string
  - `noReply` boolean
  - `tools` object — @deprecated tools and permissions have been merged, you can set permissions on the session itself now
  - `format` union
    - OutputFormatText
      - `type` 'text', required
    - OutputFormatJsonSchema
      - `type` 'json_schema', required
      - `schema` JSONSchema, required
      - `retryCount` integer
  - `system` string
  - `variant` string
  - `excludeHistory` boolean
  - `parts` union[], required
    - union
      - TextPartInput
        - `id` string
        - `type` 'text', required
        - `text` string, required
        - `synthetic` boolean
        - `ignored` boolean
        - `time` object
          - `start` number, required
          - `end` number
        - `metadata` object
      - FilePartInput
        - `id` string
        - `type` 'file', required
        - `mime` string, required
        - `filename` string
        - `url` string, required
        - `source` union
          - FileSource
            - `text` FilePartSourceText, required
              - …
            - `type` 'file', required
            - `path` string, required
          - SymbolSource
            - `text` FilePartSourceText, required
              - …
            - `type` 'symbol', required
            - `path` string, required
            - `range` Range, required
              - …
            - `name` string, required
            - `kind` integer, required
          - ResourceSource
            - `text` FilePartSourceText, required
              - …
            - `type` 'resource', required
            - `clientName` string, required
            - `uri` string, required
      - AgentPartInput
        - `id` string
        - `type` 'agent', required
        - `name` string, required
        - `source` object
          - `value` string, required
          - `start` integer, required
          - `end` integer, required
      - SubtaskPartInput
        - `id` string
        - `type` 'subtask', required
        - `prompt` string, required
        - `description` string, required
        - `agent` string, required
        - `model` object
          - `providerID` string, required
          - `modelID` string, required
        - `command` string

## Response `204`

Prompt accepted

## Other responses

- `400` — Bad request
- `404` — Not found

---

[API](https://skmtc.net/cyberstrikeus/apis/cyberstrike.md) · [All operations](https://skmtc.net/cyberstrikeus/apis/cyberstrike/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cyberstrikeus/cyberstrike/versions/4e11f1aed2fd/schema)
