---
updatedAt: 2026-04-22T22:36:18.000Z
agentTools:
  projectIndex: https://vision.truepic.dev/llms.txt
---

# Create a website form

# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Vision API - V3",
    "description": "Truepic Vision is a digital inspection platform that provides a quick and convenient way to receive verified, trustworthy images directly from your customer. We offer you the same trusted result as traditional site inspections, but get it done virtually, saving you time and money while improving productivity in the process.\n\nTo begin using our API, please contact us to request access. We will issue you a `client_id` and `client_secret` for authorization, as well as team and inspection type IDs that you will need when making requests.\n\nAuthorization is done via OAuth 2's [client credentials flow](https://auth0.com/docs/flows/concepts/client-credentials). Click the \"Authorize\" button below for more details.\n",
    "contact": {
      "name": "Truepic",
      "email": "support@truepic.com"
    },
    "version": "3.92.0"
  },
  "servers": [
    {
      "url": "https://vision-api.truepic.{tld}/v3",
      "description": "Production",
      "variables": {
        "tld": {
          "default": "com",
          "enum": [
            "com",
            "uk"
          ],
          "description": "The top-level domain for your region: `com` for the US region or `uk` for the EU region."
        }
      }
    }
  ],
  "components": {
    "responses": {
      "ErrorBadRequest": {
        "description": "The request is malformed or fails path, query, body, or lifecycle validation. Standard errors include `response_code`, `message` and `api_version`, and an `error_code` when a client can act on the specific reason. Use the `x-request-id` response header when reporting a failed request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseData"
            },
            "example": {
              "response_code": 400,
              "message": "Inspection ID missing",
              "api_version": "3.0.0"
            }
          }
        }
      },
      "ErrorUnauthorized": {
        "description": "Authentication failed, or the user/client doesn't have permission to access the requested resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseData"
            },
            "example": {
              "response_code": 401,
              "message": "Unauthorized",
              "api_version": "3.0.0"
            }
          }
        }
      },
      "ErrorForbidden": {
        "description": "The user doesn't have permission to access the requested resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseData"
            },
            "example": {
              "response_code": 403,
              "message": "Forbidden",
              "api_version": "3.0.0"
            }
          }
        }
      },
      "ErrorNotFound": {
        "description": "The requested resource couldn't be found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ResponseData"
            },
            "example": {
              "response_code": 404,
              "message": "Not Found",
              "api_version": "3.0.0"
            }
          }
        }
      },
      "ErrorPreconditionFailed": {
        "description": "A request precondition failed. Some operations also return `412` when a related resource is not found, such as an assigned member when updating an inspection. Missing required fields normally return `400`. Check the operation and message for the failed precondition.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseData"
            },
            "example": {
              "response_code": 412,
              "message": "first_name was not provided.",
              "api_version": "3.0.0"
            }
          }
        }
      },
      "ErrorUnhandled": {
        "description": "An unexpected error occurred.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ResponseData"
            },
            "example": {
              "response_code": 500,
              "message": "An error occurred",
              "api_version": "3.0.0"
            }
          }
        }
      }
    },
    "schemas": {
      "CreateWebsiteFormBody": {
        "additionalProperties": false,
        "properties": {
          "allowed_origins": {
            "description": "The domains that the website form is allowed to be embedded on. URLs must include `https://` and cannot include a path. An asterisk (`*`) can be used in place of the subdomain to allow any subdomain.",
            "items": {
              "type": "string"
            },
            "type": "array",
            "example": [
              "https://website1.com",
              "https://subdomain.website1.com",
              "https://*.website2.com"
            ]
          },
          "inspection_type_ids": {
            "description": "The IDs of the inspection types that can be created from the website form.",
            "items": {
              "type": "number"
            },
            "type": "array",
            "example": [
              123,
              456
            ]
          },
          "is_email_required": {
            "description": "Whether the email field is required on the website form. Defaults to `false`.",
            "type": "boolean",
            "example": false
          },
          "is_phone_required": {
            "description": "Whether the phone field is required on the website form. Defaults to `false`.",
            "type": "boolean",
            "example": false
          },
          "name": {
            "description": "The name of the website form.",
            "type": "string",
            "example": "Landing Page"
          },
          "should_show_address": {
            "description": "Whether the address field should be shown on the website form when it is optional. The field is always shown if it is required by the inspection type. Defaults to `false`.",
            "type": "boolean",
            "example": false
          },
          "team_id": {
            "description": "The ID of the team that the website form creates inspections within.",
            "type": "number",
            "example": 789
          }
        },
        "required": [
          "allowed_origins",
          "inspection_type_ids",
          "name",
          "team_id"
        ],
        "type": "object"
      },
      "ErrorResponseData": {
        "additionalProperties": false,
        "description": "The format for Vision API `4xx` responses.",
        "properties": {
          "api_version": {
            "description": "The current version number of the Vision API.",
            "type": "string",
            "example": "3.0.0"
          },
          "error_code": {
            "description": "A stable, machine-readable name for a rejection, sent beside the message on the `4xx` responses a client has to act on rather than only display. Absent on rejections with nothing to branch on, so treat a missing value as \"no specific reason given\" rather than as an error.",
            "type": "string",
            "example": "announcement_internal_name_taken"
          },
          "message": {
            "description": "The human-readable status of the response.",
            "type": "string",
            "example": "Success"
          },
          "response_code": {
            "description": "The HTTP status code of the response.",
            "type": "integer",
            "example": 200
          }
        },
        "required": [
          "api_version",
          "message",
          "response_code"
        ],
        "type": "object"
      },
      "GetWebsiteFormResult": {
        "additionalProperties": false,
        "properties": {
          "api_version": {
            "description": "The current version number of the Vision API.",
            "type": "string",
            "example": "3.0.0"
          },
          "message": {
            "description": "The human-readable status of the response.",
            "type": "string",
            "example": "Success"
          },
          "response_code": {
            "description": "The HTTP status code of the response.",
            "type": "integer",
            "example": 200
          },
          "result": {
            "$ref": "#/components/schemas/WebsiteFormSerializedWithInspectionTypeIds"
          }
        },
        "required": [
          "api_version",
          "message",
          "response_code",
          "result"
        ],
        "type": "object"
      },
      "ResponseData": {
        "additionalProperties": false,
        "description": "The generic format for Vision API responses.",
        "properties": {
          "api_version": {
            "description": "The current version number of the Vision API.",
            "type": "string",
            "example": "3.0.0"
          },
          "message": {
            "description": "The human-readable status of the response.",
            "type": "string",
            "example": "Success"
          },
          "response_code": {
            "description": "The HTTP status code of the response.",
            "type": "integer",
            "example": 200
          }
        },
        "required": [
          "response_code",
          "message",
          "api_version"
        ],
        "type": "object"
      },
      "WebsiteFormSerializedWithInspectionTypeIds": {
        "additionalProperties": false,
        "properties": {
          "allowed_origins": {
            "description": "The domains that the website form is allowed to be embedded on. URLs must include `https://` and cannot include a path. An asterisk (`*`) can be used in place of the subdomain to allow any subdomain.",
            "items": {
              "type": "string"
            },
            "type": "array",
            "example": [
              "https://website1.com",
              "https://subdomain.website1.com",
              "https://*.website2.com"
            ]
          },
          "created_at": {
            "description": "When the resource was created.",
            "format": "date-time",
            "type": "string",
            "example": "2020-05-01T21:44:40.000Z"
          },
          "id": {
            "description": "The ID of the website form.",
            "type": "number",
            "example": 123
          },
          "inspection_type_ids": {
            "description": "The IDs of the inspection types that can be created from the website form.",
            "items": {
              "type": "number"
            },
            "type": "array",
            "example": [
              123,
              456
            ]
          },
          "is_email_required": {
            "description": "Whether the email field is required on the website form. Defaults to `false`.",
            "type": "boolean",
            "example": false
          },
          "is_phone_required": {
            "description": "Whether the phone field is required on the website form. Defaults to `false`.",
            "type": "boolean",
            "example": false
          },
          "name": {
            "description": "The name of the website form.",
            "type": "string",
            "example": "Landing Page"
          },
          "should_show_address": {
            "description": "Whether the address field should be shown on the website form when it is optional. The field is always shown if it is required by the inspection type. Defaults to `false`.",
            "type": "boolean",
            "example": false
          },
          "team_id": {
            "description": "The ID of the team that the website form creates inspections within.",
            "type": "number",
            "example": 789
          },
          "token": {
            "description": "The unique token used by the website form to authenticate with the API.",
            "type": "string",
            "example": "-SQuSE62r4ISFCE4EOOTtu3yx1SW8i6PE7VMZwvVZ8TNyliC"
          },
          "updated_at": {
            "description": "When the resource was last updated.",
            "format": "date-time",
            "type": "string",
            "example": "2020-05-01T21:44:40.000Z"
          }
        },
        "required": [
          "allowed_origins",
          "created_at",
          "id",
          "inspection_type_ids",
          "is_email_required",
          "is_phone_required",
          "name",
          "should_show_address",
          "team_id",
          "token",
          "updated_at"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "AccessToken": {
        "type": "http",
        "description": "Authorization is done via OAuth 2's [client credentials flow](https://auth0.com/docs/flows/concepts/client-credentials).\n\nIn short, using the `client_id` and `client_secret` we issue you, you request an access token from our authorization service. You then include this access token in subsequent API requests in the `Authorization: Bearer {access_token}` header.\n\nEach access token is valid for 72 hours, and should be stored on your end so that it can be used for all API requests in that time frame. The time of expiration is included in both the authorization service response (`expires_in`) and decoded JWT access token (`exp`). There's no need to generate a new access token for every API request. When the access token has expired (or is close to expiring), simply make another request to our authorization service for a new one.\n\nAn access token can be generated by making a `POST` request to our authorization service's [token endpoint](https://auth0.com/docs/api/authentication?http#client-credentials-flow):\n\n```\nhttps://vision-auth.truepic.com/oauth/token\n```\n\nInclude the following `application/x-www-form-urlencoded` payload:\n\n```\n{\n  audience: 'https://vision-api.truepic.com',\n  grant_type: 'client_credentials',\n  client_id: '{CLIENT_ID}',\n  client_secret: '{CLIENT_SECRET}'\n}\n```",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "OAuth2ClientCredentials": {
        "type": "oauth2",
        "description": "See `AccessToken` above.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://vision-auth.truepic.com/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "paths": {
    "/website-forms": {
      "post": {
        "tags": [
          "Website Forms"
        ],
        "summary": "Create a website form",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebsiteFormBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebsiteFormResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/ErrorUnauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ErrorForbidden"
          },
          "404": {
            "$ref": "#/components/responses/ErrorNotFound"
          },
          "412": {
            "$ref": "#/components/responses/ErrorPreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/ErrorUnhandled"
          }
        }
      }
    }
  },
  "security": [
    {
      "AccessToken": []
    },
    {
      "OAuth2ClientCredentials": []
    }
  ],
  "tags": [
    {
      "name": "Website Forms"
    }
  ]
}
````