> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://schedule-docs.moxieservices.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://schedule-docs.moxieservices.com/_mcp/server.

# Book the first appointment

PUT https://api.moxie.com/v1/signup/{signupId}/appointment
Content-Type: application/json

Allowed in awaiting_appointment or slot_unavailable. The worker books the slot in FieldRoutes, then sends the confirmation email; the signup becomes complete. A taken slot returns the signup to slot_unavailable; the account and payment are never undone at this stage.

Reference: https://schedule-docs.moxieservices.com/api-reference/customer-signup/schedule-appointment

## Authentication

- `X-Link-Token` header (required) — Random token from createSignup or the resume link. Stored hashed; expires.

## Servers

- `https://api.moxie.com` (Production (placeholder hostname), default)
- `https://api-dev.moxie.com` (Dev, FieldRoutes sandbox (placeholder hostname))

## Request

### Path parameters

- `signupId` (string, required)

### Body (application/json)

This endpoint expects an Appointment.

- `date` (date, required)
- `slot` (enum, required)
  - Allowed values: `am`, `pm`

## Response

### 202

Accepted; poll status

- `state` (enum, required) — awaiting_appointment: account and payment done, show the appointment step. payment_declined: back to the card step. slot_unavailable: back to the appointment step. complete: show the confirmation page.
  - Allowed values: `processing`, `awaiting_appointment`, `complete`, `failed`, `payment_declined`, `slot_unavailable`
- `steps` (list of SignupStatusStepsItems, required)
- `reference` (string, required) — Shown on the confirmation and failure screens, e.g. MX-8I64MVE.
- `accountNumber` (string, optional) — FieldRoutes customer ID. Present when state is complete.
- `confirmationSentTo` (string, optional) — Masked email, e.g. j***@gmail.com.
- `error` (Error, optional)
- `confirmation` (SignupStatusConfirmation, optional) — Everything the confirmation page shows. Present only when state is complete.

## Errors

### 404 Not Found Error

Unknown signup or wrong link token (not_found). The two are deliberately indistinguishable.

- `code` (enum, required) — Every code the API returns, with its HTTP status, is listed in research R12.
  - Allowed values: `validation_failed`, `unauthenticated`, `forbidden`, `not_found`, `link_expired`, `version_conflict`, `duplicate`, `unresolved_overlaps`, `price_changed`, `quote_expired`, `item_unavailable`, `locked_after_redemption`, `zip_not_serviced`, `existing_customer`, `discount_not_applicable`, `idempotency_mismatch`, `invalid_state`, `rate_limited`, `processor_rejected`, `fieldroutes_unavailable`, `job_timeout`, `internal_error`, `service_unavailable`
- `message` (string, required) — Plain-language message the UI can show.
- `fieldErrors` (list of ErrorFieldErrorsItems, optional)
- `details` (ErrorDetails, optional) — Extra data for some codes, e.g. the new quote for price_changed.
- `requestId` (string, optional) — Same value as the X-Request-Id response header; quote it to support. Present on every API error response (0.9.3); may be absent on a job's error.

### 409 Conflict Error

Not allowed in the signup's current state (invalid_state); reload the signup and show the screen for its state.

- `code` (enum, required) — Every code the API returns, with its HTTP status, is listed in research R12.
  - Allowed values: `validation_failed`, `unauthenticated`, `forbidden`, `not_found`, `link_expired`, `version_conflict`, `duplicate`, `unresolved_overlaps`, `price_changed`, `quote_expired`, `item_unavailable`, `locked_after_redemption`, `zip_not_serviced`, `existing_customer`, `discount_not_applicable`, `idempotency_mismatch`, `invalid_state`, `rate_limited`, `processor_rejected`, `fieldroutes_unavailable`, `job_timeout`, `internal_error`, `service_unavailable`
- `message` (string, required) — Plain-language message the UI can show.
- `fieldErrors` (list of ErrorFieldErrorsItems, optional)
- `details` (ErrorDetails, optional) — Extra data for some codes, e.g. the new quote for price_changed.
- `requestId` (string, optional) — Same value as the X-Request-Id response header; quote it to support. Present on every API error response (0.9.3); may be absent on a job's error.

### 410 Gone Error

Resume link expired (link_expired).

- `code` (enum, required) — Every code the API returns, with its HTTP status, is listed in research R12.
  - Allowed values: `validation_failed`, `unauthenticated`, `forbidden`, `not_found`, `link_expired`, `version_conflict`, `duplicate`, `unresolved_overlaps`, `price_changed`, `quote_expired`, `item_unavailable`, `locked_after_redemption`, `zip_not_serviced`, `existing_customer`, `discount_not_applicable`, `idempotency_mismatch`, `invalid_state`, `rate_limited`, `processor_rejected`, `fieldroutes_unavailable`, `job_timeout`, `internal_error`, `service_unavailable`
- `message` (string, required) — Plain-language message the UI can show.
- `fieldErrors` (list of ErrorFieldErrorsItems, optional)
- `details` (ErrorDetails, optional) — Extra data for some codes, e.g. the new quote for price_changed.
- `requestId` (string, optional) — Same value as the X-Request-Id response header; quote it to support. Present on every API error response (0.9.3); may be absent on a job's error.

### 422 Unprocessable Entity Error

Body failed validation (validation_failed); see fieldErrors.

- `code` (enum, required) — Every code the API returns, with its HTTP status, is listed in research R12.
  - Allowed values: `validation_failed`, `unauthenticated`, `forbidden`, `not_found`, `link_expired`, `version_conflict`, `duplicate`, `unresolved_overlaps`, `price_changed`, `quote_expired`, `item_unavailable`, `locked_after_redemption`, `zip_not_serviced`, `existing_customer`, `discount_not_applicable`, `idempotency_mismatch`, `invalid_state`, `rate_limited`, `processor_rejected`, `fieldroutes_unavailable`, `job_timeout`, `internal_error`, `service_unavailable`
- `message` (string, required) — Plain-language message the UI can show.
- `fieldErrors` (list of ErrorFieldErrorsItems, optional)
- `details` (ErrorDetails, optional) — Extra data for some codes, e.g. the new quote for price_changed.
- `requestId` (string, optional) — Same value as the X-Request-Id response header; quote it to support. Present on every API error response (0.9.3); may be absent on a job's error.

### 429 Too Many Requests Error

Too many requests (rate_limited).

- `code` (enum, required) — Every code the API returns, with its HTTP status, is listed in research R12.
  - Allowed values: `validation_failed`, `unauthenticated`, `forbidden`, `not_found`, `link_expired`, `version_conflict`, `duplicate`, `unresolved_overlaps`, `price_changed`, `quote_expired`, `item_unavailable`, `locked_after_redemption`, `zip_not_serviced`, `existing_customer`, `discount_not_applicable`, `idempotency_mismatch`, `invalid_state`, `rate_limited`, `processor_rejected`, `fieldroutes_unavailable`, `job_timeout`, `internal_error`, `service_unavailable`
- `message` (string, required) — Plain-language message the UI can show.
- `fieldErrors` (list of ErrorFieldErrorsItems, optional)
- `details` (ErrorDetails, optional) — Extra data for some codes, e.g. the new quote for price_changed.
- `requestId` (string, optional) — Same value as the X-Request-Id response header; quote it to support. Present on every API error response (0.9.3); may be absent on a job's error.

### 500 Internal Server Error

Unexpected server error (internal_error). Quote the requestId to support.

- `code` (enum, required) — Every code the API returns, with its HTTP status, is listed in research R12.
  - Allowed values: `validation_failed`, `unauthenticated`, `forbidden`, `not_found`, `link_expired`, `version_conflict`, `duplicate`, `unresolved_overlaps`, `price_changed`, `quote_expired`, `item_unavailable`, `locked_after_redemption`, `zip_not_serviced`, `existing_customer`, `discount_not_applicable`, `idempotency_mismatch`, `invalid_state`, `rate_limited`, `processor_rejected`, `fieldroutes_unavailable`, `job_timeout`, `internal_error`, `service_unavailable`
- `message` (string, required) — Plain-language message the UI can show.
- `fieldErrors` (list of ErrorFieldErrorsItems, optional)
- `details` (ErrorDetails, optional) — Extra data for some codes, e.g. the new quote for price_changed.
- `requestId` (string, optional) — Same value as the X-Request-Id response header; quote it to support. Present on every API error response (0.9.3); may be absent on a job's error.

### 503 Service Unavailable Error

A required service such as the database or queue is temporarily unavailable (service_unavailable). Retry later.

- `code` (enum, required) — Every code the API returns, with its HTTP status, is listed in research R12.
  - Allowed values: `validation_failed`, `unauthenticated`, `forbidden`, `not_found`, `link_expired`, `version_conflict`, `duplicate`, `unresolved_overlaps`, `price_changed`, `quote_expired`, `item_unavailable`, `locked_after_redemption`, `zip_not_serviced`, `existing_customer`, `discount_not_applicable`, `idempotency_mismatch`, `invalid_state`, `rate_limited`, `processor_rejected`, `fieldroutes_unavailable`, `job_timeout`, `internal_error`, `service_unavailable`
- `message` (string, required) — Plain-language message the UI can show.
- `fieldErrors` (list of ErrorFieldErrorsItems, optional)
- `details` (ErrorDetails, optional) — Extra data for some codes, e.g. the new quote for price_changed.
- `requestId` (string, optional) — Same value as the X-Request-Id response header; quote it to support. Present on every API error response (0.9.3); may be absent on a job's error.

## Types

### SignupStatusStepsItems

- `key` (enum, required)
  - Allowed values: `agreement_saved`, `customer_created`, `payment_secured`, `appointment_scheduled`, `confirmation_sent`
- `label` (string, required) — Text from the server; the booking site shows it as sent (R7).
- `state` (enum, required)
  - Allowed values: `pending`, `running`, `done`, `failed`

### Error

- `code` (enum, required) — Every code the API returns, with its HTTP status, is listed in research R12.
  - Allowed values: `validation_failed`, `unauthenticated`, `forbidden`, `not_found`, `link_expired`, `version_conflict`, `duplicate`, `unresolved_overlaps`, `price_changed`, `quote_expired`, `item_unavailable`, `locked_after_redemption`, `zip_not_serviced`, `existing_customer`, `discount_not_applicable`, `idempotency_mismatch`, `invalid_state`, `rate_limited`, `processor_rejected`, `fieldroutes_unavailable`, `job_timeout`, `internal_error`, `service_unavailable`
- `message` (string, required) — Plain-language message the UI can show.
- `fieldErrors` (list of ErrorFieldErrorsItems, optional)
- `details` (ErrorDetails, optional) — Extra data for some codes, e.g. the new quote for price_changed.
- `requestId` (string, optional) — Same value as the X-Request-Id response header; quote it to support. Present on every API error response (0.9.3); may be absent on a job's error.

### SignupStatusConfirmation

Everything the confirmation page shows. Present only when state is complete.

- `firstName` (string, required)
- `appointment` (SignupStatusConfirmationAppointment, required)
- `serviceAddress` (Address, required)
- `plan` (SignupStatusConfirmationPlan, required)
- `addOns` (list of string, required) — Add-on titles, e.g. Cockroach Service.
- `initialServiceCents` (integer, required) — Amount in US cents.
- `chargedTodayCents` (integer, required) — Amount in US cents.
- `recurringCents` (integer, optional) — Amount in US cents.
- `recurringPeriod` (enum, optional)
  - Allowed values: `per_service`, `per_month`

### ErrorFieldErrorsItems

- `field` (string, required) — JSON path, e.g. pricing.initialCents
- `message` (string, required)

### ErrorDetails

Extra data for some codes, e.g. the new quote for price_changed.

### SignupStatusConfirmationAppointment

- `date` (date, required)
- `window` (ArrivalWindow, required)

### Address

- `line1` (string, required)
- `city` (string, required)
- `state` (string, required)
- `zip` (string, required)
- `line2` (string, optional)

### SignupStatusConfirmationPlan

- `title` (string, required)
- `serviceInterval` (SignupStatusConfirmationPlanServiceInterval, optional) — Days between recurring visits, e.g. 80-100 for quarterly.

### ArrivalWindow

- `slot` (enum, required)
  - Allowed values: `am`, `pm`
- `label` (string, required) — e.g. Afternoon
- `start` (string, required) — Local time, 24-hour.
- `end` (string, required) — Local time, 24-hour.

### SignupStatusConfirmationPlanServiceInterval

Days between recurring visits, e.g. 80-100 for quarterly.

- `minDays` (integer, required)
- `maxDays` (integer, required)

## Examples

**Request**

```json
{
  "date": "2023-01-15",
  "slot": "am"
}
```

**Response**

```json
{
  "state": "processing",
  "steps": [
    {
      "key": "agreement_saved",
      "label": "string",
      "state": "pending"
    }
  ],
  "reference": "string",
  "accountNumber": "string",
  "confirmationSentTo": "string",
  "error": {
    "code": "validation_failed",
    "message": "string",
    "fieldErrors": [
      {
        "field": "string",
        "message": "string"
      }
    ],
    "details": {},
    "requestId": "string"
  },
  "confirmation": {
    "firstName": "string",
    "appointment": {
      "date": "2023-01-15",
      "window": {
        "slot": "am",
        "label": "string",
        "start": "12:00",
        "end": "16:00"
      }
    },
    "serviceAddress": {
      "line1": "string",
      "city": "string",
      "state": "string",
      "zip": "string",
      "line2": "string"
    },
    "plan": {
      "title": "string",
      "serviceInterval": {
        "minDays": 1,
        "maxDays": 1
      }
    },
    "addOns": [
      "string"
    ],
    "initialServiceCents": 1,
    "chargedTodayCents": 1,
    "recurringCents": 1,
    "recurringPeriod": "per_service"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.moxie.com/v1/signup/signupId/appointment"

payload = {
    "date": "2023-01-15",
    "slot": "am"
}
headers = {
    "X-Link-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.moxie.com/v1/signup/signupId/appointment';
const options = {
  method: 'PUT',
  headers: {'X-Link-Token': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"date":"2023-01-15","slot":"am"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.moxie.com/v1/signup/signupId/appointment"

	payload := strings.NewReader("{\n  \"date\": \"2023-01-15\",\n  \"slot\": \"am\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-Link-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.moxie.com/v1/signup/signupId/appointment")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-Link-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"date\": \"2023-01-15\",\n  \"slot\": \"am\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.moxie.com/v1/signup/signupId/appointment")
  .header("X-Link-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"date\": \"2023-01-15\",\n  \"slot\": \"am\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.moxie.com/v1/signup/signupId/appointment', [
  'body' => '{
  "date": "2023-01-15",
  "slot": "am"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Link-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.moxie.com/v1/signup/signupId/appointment");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-Link-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"date\": \"2023-01-15\",\n  \"slot\": \"am\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Link-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "date": "2023-01-15",
  "slot": "am"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.moxie.com/v1/signup/signupId/appointment")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```