Skip to main content
POST
/
lists
/
portal_session
Create a portal session URL for a contact to manage their mailing list subscripitons
curl --request POST \
  --url https://api.indiepitcher.com/v1/lists/portal_session \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contactEmail": "[email protected]",
  "returnURL": "https://example.com/projects/123456/notification_settings"
}
'
{
  "success": true,
  "data": {
    "url": "https://api.indiepitcher/lists/session/jk3434kj34j43jk3k3h433g",
    "expiresAt": "2024-08-28T08:39:17.887Z",
    "returnURL": "https://example.com/projects/123456/notification_settings"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
contactEmail
string
required

The email of a contact in your project's contact list, who to create the portal session for.

returnURL
string
required

URL to redirect the user to when they tap on that they're cone editing their lists, or when the session is expired.

Example:

"https://example.com/projects/123456/notification_settings"

Response

200 - application/json

The URL to redirect your user to, and the expiration date of the session.

success
boolean
data
object