LeadSail
Field Library

List field library entries

Returns all field library entries for the authenticated tenant. The field library is a central registry of all internal field keys used in conditional logic, questionnaires, posting specs, and prompt templates. Filter by category to get fields of a specific type.

GET
/api/v1/field-library

Authorization

ApiKeyAuth
X-API-Key<token>

API key generated from your Vayaflow dashboard Settings page

In: header

Query Parameters

category?string

Filter by field category

Value in"question" | "file" | "system" | "contact" | "attribution" | "compliance" | "flags" | "custom"
active?string

Filter by active status

Value in"true" | "false"
search?string

Case-insensitive search across key and label fields

Response Body

application/json

application/json

package mainimport (  "fmt"  "net/http"  "io/ioutil")func main() {  url := "https://api.leadsail.app/api/v1/field-library"  req, _ := http.NewRequest("GET", url, nil)    res, _ := http.DefaultClient.Do(req)  defer res.Body.Close()  body, _ := ioutil.ReadAll(res.Body)  fmt.Println(res)  fmt.Println(string(body))}
{
  "success": true,
  "data": {
    "fields": [
      {
        "key": "first_name",
        "label": "First Name",
        "category": "question",
        "dataType": "string",
        "validationRules": {
          "required": true,
          "pattern": "string",
          "minLength": 0,
          "maxLength": 0,
          "min": 0,
          "max": 0
        },
        "isStandard": true,
        "active": true,
        "createdAt": "string",
        "updatedAt": "string"
      }
    ]
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}