The WP SSR Framework exposes two public-facing form endpoints underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Ahondev/portfolio-v2/llms.txt
Use this file to discover all available pages before exploring further.
/api/v1/. Neither requires authentication. On success each endpoint validates the payload with the built-in RequestValidator and dispatches a Markdown-formatted Telegram message via TelegramNotificationService. All validation errors return a structured 422 response with per-field messages so the frontend can display inline feedback without any extra parsing logic.
POST /api/v1/contact
Submits a general contact enquiry. Use this for short inbound messages where the visitor describes their project type and leaves a free-text message.
Base URL (with rewrites): POST /api/v1/contactBase URL (without rewrites):
POST /wp-json/api/v1/contact
Request body
Full name of the sender. Must be between 2 and 100 characters.
A valid email address. Maximum 255 characters. Validated with
FILTER_VALIDATE_EMAIL.Optional phone number. When provided it must match the pattern
/^[0-9+\s]{10,}$/ (digits, +, and spaces, at least 10 characters total).Short description of the project type (e.g.
"Site vitrine", "Application mobile"). Maximum 200 characters.The visitor’s message. Must be between 10 and 2 000 characters.
Responses
true on a successful submission.HTTP status code echoed in the body.
200 on success.Example request
Side effects
Telegram notification — A Markdown message is dispatched to the configured chat (see Telegram notifications below). No WordPress post is created by this endpoint.POST /api/v1/devis
Submits a detailed project quote request. This endpoint collects structured budget, deadline, and urgency data on top of the basic contact fields — ideal for a multi-step quote form.
Base URL (with rewrites): POST /api/v1/devisBase URL (without rewrites):
POST /wp-json/api/v1/devis
Request body
Sender’s first name. Between 2 and 100 characters.
Sender’s last name. Between 2 and 100 characters.
A valid email address. Maximum 255 characters.
Phone number. Required for quote requests (unlike
/contact where it is optional). Must match /^[0-9+\s]{10,}$/.Company or organisation name. Optional. Maximum 150 characters.
Category of the project (e.g.
"E-commerce", "Application SaaS"). Maximum 200 characters.Estimated budget range as a string (e.g.
"5 000 – 10 000 €"). Maximum 100 characters.Target delivery timeline (e.g.
"3 mois", "Q1 2026"). Maximum 100 characters.Urgency level (e.g.
"Normal", "Urgent"). Maximum 50 characters.Detailed description of the main requirements. Between 10 and 2 000 characters.
Responses
The response envelope is identical to/contact.
Example success response
Example request
Side effects
Telegram notification — A Markdown message is dispatched with the full quote details. No WordPress post is created by this endpoint.Validation system
Both endpoints use a lightweight validation pipeline built into the framework:ApiRequest— abstract base class. Its staticvalidate()method extractsget_params()from theWP_REST_Request, delegates toRequestValidator, and returns only the fields that have declared rules (unknown keys are stripped automatically).RequestValidator— pure-PHP rule engine. Rules are declared as a pipe-separated string (e.g.'required|string|min:2|max:100'). Supported rules:required,string,email,min:<n>,max:<n>,phone,numeric,integer,boolean,in:<a,b,c>,not_in:<a,b>,confirmed,url,ip,date,regex:<pattern>.ValidationException— thrown when errors exist. Carries the full[field => [messages]]map and sets HTTP code422.
The
nullable modifier causes the validator to skip all further rules when the field is absent or empty. This is how phone is optional on /contact but still validated when present.Telegram notifications
TelegramNotificationService::sendNotification(string $message) calls the Telegram Bot API using WordPress’s built-in wp_remote_post(). Two environment variables must be set:
| Variable | Description |
|---|---|
TELEGRAM_BOT_TOKEN | The token issued by @BotFather |
TELEGRAM_CHAT_ID | The numeric ID of the target chat or channel |
parse_mode: Markdown, so the notification text uses *bold* formatting for field labels.
/contact notification looks like this in Telegram: