Contacts

Submit a contact/lead to Webrocket. Successful requests create a Lead and queue a Task for processing and delivery to your configured Email Destinations.

POST/api/contact

Create a contact

Create a contact form submission.

Headers

  • Content-Type: application/json (required)
  • x-api-key: <YOUR_API_KEY> (required)

Body

  • Name
    name
    Type
    string
    Description

    Required. Contact’s name.

  • Name
    email
    Type
    string
    Description

    Required. Contact’s email address.

  • Name
    subject
    Type
    string
    Description

    Required. Brief subject for the inquiry.

  • Name
    description
    Type
    string
    Description

    Required. The message body.

  • Name
    phone
    Type
    string
    Description

    Optional phone number.

  • Name
    metadata
    Type
    object
    Description

    Optional object for any extra fields you want to log (UTMs, page slug, campaign, product ID, environment, etc.).
    Arbitrary keys are accepted and stored.

Request

POST
/api/contact
curl https://api.webrocket.app/api/contact     -H "Content-Type: application/json"     -H "x-api-key: YOUR_API_KEY"     -d '{
    "name": "Ada Lovelace",
    "email": "ada@example.com",
    "subject": "Partnership",
    "description": "We would love a demo.",
    "phone": "+61 400 000 000",
    "metadata": {
      "utm_source": "homepage",
      "utm_campaign": "spring-launch",
      "page": "/contact",
      "plan": "starter"
    }
  }'

Response (200)

{
  "success": true,
  "message": "Lead submitted and queued for processing",
  "leadId": "lead_01JABCDEF123",
  "taskId": "task_01JABCDEF123"
}

Error (400/401/500)

{
  "success": false,
  "error": "Missing required fields"
}

Was this page helpful?