LeadSail
Field Library

Get a field library entry

Returns a single field library entry by its unique key. The key is the internal identifier used throughout the system (e.g. "first_name", "retainer_document").

GET
/api/v1/field-library/{key}

Authorization

ApiKeyAuth
X-API-Key<token>

API key generated from your Vayaflow dashboard Settings page

In: header

Path Parameters

key*string

The field key (e.g. "first_name")

Response Body

application/json

application/json

application/json

package mainimport (  "fmt"  "net/http"  "io/ioutil")func main() {  url := "https://api.leadsail.app/api/v1/field-library/first_name"  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": {
    "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"
  }
}
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}