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 organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Required. The page to change |
Request body
Every field is optional, and each one has the same rules as at creation.| Field | Type | Description |
|---|---|---|
name | string | Internal name, 1 to 100 characters |
slug | string | Last part of the public address. Changing it changes the address, and the old one stops answering |
listId | string | Another list of your organization |
content | string | New HTML. Must carry {{form}}, here as at creation |
sourceTemplateName | string | null | The theme the HTML comes from. null says "pasted HTML, no theme" |
heroTitle | string | The title visitors read |
heroSubtitle | string | Empty string removes it |
submitLabel | string | Label of the sign-up button |
successMessage | string | Shown after a sign-up when there is no redirect |
redirectUrl | string | An http:// or https:// address. Empty string removes the redirect |
collectFirstName | boolean | Whether the form asks for a first name |
collectLastName | boolean | Whether the form asks for a last name |
status | string | draft 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,contentincluded.400 Bad Request— a field is malformed, or the new HTML carries no{{form}}. When the shape is at fault,detailscarries the field-level issues.401 Unauthorized— missing or invalid key, or its owner left the organization.403 Forbidden— the key's owner is amemberof the organization, not anadmin.404 Not Found— no such page, or it belongs to another organization — and the same answer whenlistIdnames a list that is not yours. Nothing was changed.409 Conflict— another page already holds theslugyou 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,
})sourceTemplateName: null.
Notes
- Unpublishing is
{"status": "draft"}. The address stops answering immediately; the contacts already collected are untouched, they belong to the list. - Changing
slugbreaks every link already published to the old address. Nothing redirects. - Moving a page to another list does not move the contacts it already collected.