Skip to content
Create custom draft credentials

Create custom draft credentials

Obtain signing credentials for testing an unsaved integration without persisting it.

POST/api/v1/custom-integrations/draft

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/custom-integrations/draft", {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();

Use your server-side apiKey. Replace the example IDs.

Responses#

Returns an owner-bound draftToken, signingSecret, and test user's external userId. Supply draftToken when testing or creating to preserve the secret.

200 response
{
  "draftToken": "draft_token",
  "signingSecret": "whsec_draft_secret",
  "userId": "playground-test-user"
}
More about this endpoint

Draft credentials expire after 24 hours. Save the secret in your endpoint before sending tests.