> For the complete documentation index, see [llms.txt](https://docs.welkinhealth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.welkinhealth.com/api-reference/profile-data-types-pdt-formation.md).

# Profile Data Types (PDT) Formation

Endpoints to receive an information of PDTs from formation.

## Get All PDT

> The endpoint GET {{url}}/{{tenantName}}/{{instanceName}}/formations/current/pdts retrieves the list of Profile Data Types (PDTs) for the current formation in the specified instance. PDTs are used to define custom data types that can be associated with user profiles in the system. The response will contain an array of PDT objects, each containing information about the PDT.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Profile Data Types (PDT) Formation","description":"Endpoints to receive an information of PDTs from formation."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}}},"schemas":{"Pdt":{"type":"object","required":["name","fields"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"internal":{"type":"boolean"},"readable":{"type":"boolean","default":true},"updatable":{"type":"boolean","default":true},"contactable":{"type":"boolean"},"type":{"$ref":"#/components/schemas/DtType"},"sourceType":{"$ref":"#/components/schemas/PdtSourceType"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DtField"}}}},"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]},"PdtSourceType":{"type":"string","enum":["INTERNAL","EXTERNAL"]},"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/current/pdts":{"get":{"summary":"Get All PDT","tags":["Profile Data Types (PDT) Formation"],"operationId":"Get_All_PDT","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"}],"responses":{"200":{"description":"List of PDT formations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Pdt"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"The endpoint GET {{url}}/{{tenantName}}/{{instanceName}}/formations/current/pdts retrieves the list of Profile Data Types (PDTs) for the current formation in the specified instance. PDTs are used to define custom data types that can be associated with user profiles in the system. The response will contain an array of PDT objects, each containing information about the PDT."}}}}
```

## Get All PDT by name

> This endpoint is used to retrieve information about a specific Profile Data Type (PDT) in the current formation for a given tenant and instance. PDTs are data types that define the structure and properties of profiles that can be created in the Welkin Health platform. The endpoint requires the name of the core type as a parameter to identify the PDT to retrieve.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Profile Data Types (PDT) Formation","description":"Endpoints to receive an information of PDTs from formation."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PdtName":{"name":"pdtName","in":"path","required":true,"description":"Profile Data Type (PDT) name","schema":{"type":"string"}}},"schemas":{"Pdt":{"type":"object","required":["name","fields"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"internal":{"type":"boolean"},"readable":{"type":"boolean","default":true},"updatable":{"type":"boolean","default":true},"contactable":{"type":"boolean"},"type":{"$ref":"#/components/schemas/DtType"},"sourceType":{"$ref":"#/components/schemas/PdtSourceType"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DtField"}}}},"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]},"PdtSourceType":{"type":"string","enum":["INTERNAL","EXTERNAL"]},"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/current/pdts/{pdtName}":{"get":{"summary":"Get All PDT by name","tags":["Profile Data Types (PDT) Formation"],"operationId":"Get_All_PDT_by_name","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PdtName"}],"responses":{"200":{"description":"PDT formation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pdt"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"This endpoint is used to retrieve information about a specific Profile Data Type (PDT) in the current formation for a given tenant and instance. PDTs are data types that define the structure and properties of profiles that can be created in the Welkin Health platform. The endpoint requires the name of the core type as a parameter to identify the PDT to retrieve."}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.welkinhealth.com/api-reference/profile-data-types-pdt-formation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
