Test, Publish, Roll Back
Pin sample files, test a Spec draft on them, publish it as the version new runs use, compare two versions, roll back, and share a read-only link to the Spec document.
Samples and tests
Samples are documents you pin to a Spec to test it on. A test runs the draft on document_ids, or on the pinned samples when you send none. Tests are preview runs: they are never delivered to your destinations. A draft with unpublished changes is published first, as in the editor. A test uses credits like any run.
/v1/specs/{id}/samples/v1/specs/{id}/samples/v1/specs/{id}/samples/{documentId}/v1/specs/{id}/testBody
Publish
Publishing turns the draft into the next version, the one new runs use. Nothing is published when the draft has errors, or when it has issues that change results and that you have not acknowledged: the 422 lists them, and you retry with acknowledge_issues: true. Send expected_draft_revision to be sure you publish what you reviewed. If runs are in flight, the version is published with activation_pending: true and takes over when they finish. Publishing an unchanged draft returns the current version and mints nothing.
/v1/specs/{id}/publishVersions, diff and rollback
/v1/specs/{id}/versions/{n}/v1/specs/{id}/versions/{a}/diff/{b}/v1/specs/{id}/versions/{n}/rollbackShare
A share link opens the read-only Spec document (fields, descriptions, checks) for anyone who has it, without signing in. Creating a link again replaces it and the old one stops working.
/v1/specs/{id}/share/v1/specs/{id}/share/v1/specs/{id}/shareFrequently asked questions
Are test runs delivered to my destinations?+
Does rollback delete newer versions?+
Why did publish return 422 with issues?+
acknowledge_issues: true, or fix the draft first.