# Publish a form

Opens the public door on one form: it starts answering at its slug and a stranger holding the link can file it. Workspace admin, because publishing opens a door strangers walk through.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/forms/{id}/publish`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {},
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "createdAt": "string",
    "createdBy": "string",
    "description": "string",
    "fields": [
      {
        "column": "string",
        "documentType": "string",
        "entityType": "string",
        "id": "",
        "kind": "string",
        "label": "string",
        "options": "string",
        "placeholder": "string",
        "required": "string"
      }
    ],
    "id": "",
    "name": "string",
    "publishedAt": "string",
    "sections": [
      {
        "fieldIds": "string",
        "title": "string"
      }
    ],
    "settings": {
      "analytics": true,
      "automations": [
        "string"
      ],
      "branding": "string",
      "pacing": "string",
      "postSubmit": "string",
      "saveDrafts": true,
      "signature": "string",
      "theme": "string"
    },
    "slug": "string",
    "sourceUrl": "string",
    "stats": {
      "submissions": 1,
      "views": 1
    },
    "status": "string",
    "targetDefinitionKey": "string",
    "updatedAt": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
