Update a sign-up page

PATCH /api/v1/signup-pages/{id} Changes a sign-up page. Only the fields you send move — everything you omit stays exactly as it was, so publishing a page is a one-field call.

Authorization

Role in the organizationThis endpoint
OWNERAllowed
ADMINAllowed
MEMBERRefused — 403
A key carries the role its creator holds in this organization — never a role on AgentsMail itself. See API keys.

Path parameters

ParameterTypeDescription
idstringRequired. The page to change

Request body

Every field is optional, and each one has the same rules as at creation.
FieldTypeDescription
namestringInternal name, 1 to 100 characters
slugstringLast part of the public address. Changing it changes the address, and the old one stops answering
listIdstringAnother list of your organization
contentstringNew HTML. Must carry {{form}}, here as at creation
sourceTemplateNamestring | nullThe theme the HTML comes from. null says "pasted HTML, no theme"
heroTitlestringThe title visitors read
heroSubtitlestringEmpty string removes it
submitLabelstringLabel of the sign-up button
successMessagestringShown after a sign-up when there is no redirect
redirectUrlstringAn http:// or https:// address. Empty string removes the redirect
collectFirstNamebooleanWhether the form asks for a first name
collectLastNamebooleanWhether the form asks for a last name
statusstringdraft or published
json
{"status": "published"}

Example

bash
curl -X PATCH -H "x-api-key: $AGENTMAIL_API_KEY" -H "content-type: application/json" \
  -d '{"status":"published"}' \
  "https://www.agentsmail.io/api/v1/signup-pages/$SIGNUP_PAGE_ID"

Response

  • 200 OK — the page as it now stands, content included.
  • 400 Bad Request — a field is malformed, or the new HTML carries no {{form}}. When the shape is at fault, details carries the field-level issues.
  • 401 Unauthorized — missing or invalid key, or its owner left the organization.
  • 403 Forbidden — the key's owner is a member of the organization, not an admin.
  • 404 Not Found — no such page, or it belongs to another organization — and the same answer when listId names a list that is not yours. Nothing was changed.
  • 409 Conflict — another page already holds the slug you asked for; the message names it.
  • 429 Too Many Requests — the key is over its rate limit.

Response fields

Identical to Get a sign-up page: the full page, with the fields you changed already applied.

Agent recipe

Changing the theme rewrites the HTML, so send both fields together — otherwise the page keeps claiming a theme it no longer uses:
js
const theme = (await get('/api/v1/signup-page-templates')).data.find(
  (t) => t.name === 'Editorial'
)

await patch(`/api/v1/signup-pages/${pageId}`, {
  content: theme.content,
  sourceTemplateName: theme.name,
})
Pasting your own HTML is the same call with sourceTemplateName: null.

Notes

  • Unpublishing is {"status": "draft"}. The address stops answering immediately; the contacts already collected are untouched, they belong to the list.
  • Changing slug breaks every link already published to the old address. Nothing redirects.
  • Moving a page to another list does not move the contacts it already collected.