> For the complete documentation index, see [llms.txt](https://docs.garryhost.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.garryhost.com/api/send-action.md).

# Send action

### Send power action <a href="#send-power-action" id="send-power-action"></a>

```php
curl "https://garry.host/api/client/servers/<id>/power" \
  -H "Authorization: Bearer api" \
  -H "Content-Type: application/json" \
  -H "Accept: Application/vnd.pterodactyl.v1+json" \
  -X POST \
  -d '{ "signal": "start" }'
```

This endpoint sends a power signal to the server.

You are required to add the `Accept: Application/vnd.pterodactyl.v1+json` and `Content-Type: application/json`headers for this endpoint.

If successful, there will be an empty response body.

#### HTTP Request <a href="#http-request-5" id="http-request-5"></a>

`POST https://garry.host/api/client/servers/<ID>/power`

#### URL Parameters <a href="#url-parameters-4" id="url-parameters-4"></a>

| Parameter | Description                                      |
| --------- | ------------------------------------------------ |
| ID        | The ID of the server that you are requesting.    |
| signal    | The power signal you want to send to the server. |

#### Power Signals <a href="#power-signals" id="power-signals"></a>

| Signal  | Description                                                   |
| ------- | ------------------------------------------------------------- |
| start   | Sends the startup command to the server.                      |
| stop    | Sends the stop command to the server.                         |
| restart | Stops the server then immediately starts it straight after.   |
| kill    | Instantly ends all processes and marks the server as stopped. |

&#x20;Sending the `kill` power signal will forcefully kill the server process and can cause corruption in files, only use it as a last resort.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.garryhost.com/api/send-action.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
