stable · api · 0.1.0
Validate a repository-owned Notification Catalog
POST /api/v1/notification-catalog/validate
Capability Domain: Notifications
Authentication
projectCredential (notifications:write)
Scope: notifications:write
Parameters and request body
-
X-Correlation-ID— header, optionalX-Correlation-ID schema { "type": "string", "format": "uuid" }
Request schema
application/json
{
"type": "object",
"additionalProperties": false,
"required": [
"entries"
],
"properties": {
"entries": {
"type": "array",
"minItems": 1,
"maxItems": 500,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"event_key",
"template_key",
"channel",
"purpose",
"locale",
"sender_profile",
"variables"
],
"properties": {
"event_key": {
"type": "string",
"maxLength": 120,
"pattern": "^[a-z][a-z0-9_.-]+$"
},
"template_key": {
"type": "string",
"maxLength": 120
},
"channel": {
"type": "string",
"enum": [
"email",
"fcm",
"apns",
"line",
"web_push"
]
},
"purpose": {
"type": "string",
"maxLength": 120,
"pattern": "^[a-z][a-z0-9_.-]+$"
},
"locale": {
"type": "string",
"maxLength": 20
},
"sender_profile": {
"type": "string",
"maxLength": 120
},
"variables": {
"type": "object",
"maxProperties": 50,
"additionalProperties": {
"type": "string",
"enum": [
"string",
"integer",
"number"
]
}
}
}
}
}
}
}
application/json request example
{
"entries": [
{
"event_key": "leader.geo_match_found",
"template_key": "geo-match-found",
"channel": "fcm",
"purpose": "geo_match_updates",
"locale": "zh-TW",
"sender_profile": "default",
"variables": {
"leader_name": "string"
}
}
]
}
Responses and errors
| Status | Description |
|---|---|
200 | Catalog validation result |
401 | Invalid or revoked Project Credential |
403 | Project Credential lacks the required scope |
422 | Request violates the public contract |
200 schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"entries",
"digest"
],
"properties": {
"entries": {
"type": "integer",
"minimum": 1
},
"digest": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
}
}
}
}
401 schema
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message",
"retryable",
"correlation_id",
"details"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"correlation_id": {
"type": "string",
"format": "uuid"
},
"details": {
"type": "object"
}
}
}
}
}
403 schema
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message",
"retryable",
"correlation_id",
"details"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"correlation_id": {
"type": "string",
"format": "uuid"
},
"details": {
"type": "object"
}
}
}
}
}
422 schema
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message",
"retryable",
"correlation_id",
"details"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"correlation_id": {
"type": "string",
"format": "uuid"
},
"details": {
"type": "object"
}
}
}
}
}
200 example
{
"data": {
"entries": 1,
"digest": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
}
Idempotency
Validation is read-only; retry with the same catalog body.