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

# API Reference

## Create Entry

<mark style="color:green;">`POST`</mark> `https://api.robobot.app/client/entry/create/:id`

#### Path Parameters

| Name | Type   | Description     |
| ---- | ------ | --------------- |
| id   | string | ID of the form. |

#### Request Body

| Name      | Type   | Description                     |
| --------- | ------ | ------------------------------- |
| email     | string | E-mail of the entry contact.    |
| lastName  | string | Last name of the entry contact. |
| firstName | string | First name of the entry contact |

{% tabs %}
{% tab title="200 " %}

```
{
  accessCode: "XXXXXXXXXXXXXXX"
}
```

{% endtab %}
{% endtabs %}

## Get Form

<mark style="color:blue;">`GET`</mark> `https://api.robobot.app/client/form/get/:id`

Request this endpoint to retrieve the form data for a certain form\_id. allows you to get free cakes.

#### Path Parameters

| Name | Type   | Description                                |
| ---- | ------ | ------------------------------------------ |
| id   | string | ID of the cake to get, for free of course. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    form: {
        id: 1,
        title: "Mauris mattis",
        background: "#3a87fe",
        buttons: "#ffab01",
        description: "Mauris mattis mi eu suscipit mollis.",
        gaTrackingCode: null,
        image: null,
        allowOpenEntry: true,
        allowAnonymousEntry: true,
        updated: 1581677549
    },
    next: ...
}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "An error occured."}
```

{% endtab %}
{% endtabs %}

## Submit Answer

<mark style="color:blue;">`GET`</mark> `https://api.robobot.app/client/entry/submit/:id`

#### Path Parameters

| Name | Type   | Description     |
| ---- | ------ | --------------- |
| id   | string | ID of the form. |

#### Request Body

| Name        | Type   | Description                          |
| ----------- | ------ | ------------------------------------ |
| element\_id | number | 31 (input-number)                    |
| element\_id | string | "1" (input-options, single)          |
| element\_id | string | \["1","2"] (input-options, multiple) |
| element\_id | string | \[ ]  (static-text)                  |

{% tabs %}
{% tab title="200 Example response for static-text element." %}

```
{
    form: ...
    next: {
        id: 122
        title: "Mauris mattis mi eu suscipit mollis!"
        type: "static-text"
        params: {
            body: "Aliquam cursus leo ac fringilla congue. Cras elementum euismod malesuada. Donec mauris dui, commodo ac felis et, blandit efficitur enim."
        }
    },
}
```

{% endtab %}
{% endtabs %}
