Skip to content

Docs

Capture emails from an API

Use the public form endpoint from an app or server. A management API key is not required for signups.

Public signup

POST https://gathersprout.com/v1/public/forms/<public_id>/submissions with JSON. Send an Idempotency-Key header if you retry.

{
  "email": "[email protected]",
  "consent": true,
  "attributes": {
    "first_name": "Reader"
  },
  "context": {
    "page_url": "https://yoursite.com/signup",
    "offer": "Launch list"
  }
}

Every key under attributes must be a field the form itself defines, or the request is rejected with field is not accepted by this form. The example works once the form collects first_name. Everything under context is optional; values you leave out are stored as null or empty rather than guessed.

A valid request returns 202 with accepted true. For a new address, double opt-in stays on: the address is pending until they confirm the email.

Management keys

Create a gs_ key in workspace settings for server-side management API operations, including list and contact management. Never embed that key in a website or mobile app.

Related