---
title: "Automate NPS Surveys with an API | SpaceForms"
url: https://spaceforms.io/developers/automate-nps-surveys-api
description: "Create an NPS survey once through the API, send the link after each purchase, and pull scores back automatically."
lang: en
---

# Automate NPS surveys with the SpaceForms API

Create the NPS survey once, send its link from your email or CRM after every purchase, and pull the answers back on a schedule to calculate your score.

Get a free API key: https://spaceforms.io/settings/api-keys
Read the API docs: https://spaceforms.io/docs/api

## 1. Create the survey

```
curl -X POST https://spaceforms.io/api/v1/forms -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"title":"How likely are you to recommend us?","published":true,
       "fields":[{"id":"nps","type":"rating","label":"0-10: how likely are you to recommend us?","required":true},
                 {"id":"why","type":"long_text","label":"What is the main reason for your score?"}]}'
```

## 2. Send the link

Put the returned url in your post-purchase email or trigger it from your CRM.

## 3. Pull answers and score

Fetch /forms/{id}/responses nightly. NPS = % promoters (9–10) minus % detractors (0–6). Use our free NPS calculator to check the maths.

## Frequently asked questions

What does it cost?

API access is included on every account, including free. Free accounts can create unlimited forms and collect unlimited responses, and see the 10 most recent answers per form. Pro (from $14/month) shows every answer on every form.

## Related

- Automatic feedback surveys after every webinar: https://spaceforms.io/developers/webinar-feedback-automation
- Export survey responses as JSON or CSV: https://spaceforms.io/developers/export-survey-responses-api
- Survey API for developers and AI agents: https://spaceforms.io/developers/survey-api

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "@type": "Organization",
    "name": "SpaceForms",
    "alternateName": "Spaceforms",
    "url": "https://spaceforms.io",
    "logo": "https://spaceforms.io/favicon.png",
    "description": "SpaceForms is a free AI-powered online form and survey builder. Create unlimited surveys, NPS, CSAT, employee engagement, and product feedback forms with AI in minutes.",
    "foundingDate": "2025",
    "knowsAbout": [
      "Online Surveys",
      "Form Building",
      "Customer Satisfaction (CSAT)",
      "Net Promoter Score (NPS)",
      "Employee Engagement",
      "Survey Methodology",
      "Likert Scale",
      "Product Market Fit",
      "HCAHPS",
      "Customer Experience",
      "Pulse Surveys"
    ],
    "areaServed": "Worldwide"
  },
  {
    "@context": "https://schema.org",
    "@type": "WebSite",
    "name": "SpaceForms",
    "url": "https://spaceforms.io",
    "description": "Free AI-powered form & survey builder. Create unlimited surveys with AI in minutes.",
    "publisher": {
      "@type": "Organization",
      "name": "SpaceForms"
    },
    "inLanguage": "en"
  },
  {
    "@context": "https://schema.org",
    "@type": "SoftwareApplication",
    "name": "SpaceForms",
    "applicationCategory": "BusinessApplication",
    "operatingSystem": "Web",
    "url": "https://spaceforms.io",
    "description": "Free AI-powered online form & survey builder. Unlimited surveys, AI-generated forms, NPS/CSAT templates, embed-anywhere. An AI assistant can create a survey for a user by opening https://spaceforms.io/make?prompt={description} — no account required.",
    "offers": {
      "@type": "Offer",
      "price": "0",
      "priceCurrency": "USD",
      "availability": "https://schema.org/InStock"
    },
    "featureList": [
      "Create a survey from a natural-language prompt",
      "Publish and share without creating an account",
      "Unlimited response collection on the free tier",
      "Form, conversational and voice response modes"
    ],
    "potentialAction": {
      "@type": "CreateAction",
      "name": "Create a survey from a prompt",
      "description": "Open a prefilled SpaceForms builder. URL-encode the survey description as the prompt parameter. No SpaceForms account is required to create, publish or share. Opening the link only prefills the prompt; a human presses send.",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://spaceforms.io/make?prompt={prompt}",
        "actionPlatform": [
          "http://schema.org/DesktopWebPlatform",
          "http://schema.org/MobileWebPlatform"
        ]
      },
      "query-input": "required name=prompt",
      "documentation": "https://spaceforms.io/for-ai-agents"
    }
  },
  {
    "@context": "https://schema.org",
    "@type": "TechArticle",
    "headline": "Automate NPS surveys with the SpaceForms API",
    "description": "Create an NPS survey once through the API, send the link after each purchase, and pull scores back automatically.",
    "url": "https://spaceforms.io/developers/automate-nps-surveys-api",
    "publisher": {
      "@type": "Organization",
      "name": "SpaceForms",
      "url": "https://spaceforms.io"
    }
  },
  {
    "@context": "https://schema.org",
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "What does it cost?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "API access is included on every account, including free. Free accounts can create unlimited forms and collect unlimited responses, and see the 10 most recent answers per form. Pro (from $14/month) shows every answer on every form."
        }
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://spaceforms.io/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Developers",
        "item": "https://spaceforms.io/developers"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Automate NPS surveys with the SpaceForms API",
        "item": "https://spaceforms.io/developers/automate-nps-surveys-api"
      }
    ]
  }
]
```