> For the complete documentation index, see [llms.txt](https://deskpro.gitbook.io/dev-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deskpro.gitbook.io/dev-guide/getting-started-with-the-api/php.md).

# PHP

Welcome to the Deskpro API. This section will guide you through creating an article form with PHP, from start to finish.

The first step is to create an [API Key](/dev-guide/api-basics/auth/api-keys.md). Go to *Admin > Apps > API Keys* to create an API Key for yourself.

Next:

1. Create a new directory on your computer
2. Use [composer](https://getcomposer.org) to create a new project
3. Use composer to install the [PHP API Client](https://github.com/deskpro/deskpro-api-client-php)
4. Create an empty `form.php` file

For example, from the command-line it might look something like this:

```bash
$ mkdir article-form
$ cd article-form/
$ composer init -n --name example/article-form
$ composer require deskpro/deskpro-api-client-php
$ touch form.php
```


---

# 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://deskpro.gitbook.io/dev-guide/getting-started-with-the-api/php.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.
