BlueSuite API

Requests API

Create customer requests programmatically

The Requests API allows you to create customer requests in BlueSuite programmatically. This is typically used for integrations with external systems like WordPress plugins.

Create Request

POST /api/requests

Authentication: Requires the internal WordPress API key.

Request Body

FieldTypeRequiredDescription
workspace_idnumberYesYour workspace ID
namestringNoFull name (parsed into first/last)
first_namestringNoCustomer's first name
last_namestringNoCustomer's last name
emailstringConditionalEmail (required if no phone)
phonestringConditionalPhone (required if no email)
messagestringNoRequest details/message
streetstringNoStreet address
street_2stringNoUnit/Suite number
citystringNoCity
statestringNoState/Province
postal_codestringNoZIP/Postal code
countrystringNoCountry

Example Request

curl -X POST https://app.bluesuite.com/api/requests \
  -H "Authorization: Bearer YOUR_WP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": 123,
    "first_name": "John",
    "last_name": "Smith",
    "email": "john@example.com",
    "phone": "555-123-4567",
    "message": "I need window cleaning service",
    "street": "123 Main St",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94102"
  }'

Success Response

{
  "id": 456,
  "number": "REQ-2024-0042",
  "contact_id": 789,
  "property_id": 101,
  "workspace_id": 123,
  "details": "I need window cleaning service",
  "status": "new",
  "created_at": "2024-01-15T10:30:00.000Z"
}

Error Responses

StatusDescription
400Invalid request body
401Unauthorized (missing/invalid API key)
404Workspace not found
500Server error

Behavior

When a request is created:

  1. Contact handling: A contact is created or matched by email/phone
  2. Property creation: If address fields are provided, a property is created
  3. Linking: The property is linked to the contact
  4. Request creation: The request is created with an auto-generated number
  5. Webhooks: Any subscribed new_request webhooks are triggered

Alternative: Embedded Forms

For website integrations, consider using the Embedded Forms API instead:

  • Uses standard API key authentication
  • Designed for client-side use
  • Includes spam prevention
  • Better suited for public-facing forms

On this page