Integrate PlaneMail programmatically using our API.
All API requests must be authenticated using an API key. Pass your API key as a Bearer token in the Authorization
header.
Authorization: Bearer YOUR_API_KEY
You can generate and manage your API keys from the Integrations page (requires login) . Keep your API keys secure and do not share them publicly.
/api/v1/subscribers
Adds a new subscriber to your list.
Header | Description |
---|---|
Authorization | Bearer token containing your API key. Example: Bearer YOUR_API_KEY |
Content-Type | application/json |
{
"email": "subscriber@example.com", // Required, must be a valid email
"name": "John Doe", // Optional, string
"status": "active", // Optional, 'active' | 'unsubscribed' | 'pending' | 'bounced'
// Defaults to 'active' if not provided
"segmentNames": ["Segment Name 1"] // Optional, array of existing segment names
}
If segmentNames
are provided, the subscriber will be added to those existing segments. Segments that do not exist for your account will be ignored.
{
"message": "Subscriber added successfully.",
"subscriberId": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
}
details
field in the response for more information.