{
    "lexicon": 1,
    "id": "place.wisp.v2.secret.create",
    "defs": {
        "main": {
            "type": "procedure",
            "description": "Create a named webhook signing secret. The server generates a short random token returned once in the response. Reference the secret by name via secretId in place.wisp.v2.wh.",
            "input": {
                "encoding": "application/json",
                "schema": {
                    "type": "object",
                    "required": ["name"],
                    "properties": {
                        "name": {
                            "type": "string",
                            "format": "record-key",
                            "maxLength": 64,
                            "description": "Unique 1–64 character secret ID scoped to the caller DID. Use ASCII letters, digits, dots, underscores, and hyphens only."
                        }
                    }
                }
            },
            "output": {
                "encoding": "application/json",
                "schema": {
                    "type": "object",
                    "required": ["name", "token", "createdAt"],
                    "properties": {
                        "name": { "type": "string" },
                        "token": {
                            "type": "string",
                            "description": "The signing token. Only returned at creation time — store it now."
                        },
                        "createdAt": { "type": "string", "format": "datetime" }
                    }
                }
            },
            "errors": [
                { "name": "AuthenticationRequired" },
                { "name": "InvalidRequest" },
                { "name": "AlreadyExists" }
            ]
        }
    }
}
