{
  "info": {
    "name": "Cormak — Official API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Build product-content integrations with the existing Cormak OAuth Store API. For tasks, agents, projects and creative tools use the separate MCP collection. Start with 01 Discovery for a free HTTP 200 without an account. apiKey is an OAuth access token, not an issued personal API key. See README.md for PKCE setup, consent, limits, retries and credit use. Collection examples contain no real data. Publication and paid/write execution require explicit owner approval."
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://mcp.cormak.app",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "01 Discovery and safe negative tests",
      "item": [
        {
          "name": "1. OAuth resource metadata — no token needed",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{baseUrl}}/.well-known/oauth-protected-resource/mcp",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                ".well-known",
                "oauth-protected-resource",
                "mcp"
              ]
            },
            "description": "First successful request; free public metadata."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 200', () => pm.response.to.have.status(200));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('Canonical resource', () => pm.expect(pm.response.json().resource).to.eql('https://mcp.cormak.app/mcp'));",
                  "pm.test('Scopes', () => pm.expect(pm.response.json().scopes_supported).to.be.an('array').that.includes('store:use')); ",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "2. OAuth authorization metadata",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{baseUrl}}/.well-known/oauth-authorization-server/mcp",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                ".well-known",
                "oauth-authorization-server",
                "mcp"
              ]
            },
            "description": "Discover the real endpoints."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 200', () => pm.response.to.have.status(200));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('PKCE S256', () => pm.expect(pm.response.json().code_challenge_methods_supported).to.include('S256')); ",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "3. Store missing token — expected 401",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{baseUrl}}/store",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "store"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"action\": \"account\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Safe negative test. Sends no credentials."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 401', () => pm.response.to.have.status(401));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('invalid_token', () => pm.expect(pm.response.json().error).to.eql('invalid_token')); ",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "4. MCP missing token — expected 401",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{baseUrl}}/mcp",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/list\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Safe negative test."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 401', () => pm.response.to.have.status(401));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('Challenge', () => pm.expect(pm.response.headers.get('WWW-Authenticate')).to.include('resource_metadata')); ",
                  "pm.test('invalid_token', () => pm.expect(pm.response.json().error).to.eql('invalid_token')); ",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        }
      ]
    },
    {
      "name": "02 Authorized reads — store:use",
      "item": [
        {
          "name": "Account and current prices — free",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/store",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "store"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"action\": \"account\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Requires a store:use token. Private response contains your email and wallet: never publish captured responses."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get('apiKey')) { pm.execution.skipRequest(); }"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 200', () => pm.response.to.have.status(200));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "const data = pm.response.json();",
                  "pm.test('Store v1 wallet', () => { pm.expect(data.api_version).to.eql(1); pm.expect(data.available_ai_credits).to.be.a('number'); pm.expect(data.daily_limit).to.be.a('number'); pm.expect(data.used_today).to.be.a('number'); });",
                  "pm.test('Price contract', () => { pm.expect(data.prices.text).to.eql(1); pm.expect(data.prices.images.nano2.standard).to.be.a('number'); });",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Image status — no new generation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/store",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "store"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"action\": \"image_status\",\n  \"request_ids\": [\n    \"00000000-0000-4000-8000-000000000001\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Uses a fictional UUID. Replace with your original image request_id. May reconcile a stale job; does not start a new generation."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get('apiKey')) { pm.execution.skipRequest(); }"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 200', () => pm.response.to.have.status(200));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('Images', () => { pm.expect(pm.response.json().images).to.be.an('array'); pm.response.json().images.forEach(i => pm.expect(['running','complete','failed','unknown','not_found']).to.include(i.status)); });",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Invalid action — expected 400",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/store",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "store"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"action\": \"not_a_supported_action\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Requires valid store:use token; no generation."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get('apiKey')) { pm.execution.skipRequest(); }"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 400', () => pm.response.to.have.status(400));",
                  "pm.test('invalid_action', () => pm.expect(pm.response.json().error).to.eql('invalid_action')); ",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Invalid image status UUID — expected 400",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/store",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "store"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"action\": \"image_status\",\n  \"request_ids\": [\n    \"not-a-uuid\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Requires valid store:use token; validates input before status read."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get('apiKey')) { pm.execution.skipRequest(); }"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 400', () => pm.response.to.have.status(400));",
                  "pm.test('invalid_request', () => pm.expect(pm.response.json().error).to.eql('invalid_request')); ",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        }
      ]
    },
    {
      "name": "03 PAID — blocked by default",
      "description": "Do not run without explicit owner approval. Read prices first.",
      "item": [
        {
          "name": "Generate product text — COSTS 1 CREDIT",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/store",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "store"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"action\": \"fill_text\",\n  \"request_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"locale\": \"en_US\",\n  \"product\": {\n    \"name\": \"White ceramic mug\",\n    \"attributes\": [\n      {\n        \"name\": \"Material\",\n        \"values\": [\n          \"Ceramic\"\n        ]\n      }\n    ]\n  },\n  \"options\": {\n    \"fields\": [\n      \"title\",\n      \"description\",\n      \"image_alt\"\n    ],\n    \"tone\": \"neutral\",\n    \"length\": \"short\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "BLOCKED by default. After explicit owner approval set local allowPaidRequests=true. Choose a fresh UUID for new intended work; keep the exact UUID/body for retries."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.environment.get('allowPaidRequests') !== 'true') {",
                  "  pm.request.url.update('https://blocked.invalid/cormak-opt-in-required');",
                  "  if (pm.execution && typeof pm.execution.skipRequest === 'function') { pm.execution.skipRequest(); }",
                  "}"
                ]
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get('apiKey')) { pm.execution.skipRequest(); }"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('Completion or running replay', () => pm.expect([200,202]).to.include(pm.response.code));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('Durable identity/state', () => { const d=pm.response.json(); pm.expect(d.request_id).to.be.a('string'); pm.expect(['complete','running','failed','unknown']).to.include(d.status); if(d.status==='complete') { pm.expect(d.credits_charged).to.eql(1); pm.expect(d.result).to.be.an('object'); } });",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Start product image — COSTS CURRENT QUOTE",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/store",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "store"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"action\": \"image_start\",\n  \"request_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"mode\": \"prompt\",\n  \"prompt\": \"A white ceramic mug on a plain background\",\n  \"model\": \"nano2\",\n  \"quality\": \"standard\",\n  \"aspect_ratio\": \"1:1\",\n  \"expected_credits\": 2,\n  \"use_free_photo\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "BLOCKED by default. Read current prices first and update expected_credits. Charges can occur immediately. One operation generates one frame; variation selects composition, not batch size."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.environment.get('allowPaidRequests') !== 'true') {",
                  "  pm.request.url.update('https://blocked.invalid/cormak-opt-in-required');",
                  "  if (pm.execution && typeof pm.execution.skipRequest === 'function') { pm.execution.skipRequest(); }",
                  "}"
                ]
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get('apiKey')) { pm.execution.skipRequest(); }"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 202', () => pm.response.to.have.status(202));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('Accepted image', () => { const d=pm.response.json(); pm.expect(d.request_id).to.be.a('string'); pm.expect(['running','complete','failed','unknown']).to.include(d.status); pm.expect(d.credits_max).to.be.a('number'); });",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        }
      ]
    },
    {
      "name": "04 OAuth setup — blocked by default",
      "description": "SETUP / SIDE EFFECTS — blocked unless local allowOAuthSetup=true, with explicit owner approval. Register one client using the same callback as Postman OAuth helper. Then configure Authorization Code (With PKCE), SHA-256, no client secret, client authentication in request body, explicit scope and resource on both authorize/token calls. Do not use ordinary Send for the authorize redirect: follow the browser consent workflow. Do not share tokens or save token responses.",
      "item": [
        {
          "name": "Register public OAuth client — creates record",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json, text/event-stream"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{baseUrl}}/mcp/register",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp",
                "register"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"client_name\": \"Cormak Postman local client\",\n  \"redirect_uris\": [\n    \"{{redirectUri}}\"\n  ],\n  \"token_endpoint_auth_method\": \"none\",\n  \"grant_types\": [\n    \"authorization_code\",\n    \"refresh_token\"\n  ],\n  \"response_types\": [\n    \"code\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "SETUP / SIDE EFFECTS — blocked unless local allowOAuthSetup=true, with explicit owner approval. Register one client using the same callback as Postman OAuth helper. Then configure Authorization Code (With PKCE), SHA-256, no client secret, client authentication in request body, explicit scope and resource on both authorize/token calls. Do not use ordinary Send for the authorize redirect: follow the browser consent workflow. Do not share tokens or save token responses."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.environment.get('allowOAuthSetup') !== 'true') {",
                  "  pm.request.url.update('https://blocked.invalid/cormak-opt-in-required');",
                  "  if (pm.execution && typeof pm.execution.skipRequest === 'function') { pm.execution.skipRequest(); }",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 201', () => pm.response.to.have.status(201));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('Public client', () => { const d=pm.response.json(); pm.expect(d.client_id).to.be.a('string'); pm.expect(d.token_endpoint_auth_method).to.eql('none'); });",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Exchange approved code — private tokens",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/x-www-form-urlencoded"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{baseUrl}}/mcp/token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp",
                "token"
              ]
            },
            "description": "SETUP / SIDE EFFECTS — blocked unless local allowOAuthSetup=true, with explicit owner approval. Register one client using the same callback as Postman OAuth helper. Then configure Authorization Code (With PKCE), SHA-256, no client secret, client authentication in request body, explicit scope and resource on both authorize/token calls. Do not use ordinary Send for the authorize redirect: follow the browser consent workflow. Do not share tokens or save token responses.",
            "body": {
              "mode": "urlencoded",
              "urlencoded": [
                {
                  "key": "grant_type",
                  "value": "authorization_code",
                  "type": "text"
                },
                {
                  "key": "client_id",
                  "value": "{{clientId}}",
                  "type": "text"
                },
                {
                  "key": "code",
                  "value": "{{authorizationCode}}",
                  "type": "text"
                },
                {
                  "key": "code_verifier",
                  "value": "{{codeVerifier}}",
                  "type": "text"
                },
                {
                  "key": "redirect_uri",
                  "value": "{{redirectUri}}",
                  "type": "text"
                },
                {
                  "key": "resource",
                  "value": "https://mcp.cormak.app/mcp",
                  "type": "text"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.environment.get('allowOAuthSetup') !== 'true') {",
                  "  pm.request.url.update('https://blocked.invalid/cormak-opt-in-required');",
                  "  if (pm.execution && typeof pm.execution.skipRequest === 'function') { pm.execution.skipRequest(); }",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 200', () => pm.response.to.have.status(200));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('Private token shape', () => { const d=pm.response.json(); pm.expect(d.token_type).to.eql('Bearer'); pm.expect(d.access_token).to.be.a('string'); pm.expect(d.refresh_token).to.be.a('string'); pm.expect(d.expires_in).to.be.at.most(3600); });",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Refresh once under a client lock — rotates tokens",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/x-www-form-urlencoded"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{baseUrl}}/mcp/token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp",
                "token"
              ]
            },
            "description": "SETUP / SIDE EFFECTS — blocked unless local allowOAuthSetup=true, with explicit owner approval. Register one client using the same callback as Postman OAuth helper. Then configure Authorization Code (With PKCE), SHA-256, no client secret, client authentication in request body, explicit scope and resource on both authorize/token calls. Do not use ordinary Send for the authorize redirect: follow the browser consent workflow. Do not share tokens or save token responses. Never replay an old refresh token or run concurrent refreshes.",
            "body": {
              "mode": "urlencoded",
              "urlencoded": [
                {
                  "key": "grant_type",
                  "value": "refresh_token",
                  "type": "text"
                },
                {
                  "key": "client_id",
                  "value": "{{clientId}}",
                  "type": "text"
                },
                {
                  "key": "refresh_token",
                  "value": "{{refreshToken}}",
                  "type": "text"
                },
                {
                  "key": "resource",
                  "value": "https://mcp.cormak.app/mcp",
                  "type": "text"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.environment.get('allowOAuthSetup') !== 'true') {",
                  "  pm.request.url.update('https://blocked.invalid/cormak-opt-in-required');",
                  "  if (pm.execution && typeof pm.execution.skipRequest === 'function') { pm.execution.skipRequest(); }",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 200', () => pm.response.to.have.status(200));",
                  "pm.test('JSON response', () => pm.response.to.be.json);",
                  "pm.test('Rotated tokens', () => { const d=pm.response.json(); pm.expect(d.access_token).to.be.a('string'); pm.expect(d.refresh_token).to.be.a('string'); });",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Revoke connection tokens — invalidates access",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/x-www-form-urlencoded"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{baseUrl}}/mcp/revoke",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp",
                "revoke"
              ]
            },
            "description": "SETUP / SIDE EFFECTS — blocked unless local allowOAuthSetup=true, with explicit owner approval. Register one client using the same callback as Postman OAuth helper. Then configure Authorization Code (With PKCE), SHA-256, no client secret, client authentication in request body, explicit scope and resource on both authorize/token calls. Do not use ordinary Send for the authorize redirect: follow the browser consent workflow. Do not share tokens or save token responses.",
            "body": {
              "mode": "urlencoded",
              "urlencoded": [
                {
                  "key": "client_id",
                  "value": "{{clientId}}",
                  "type": "text"
                },
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "text"
                },
                {
                  "key": "resource",
                  "value": "https://mcp.cormak.app/mcp",
                  "type": "text"
                }
              ]
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.environment.get('allowOAuthSetup') !== 'true') {",
                  "  pm.request.url.update('https://blocked.invalid/cormak-opt-in-required');",
                  "  if (pm.execution && typeof pm.execution.skipRequest === 'function') { pm.execution.skipRequest(); }",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "(() => {",
                  "pm.test('HTTP 200', () => pm.response.to.have.status(200));",
                  "pm.test('Empty revoke response', () => pm.expect(pm.response.text()).to.eql('')); ",
                  "})();"
                ]
              }
            }
          ],
          "response": []
        }
      ]
    }
  ]
}
