{
  "slug": "slim-zendesk-ticket-json-widgets",
  "title": "Zendesk ticket api response slim for widgets",
  "metaDescription": "Zendesk ticket api response slim for widgets. Expose ticket id subject and status only for embeddable. Map only UI fields from Zendesk before Frontend.",
  "headline": "Status widgets without comment threads",
  "category": "slimmer",
  "categoryLabel": "Payload Slimmer",
  "urgency": 8,
  "clientPlatform": "Frontend / Web",
  "upstreamServices": [
    "Zendesk"
  ],
  "searchIntentQuery": "zendesk ticket api response slim for widgets",
  "directAnswerSummary": "Expose ticket id subject and status only for embeddable widgets. For \"zendesk ticket api response slim for widgets\", store ZENDESK_API_TOKEN in Secret Vault, call https://{{secrets.ZENDESK_SUBDOMAIN}}.zendesk.com/api/v2/tickets.json from a Worker, and let Frontend / Web hit only https://realcomposer.com/v1/workspace/slim-zendesk-ticket-json-widgets with an rc_live_ client token.",
  "problem": {
    "title": "Unmapped Zendesk fields waste bandwidth",
    "explanation": "Zendesk returns nested CRM, audit, and configuration objects. Frontend / Web parses them on the main thread even when the UI binds three fields.",
    "risks": [
      "Large arrays kept in memory after navigation",
      "Analytics showing poor LCP on API-heavy screens",
      "Developers shipping defensive null checks for unused paths"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Store upstream credentials in Secret Vault",
      "description": "Store ZENDESK_API_TOKEN in the vault. Frontend / Web never embeds the raw secret, only a revocable rc_live_ client token."
    },
    {
      "stepNumber": 2,
      "title": "Set headers, mapping, and cache TTL",
      "description": "Configure headersTemplate to inject vault secrets, target https://{{secrets.ZENDESK_SUBDOMAIN}}.zendesk.com/api/v2/tickets.json, and Map only the UI fields in output mapping so clients never download audit or nested blobs."
    },
    {
      "stepNumber": 3,
      "title": "Call from Frontend / Web",
      "description": "Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/slim-zendesk-ticket-json-widgets', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Zendesk ticket api response slim for widgets",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "zendesk",
        "upstreamUrlTemplate": "https://{{secrets.ZENDESK_SUBDOMAIN}}.zendesk.com/api/v2/tickets.json",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.ZENDESK_API_TOKEN}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "ticketId",
          "sourcePath": "tickets.0.id",
          "type": "number",
          "sourceStep": "zendesk"
        },
        {
          "targetPath": "subject",
          "sourcePath": "tickets.0.subject",
          "type": "string",
          "sourceStep": "zendesk"
        },
        {
          "targetPath": "status",
          "sourcePath": "tickets.0.status",
          "type": "string",
          "sourceStep": "zendesk"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_slim-zen",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "slim-zendesk-ticket-json-widgets"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "ticketId": "sample",
    "subject": "sample",
    "status": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/slim-zendesk-ticket-json-widgets\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Which Zendesk credential belongs in the vault for this pipeline?",
      "answer": "Yes for slim-zendesk-ticket-json-widgets. Ship only an rc_live_ client token in Frontend / Web; RealComposer injects ZENDESK_API_TOKEN on https://{{secrets.ZENDESK_SUBDOMAIN}}.zendesk.com/api/v2/tickets.json."
    },
    {
      "question": "What cache key does RealComposer use?",
      "answer": "slim-zendesk-ticket-json-widgets POST steps bypass caches.default even if cacheTtlSeconds is set in the dashboard."
    },
    {
      "question": "What happens if an upstream step times out?",
      "answer": "Allowed origins on the slim-zendesk-ticket-json-widgets client token restrict which domains may call the edge URL."
    }
  ],
  "relatedRecipeSlugs": [
    "slim-github-api-response-mobile-widgets",
    "filter-json-response-at-edge"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/slim-zendesk-ticket-json-widgets",
    "markdown": "https://realcomposer.com/recipes/slim-zendesk-ticket-json-widgets.md",
    "json": "https://realcomposer.com/recipes/slim-zendesk-ticket-json-widgets.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=slim-zendesk-ticket-json-widgets&via=agent"
  }
}