# Create reusable survey template with custom questions
URL: /docs/api-reference/micro-surveys-nps/createSurvey

## POST `/api/v1/public/surveys`

**Summary:** Create reusable survey template with custom questions
**Operation ID:** `createSurvey`

Configures a responsive web survey template supporting NPS (0-10), CSAT (1-5), star ratings, multiple choice, and open-ended feedback.

**Authentication:** `X-Api-Key: sk_live_...` or `Authorization: Bearer sk_live_...`

### Request Body (`application/json`)

```json
{
  "type": "object",
  "required": [
    "title",
    "questions"
  ],
  "properties": {
    "title": {
      "type": "string",
      "example": "Customer Satisfaction Survey"
    },
    "description": {
      "type": "string",
      "example": "How was your experience today?"
    },
    "surveyType": {
      "type": "string",
      "enum": [
        "NPS_1_TO_10",
        "CSAT_1_TO_5",
        "CUSTOM"
      ],
      "default": "NPS_1_TO_10"
    },
    "questions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "type",
          "label"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "nps_q1"
          },
          "type": {
            "type": "string",
            "enum": [
              "NPS_1_TO_10",
              "RATING_STARS",
              "SINGLE_CHOICE",
              "MULTIPLE_CHOICE",
              "TEXT",
              "YES_NO"
            ]
          },
          "label": {
            "type": "string",
            "example": "How likely are you to recommend us to a friend?"
          },
          "required": {
            "type": "boolean",
            "default": true
          }
        }
      }
    }
  }
}
```

### Responses

- **`201`**: Survey template created

```json
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "example": "success"
    },
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "title": {
          "type": "string"
        },
        "surveyType": {
          "type": "string"
        }
      }
    }
  }
}
```
- **`401`**: Authentication failed or API key missing