# Submit a form

**Publié le** : 2026-05-12
**Catégorie** : Forms & Reviews

## `POST /forms/:slug/submit`

**Submit a form**

Submit a form by slug. Requires spam protection: include the
honeypot field (empty) and a client-set ISO 8601 `timestamp`, OR a
reCAPTCHA token, depending on the site's `GET /spam-settings`
configuration. Returns the created submission with its `id` and
the form's configured `confirmationMessage`. Status code: 201.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `slug` | path | string | Yes | URL-friendly identifier, unique per site and locale |


### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object | Yes | Required. Resource data object |
| `honeypot` | string | No |  |
| `recaptchaToken` | string | No |  |
| `session_id` | string | No |  |
| `visitor_id` | string | No | 8-64 characters |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `404` | Not found |
| `422` | Validation error |


> **Notes:** Spam protection: see top-level `x-spam-protection`. Rate-limit
> bucket: public-submit (~30 rpm per IP). On spam rejection: 403. On
> validation failure: 422.

### Examples

```curl
curl -X POST "https://api.lynkow.com/public/{siteId}/forms/contact/submit" \
  -H "Content-Type: application/json" \
  -d '{ "data": { "email": "anna.cooper@example.com", "message": "Hi" }, "honeypot": "", "timestamp": "2026-05-12T14:32:18.000Z" }'
```

```javascript
await fetch(`https://api.lynkow.com/public/${siteId}/forms/contact/submit`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    data: { email: 'anna.cooper@example.com', message: 'Hi' },
    honeypot: '',
    timestamp: new Date().toISOString(),
  }),
})
```

### Response Example

```json
"{\n  \"data\": {\n    \"id\": \"01J9X6P4ZTQ9XQVA3F2K8N7H5R\",\n    \"formId\": \"01J9Q7B1H6KQ5VFA2DKW8R3X0Z\",\n    \"submittedAt\": \"2026-05-12T14:32:18.512Z\",\n    \"status\": \"received\",\n    \"values\": {\n      \"email\": \"anna.cooper@example.com\",\n      \"message\": \"Hi, I'd love to learn more about your enterprise tier.\"\n    },\n    \"confirmationMessage\": \"Thanks, we got your message and will reply within 24 hours.\"\n  }\n}\n"
```

---