Developer Reference
SocialMGR API
A bearer-token REST API over the whole service desk. Everything you can do in the panel, you can automate here.
Authentication
Every request needs a bearer token in the Authorization header. A store owner mints one in the admin panel under Settings → API Tokens. Tokens start with vlt_ and are shown once.
curl https://social-demo.scriptgain.com/api/v1/tickets \
-H "Authorization: Bearer vlt_your_token_here" \
-H "Accept: application/json"
Conventions
- Base URL
- https://social-demo.scriptgain.com/api/v1
- Format
- JSON request + response bodies. Send Accept: application/json.
- Pagination
- List endpoints return a paginator. Use ?per_page=25 (max 100) and ?page=N.
- Filtering
- Most lists accept ?q= for search and resource-specific filters (see each endpoint).
- Rate limit
- 120 requests per minute per token. Exceeding it returns 429 with X-RateLimit headers.
- Errors
- 401 unauthenticated, 403 forbidden, 404 not found, 422 validation (with an errors object), 429 rate limited.
- Money
- Amounts are read as integer cents plus a formatted string. Totals are never writable over the API.
Service Requests
Incoming requests captured from the intake form or logged by staff.
/service-requests
List service requests
Query: q, per_page, page, status, priority
/service-requests/{id}
Retrieve a service request
/service-requests
Create a service request
Body: name, email, phone?, subject, description?, service_id?, priority?, address?
/service-requests/{id}
Update a service request
/service-requests/{id}
Delete a service request
/service-requests/{id}/convert-ticket
Convert into a ticket
/service-requests/{id}/convert-work-order
Convert into a work order
/service-requests/{id}/close
Close the request
Response fields
Tickets
The service-desk conversation. Replies may be public or internal staff notes.
/tickets
List tickets
Query: q, per_page, page, status, priority, assigned_user_id, customer_id
/tickets/{id}
Retrieve a ticket
/tickets
Create a ticket
Body: subject, description?, customer_id?, priority?, assigned_user_id?
/tickets/{id}
Update a ticket
/tickets/{id}
Delete a ticket
/tickets/{id}/replies
List replies
Query: include_internal
/tickets/{id}/replies
Post a reply
Body: body, is_internal?
/tickets/{id}/status
Change status
Body: status
/tickets/{id}/assign
Assign a technician
Body: assigned_user_id
/tickets/{id}/work-order
Spawn a work order from this ticket
Body: title?, scheduled_at?
Response fields
Work Orders
Scheduled service visits. Completing one generates an invoice.
/work-orders
List work orders
Query: q, per_page, page, status, upcoming
/work-orders/{id}
Retrieve a work order
/work-orders
Create a work order
Body: customer_id?, title, scheduled_at?, duration_minutes?, assigned_user_id?, address?, items[] {service_id?, name, quantity, unit_price}
/work-orders/{id}
Update a work order
/work-orders/{id}
Delete a work order
/work-orders/{id}/status
Change status
Body: status
/work-orders/{id}/complete
Mark complete and generate an invoice
/work-orders/{id}/cancel
Cancel the work order
Body: reason?
/work-orders/{id}/reschedule
Reschedule
Body: scheduled_at, duration_minutes?
Response fields
Projects
Engagements that group tickets and work orders.
/projects
List projects
Query: q, per_page, page, status
/projects/{id}
Retrieve a project
/projects
Create a project
Body: name, description?, customer_id?, assigned_user_id?, starts_on?, due_on?, status?
/projects/{id}
Update a project
/projects/{id}
Delete a project
/projects/{id}/status
Change status
Body: status
Response fields
Invoices
Read-only view of invoices (the billable orders behind work orders).
/invoices
List invoices
Query: q, per_page, page, financial_status
/invoices/{id}
Retrieve an invoice
Response fields
Services
Read-only catalog of the services offered.
/services
List services
Query: q, per_page, page
/services/{id}
Retrieve a service
Response fields
Booking Types
The kinds of appointment offered, with durations and pricing.
/booking-types
List booking types
Query: q, per_page, page, is_active
/booking-types/{id}
Retrieve a booking type
/booking-types
Create a booking type
Body: name, duration_minutes, price?, buffer_before_minutes?, buffer_after_minutes?, assigned_user_id?, is_active?
/booking-types/{id}
Update a booking type
/booking-types/{id}
Delete a booking type
Response fields
Availability
A staff member's weekly working hours, exceptions, and timezone.
/users/{user}/availability
Get a staff member's availability
/users/{user}/availability
Replace availability
Body: timezone, days {0-6: {enabled, start, end}}, exceptions[] {date, is_available, start?, end?, reason?}
Response fields
Customers
The people who submit requests and pay invoices.
/customers
List customers
Query: q, per_page, page
/customers/{id}
Retrieve a customer
/customers
Create a customer
/customers/{id}
Update a customer
Response fields
Account
The authenticated token's own context.
/me
The staff account this token belongs to
Response fields
Machine-readable schema: openapi.json. Import it into Postman or an OpenAPI client to generate a request collection.