1.0 stable for the consent-link profile — MCP binding profile, registry and forwarding. Other profiles and the core objects are draft. What is stable

Isto Intents push subscription

push-subscription.schema.json · raw JSON · JSON Schema 2020-12

The structuredContent of intent_subscribe_events and intent_unsubscribe_events (push profile, draft 0.4). The endpoint secret is never echoed.

$id: https://istointents.org/schemas/0.4/push-subscription.schema.json

Fields#

fieldtyperequireddescription
specVersion"0.4"yes
type"push-subscription"yes
subscriptionIdstring (pattern ^[A-Za-z0-9_-]{22,64}$)yes
status"awaiting_person_approval" | "verifying" | "active" | "ended"yes
approval"on-consent-page" | "sent-to-verified-channel"
eventsarray of "intent.matches.delivered" | "intent.status.changed" | "interest.status.changed"yes
expiresAtcommon › timestampyes
refreshBeforecommon › timestampyes

Examples#

Full schema#

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://istointents.org/schemas/0.4/push-subscription.schema.json",
  "title": "Isto Intents push subscription",
  "description": "The structuredContent of intent_subscribe_events and intent_unsubscribe_events (push profile, draft 0.4). The endpoint secret is never echoed.",
  "type": "object",
  "required": [
    "specVersion",
    "type",
    "subscriptionId",
    "status",
    "expiresAt",
    "refreshBefore",
    "events"
  ],
  "properties": {
    "specVersion": {
      "const": "0.4"
    },
    "type": {
      "const": "push-subscription"
    },
    "subscriptionId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{22,64}$"
    },
    "status": {
      "enum": [
        "awaiting_person_approval",
        "verifying",
        "active",
        "ended"
      ]
    },
    "approval": {
      "enum": [
        "on-consent-page",
        "sent-to-verified-channel"
      ]
    },
    "events": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "enum": [
          "intent.matches.delivered",
          "intent.status.changed",
          "interest.status.changed"
        ]
      }
    },
    "expiresAt": {
      "$ref": "https://istointents.org/schemas/0.1/common.schema.json#/$defs/timestamp"
    },
    "refreshBefore": {
      "$ref": "https://istointents.org/schemas/0.1/common.schema.json#/$defs/timestamp"
    }
  },
  "additionalProperties": false,
  "if": {
    "properties": {
      "status": {
        "const": "awaiting_person_approval"
      }
    }
  },
  "then": {
    "required": [
      "approval"
    ]
  }
}