Deformity
← Back to Help Center

External API

The Deformity External API lets you create, edit, fetch, and delete forms from your own app, scripts, or automation tools. It is completely free for all users.

Setup

  1. Go to Account - API Keys and create a key in the Deformity External API section.
  2. Copy the key immediately. It is only shown once.
  3. Use Authorization: Bearer df_your_api_key on every form API request.
  4. Find a workspace ID from this page, the dashboard URL, or the workspace endpoint.
  5. Find a form ID from Settings - Integrations - Developer inside a form, or from the list forms endpoint.

Find your workspace ID

workspaceId is required when creating a form. If you are logged in, your active organization workspaces appear below. You can also callGET /api/v1/workspaces with your API key to list workspaces programmatically.

Loading your workspaces...

Endpoints

MethodPathPurpose
GET/api/v1/formsList active forms.
GET/api/v1/workspacesList workspaces available to the API key.
POST/api/v1/formsCreate an AI or static form.
GET/api/v1/forms/{formId}Fetch one form with settings and points.
PATCH/api/v1/forms/{formId}Edit metadata, settings, form type, or points.
DELETE/api/v1/forms/{formId}Soft-delete a form.

Status codes and responses

Successful requests return a data value. Errors return anerror object with a stable code and human-readable message. Delete requests return confirmation JSON instead of an empty response.

{
  "data": {
    "id": "form_123"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "Request body is invalid"
  }
}
StatusMeaning
200Request succeeded. Delete requests return confirmation data.
201Resource was created.
400Invalid request, missing required fields, malformed JSON, or missing organization context.
401Missing or invalid API key, or missing logged-in session for API key management.
404Workspace, form, or API key was not found in the authenticated organization.
429Rate limit exceeded. Check Retry-After and X-RateLimit headers.
500Unexpected server error.

AI vs static forms

Send formType on create. Use ai for conversational forms andstatic for one-question-at-a-time static forms. You can also sendformType in PATCH to switch a form.

{
  "workspaceId": "workspace_123",
  "formType": "ai",
  "name": "Customer intake"
}

Create a form

curl -X POST https://deformity.ai/api/v1/forms \
  -H 'Authorization: Bearer df_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "workspaceId": "workspace_123",
    "formType": "ai",
    "name": "Customer intake",
    "purpose": "Collect onboarding details and ask helpful follow-ups.",
    "points": [
      {
        "pointType": "welcome_screen",
        "body": {
          "point": "Welcome to onboarding",
          "description": "We will ask a few quick questions.",
          "buttonText": "Start",
          "active": true
        }
      },
      {
        "pointType": "freeform",
        "required": true,
        "body": {
          "point": "What should we know before kickoff?",
          "sampleQuestion": "Tell us about your goals"
        }
      }
    ],
    "settings": {
      "saveResponses": true,
      "emailResponses": true
    }
  }'

Edit a form

PATCH accepts partial form updates. If you send points, the API replaces the form's ordered points with the array you provide.

curl -X PATCH https://deformity.ai/api/v1/forms/form_123 \
  -H 'Authorization: Bearer df_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Customer onboarding intake",
    "formType": "static",
    "settings": {
      "completionRedirect": "https://example.com/thanks"
    }
  }'

Form properties

PropertyTypeUsage
workspaceIdstringRequired on create. Workspace where the form will be created.
formTypeai or staticRequired on create. Use ai for conversational forms or static for non-AI forms.
namestringForm name shown in the dashboard.
purposestring or nullAI instruction describing what the form should accomplish.
personalityIdstring or nullOptional AI personality to use for AI forms.
snippetsarray of stringsTraining snippets or extra instructions used by the AI.
urlstring or nullReference website URL for the form.
filesarray of file objectsFile references attached to the form. Shape shown below.
colorsarray of stringsTheme colors used by the renderer, for example ["#000000", "#ffffff"].
buttonsbutton style object or nullButton style configuration. Shape shown below.
fontstring or nullFont family name.
settingssettings objectForm behavior settings. See settings reference below.
pointsarray of point objectsOrdered form elements. If sent in PATCH, replaces all points.

Settings properties

PropertyTypeUsage
submissionPeriodsubmission period object or nullstartDate, endDate, and customMessage for opening or closing submissions by date.
limitsubmission limit object or nullmaxSubmissions and customMessage for response limits.
instantResponsesbooleanEnable instant AI responses when available.
saveResponsesbooleanStore responses in Deformity.
completionRedirectstring or nullURL to redirect respondents after completion.
collectPartialsbooleanStore partial responses.
multilingualbooleanAllow multilingual behavior.
emailResponsesbooleanSend response notification emails.
completionEmailcompletion email object or nullCompletion email settings. Shape shown below.
customLogostring or nullCustom logo URL.
customBrandingbranding object or nullCustom logo and logo position. Shape shown below.
removeDeformityBrandingbooleanHide Deformity branding when the plan allows it.
removeProgressbooleanHide progress UI.
allowIndexingbooleanAllow search engine indexing.
formNavigationbooleanShow form navigation controls.
responsePathCapturebooleanCapture response-path data when enabled for the organization.
metadatametadata object or nullShare metadata. Shape shown below.

Settings object shapes

{
  "submissionPeriod": {
    "startDate": "2026-06-01T00:00:00.000Z",
    "endDate": "2026-06-30T23:59:59.999Z",
    "customMessage": "This form is closed."
  },
  "limit": {
    "maxSubmissions": "100",
    "customMessage": "This form has reached its response limit."
  },
  "completionEmail": {
    "active": true,
    "email": "team@example.com"
  },
  "customBranding": {
    "logo": "https://example.com/logo.png",
    "position": "bottomRight"
  },
  "metadata": {
    "title": "Customer intake",
    "description": "Tell us about your project.",
    "favicon": "https://example.com/favicon.ico",
    "shareImage": "https://example.com/share.png"
  }
}

Point properties

PropertyTypeUsage
idstringReturned by the API. Optional in requests; replacement updates create new point IDs.
pointTypestringRequired for each point. See supported point types below.
ordernumberOptional 1-based position. Array order is used when omitted.
requiredboolean or nullRequire an answer before continuing.
layoutstring or nullVisual layout value used by the renderer.
backgroundbackground object or nullBackground image/color/video configuration. Shape shown below.
colorstring or nullText or theme color for this point.
opacitynumber or nullBackground opacity.
bodypoint body objectQuestion-type-specific fields. Unknown top-level point fields are also folded into body.

Visual object shapes

Visual objects are intentionally flexible because the builder may add renderer-specific keys over time. These are the common shapes to start with.

{
  "buttons": {
    "backgroundColor": "#000000",
    "textColor": "#ffffff",
    "borderRadius": 8
  },
  "background": {
    "type": "image",
    "url": "https://example.com/background.jpg",
    "position": "center",
    "size": "cover"
  },
  "files": [
    {
      "id": "file_123",
      "name": "Brief.pdf",
      "url": "https://example.com/brief.pdf",
      "type": "application/pdf"
    }
  ]
}

Point body properties

Put question-specific values inside body. For convenience, unknown top-level fields on a point are folded into body, but using body directly is clearer for integrations.

PropertyTypeUsage
pointstringMain prompt or screen text.
sampleQuestionstringPlaceholder/sample text shown to respondents.
descriptionstringSupporting text below the prompt.
optionsarray of strings or option objectsChoices for multiple choice, checkboxes, dropdown, and ranking. Shapes shown below.
buttonTextstringButton label for screens, embeds, statements, payments, and similar elements.
buttonLinkstringLink target for supported button-style elements.
minRatingnumberLowest rating value.
maxRatingnumberHighest rating value.
ratingTypestars, hearts, numbers, smileys, or thumbsVisual rating style.
showOtherbooleanShow an Other choice for choice-based questions.
embedLinkstringURL for embed points.
disclosurestringSmall disclosure text, commonly used on welcome screens.
defaultCountrystringDefault country code for phone/address inputs.
activebooleanUsed by welcome/end screens to show or hide them.
logicstringLegacy/manual logic text.
logicImplementationstringExecutable logic implementation used by the builder/runtime.
isManualLogicbooleanMarks logic as manually configured.
selectMultiplebooleanAllow multiple selections for supported choice fields.
signatureTypepad, typing, or bothSignature input mode.
dateTypetime, date, or date_timeDate/time input mode.
weekStartnumberFirst day of week for date inputs.
matrixRowsarray of stringsRows for matrix questions.
matrixColumnsarray of stringsColumns for matrix questions.
amountnumberPayment amount.
currencystringPayment currency code, such as USD.
collectNamebooleanCollect payer name for payment points.
collectEmailbooleanCollect payer email for payment points.

Choice option shapes

For simple choices, send strings. For choices that need stable IDs or metadata, send objects.

{
  "options": ["Free", "Pro", "Enterprise"]
}

{
  "options": [
    { "id": "free", "label": "Free", "value": "free" },
    { "id": "pro", "label": "Pro", "value": "pro" }
  ]
}

Common body shapes by point type

{
  "freeform": {
    "point": "What should we know?",
    "description": "Share as much detail as you want.",
    "sampleQuestion": "Tell us about your goals"
  },
  "multiple_choice": {
    "point": "Pick one",
    "options": ["A", "B", "C"],
    "showOther": true
  },
  "dropdown": {
    "point": "Choose a department",
    "options": ["Sales", "Support", "Product"],
    "selectMultiple": false
  },
  "rating": {
    "point": "Rate your experience",
    "minRating": 1,
    "maxRating": 5,
    "ratingType": "stars"
  },
  "signature": {
    "point": "Sign here",
    "signatureType": "both"
  },
  "date_time": {
    "point": "Pick a time",
    "dateType": "date_time",
    "weekStart": 1
  },
  "matrix": {
    "point": "Rate each area",
    "matrixRows": ["Support", "Pricing"],
    "matrixColumns": ["Poor", "Okay", "Great"]
  },
  "payment": {
    "point": "Pay your deposit",
    "buttonText": "Pay now",
    "amount": 5000,
    "currency": "USD",
    "collectName": true,
    "collectEmail": true
  },
  "embed": {
    "point": "Watch this first",
    "embedLink": "https://www.youtube.com/watch?v=example",
    "buttonText": "Continue"
  }
}

Supported point types

pointTypeUsage
welcome_screenOpening screen with optional button and disclosure.
end_screenFinal completion screen.
freeformOpen text response.
emailEmail address input.
urlURL input.
numberNumber input.
addressAddress input.
phone_numberPhone number input.
multiple_choiceSingle-choice selection.
multiple_selectMultiple-choice selection.
checkboxesCheckbox list.
dropdownDropdown selection.
confirmation_statementStatement with an acknowledgement button.
ratingRating input.
signatureSignature input.
file_uploadFile upload input.
embedEmbedded URL/content point.
rankingRanked choice input.
matrixMatrix/grid question.
paymentStripe payment point.
logicLogic-oriented text point.

Common point examples

[
  {
    "pointType": "multiple_choice",
    "required": true,
    "body": {
      "point": "Which plan are you interested in?",
      "options": ["Free", "Pro", "Enterprise"],
      "showOther": true
    }
  },
  {
    "pointType": "rating",
    "body": {
      "point": "How urgent is this?",
      "minRating": 1,
      "maxRating": 5,
      "ratingType": "stars"
    }
  },
  {
    "pointType": "date_time",
    "body": {
      "point": "When should we follow up?",
      "dateType": "date_time",
      "weekStart": 1
    }
  },
  {
    "pointType": "matrix",
    "body": {
      "point": "Rate each area",
      "matrixRows": ["Support", "Pricing", "Features"],
      "matrixColumns": ["Poor", "Okay", "Great"]
    }
  },
  {
    "pointType": "payment",
    "body": {
      "point": "Pay your deposit",
      "buttonText": "Pay now",
      "amount": 5000,
      "currency": "USD",
      "collectName": true,
      "collectEmail": true
    }
  }
]

Response shape

Successful create, fetch, and update responses return { "data": form }. Form objects include id, formType, form metadata,settings, ordered points, timestamps, andnumberOfSubmissions.

Errors

{
  "error": {
    "code": "invalid_request",
    "message": "Request body is invalid"
  }
}

API keys are rate limited to 120 requests per minute by default. A rate limited request returns HTTP 429 with Retry-After, X-RateLimit-Limit,X-RateLimit-Remaining, and X-RateLimit-Reset headers.

    External API - Deformity Help