Api patterns

From wyre-technology/msp-claude-plugins · View interactive version

Api patterns is an AI agent skill from the GitHub repository wyre-technology/msp-claude-plugins. TimeZest MCP fundamentals: Bearer token authentication, the navigation pattern, scheduling-request payloads that carry PSA associated_entities (ConnectWise / Autotask / Halo ticket IDs), and the polling-only update model (no webhooks).

How to use this skill

Skill file

TimeZest MCP Tools & API Patterns

Overview

TimeZest provides scheduling-request flows tightly coupled to MSP PSA

systems. A scheduling request is created against a PSA ticket

(ConnectWise / Autotask / Halo), TimeZest sends the customer a

self-service booking link, and the technician's calendar is updated

when the customer picks a slot.

Connection & Authentication

TimeZest uses an API token passed via header.

| Header | Value |

|--------|-------|

| X-Timezest-Api-Token | The raw TimeZest API token |

The token is stored on the TimeZest connection in Conduit, which

injects it as X-Timezest-Api-Token on every request; nothing is set on

the client. The TimeZest MCP server forwards it to TimeZest as a

Bearer token, so you do not add the Bearer prefix yourself.

Navigation Tools

| Tool | Purpose |

|------|---------|

| timezest_navigate | Discover the available domains |

| timezest_back | Pop back to the prior context |

| timezest_status | Health/status check |

Functional Tool Surface

Tools follow timezest_<domain>_<action>. Domains:

Scheduling Request Payload — `associated_entities`

This is the most important pattern. When you call

timezest_scheduling_create_request, the payload carries an

associated_entities array that links the booking to a PSA record:

{
  "associated_entities": [
    {
      "type": "ConnectWiseTicket",
      "id": 12345
    }
  ]
}

Supported PSA types: ConnectWise tickets, Autotask tickets, Halo

tickets. Always include the PSA association so the tech's PSA shows

the booking.

Polling, Not Webhooks

TimeZest's MCP surface is poll-only. To track a booking's lifecycle

(sent / clicked / booked / canceled), call

timezest_scheduling_get on a cadence. Reasonable cadence:

Do not assume a webhook will arrive — none does at the MCP layer.

Error Handling

| Status | Meaning | Action |

|--------|---------|--------|

| 401 | Bad/missing Bearer token | Re-check TIMEZEST_API_TOKEN |

| 403 | Token valid but not authorized for the agent/team | Check token scope |

| 404 | Unknown agent / team / scheduling request | Re-list to confirm |

| 422 | Bad payload (missing PSA association, invalid appointment_type) | Validate input |

Best Practices

PSA association is hard to find later.

creating a request; do not hard-code IDs.

as the primary input and resolve agent/team/appointment from

context.

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.