<?php
// FinanceGPT generated client starter
// Source: FinanceGPT API v2 OpenAPI index
// OpenAPI SHA-256: dea651760d4f9eb2788e7dc398eb1ad7a1304e5c4b008a2407b0027fb746b65d
// Operations: post-finance-core-intake-submissions-submissionuid-evidence
// Credential: FINANCEGPT_API_KEY environment variable; no credential is embedded.
// Authority: API identity and generated code do not create model-promotion, QLM-binding or Financial Actions authority.

if (!getenv('FINANCEGPT_API_KEY')) { throw new RuntimeException('FINANCEGPT_API_KEY is required'); }

// Attach immutable provenance evidence to a Finance Core intake submission | scope: finance-core:evidence:write
$ch = curl_init('https://financegpt.dev/api/v2/finance-core/intake/submissions/{submissionUid}/evidence');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('FINANCEGPT_API_KEY'),
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode(array (
  'evidence_type' => 'string',
  'source_reference' => 'string',
  'source_uri' => 'string',
  'content_sha256' => 'string',
  'observed_at' => '2026-08-16T12:00:00Z',
  'metadata' => 
  array (
  ),
)),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
