For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
CommunityCreate AccountSign in
  • Overview
    • Welcome
    • Authentication
    • Using Environments
  • API Reference
      • GETList apps
      • GETGet an app
      • PATCHUpdate an app
      • POSTCreate an app
      • DELDelete an app
      • GETGet constraints
      • POSTCreate constraint
      • GETGet constraint by ID
      • GETGet constraint versions
      • GETGet constraint version
      • PATCHUpdate constraint
      • DELDelete constraint
LogoLogo
LogoLogo
CommunityCreate AccountSign in
API ReferenceApps

Create constraint

POST
https://api.x.flatfile.com/v1/apps/:appId/constraints
POST
/v1/apps/:appId/constraints
$curl -X POST https://api.x.flatfile.com/v1/apps/appId/constraints \
> -H "X-Disable-Hooks: true" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
200Successful
1{
2 "data": {
3 "id": "id",
4 "appId": "appId",
5 "validator": "validator",
6 "createdAt": "2024-01-15T09:30:00Z",
7 "updatedAt": "2024-01-15T09:30:00Z",
8 "description": "description",
9 "function": "function",
10 "options": {
11 "key": "value"
12 },
13 "label": "label"
14 }
15}
Creates a new constraint for an app
Was this page helpful?
Previous

Get constraint by ID

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

appIdstringRequired
ID of the app

Headers

X-Disable-Hooks"true"Required

Request

This endpoint expects an object.
descriptionstringOptional
functionstringOptional
optionsanyOptional
labelstringOptional
validatorstringOptional
appIdstringOptional
App ID

Response

This endpoint returns an object.
dataobject