> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manypi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get form embed code

> The live URL, the HTML snippet for a website, and a prompt for a coding agent. With lead_id, a signed personal link that attaches the response to that

`GET /api/forms/{id}/embed`, API key scope `read`. Also available as the `get_form_embed_code` MCP tool.

The live URL, the HTML snippet for a website, and a prompt for a coding agent. With `lead_id`, a signed personal link that attaches the response to that lead.

| Parameter | In | Description |
| - | - | - |
| `id` | path | Form uuid, public id or key |
| `mode` | query | inline (default), popup, slider, popover, sidetab |
| `button` | query | Button text for non-inline modes |
| `lead_id` | query | A lead id for a personal link |

## Example

```bash theme={null}
curl "https://app.manypi.com/api/forms/{id}/embed" \
  -H "Authorization: Bearer $MANYPI_API_KEY"
```

## Response

```json theme={null}
{ "url": "https://…/to/Ab3dE9xZ", "snippet": "<div data-manypi-form=…>…</div>", "scriptUrl": "https://embed.usemanypi.eu/v1.js", "credit": true, "agentPrompt": "Add the ManyPI form …", "leadLink": null }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.