Troubleshooting
When an integration is failing, reduce the problem to one API request or one webhook delivery. SpotDraft does not expose product-side API or webhook logs in the developer portal, so your integration must keep the operational logs needed for debugging.
Debug an API call
- Confirm the regional base URL and path. The full request should use the workspace region and a versioned public path such as
/api/v2.1/public/.... - Disable automatic redirects while debugging. A
302commonly meanshttp://was used instead ofhttps://, or the trailing slash does not match the documented route. - Confirm the credentials were generated in the same workspace and environment as the request target.
- Check whether
user-emailis being passed intentionally. If it is present, the user must be active in the workspace and allowed to perform the action. - Validate all workspace-specific ids: contract type id, template id, entity id, counterparty id, contract id, role id, and metadata keys.
- Inspect the response status and body. Treat
400,401,403,404, and409as request, permission, or state problems before retrying. - Retry only transient failures such as
429, timeouts, and selected5xxresponses with bounded exponential backoff and jitter.
Log the method, regional host, path, environment, status code, internal request id, retry count, and any external metadata key involved. Do not log client-secret, bearer tokens, or signed document URLs.
Debug a webhook
- Confirm the webhook is registered in the same SpotDraft environment where the contract activity occurred.
- Confirm the endpoint is public, uses HTTPS, has a valid certificate, and accepts
POSTrequests. - Confirm the subscription includes the event type you expect.
- Check your ingress logs for the exact request time. There are no SpotDraft-side webhook logs exposed in the product for you to inspect.
- Verify the signature using
X-SD-WEBHOOK-CONTENT-HASHand the raw request body before JSON parsing. - Confirm the receiver returns
2xxquickly and moves slow work into a queue. - Check dedupe and idempotency handling. Duplicate deliveries should not create duplicate downstream updates.
- Check worker logs for the downstream job that processed the event.
- If downstream state is stale, fetch fresh contract or document state from the API and run a reconciliation job.
Log the event type, contract id, delivery id or payload hash, signature result, queue job id, response code, retry count, and downstream processing result.
Debug environment drift
If the same code works in UAT but fails in production, compare:
- API base URL
- API credentials
- contract type ids
- template ids
- questionnaire and intake-form fields
- creator entities
- user and role membership
- webhook endpoint URL and event subscriptions
- downstream secret configuration
Do not copy UAT identifiers into production code or production identifiers into UAT fixtures.
When to escalate
Escalate only after you can provide a minimal failing example:
- exact endpoint or webhook event
- environment and region
- timestamp
- request method and status code
- sanitized request body or webhook payload
- contract id or external metadata id
- your internal request id, delivery id, or queue job id
Related
- Use Errors, Redirects, and Retries for status-code-level guidance.
- Use Webhooks for webhook verification and receiver design.