What Custom API / Webhook is for
Custom API / Webhook is useful for custom websites, internal CMS systems, or technical publishing workflows. It lets Serpy send article content to an endpoint your team controls. This can be useful for:- custom-built websites
- internal publishing systems
- headless CMS workflows
- developer-managed websites
- custom content pipelines
Who should use it
Use Custom API / Webhook if you have a developer or technical team that can receive and process content. If you use WordPress, Shopify, Webflow, Wix, Framer, Sanity, or Supabase, a standard CMS integration may be easier.How the publishing flow works
The flow is simple:- You add an endpoint URL in Serpy.
- You choose the authentication type if needed.
- You save and test the connection.
- When you publish from the Content Editor, Serpy sends the article data to your endpoint.
- Your system receives the request.
- Your system creates, updates, stores, or publishes the content.
Endpoint URL
The endpoint URL is the URL Serpy will send the publish request to. Example:https://example.com/api/serpy/publish
Your endpoint should accept a POST request.
Method
Serpy sends aPOST request to your endpoint.
Your endpoint should be prepared to receive JSON.
Headers
Serpy sends the request as JSON. Typical headers include:Content-Type: application/json
Authentication
Authentication helps protect your endpoint. Depending on your setup, you may use options such as:- no authentication
- bearer token
- API key
- custom header
Publish payload
When an article is published, Serpy sends article data to your endpoint. The payload may include fields such as:- article title
- slug
- HTML content
- plain text or markdown content when available
- meta title
- meta description
- featured image URL
- additional image URLs
- publish status
- scheduled date when available
- website ID
- article ID
- content type
Scheduled content
If the article is scheduled, Serpy may include a scheduled date. Your system can use that date to schedule the post or store it as a draft until the publish time. Example:Expected response
Your endpoint should return a success response when the content is received. A successful response should use a2xx status code.
Example response:
external_id and url are useful if your system creates a post and wants to return the created page details.
Error response
If your system cannot accept the content, return an error response. Example:Testing the connection
Before publishing real content, test the connection. Testing helps confirm that:- Serpy can reach your endpoint
- authentication works
- your endpoint accepts JSON
- your system can process the request
- the response format is valid
What your system should do with the content
Your system can decide how to handle the article. Common options include:- create a draft post
- publish immediately
- schedule for later
- store the article in a database
- send the article into an approval workflow
- map the content into a headless CMS