# Custom Fields

List and create organization-level custom field definitions for contacts

## Get Custom Fields

> Get all custom field definitions for the organization. Supports pagination with page and page\_size query parameters.

````json
{"openapi":"3.0.3","info":{"title":"Agentalk External API","version":"1.0.0"},"tags":[{"name":"Custom Fields","description":"List and create organization-level custom field definitions for contacts"}],"servers":[{"url":"https://api.agentalk.io","description":"Agentalk API"}],"security":[{"OrganizationApiToken":[]}],"components":{"securitySchemes":{"OrganizationApiToken":{"type":"http","scheme":"bearer","bearerFormat":"OrgId.SecretToken","description":"**Organization API Token.**\n\nPaste **only** your token in the field below — the `Bearer ` prefix is added automatically by the docs UI and in every generated code sample. The final header sent is:\n\n```\nAuthorization: Bearer {orgId}.{secretToken}\n```\n\nToken format: `{orgId}.{secretToken}` — example: `15c94c3c-1873-4a09-bfbb-03357c29ea50.abc123xyz`.\n\nJWT tokens are NOT accepted."}},"parameters":{"XOrganizationId":{"name":"X-Organization-ID","in":"header","required":false,"description":"Optional organization scope. Superusers without it see all; regular users default to their current organization.","schema":{"type":"string","format":"uuid"}}}},"paths":{"/api/account/custom-fields":{"get":{"operationId":"account_custom_fields_retrieve","description":"Get all custom field definitions for the organization. Supports pagination with page and page_size query parameters.","summary":"Get Custom Fields","parameters":[{"in":"query","name":"page","schema":{"type":"integer"},"description":"Page number"},{"in":"query","name":"page_size","schema":{"type":"integer"},"description":"Number of results per page (max 100)"},{"$ref":"#/components/parameters/XOrganizationId"}],"tags":["Custom Fields"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"description":"List of organization-level custom field definitions"}}}}}}
````

## Create Custom Field

> Create a new custom field definition at organization level. The key will be used as 'custom.{key}' when setting values on contacts.

````json
{"openapi":"3.0.3","info":{"title":"Agentalk External API","version":"1.0.0"},"tags":[{"name":"Custom Fields","description":"List and create organization-level custom field definitions for contacts"}],"servers":[{"url":"https://api.agentalk.io","description":"Agentalk API"}],"security":[{"OrganizationApiToken":[]}],"components":{"securitySchemes":{"OrganizationApiToken":{"type":"http","scheme":"bearer","bearerFormat":"OrgId.SecretToken","description":"**Organization API Token.**\n\nPaste **only** your token in the field below — the `Bearer ` prefix is added automatically by the docs UI and in every generated code sample. The final header sent is:\n\n```\nAuthorization: Bearer {orgId}.{secretToken}\n```\n\nToken format: `{orgId}.{secretToken}` — example: `15c94c3c-1873-4a09-bfbb-03357c29ea50.abc123xyz`.\n\nJWT tokens are NOT accepted."}},"parameters":{"XOrganizationId":{"name":"X-Organization-ID","in":"header","required":false,"description":"Optional organization scope. Superusers without it see all; regular users default to their current organization.","schema":{"type":"string","format":"uuid"}}}},"paths":{"/api/account/custom-fields":{"post":{"operationId":"account_custom_fields_create","description":"Create a new custom field definition at organization level. The key will be used as 'custom.{key}' when setting values on contacts.","summary":"Create Custom Field","tags":["Custom Fields"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Field key (required, used as custom.key)"},"label":{"type":"string","description":"Display label (required)"},"type":{"type":"string","enum":["text","number","date","boolean","single_select","multi_select"],"description":"Field type"},"options":{"type":"array","items":{"type":"string"},"description":"Options for select types"}},"required":["key","label"]}}}},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"description":"Custom field created successfully"},"409":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"description":"Custom field with this key already exists"}},"parameters":[{"$ref":"#/components/parameters/XOrganizationId"}]}}}}
````


---

# Agent Instructions: 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:

```
GET https://docs.agentalk.io/api-reference/custom-fields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
