Signals and subscriptions Proposal
A signal records a capacity requirement with a provider as a standing need. A subscription sends you an event when the answer to a requirement or a signal changes. This page explains their states, confidentiality, and event delivery.
Signals#
A signal records a requirement with the provider until you end it. The provider doesn't keep a query. A signal has the same CapacityRequirement as a query, plus the following optional fields:
| Field | Meaning |
|---|---|
reference | Your own reference |
confidence | How firm the need is: EXPLORATORY, PLANNED, FUNDED, or COMMITTED |
confidentiality | What the provider can do with the signal |
contact | A name and an email address. Required when confidentiality.contactPermitted is true. |
expiresAt | When the signal ends. Absent means the maximum signal lifetime of the provider. |
A provider can give its current answer to a signal in the answer field of the signal.
Confidentiality#
A signal discloses your plans to the provider. You state what the provider can do with it. Absent values take the most restrictive default.
| Field | Values |
|---|---|
sharing | NONE, the default: the provider uses the signal only for its own capacity planning. AGGREGATED: the provider can also include it in totals that don't identify you. |
contactPermitted | True when the provider can contact you about the signal. The default is false. |
Signal states#
| State | Meaning |
|---|---|
RECEIVED | Stored, and not yet taken into planning |
ACKNOWLEDGED | The provider has taken it into planning |
WITHDRAWN | You ended the need and kept the record. It isn't an active need. |
CLOSED | The provider ended it. closeReason is FULFILLED, DECLINED, DUPLICATE, or OTHER. |
EXPIRED | expiresAt passed |
Amend, withdraw, and delete#
| Action | Operation | Effect |
|---|---|---|
| Amend | PUT /signals/{signalId} with If-Match | Replaces the part of the signal that you supply. The revision increases by one, and the state returns to RECEIVED. An amend makes a WITHDRAWN signal active again. A signal in the state CLOSED or EXPIRED returns 409. |
| Withdraw | POST /signals/{signalId}/withdraw | Moves the signal to WITHDRAWN. The signal stays readable and listed until you delete it. Subscriptions that follow the signal receive a signal.updated event and no more answer events while it is withdrawn. |
| Delete | DELETE /signals/{signalId} | Removes the signal from the API. Later reads return 404. Subscriptions that follow the signal move to EXPIRED. |
The specification doesn't say what a provider keeps in its own records after a delete. The agreement between you and the provider governs that.
The following request records a need of 40 cabinets and 800 kVA in Frankfurt, for the provider's planning only, with permission to contact you:
{
"reference": "example-signal-1",
"confidence": "PLANNED",
"confidentiality": {
"sharing": "NONE",
"contactPermitted": true
},
"contact": {
"name": "Network Operations",
"email": "noc@example.com"
},
"requirement": {
"locations": [
{
"level": "METRO",
"code": "FR"
}
],
"demand": {
"power": {
"value": 800,
"unit": "KVA"
},
"cabinets": {
"count": 40
},
"density": {
"target": 20,
"unit": "KVA"
}
},
"timeframe": {
"neededForService": "2027-06-01"
},
"desiredFeatures": [
{
"feature": "LIQUID_COOLING",
"required": true
}
]
}
}Subscriptions#
A subscription follows the answer to one requirement, or the answer and the state of one of your signals. Exactly one of requirement and signalId is present.
| Field | Meaning |
|---|---|
delivery | Required. WEBHOOK with an https URL, or PULL. |
notifyOn | GRADE_CHANGE, the default, sends an event when a grade changes. ANY_CHANGE also sends one when a band, a date, or a feature entry changes. |
paused | True stops delivery without deleting the subscription. The default is false. |
name, expiresAt | A label, and when the subscription ends |
The first event after activation has the current answer, with the reason INITIAL.
A provider can coalesce several changes to an answer into one event. An event always has the latest answer, and the sequence has no gaps.
Subscription states#
| State | Meaning |
|---|---|
PENDING_VERIFICATION | Waiting for the webhook endpoint to echo the challenge |
ACTIVE | Events are delivered |
PAUSED | Stopped by you |
SUSPENDED | Stopped by the provider after repeated delivery failures. Amend the subscription to return to PENDING_VERIFICATION. |
EXPIRED | expiresAt passed, or the followed signal ended. EXPIRED is final. |
With PULL delivery, the state is ACTIVE at once. A change of the webhook URL returns the state to PENDING_VERIFICATION.
Webhook delivery#
The provider sends each event as one POST, as a CloudEvents 1.0 envelope in structured JSON mode.
| Step | Rule |
|---|---|
| Verification | The provider first sends a verification event. Respond 200 with the body {"challenge": "<data.challenge>"}. |
| Signing | Verify the OpenCapacity-Signature header before you trust the body. Its value is t=<unix seconds>,v1=<hex>. The hex string is the HMAC-SHA256 of <t>.<raw body>, keyed with the signing secret of the subscription. The provider returns the signing secret once, in the create response. |
| Delivery | Delivery is at least once. De-duplicate on the event id, and order by data.sequence. Any 2xx response acknowledges the event. The provider retries other outcomes with increasing delays for at least 24 hours and then moves the subscription to SUSPENDED. |
Pull delivery#
GET /subscriptions/{subscriptionId}/events returns events in sequence order. It is available for every subscription, whatever its delivery type, for at least limits.eventRetentionHours after each event.
Accept header | Response |
|---|---|
application/json | One page of events |
text/event-stream | A server-sent event stream that stays open. Each server-sent event has the event sequence as its id and one event as its data. |
To reconnect, send the Last-Event-ID header or the after parameter.
Example#
The following request follows a signal and delivers events to a webhook when a grade changes:
{
"name": "Frankfurt 2027",
"signalId": "sig-0001",
"notifyOn": "GRADE_CHANGE",
"delivery": {
"type": "WEBHOOK",
"url": "https://customer.example/hooks/capacity"
}
}The following event reports that the grade for the subscribed requirement changed to AVAILABLE:
{
"specversion": "1.0",
"id": "evt-000017",
"source": "https://provider.example/capacity/v1",
"type": "org.opencapacity.answer.updated",
"subject": "sub-0001",
"time": "2026-12-02T08:15:00Z",
"datacontenttype": "application/json",
"data": {
"subscriptionId": "sub-0001",
"sequence": 17,
"reason": "GRADE_CHANGE",
"answer": {
"answerId": "ans-0042",
"generatedAt": "2026-12-02T08:15:00Z",
"validUntil": "2026-12-03T08:15:00Z",
"grade": "AVAILABLE",
"results": [
{
"location": {
"level": "METRO",
"code": "FR"
},
"grade": "AVAILABLE",
"supportedFeatures": [
{
"feature": "LIQUID_COOLING",
"support": "AVAILABLE",
"required": true
}
]
}
]
}
}
}Related pages#
- To write the requirement of a signal or a subscription, see Capacity requirements.
- To see how subscriptions can disclose timing and what a provider does about it, see Disclosure risks and the provider's defenses.
- For each step as a request and a response, see Signal examples and Subscription and event examples.
- For event types, error codes, and limits, see OpenCapacity 1.0 reference.