Markus Michalski FAQ

Contact Requests: Admin API

Sylius Contact Requests Plugin - admin-authenticated REST API for reading stored contact requests, endpoints, example requests, error format

Deutsche Version

Back to overview

Contact Requests: Admin API

Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net

No public Shop API. Stored contact requests contain personal data. The plugin therefore exposes them only through an API with admin authentication, not through a public Shop API as is usual for plugins with visible storefront features.

Endpoints

Method Path Description
GET /api/v2/admin/contact-requests List of every stored request, newest first
GET /api/v2/admin/contact-requests/{id} A single request

Both endpoints require ROLE_API_ACCESS, the same permission as any other Sylius Admin API resource. You authenticate with the regular Admin API token (POST /api/v2/admin/administrators/token).

Example request

curl -H "Authorization: Bearer $ADMIN_API_TOKEN" \
     https://shop.example.com/api/v2/admin/contact-requests

Example response (shortened, in API Platform's Hydra format):

{
  "member": [
    {
      "id": 42,
      "createdAt": "2026-10-09T08:15:00+00:00",
      "name": "Jane Doe",
      "email": "jane@example.com",
      "subject": "Question about delivery time",
      "message": "...",
      "consent": true
    }
  ],
  "totalItems": 1
}

Error format

The standard API Platform error format applies (Hydra/Problem Details). A missing or wrong token gives 401, a token without ROLE_API_ACCESS gives 403, an unknown id gives 404. The JSON has the same shape as for any other Sylius Admin API resource.