> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usespoke.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Designed extension methods

> The complete remaining contract for extension workflows; availability is labeled method by method.

The complete remaining contract for extension workflows; availability is labeled method by method.

This reference is generated from application commit [`1c90c5e`](https://github.com/Enoch208/spoke/commit/1c90c5e408592d5b4e87944ea79b998890633249). It covers **53 client methods** in this group.

<Note>
  Input schemas describe the typed client call before path/query/body mapping.
  Output schemas describe the envelope's `data`, not the full HTTP response.
  Custom refinements, transforms, and runtime permissions are enforced by the
  [shared Zod
  contract](https://github.com/Enoch208/spoke/tree/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api).
  Read [transport rules](/developers/http-transport) before copying a client
  object into an HTTP body. Designed methods reject live calls; optional funding
  still requires provider configuration.
</Note>

[Download all method schemas](https://raw.githubusercontent.com/Enoch208/docs-madonna/main/schemas/client-methods.json) · [Live endpoint registry](https://api.usespoke.xyz/v1/system/endpoints)

## Methods at a glance

| Client method | HTTP route | Access | Availability |
| - | - | - | - |
| [`partners.list`](#partners-list) | `GET /v1/merchant/partners` | session | Core live |
| [`partners.get`](#partners-get) | `GET /v1/merchant/partners/:address` | session | Core live |
| [`invitations.mine`](#invitations-mine) | `GET /v1/me/invitations` | session | Core live |
| [`invitations.sent`](#invitations-sent) | `GET /v1/merchant/invitations` | session | Core live |
| [`invitations.send`](#invitations-send) | `POST /v1/merchant/invitations` | session | Core live |
| [`invitations.respond`](#invitations-respond) | `POST /v1/me/invitations/:id` | session | Core live |
| [`invitations.withdraw`](#invitations-withdraw) | `DELETE /v1/merchant/invitations/:id` | session | Core live |
| [`analytics.merchant`](#analytics-merchant) | `GET /v1/merchant/analytics` | session | Core live |
| [`analytics.campaign`](#analytics-campaign) | `GET /v1/merchant/campaigns/:campaignId/analytics` | session | Core live |
| [`billing.summary`](#billing-summary) | `GET /v1/merchant/billing` | session | Core live |
| [`billing.invoices`](#billing-invoices) | `GET /v1/merchant/billing/invoices` | session | Core live |
| [`integrations.list`](#integrations-list) | `GET /v1/merchant/integrations` | session | Designed — unavailable |
| [`integrations.connect`](#integrations-connect) | `POST /v1/merchant/integrations/:provider` | session | Designed — unavailable |
| [`integrations.disconnect`](#integrations-disconnect) | `DELETE /v1/merchant/integrations/:provider` | session | Designed — unavailable |
| [`integrations.status`](#integrations-status) | `GET /v1/merchant/integrations/:provider/status` | session | Designed — unavailable |
| [`integrations.reconciliation`](#integrations-reconciliation) | `GET /v1/merchant/integrations/:provider/reconciliation` | session | Designed — unavailable |
| [`integrations.resolveMismatch`](#integrations-resolvemismatch) | `POST /v1/merchant/integrations/mismatches/:id` | session | Designed — unavailable |
| [`signers.list`](#signers-list) | `GET /v1/merchant/signers` | session | Designed — unavailable |
| [`signers.add`](#signers-add) | `POST /v1/merchant/signers` | session | Designed — unavailable |
| [`signers.revoke`](#signers-revoke) | `DELETE /v1/merchant/signers/:id` | session | Designed — unavailable |
| [`signers.attestations`](#signers-attestations) | `GET /v1/merchant/signers/:id/attestations` | session | Designed — unavailable |
| [`apiKeys.list`](#apikeys-list) | `GET /v1/developer/keys` | session | Designed — unavailable |
| [`apiKeys.create`](#apikeys-create) | `POST /v1/developer/keys` | session | Designed — unavailable |
| [`apiKeys.revoke`](#apikeys-revoke) | `DELETE /v1/developer/keys/:id` | session | Designed — unavailable |
| [`apiKeys.usage`](#apikeys-usage) | `GET /v1/developer/keys/:id/usage` | session | Designed — unavailable |
| [`webhooks.list`](#webhooks-list) | `GET /v1/developer/webhooks` | session | Designed — unavailable |
| [`webhooks.create`](#webhooks-create) | `POST /v1/developer/webhooks` | session | Designed — unavailable |
| [`webhooks.test`](#webhooks-test) | `POST /v1/developer/webhooks/:id/test` | session | Designed — unavailable |
| [`webhooks.deliveries`](#webhooks-deliveries) | `GET /v1/developer/webhooks/:id/deliveries` | session | Designed — unavailable |
| [`webhooks.update`](#webhooks-update) | `PATCH /v1/developer/webhooks/:id` | session | Designed — unavailable |
| [`webhooks.rotateSecret`](#webhooks-rotatesecret) | `POST /v1/developer/webhooks/:id/secret` | session | Designed — unavailable |
| [`webhooks.remove`](#webhooks-remove) | `DELETE /v1/developer/webhooks/:id` | session | Designed — unavailable |
| [`webhooks.replay`](#webhooks-replay) | `POST /v1/developer/webhooks/deliveries/:id/replay` | session | Designed — unavailable |
| [`team.members`](#team-members) | `GET /v1/merchant/team` | session | Designed — unavailable |
| [`team.invite`](#team-invite) | `POST /v1/merchant/team` | session | Designed — unavailable |
| [`team.updateRole`](#team-updaterole) | `PATCH /v1/merchant/team/:id` | session | Designed — unavailable |
| [`team.remove`](#team-remove) | `DELETE /v1/merchant/team/:id` | session | Designed — unavailable |
| [`team.audit`](#team-audit) | `GET /v1/merchant/team/audit` | session | Designed — unavailable |
| [`team.transferOwnership`](#team-transferownership) | `POST /v1/merchant/team/transfer` | session | Designed — unavailable |
| [`subscriptions.list`](#subscriptions-list) | `GET /v1/merchant/subscriptions` | session | Designed — unavailable |
| [`subscriptions.get`](#subscriptions-get) | `GET /v1/merchant/subscriptions/:id` | session | Designed — unavailable |
| [`subscriptions.save`](#subscriptions-save) | `PUT /v1/merchant/subscriptions/:id` | session | Designed — unavailable |
| [`partnerships.list`](#partnerships-list) | `GET /v1/partnerships` | session | Designed — unavailable |
| [`partnerships.propose`](#partnerships-propose) | `POST /v1/partnerships` | session | Designed — unavailable |
| [`partnerships.respond`](#partnerships-respond) | `POST /v1/partnerships/:id/responses` | session | Designed — unavailable |
| [`partnerships.terminate`](#partnerships-terminate) | `POST /v1/partnerships/:id/terminate` | session | Designed — unavailable |
| [`communities.list`](#communities-list) | `GET /v1/communities` | session | Designed — unavailable |
| [`communities.get`](#communities-get) | `GET /v1/communities/:id` | session | Designed — unavailable |
| [`communities.create`](#communities-create) | `POST /v1/communities` | session | Designed — unavailable |
| [`communities.members`](#communities-members) | `GET /v1/communities/:id/members` | session | Designed — unavailable |
| [`communities.join`](#communities-join) | `POST /v1/communities/:id/members` | session | Designed — unavailable |
| [`communities.leave`](#communities-leave) | `DELETE /v1/communities/:id/members/me` | session | Designed — unavailable |
| [`communities.update`](#communities-update) | `PATCH /v1/communities/:id` | session | Designed — unavailable |

## partners.list

**GET `/v1/merchant/partners`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L375).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `campaignId` | string | No | See nested schema and runtime validation |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |
| `status` | string | No | See nested schema and runtime validation |
| `q` | string | No | See nested schema and runtime validation |
| `sort` | string | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "campaignId": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 78,
              "pattern": "^(0|[1-9]\\d*)$"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "status": {
          "type": "string"
        },
        "q": {
          "type": "string"
        },
        "sort": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "address": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "handle": {
                "type": ["string", "null"]
              },
              "displayName": {
                "type": ["string", "null"]
              },
              "visibility": {
                "type": "string",
                "enum": ["public", "pseudonymous"]
              },
              "settledConversions": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "merchantCount": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "lastSettledAt": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema0"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rankSignals": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "number"
                    }
                  },
                  "required": ["name", "value"],
                  "additionalProperties": false
                }
              },
              "slot": {
                "type": "string",
                "enum": ["ranked", "new"]
              },
              "rankingVersion": {
                "type": "string",
                "const": "discovery-v1"
              },
              "methodologyVersion": {
                "type": "string"
              },
              "isPartner": {
                "type": "boolean"
              },
              "linkCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "directSales": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "networkSales": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "settledValue": {
                "$ref": "#/$defs/__schema1"
              },
              "rewards": {
                "type": "object",
                "properties": {
                  "atRisk": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "readyToFinalize": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "claimable": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "claimed": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "refunded": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "reversed": {
                    "$ref": "#/$defs/__schema1"
                  }
                },
                "required": [
                  "atRisk",
                  "readyToFinalize",
                  "claimable",
                  "claimed",
                  "refunded",
                  "reversed"
                ],
                "additionalProperties": false
              },
              "firstLinkAt": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "required": [
              "address",
              "handle",
              "displayName",
              "visibility",
              "settledConversions",
              "merchantCount",
              "categories",
              "lastSettledAt",
              "rankSignals",
              "slot",
              "rankingVersion",
              "methodologyVersion",
              "isPartner",
              "linkCount",
              "directSales",
              "networkSales",
              "settledValue",
              "rewards",
              "firstLinkAt"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        },
        "summary": {
          "type": "object",
          "properties": {
            "partners": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "sales": {
              "$ref": "#/$defs/__schema2"
            },
            "value": {
              "$ref": "#/$defs/__schema1"
            },
            "series": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "at": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "sales": {
                    "$ref": "#/$defs/__schema2"
                  },
                  "value": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "rewards": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "links": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["at", "sales", "value", "rewards", "links"],
                "additionalProperties": false
              }
            }
          },
          "required": ["partners", "sales", "value", "series"],
          "additionalProperties": false
        }
      },
      "required": ["items", "nextCursor", "summary"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "__schema1": {
          "type": "string"
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "pending": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "finalized": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "refunded": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["pending", "finalized", "refunded"],
          "additionalProperties": false
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## partners.get

**GET `/v1/merchant/partners/:address`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L390).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `address` | string | Yes | Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        }
      },
      "required": ["address"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "partner": {
          "type": "object",
          "properties": {
            "address": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^0x[0-9a-fA-F]{40}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "handle": {
              "type": ["string", "null"]
            },
            "displayName": {
              "type": ["string", "null"]
            },
            "visibility": {
              "type": "string",
              "enum": ["public", "pseudonymous"]
            },
            "settledConversions": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "merchantCount": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "categories": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "lastSettledAt": {
              "anyOf": [
                {
                  "$ref": "#/$defs/__schema0"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rankSignals": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "type": "number"
                  }
                },
                "required": ["name", "value"],
                "additionalProperties": false
              }
            },
            "slot": {
              "type": "string",
              "enum": ["ranked", "new"]
            },
            "rankingVersion": {
              "type": "string",
              "const": "discovery-v1"
            },
            "methodologyVersion": {
              "type": "string"
            },
            "isPartner": {
              "type": "boolean"
            },
            "linkCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "directSales": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "networkSales": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "settledValue": {
              "$ref": "#/$defs/__schema1"
            },
            "rewards": {
              "$ref": "#/$defs/__schema2"
            },
            "firstLinkAt": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "address",
            "handle",
            "displayName",
            "visibility",
            "settledConversions",
            "merchantCount",
            "categories",
            "lastSettledAt",
            "rankSignals",
            "slot",
            "rankingVersion",
            "methodologyVersion",
            "isPartner",
            "linkCount",
            "directSales",
            "networkSales",
            "settledValue",
            "rewards",
            "firstLinkAt"
          ],
          "additionalProperties": false
        },
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "nodeId": {
                "$ref": "#/$defs/__schema3"
              },
              "parentNodeId": {
                "$ref": "#/$defs/__schema3"
              },
              "childCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["nodeId", "parentNodeId", "childCount"],
            "additionalProperties": false
          }
        },
        "sales": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "saleId": {
                "$ref": "#/$defs/__schema3"
              },
              "level": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "amount": {
                "$ref": "#/$defs/__schema1"
              },
              "state": {
                "type": "string",
                "enum": ["reserved", "claimable", "claimed", "refunded", "reversed"]
              }
            },
            "required": ["saleId", "level", "amount", "state"],
            "additionalProperties": false
          }
        },
        "rewards": {
          "$ref": "#/$defs/__schema2"
        }
      },
      "required": ["partner", "nodes", "sales", "rewards"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "__schema1": {
          "type": "string"
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "atRisk": {
              "$ref": "#/$defs/__schema1"
            },
            "readyToFinalize": {
              "$ref": "#/$defs/__schema1"
            },
            "claimable": {
              "$ref": "#/$defs/__schema1"
            },
            "claimed": {
              "$ref": "#/$defs/__schema1"
            },
            "refunded": {
              "$ref": "#/$defs/__schema1"
            },
            "reversed": {
              "$ref": "#/$defs/__schema1"
            }
          },
          "required": [
            "atRisk",
            "readyToFinalize",
            "claimable",
            "claimed",
            "refunded",
            "reversed"
          ],
          "additionalProperties": false
        },
        "__schema3": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## invitations.mine

**GET `/v1/me/invitations`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L391).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |
| `status` | string | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "status": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "distributor": {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{40}$"
              },
              "campaignId": {
                "$ref": "#/$defs/__schema1"
              },
              "merchantId": {
                "$ref": "#/$defs/__schema0"
              },
              "message": {
                "type": "string"
              },
              "terms": {
                "type": "string"
              },
              "parentNodeId": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema1"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "policyHash": {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{64}$"
              },
              "status": {
                "type": "string",
                "enum": ["pending", "accepted", "declined", "withdrawn", "expired"]
              },
              "expiresAt": {
                "$ref": "#/$defs/__schema2"
              },
              "withdrawnAt": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema2"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "$ref": "#/$defs/__schema2"
              }
            },
            "required": [
              "id",
              "distributor",
              "campaignId",
              "merchantId",
              "message",
              "terms",
              "parentNodeId",
              "policyHash",
              "status",
              "expiresAt",
              "withdrawnAt",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "__schema2": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## invitations.sent

**GET `/v1/merchant/invitations`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L395).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |
| `distributor` | string | No | Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "distributor": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "distributor": {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{40}$"
              },
              "campaignId": {
                "$ref": "#/$defs/__schema1"
              },
              "merchantId": {
                "$ref": "#/$defs/__schema0"
              },
              "message": {
                "type": "string"
              },
              "terms": {
                "type": "string"
              },
              "parentNodeId": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema1"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "policyHash": {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{64}$"
              },
              "status": {
                "type": "string",
                "enum": ["pending", "accepted", "declined", "withdrawn", "expired"]
              },
              "expiresAt": {
                "$ref": "#/$defs/__schema2"
              },
              "withdrawnAt": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema2"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "$ref": "#/$defs/__schema2"
              }
            },
            "required": [
              "id",
              "distributor",
              "campaignId",
              "merchantId",
              "message",
              "terms",
              "parentNodeId",
              "policyHash",
              "status",
              "expiresAt",
              "withdrawnAt",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "__schema2": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## invitations.send

**POST `/v1/merchant/invitations`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L399).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `distributor` | string | Yes | Pattern validated; see input schema |
| `campaignId` | string | Yes | See nested schema and runtime validation |
| `message` | string | Yes | Max length: 2000 |
| `terms` | string | Yes | Max length: 3000 |
| `expiresAt` | string | Yes | Format: date-time; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "distributor": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "campaignId": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 78,
              "pattern": "^(0|[1-9]\\d*)$"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "message": {
          "type": "string",
          "maxLength": 2000
        },
        "terms": {
          "type": "string",
          "maxLength": 3000
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": ["distributor", "campaignId", "message", "terms", "expiresAt"],
      "additionalProperties": false
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "distributor": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "campaignId": {
          "$ref": "#/$defs/__schema1"
        },
        "merchantId": {
          "$ref": "#/$defs/__schema0"
        },
        "message": {
          "type": "string"
        },
        "terms": {
          "type": "string"
        },
        "parentNodeId": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "null"
            }
          ]
        },
        "policyHash": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{64}$"
        },
        "status": {
          "type": "string",
          "enum": ["pending", "accepted", "declined", "withdrawn", "expired"]
        },
        "expiresAt": {
          "$ref": "#/$defs/__schema2"
        },
        "withdrawnAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema2"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "$ref": "#/$defs/__schema2"
        }
      },
      "required": [
        "id",
        "distributor",
        "campaignId",
        "merchantId",
        "message",
        "terms",
        "parentNodeId",
        "policyHash",
        "status",
        "expiresAt",
        "withdrawnAt",
        "createdAt"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "__schema2": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## invitations.respond

**POST `/v1/me/invitations/:id`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L400).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `response` | "accept" · "decline" | Yes | See nested schema and runtime validation |
| `reason` | string | No | Max length: 500 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "response": {
          "type": "string",
          "enum": ["accept", "decline"]
        },
        "reason": {
          "type": "string",
          "maxLength": 500
        }
      },
      "required": ["id", "response"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "distributor": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "campaignId": {
          "$ref": "#/$defs/__schema1"
        },
        "merchantId": {
          "$ref": "#/$defs/__schema0"
        },
        "message": {
          "type": "string"
        },
        "terms": {
          "type": "string"
        },
        "parentNodeId": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "null"
            }
          ]
        },
        "policyHash": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{64}$"
        },
        "status": {
          "type": "string",
          "enum": ["pending", "accepted", "declined", "withdrawn", "expired"]
        },
        "expiresAt": {
          "$ref": "#/$defs/__schema2"
        },
        "withdrawnAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema2"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "$ref": "#/$defs/__schema2"
        }
      },
      "required": [
        "id",
        "distributor",
        "campaignId",
        "merchantId",
        "message",
        "terms",
        "parentNodeId",
        "policyHash",
        "status",
        "expiresAt",
        "withdrawnAt",
        "createdAt"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "__schema2": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## invitations.withdraw

**DELETE `/v1/merchant/invitations/:id`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L404).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "distributor": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "campaignId": {
          "$ref": "#/$defs/__schema1"
        },
        "merchantId": {
          "$ref": "#/$defs/__schema0"
        },
        "message": {
          "type": "string"
        },
        "terms": {
          "type": "string"
        },
        "parentNodeId": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "null"
            }
          ]
        },
        "policyHash": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{64}$"
        },
        "status": {
          "type": "string",
          "enum": ["pending", "accepted", "declined", "withdrawn", "expired"]
        },
        "expiresAt": {
          "$ref": "#/$defs/__schema2"
        },
        "withdrawnAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema2"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "$ref": "#/$defs/__schema2"
        }
      },
      "required": [
        "id",
        "distributor",
        "campaignId",
        "merchantId",
        "message",
        "terms",
        "parentNodeId",
        "policyHash",
        "status",
        "expiresAt",
        "withdrawnAt",
        "createdAt"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "__schema2": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## analytics.merchant

**GET `/v1/merchant/analytics`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L406).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `range` | object | No | See nested schema and runtime validation |
| `campaignIds` | string\[] | No | See nested schema and runtime validation |
| `source` | string | No | See nested schema and runtime validation |
| `basis` | string | No | See nested schema and runtime validation |
| `compare` | boolean | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "range": {
          "type": "object",
          "properties": {
            "from": {
              "$ref": "#/$defs/__schema0"
            },
            "to": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["from", "to"]
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 78,
                "pattern": "^(0|[1-9]\\d*)$"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        },
        "source": {
          "type": "string"
        },
        "basis": {
          "type": "string"
        },
        "compare": {
          "type": "boolean"
        }
      },
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "period": {
          "type": "object",
          "properties": {
            "from": {
              "$ref": "#/$defs/__schema0"
            },
            "to": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["from", "to"],
          "additionalProperties": false
        },
        "series": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        },
        "totals": {
          "$ref": "#/$defs/__schema1"
        },
        "previousPeriodTotals": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "null"
            }
          ]
        },
        "depthMix": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "depth": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "sales": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rewards": {
                "$ref": "#/$defs/__schema2"
              }
            },
            "required": ["depth", "sales", "rewards"],
            "additionalProperties": false
          }
        },
        "networkGrowth": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        },
        "funnel": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "stage": {
                "type": "string"
              },
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "estimate": {
                "type": "boolean"
              }
            },
            "required": ["stage", "count", "estimate"],
            "additionalProperties": false
          }
        },
        "cohortGrid": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "cohort": {
                "$ref": "#/$defs/__schema0"
              },
              "periods": {
                "type": "array",
                "items": {
                  "type": "number",
                  "minimum": 0
                }
              }
            },
            "required": ["cohort", "periods"],
            "additionalProperties": false
          }
        },
        "byCampaign": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "campaignId": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema2"
                  },
                  {
                    "type": "string",
                    "pattern": "^demo-[\\w-]+$"
                  }
                ]
              },
              "totals": {
                "$ref": "#/$defs/__schema1"
              }
            },
            "required": ["campaignId", "totals"],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "period",
        "series",
        "totals",
        "previousPeriodTotals",
        "depthMix",
        "networkGrowth",
        "funnel",
        "cohortGrid",
        "byCampaign"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "at": {
              "$ref": "#/$defs/__schema0"
            },
            "sales": {
              "type": "object",
              "properties": {
                "pending": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "finalized": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "refunded": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": ["pending", "finalized", "refunded"],
              "additionalProperties": false
            },
            "value": {
              "$ref": "#/$defs/__schema2"
            },
            "rewards": {
              "$ref": "#/$defs/__schema2"
            },
            "links": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["at", "sales", "value", "rewards", "links"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## analytics.campaign

**GET `/v1/merchant/campaigns/:campaignId/analytics`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L414).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `campaignId` | string | Yes | See nested schema and runtime validation |
| `range` | object | No | See nested schema and runtime validation |
| `campaignIds` | string\[] | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "campaignId": {
          "$ref": "#/$defs/__schema0"
        },
        "range": {
          "type": "object",
          "properties": {
            "from": {
              "$ref": "#/$defs/__schema1"
            },
            "to": {
              "$ref": "#/$defs/__schema1"
            }
          },
          "required": ["from", "to"]
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        }
      },
      "required": ["campaignId"],
      "$defs": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 78,
              "pattern": "^(0|[1-9]\\d*)$"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "__schema1": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "period": {
          "type": "object",
          "properties": {
            "from": {
              "$ref": "#/$defs/__schema0"
            },
            "to": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["from", "to"],
          "additionalProperties": false
        },
        "series": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        },
        "totals": {
          "$ref": "#/$defs/__schema1"
        },
        "previousPeriodTotals": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "null"
            }
          ]
        },
        "depthMix": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "depth": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "sales": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rewards": {
                "$ref": "#/$defs/__schema2"
              }
            },
            "required": ["depth", "sales", "rewards"],
            "additionalProperties": false
          }
        },
        "networkGrowth": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        },
        "funnel": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "stage": {
                "type": "string"
              },
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "estimate": {
                "type": "boolean"
              }
            },
            "required": ["stage", "count", "estimate"],
            "additionalProperties": false
          }
        },
        "cohortGrid": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "cohort": {
                "$ref": "#/$defs/__schema0"
              },
              "periods": {
                "type": "array",
                "items": {
                  "type": "number",
                  "minimum": 0
                }
              }
            },
            "required": ["cohort", "periods"],
            "additionalProperties": false
          }
        },
        "byCampaign": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "campaignId": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema2"
                  },
                  {
                    "type": "string",
                    "pattern": "^demo-[\\w-]+$"
                  }
                ]
              },
              "totals": {
                "$ref": "#/$defs/__schema1"
              }
            },
            "required": ["campaignId", "totals"],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "period",
        "series",
        "totals",
        "previousPeriodTotals",
        "depthMix",
        "networkGrowth",
        "funnel",
        "cohortGrid",
        "byCampaign"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "at": {
              "$ref": "#/$defs/__schema0"
            },
            "sales": {
              "type": "object",
              "properties": {
                "pending": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "finalized": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "refunded": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": ["pending", "finalized", "refunded"],
              "additionalProperties": false
            },
            "value": {
              "$ref": "#/$defs/__schema2"
            },
            "rewards": {
              "$ref": "#/$defs/__schema2"
            },
            "links": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["at", "sales", "value", "rewards", "links"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## billing.summary

**GET `/v1/merchant/billing`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L466).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

No fields. Use an empty object for the client method input.

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {},
      "additionalProperties": false
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "feeBps": {
          "type": "number",
          "const": 0
        },
        "period": {
          "type": "object",
          "properties": {
            "from": {
              "$ref": "#/$defs/__schema0"
            },
            "to": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["from", "to"],
          "additionalProperties": false
        },
        "totals": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "token": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "symbol": {
                    "type": "string"
                  },
                  "decimals": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 36
                  },
                  "name": {
                    "type": "string"
                  },
                  "testnet": {
                    "type": "boolean"
                  }
                },
                "required": ["address", "symbol", "decimals"],
                "additionalProperties": false
              },
              "settledValue": {
                "$ref": "#/$defs/__schema1"
              },
              "protocolFees": {
                "$ref": "#/$defs/__schema1"
              }
            },
            "required": ["token", "settledValue", "protocolFees"],
            "additionalProperties": false
          }
        }
      },
      "required": ["feeBps", "period", "totals"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "__schema1": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## billing.invoices

**GET `/v1/merchant/billing/invoices`** · **Core live** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L467).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "period": {
                "type": "object",
                "properties": {
                  "from": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "to": {
                    "$ref": "#/$defs/__schema0"
                  }
                },
                "required": ["from", "to"],
                "additionalProperties": false
              },
              "amount": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": ["draft", "issued", "paid", "void"]
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["id", "period", "amount", "currency", "status", "url"],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## integrations.list

**GET `/v1/merchant/integrations`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L468).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

No fields. Use an empty object for the client method input.

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {},
      "additionalProperties": false
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "provider": {
            "type": "string",
            "enum": ["shopify", "stripe", "woocommerce"]
          },
          "status": {
            "type": "string",
            "enum": ["connected", "disconnected", "error", "pending"]
          },
          "connectedAt": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastSyncAt": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["id", "provider", "status", "connectedAt", "lastSyncAt"],
        "additionalProperties": false
      },
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## integrations.connect

**POST `/v1/merchant/integrations/:provider`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L469).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `provider` | "shopify" · "stripe" · "woocommerce" | Yes | See nested schema and runtime validation |
| `storeUrl` | string | No | Format: uri |
| `authorizationCode` | string | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": ["shopify", "stripe", "woocommerce"]
        },
        "storeUrl": {
          "type": "string",
          "format": "uri"
        },
        "authorizationCode": {
          "type": "string"
        }
      },
      "required": ["provider"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "provider": {
          "type": "string",
          "enum": ["shopify", "stripe", "woocommerce"]
        },
        "status": {
          "type": "string",
          "enum": ["connected", "disconnected", "error", "pending"]
        },
        "connectedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema0"
            },
            {
              "type": "null"
            }
          ]
        },
        "lastSyncAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema0"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["id", "provider", "status", "connectedAt", "lastSyncAt"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## integrations.disconnect

**DELETE `/v1/merchant/integrations/:provider`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L477).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `provider` | string | Yes | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "provider": {
          "type": "string"
        }
      },
      "required": ["provider"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        }
      },
      "required": ["ok"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## integrations.status

**GET `/v1/merchant/integrations/:provider/status`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L478).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `provider` | string | Yes | See nested schema and runtime validation |
| `refresh` | boolean | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "provider": {
          "type": "string"
        },
        "refresh": {
          "type": "boolean"
        }
      },
      "required": ["provider"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "lastSyncAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "pendingOrders": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "sourceTotal": {
          "$ref": "#/$defs/__schema0"
        },
        "attestedTotal": {
          "$ref": "#/$defs/__schema0"
        },
        "acceptedTotal": {
          "$ref": "#/$defs/__schema0"
        },
        "mismatches": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "kind": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": ["info", "warning", "critical"]
              },
              "sourceOrderId": {
                "type": "string"
              },
              "saleId": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/__schema0"
                      },
                      {
                        "type": "string",
                        "pattern": "^demo-[\\w-]+$"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "suggestedAction": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "kind",
              "severity",
              "sourceOrderId",
              "saleId",
              "suggestedAction"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "lastSyncAt",
        "pendingOrders",
        "sourceTotal",
        "attestedTotal",
        "acceptedTotal",
        "mismatches"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## integrations.reconciliation

**GET `/v1/merchant/integrations/:provider/reconciliation`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L482).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `provider` | string | Yes | See nested schema and runtime validation |
| `range` | object | No | See nested schema and runtime validation |
| `campaignIds` | string\[] | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "provider": {
          "type": "string"
        },
        "range": {
          "type": "object",
          "properties": {
            "from": {
              "$ref": "#/$defs/__schema0"
            },
            "to": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["from", "to"]
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 78,
                "pattern": "^(0|[1-9]\\d*)$"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        }
      },
      "required": ["provider"],
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "lastSyncAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "pendingOrders": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "sourceTotal": {
          "$ref": "#/$defs/__schema0"
        },
        "attestedTotal": {
          "$ref": "#/$defs/__schema0"
        },
        "acceptedTotal": {
          "$ref": "#/$defs/__schema0"
        },
        "mismatches": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "kind": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": ["info", "warning", "critical"]
              },
              "sourceOrderId": {
                "type": "string"
              },
              "saleId": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/__schema0"
                      },
                      {
                        "type": "string",
                        "pattern": "^demo-[\\w-]+$"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "suggestedAction": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "kind",
              "severity",
              "sourceOrderId",
              "saleId",
              "suggestedAction"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "lastSyncAt",
        "pendingOrders",
        "sourceTotal",
        "attestedTotal",
        "acceptedTotal",
        "mismatches"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## integrations.resolveMismatch

**POST `/v1/merchant/integrations/mismatches/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L486).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `note` | string | Yes | Min length: 20; Max length: 1000 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "note": {
          "type": "string",
          "minLength": 20,
          "maxLength": 1000
        }
      },
      "required": ["id", "note"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "actor": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "resource": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "beforeHash": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema0"
            },
            {
              "type": "null"
            }
          ]
        },
        "afterHash": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema0"
            },
            {
              "type": "null"
            }
          ]
        },
        "at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "id",
        "actor",
        "role",
        "resource",
        "action",
        "beforeHash",
        "afterHash",
        "at"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{64}$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## signers.list

**GET `/v1/merchant/signers`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L490).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

No fields. Use an empty object for the client method input.

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {},
      "additionalProperties": false
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "address": {
                "$ref": "#/$defs/__schema0"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "limits": {
                "type": "object",
                "properties": {
                  "perOrder": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "daily": {
                    "$ref": "#/$defs/__schema1"
                  }
                },
                "required": ["perOrder", "daily"],
                "additionalProperties": false
              },
              "expiry": {
                "$ref": "#/$defs/__schema2"
              },
              "revokedAt": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema2"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "usedToday": {
                "$ref": "#/$defs/__schema1"
              }
            },
            "required": [
              "id",
              "address",
              "scopes",
              "limits",
              "expiry",
              "revokedAt",
              "usedToday"
            ],
            "additionalProperties": false
          }
        },
        "policy": {
          "type": "object",
          "properties": {
            "domain": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "chainId": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "verifyingContract": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "required": ["name", "version", "chainId", "verifyingContract"],
              "additionalProperties": false
            },
            "nonceRule": {
              "type": "string"
            },
            "maxValiditySeconds": {
              "type": "number",
              "const": 900
            }
          },
          "required": ["domain", "nonceRule", "maxValiditySeconds"],
          "additionalProperties": false
        }
      },
      "required": ["items", "policy"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "__schema1": {
          "type": "string"
        },
        "__schema2": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## signers.add

**POST `/v1/merchant/signers`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L506).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `address` | string | Yes | Pattern validated; see input schema |
| `scopes` | string\[] | Yes | See nested schema and runtime validation |
| `limits` | object | Yes | See nested schema and runtime validation |
| `expiry` | string | Yes | Format: date-time; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limits": {
          "type": "object",
          "properties": {
            "perOrder": {
              "$ref": "#/$defs/__schema0"
            },
            "daily": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["perOrder", "daily"]
        },
        "expiry": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": ["address", "scopes", "limits", "expiry"],
      "$defs": {
        "__schema0": {
          "type": "string",
          "maxLength": 78,
          "pattern": "^(0|[1-9]\\d*)$"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limits": {
          "type": "object",
          "properties": {
            "perOrder": {
              "$ref": "#/$defs/__schema0"
            },
            "daily": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["perOrder", "daily"],
          "additionalProperties": false
        },
        "expiry": {
          "$ref": "#/$defs/__schema1"
        },
        "revokedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "null"
            }
          ]
        },
        "usedToday": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "required": [
        "id",
        "address",
        "scopes",
        "limits",
        "expiry",
        "revokedAt",
        "usedToday"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string"
        },
        "__schema1": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## signers.revoke

**DELETE `/v1/merchant/signers/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L510).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limits": {
          "type": "object",
          "properties": {
            "perOrder": {
              "$ref": "#/$defs/__schema0"
            },
            "daily": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["perOrder", "daily"],
          "additionalProperties": false
        },
        "expiry": {
          "$ref": "#/$defs/__schema1"
        },
        "revokedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "null"
            }
          ]
        },
        "usedToday": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "required": [
        "id",
        "address",
        "scopes",
        "limits",
        "expiry",
        "revokedAt",
        "usedToday"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string"
        },
        "__schema1": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## signers.attestations

**GET `/v1/merchant/signers/:id/attestations`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L511).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |
| `outcome` | string | No | See nested schema and runtime validation |
| `nonce` | string | No | Max length: 78; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "outcome": {
          "type": "string"
        },
        "nonce": {
          "type": "string",
          "maxLength": 78,
          "pattern": "^(0|[1-9]\\d*)$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "orderHash": {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{64}$"
              },
              "nonce": {
                "$ref": "#/$defs/__schema0"
              },
              "campaignId": {
                "$ref": "#/$defs/__schema1"
              },
              "amount": {
                "$ref": "#/$defs/__schema0"
              },
              "outcome": {
                "type": "string",
                "enum": ["accepted", "rejected", "pending"]
              },
              "saleId": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema1"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": [
              "id",
              "orderHash",
              "nonce",
              "campaignId",
              "amount",
              "outcome",
              "saleId",
              "at"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string"
        },
        "__schema1": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema0"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## apiKeys.list

**GET `/v1/developer/keys`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L517).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

No fields. Use an empty object for the client method input.

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {},
      "additionalProperties": false
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "prefix": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "$ref": "#/$defs/__schema0"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedAt": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "prefix",
          "scopes",
          "createdAt",
          "lastUsedAt",
          "revokedAt"
        ],
        "additionalProperties": false
      },
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## apiKeys.create

**POST `/v1/developer/keys`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L518).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `confirmationToken` | string | Yes | Min length: 32; Max length: 128 |
| `name` | string | Yes | Min length: 1; Max length: 80 |
| `scopes` | string\[] | Yes | Min items: 1 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "confirmationToken": {
          "type": "string",
          "minLength": 32,
          "maxLength": 128
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "scopes": {
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        }
      },
      "required": ["confirmationToken", "name", "scopes"],
      "$defs": {
        "__schema0": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "prefix": {
          "type": "string"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "createdAt": {
          "$ref": "#/$defs/__schema0"
        },
        "lastUsedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema0"
            },
            {
              "type": "null"
            }
          ]
        },
        "revokedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema0"
            },
            {
              "type": "null"
            }
          ]
        },
        "secret": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "prefix",
        "scopes",
        "createdAt",
        "lastUsedAt",
        "revokedAt",
        "secret"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## apiKeys.revoke

**DELETE `/v1/developer/keys/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L522).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        }
      },
      "required": ["ok"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## apiKeys.usage

**GET `/v1/developer/keys/:id/usage`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L523).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `range` | object | No | See nested schema and runtime validation |
| `campaignIds` | string\[] | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "range": {
          "type": "object",
          "properties": {
            "from": {
              "$ref": "#/$defs/__schema0"
            },
            "to": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["from", "to"]
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 78,
                "pattern": "^(0|[1-9]\\d*)$"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        }
      },
      "required": ["id"],
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "hourly": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "at": {
                "$ref": "#/$defs/__schema0"
              },
              "statusClass": {
                "type": "string"
              },
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["at", "statusClass", "count"],
            "additionalProperties": false
          }
        },
        "requests": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        }
      },
      "required": ["hourly", "requests"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "at": {
              "$ref": "#/$defs/__schema0"
            },
            "method": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "status": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "latencyMs": {
              "type": "number",
              "minimum": 0
            },
            "requestId": {
              "type": "string"
            }
          },
          "required": ["at", "method", "path", "status", "latencyMs", "requestId"],
          "additionalProperties": false
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## webhooks.list

**GET `/v1/developer/webhooks`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L536).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

No fields. Use an empty object for the client method input.

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {},
      "additionalProperties": false
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": ["id", "url", "events", "enabled", "createdAt"],
        "additionalProperties": false
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## webhooks.create

**POST `/v1/developer/webhooks`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L537).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `url` | string | Yes | Format: uri |
| `events` | string\[] | Yes | Min items: 1; Max items: 50 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "events": {
          "minItems": 1,
          "maxItems": 50,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        }
      },
      "required": ["url", "events"],
      "$defs": {
        "__schema0": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "events": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "enabled": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "secret": {
          "type": "string"
        }
      },
      "required": ["id", "url", "events", "enabled", "createdAt", "secret"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## webhooks.test

**POST `/v1/developer/webhooks/:id/test`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L538).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "endpointId": {
          "$ref": "#/$defs/__schema0"
        },
        "eventId": {
          "$ref": "#/$defs/__schema0"
        },
        "attempt": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "status": {
          "type": "string",
          "enum": ["queued", "sending", "delivered", "failed", "cancelled"]
        },
        "httpStatus": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "nextAttemptAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "$ref": "#/$defs/__schema1"
        }
      },
      "required": [
        "id",
        "endpointId",
        "eventId",
        "attempt",
        "status",
        "httpStatus",
        "nextAttemptAt",
        "createdAt"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## webhooks.deliveries

**GET `/v1/developer/webhooks/:id/deliveries`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L539).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "endpointId": {
                "$ref": "#/$defs/__schema0"
              },
              "eventId": {
                "$ref": "#/$defs/__schema0"
              },
              "attempt": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "status": {
                "type": "string",
                "enum": ["queued", "sending", "delivered", "failed", "cancelled"]
              },
              "httpStatus": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "nextAttemptAt": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema1"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "$ref": "#/$defs/__schema1"
              }
            },
            "required": [
              "id",
              "endpointId",
              "eventId",
              "attempt",
              "status",
              "httpStatus",
              "nextAttemptAt",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## webhooks.update

**PATCH `/v1/developer/webhooks/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L540).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `events` | string\[] | No | See nested schema and runtime validation |
| `enabled` | boolean | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "events": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "enabled": {
          "type": "boolean"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "events": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "enabled": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": ["id", "url", "events", "enabled", "createdAt"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## webhooks.rotateSecret

**POST `/v1/developer/webhooks/:id/secret`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L544).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "secret": {
          "type": "string"
        },
        "oldSecretExpiresAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": ["secret", "oldSecretExpiresAt"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## webhooks.remove

**DELETE `/v1/developer/webhooks/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L548).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        }
      },
      "required": ["ok"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## webhooks.replay

**POST `/v1/developer/webhooks/deliveries/:id/replay`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L549).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "endpointId": {
          "$ref": "#/$defs/__schema0"
        },
        "eventId": {
          "$ref": "#/$defs/__schema0"
        },
        "attempt": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "status": {
          "type": "string",
          "enum": ["queued", "sending", "delivered", "failed", "cancelled"]
        },
        "httpStatus": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "nextAttemptAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "$ref": "#/$defs/__schema1"
        }
      },
      "required": [
        "id",
        "endpointId",
        "eventId",
        "attempt",
        "status",
        "httpStatus",
        "nextAttemptAt",
        "createdAt"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## team.members

**GET `/v1/merchant/team`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L550).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

No fields. Use an empty object for the client method input.

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {},
      "additionalProperties": false
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "address": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "role": {
            "type": "string",
            "enum": ["owner", "admin", "analyst", "viewer"]
          },
          "status": {
            "type": "string",
            "enum": ["invited", "active", "removed"]
          },
          "joinedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["id", "address", "role", "status", "joinedAt"],
        "additionalProperties": false
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## team.invite

**POST `/v1/merchant/team`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L551).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `address` | string | Yes | Pattern validated; see input schema |
| `role` | "admin" · "analyst" · "viewer" | Yes | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "role": {
          "type": "string",
          "enum": ["admin", "analyst", "viewer"]
        }
      },
      "required": ["address", "role"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "role": {
          "type": "string",
          "enum": ["owner", "admin", "analyst", "viewer"]
        },
        "status": {
          "type": "string",
          "enum": ["invited", "active", "removed"]
        },
        "joinedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["id", "address", "role", "status", "joinedAt"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## team.updateRole

**PATCH `/v1/merchant/team/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L555).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `role` | "admin" · "analyst" · "viewer" | Yes | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "role": {
          "type": "string",
          "enum": ["admin", "analyst", "viewer"]
        }
      },
      "required": ["id", "role"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "role": {
          "type": "string",
          "enum": ["owner", "admin", "analyst", "viewer"]
        },
        "status": {
          "type": "string",
          "enum": ["invited", "active", "removed"]
        },
        "joinedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["id", "address", "role", "status", "joinedAt"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## team.remove

**DELETE `/v1/merchant/team/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L559).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        }
      },
      "required": ["ok"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## team.audit

**GET `/v1/merchant/team/audit`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L560).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "actor": {
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "resource": {
                "type": "string"
              },
              "action": {
                "type": "string"
              },
              "beforeHash": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema0"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "afterHash": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema0"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": [
              "id",
              "actor",
              "role",
              "resource",
              "action",
              "beforeHash",
              "afterHash",
              "at"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{64}$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## team.transferOwnership

**POST `/v1/merchant/team/transfer`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L561).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `address` | string | Yes | Pattern validated; see input schema |
| `confirmationToken` | string | Yes | Min length: 32; Max length: 128 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "confirmationToken": {
          "type": "string",
          "minLength": 32,
          "maxLength": 128
        }
      },
      "required": ["address", "confirmationToken"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        }
      },
      "required": ["ok"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## subscriptions.list

**GET `/v1/merchant/subscriptions`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L562).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "campaignId": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema1"
                  },
                  {
                    "type": "string",
                    "pattern": "^demo-[\\w-]+$"
                  }
                ]
              },
              "name": {
                "type": "string"
              },
              "billingPeriod": {
                "type": "string",
                "enum": ["monthly", "yearly"]
              },
              "subscribers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/$defs/__schema0"
                    },
                    "renewalCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "rewards": {
                      "$ref": "#/$defs/__schema1"
                    },
                    "cap": {
                      "$ref": "#/$defs/__schema1"
                    },
                    "nextRenewalAt": {
                      "anyOf": [
                        {
                          "$ref": "#/$defs/__schema2"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "renewalCount",
                    "rewards",
                    "cap",
                    "nextRenewalAt"
                  ],
                  "additionalProperties": false
                }
              },
              "series": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "at": {
                      "$ref": "#/$defs/__schema2"
                    },
                    "sales": {
                      "type": "object",
                      "properties": {
                        "pending": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "finalized": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "refunded": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": ["pending", "finalized", "refunded"],
                      "additionalProperties": false
                    },
                    "value": {
                      "$ref": "#/$defs/__schema1"
                    },
                    "rewards": {
                      "$ref": "#/$defs/__schema1"
                    },
                    "links": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": ["at", "sales", "value", "rewards", "links"],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "name",
              "billingPeriod",
              "subscribers",
              "series"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "type": "string"
        },
        "__schema2": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## subscriptions.get

**GET `/v1/merchant/subscriptions/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L563).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "campaignId": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "billingPeriod": {
          "type": "string",
          "enum": ["monthly", "yearly"]
        },
        "subscribers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "renewalCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rewards": {
                "$ref": "#/$defs/__schema1"
              },
              "cap": {
                "$ref": "#/$defs/__schema1"
              },
              "nextRenewalAt": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema2"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["id", "renewalCount", "rewards", "cap", "nextRenewalAt"],
            "additionalProperties": false
          }
        },
        "series": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "at": {
                "$ref": "#/$defs/__schema2"
              },
              "sales": {
                "type": "object",
                "properties": {
                  "pending": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "finalized": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "refunded": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["pending", "finalized", "refunded"],
                "additionalProperties": false
              },
              "value": {
                "$ref": "#/$defs/__schema1"
              },
              "rewards": {
                "$ref": "#/$defs/__schema1"
              },
              "links": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["at", "sales", "value", "rewards", "links"],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "id",
        "campaignId",
        "name",
        "billingPeriod",
        "subscribers",
        "series"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "type": "string"
        },
        "__schema2": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## subscriptions.save

**PUT `/v1/merchant/subscriptions/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L564).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `campaignId` | string | Yes | See nested schema and runtime validation |
| `name` | string | Yes | See nested schema and runtime validation |
| `billingPeriod` | "monthly" · "yearly" | Yes | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "campaignId": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 78,
              "pattern": "^(0|[1-9]\\d*)$"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "billingPeriod": {
          "type": "string",
          "enum": ["monthly", "yearly"]
        }
      },
      "required": ["id", "campaignId", "name", "billingPeriod"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "campaignId": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema1"
            },
            {
              "type": "string",
              "pattern": "^demo-[\\w-]+$"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "billingPeriod": {
          "type": "string",
          "enum": ["monthly", "yearly"]
        },
        "subscribers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "renewalCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rewards": {
                "$ref": "#/$defs/__schema1"
              },
              "cap": {
                "$ref": "#/$defs/__schema1"
              },
              "nextRenewalAt": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema2"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["id", "renewalCount", "rewards", "cap", "nextRenewalAt"],
            "additionalProperties": false
          }
        },
        "series": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "at": {
                "$ref": "#/$defs/__schema2"
              },
              "sales": {
                "type": "object",
                "properties": {
                  "pending": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "finalized": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "refunded": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["pending", "finalized", "refunded"],
                "additionalProperties": false
              },
              "value": {
                "$ref": "#/$defs/__schema1"
              },
              "rewards": {
                "$ref": "#/$defs/__schema1"
              },
              "links": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["at", "sales", "value", "rewards", "links"],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "id",
        "campaignId",
        "name",
        "billingPeriod",
        "subscribers",
        "series"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "__schema1": {
          "type": "string"
        },
        "__schema2": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## partnerships.list

**GET `/v1/partnerships`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L572).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "fromMerchantId": {
                "$ref": "#/$defs/__schema0"
              },
              "toMerchantId": {
                "$ref": "#/$defs/__schema0"
              },
              "campaignIds": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "string",
                      "pattern": "^demo-[\\w-]+$"
                    }
                  ]
                }
              },
              "terms": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "proposed",
                  "accepted",
                  "declined",
                  "notice",
                  "withdrawn",
                  "terminated"
                ]
              },
              "versionHistory": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "terms": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    }
                  },
                  "required": ["version", "terms", "at"],
                  "additionalProperties": false
                }
              },
              "performance": {
                "type": "object",
                "properties": {
                  "pending": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "finalized": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "refunded": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["pending", "finalized", "refunded"],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "fromMerchantId",
              "toMerchantId",
              "campaignIds",
              "terms",
              "status",
              "versionHistory",
              "performance"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## partnerships.propose

**POST `/v1/partnerships`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L573).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `toMerchantId` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `campaignIds` | string\[] | Yes | See nested schema and runtime validation |
| `terms` | string | Yes | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "toMerchantId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 78,
                "pattern": "^(0|[1-9]\\d*)$"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        },
        "terms": {
          "type": "string"
        }
      },
      "required": ["toMerchantId", "campaignIds", "terms"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "fromMerchantId": {
          "$ref": "#/$defs/__schema0"
        },
        "toMerchantId": {
          "$ref": "#/$defs/__schema0"
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        },
        "terms": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "proposed",
            "accepted",
            "declined",
            "notice",
            "withdrawn",
            "terminated"
          ]
        },
        "versionHistory": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "terms": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": ["version", "terms", "at"],
            "additionalProperties": false
          }
        },
        "performance": {
          "type": "object",
          "properties": {
            "pending": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "finalized": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "refunded": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["pending", "finalized", "refunded"],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "fromMerchantId",
        "toMerchantId",
        "campaignIds",
        "terms",
        "status",
        "versionHistory",
        "performance"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## partnerships.respond

**POST `/v1/partnerships/:id/responses`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L577).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `response` | "accept" · "decline" | Yes | See nested schema and runtime validation |
| `reason` | string | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "response": {
          "type": "string",
          "enum": ["accept", "decline"]
        },
        "reason": {
          "type": "string"
        }
      },
      "required": ["id", "response"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "fromMerchantId": {
          "$ref": "#/$defs/__schema0"
        },
        "toMerchantId": {
          "$ref": "#/$defs/__schema0"
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        },
        "terms": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "proposed",
            "accepted",
            "declined",
            "notice",
            "withdrawn",
            "terminated"
          ]
        },
        "versionHistory": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "terms": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": ["version", "terms", "at"],
            "additionalProperties": false
          }
        },
        "performance": {
          "type": "object",
          "properties": {
            "pending": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "finalized": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "refunded": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["pending", "finalized", "refunded"],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "fromMerchantId",
        "toMerchantId",
        "campaignIds",
        "terms",
        "status",
        "versionHistory",
        "performance"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## partnerships.terminate

**POST `/v1/partnerships/:id/terminate`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L581).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `mode` | "notice" · "withdraw" | Yes | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "mode": {
          "type": "string",
          "enum": ["notice", "withdraw"]
        }
      },
      "required": ["id", "mode"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "fromMerchantId": {
          "$ref": "#/$defs/__schema0"
        },
        "toMerchantId": {
          "$ref": "#/$defs/__schema0"
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        },
        "terms": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "proposed",
            "accepted",
            "declined",
            "notice",
            "withdrawn",
            "terminated"
          ]
        },
        "versionHistory": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "terms": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": ["version", "terms", "at"],
            "additionalProperties": false
          }
        },
        "performance": {
          "type": "object",
          "properties": {
            "pending": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "finalized": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "refunded": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["pending", "finalized", "refunded"],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "fromMerchantId",
        "toMerchantId",
        "campaignIds",
        "terms",
        "status",
        "versionHistory",
        "performance"
      ],
      "additionalProperties": false,
      "$defs": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## communities.list

**GET `/v1/communities`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L585).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "owner": {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{40}$"
              },
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "campaignIds": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "string",
                      "pattern": "^demo-[\\w-]+$"
                    }
                  ]
                }
              },
              "memberCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": [
              "id",
              "owner",
              "name",
              "description",
              "campaignIds",
              "memberCount",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## communities.get

**GET `/v1/communities/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L586).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "owner": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        },
        "memberCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "id",
        "owner",
        "name",
        "description",
        "campaignIds",
        "memberCount",
        "createdAt"
      ],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## communities.create

**POST `/v1/communities`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L587).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `name` | string | Yes | See nested schema and runtime validation |
| `description` | string | Yes | See nested schema and runtime validation |
| `campaignIds` | string\[] | Yes | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 78,
                "pattern": "^(0|[1-9]\\d*)$"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        }
      },
      "required": ["name", "description", "campaignIds"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "owner": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        },
        "memberCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "id",
        "owner",
        "name",
        "description",
        "campaignIds",
        "memberCount",
        "createdAt"
      ],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## communities.members

**GET `/v1/communities/:id/members`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L591).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `cursor` | string | No | See nested schema and runtime validation |
| `limit` | integer | No | Minimum: 1; Maximum: 100 |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "cursor": {
          "type": "string"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{40}$"
              },
              "role": {
                "type": "string",
                "enum": ["owner", "member"]
              },
              "joinedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": ["address", "role", "joinedAt"],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "type": ["string", "null"]
        }
      },
      "required": ["items", "nextCursor"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## communities.join

**POST `/v1/communities/:id/members`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L592).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `inviteCode` | string | Yes | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "inviteCode": {
          "type": "string"
        }
      },
      "required": ["id", "inviteCode"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "role": {
          "type": "string",
          "enum": ["owner", "member"]
        },
        "joinedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": ["address", "role", "joinedAt"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## communities.leave

**DELETE `/v1/communities/:id/members/me`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L593).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        }
      },
      "required": ["ok"],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>

## communities.update

**PATCH `/v1/communities/:id`** · **Designed — unavailable** · Access: **session**. [Source definition](https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L594).

An authenticated session is necessary; ownership, merchant/operator scope, and any fresh-confirmation requirements are checked separately by the service.

**Client input fields**

| Field | Type | Required | Constraints |
| - | - | - | - |
| `id` | string | Yes | Min length: 1; Max length: 100; Pattern validated; see input schema |
| `name` | string | No | See nested schema and runtime validation |
| `description` | string | No | See nested schema and runtime validation |
| `campaignIds` | string\[] | No | See nested schema and runtime validation |
| `removeMember` | string | No | Pattern validated; see input schema |
| `regenerateInvite` | boolean | No | See nested schema and runtime validation |

<AccordionGroup>
  <Accordion title="Structural input JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 78,
                "pattern": "^(0|[1-9]\\d*)$"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        },
        "removeMember": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "regenerateInvite": {
          "type": "boolean"
        }
      },
      "required": ["id"]
    }
    ```
  </Accordion>

  <Accordion title="Structural output JSON schema">
    ```json theme={null}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        "owner": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "pattern": "^demo-[\\w-]+$"
              }
            ]
          }
        },
        "memberCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "id",
        "owner",
        "name",
        "description",
        "campaignIds",
        "memberCount",
        "createdAt"
      ],
      "additionalProperties": false
    }
    ```
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.