---
title: "Get code completions based on given input"
method: POST
path: "/api/lsp/compile"
tags: ["LSP"]
---

# Get code completions based on given input

`POST /api/lsp/compile`

## Request body

- CompletionDto
  - `editorValue` string, required — Editor input value for which the completion is required
  - `params` object, required — Parameters required for completion

## Response `200`

Successfully fetched the completion list.

## Other responses

- `400` — Failed to fetch the completion list.

## Changes

- **2023-10-20** `bbfe1dbc457f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/openwebgal/apis/webgal-terre-api/changes/api/lsp/compile/post.md)

---

[API](https://skmtc.dev/openwebgal/apis/webgal-terre-api.md) · [All operations](https://skmtc.dev/openwebgal/apis/webgal-terre-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openwebgal/webgal-terre-api/revisions/be5308d4e905/schema)
