> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get all custom fields

> Retrieves all custom fields defined for your team.


**📊 Response includes:**

* Field ID
* Field name and type
* Description


## OpenAPI

````yaml get /customfield
openapi: 3.1.0
info:
  title: SendX REST API
  version: 1.0.0
  description: >
    # SendX REST API Documentation


    ## 🚀 Introduction


    The SendX API is organized around REST principles. Our API has predictable
    resource-oriented URLs, accepts JSON-encoded request bodies, returns
    JSON-encoded responses, and uses standard HTTP response codes,
    authentication, and verbs.


    **Key Features:**

    - 🔒 **Security**: Team-based authentication with optional member-level
    access

    - 🎯 **Resource-Oriented**: RESTful design with clear resource boundaries

    - 📊 **Rich Data Models**: Three-layer model system (Input/Output/Internal)

    - 🔗 **Relationships**: Automatic prefix handling for resource relationships

    - 📈 **Scalable**: Built for high-volume email marketing operations


    ## 🏗️ Architecture Overview


    SendX uses a three-layer model architecture:


    1. **Input Models** (`RestE*`): For API requests

    2. **Output Models** (`RestR*`): For API responses with prefixed IDs

    3. **Internal Models**: Core business logic (not exposed in API)


    ## 🔐 Security & Authentication


    SendX uses API key authentication:


    ### Team API Key

    ```http

    X-Team-ApiKey: YOUR_TEAM_API_KEY

    ```

    - **Required for all requests**

    - Team-level access to resources

    - Available in SendX Settings → Team API Key


    ## 🆔 Encrypted ID System


    SendX uses encrypted IDs for security and better developer experience:


    - **Internal IDs**: Sequential integers (not exposed)

    - **Encrypted IDs**: 22-character alphanumeric strings

    - **Prefixed IDs**: Resource-type prefixes in API responses
    (`contact_<22-char-id>`)


    ### ID Format


    **All resource IDs follow this pattern:**

    ```

    <resource_prefix>_<22_character_alphanumeric_string>

    ```


    **Example:**

    ```json

    {
      "id": "contact_BnKjkbBBS500CoBCP0oChQ",
      "lists": ["list_OcuxJHdiAvujmwQVJfd3ss", "list_0tOFLp5RgV7s3LNiHrjGYs"],
      "tags": ["tag_UhsDkjL772Qbj5lWtT62VK", "tag_fL7t9lsnZ9swvx2HrtQ9wM"]
    }

    ```


    ## 📚 Resource Prefixes


    | Resource | Prefix | Example |

    |----------|--------|---------|

    | Contact | `contact_` | `contact_BnKjkbBBS500CoBCP0oChQ` |

    | Campaign | `campaign_` | `campaign_LUE9BTxmksSmqHWbh96zsn` |

    | List | `list_` | `list_OcuxJHdiAvujmwQVJfd3ss` |

    | Tag | `tag_` | `tag_UhsDkjL772Qbj5lWtT62VK` |

    | Sender | `sender_` | `sender_4vK3WFhMgvOwUNyaL4QxCD` |

    | Template | `template_` | `template_f3lJvTEhSjKGVb5Lwc5SWS` |

    | Custom Field | `custom_field_` | `field_MnuqBAG2NPLm7PZMWbjQxt` |

    | Webhook | `webhook_` | `webhook_9l154iiXlZoPo7vngmamee` |

    | Post | `post_` | `post_XyZ123aBc456DeF789GhI` |

    | Post Category | `post_category_` | `post_category_YzS1wOU20yw87UUHKxMzwn`
    |

    | Post Tag | `post_tag_` | `post_tag_123XyZ456AbC` |

    | Member | `member_` | `member_JkL012MnO345PqR678` |

    | Domain | `domain_` | `domain_504` |


    ## 🎯 Best Practices


    ### Error Handling

    - **Always check status codes**: 2xx = success, 4xx = client error, 5xx =
    server error

    - **Read error messages**: Descriptive messages help debug issues

    - **Handle rate limits**: Respect API rate limits for optimal performance


    ### Data Validation

    - **Email format**: Must be valid email addresses

    - **Required fields**: Check documentation for mandatory fields

    - **Field lengths**: Respect maximum length constraints


    ### Performance

    - **Pagination**: Use offset/limit for large datasets

    - **Batch operations**: Process multiple items when supported

    - **Caching**: Cache responses when appropriate


    ## 🛠️ SDKs & Integration


    Official SDKs available for:

    - [Golang](https://github.com/sendx/sendx-go-sdk)

    - [Python](https://github.com/sendx/sendx-python-sdk)

    - [Ruby](https://github.com/sendx/sendx-ruby-sdk)

    - [Java](https://github.com/sendx/sendx-java-sdk)

    - [PHP](https://github.com/sendx/sendx-php-sdk)

    - [JavaScript](https://github.com/sendx/sendx-javascript-sdk)


    ## 📞 Support


    Need help? Contact us:

    - 💬 **Website Chat**: Available on sendx.io

    - 📧 **Email**: hello@sendx.io

    - 📚 **Documentation**: Full guides at help.sendx.io


    ---


    **API Endpoint:** `https://api.sendx.io/api/v1/rest`


    [<img src="https://run.pstmn.io/button.svg" alt="Run In Postman"
    style="width: 128px; height:
    32px;">](https://god.gw.postman.com/run-collection/33476323-44b198b0-5219-4619-a01f-cfc24d573885?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D33476323-44b198b0-5219-4619-a01f-cfc24d573885%26entityType%3Dcollection%26workspaceId%3D6b1e4f65-96a9-4136-9512-6266c852517e)
  contact:
    name: SendX API Support
    email: hello@sendx.io
    url: https://sendx.io
  license:
    name: Proprietary
    url: https://sendx.io/terms
servers:
  - url: https://api.sendx.io/api/v1/rest
    description: Production server
security:
  - TeamApiKey: []
tags:
  - name: Contact
    description: >
      **Contact Management**


      Contacts are the core of your SendX account. They represent your
      customers, leads, or any person you wish to communicate with through
      marketing campaigns.


      **Key Features:**

      - ✅ Create, read, update, and delete contacts

      - 🏷️ Associate with lists and tags

      - 📝 Store custom field data

      - 📊 Track engagement metrics

      - 🔒 Team-based access control


      **Business Rules:**

      - Email addresses must be unique within a team

      - Custom fields are created automatically if they don't exist

      - Tags are created automatically when assigned

      - Soft deletes preserve historical data
  - name: Campaign
    description: >
      **Campaign Management**


      Campaigns allow you to send targeted email marketing messages to your
      contacts.


      **Key Features:**

      - 📧 Create and manage email campaigns

      - 🎯 Target specific lists and segments

      - 📊 Track campaign performance

      - ⏰ Schedule campaigns for future delivery

      - 🔄 A/B testing support
  - name: List
    description: |
      **List Management**

      Lists help you organize contacts into groups for targeted messaging.

      **Key Features:**
      - 📁 Create and manage contact lists
      - 👥 Bulk operations on list members
      - 🔗 Associate with campaigns
      - 📊 Track list growth metrics
  - name: Tag
    description: |
      **Tag Management**

      Tags provide flexible contact categorization for advanced segmentation.

      **Key Features:**
      - 🏷️ Create and manage tags
      - 🔍 Advanced contact filtering
      - 🎯 Behavior-based tagging
      - 📊 Tag-based analytics
  - name: Sender
    description: |
      **Sender Management**

      Manage verified sender addresses for your campaigns.

      **Key Features:**
      - ✉️ Add and verify sender addresses
      - 🔐 Domain authentication
      - 📧 Default sender settings
  - name: Template
    description: |
      **Email Template Management**

      Create and manage reusable email templates for campaigns.

      **Key Features:**
      - 🎨 HTML and text templates
      - 🔄 Reusable across campaigns
      - 📱 Mobile-responsive designs
      - 🏷️ Personalization support
  - name: Custom Field
    description: |
      **Custom Field Management**

      Define custom data fields for storing additional contact information.

      **Key Features:**
      - 📝 Create custom data fields
      - 🔢 Support for various data types
      - 📊 Use in segmentation
      - 🔄 Bulk updates
  - name: Webhook
    description: |
      **Webhook Management**

      Configure webhooks to receive real-time event notifications.

      **Key Features:**
      - 🔔 Real-time event notifications
      - 🎯 Event filtering
      - 🔒 Secure payload delivery
      - 📊 Delivery status tracking
  - name: Email Sending
    description: |
      **Email Sending APIs**

      Send transactional and marketing emails programmatically.

      **Key Features:**
      - 📧 Send individual emails
      - 🎨 Template-based sending
      - 📎 Attachment support
      - 🔄 Personalization variables
  - name: Events
    description: |
      **Event Tracking**

      Track custom events and revenue data for advanced analytics.

      **Key Features:**
      - 📊 Custom event tracking
      - 💰 Revenue attribution
      - 🔗 Integration with analytics
      - 📈 Conversion tracking
  - name: Tracking
    description: |
      **Contact Tracking APIs**

      Legacy tracking endpoints for backward compatibility.

      **Key Features:**
      - 👤 Identify contacts
      - 🏷️ Track contact behavior
      - 📊 Update contact properties
      - ⚠️ Consider using newer endpoints
  - name: Report
    description: |
      **Reporting APIs**

      Access detailed reports and analytics data.

      **Key Features:**
      - 📊 Campaign performance metrics
      - 📈 Engagement analytics
      - 💰 Revenue reports
      - 📉 Trend analysis
  - name: Post
    description: |
      **Blog Post Management**

      Manage blog posts and content for your marketing efforts.

      **Key Features:**
      - 📝 Create and manage posts
      - 🏷️ Categorize with tags
      - 📁 Organize by categories
      - 🔍 SEO optimization
  - name: Post Category
    description: |
      **Post Category Management**

      Organize blog posts into categories.

      **Key Features:**
      - 📁 Create categories
      - 🔗 Associate posts
      - 📊 Category analytics
  - name: Post Tag
    description: |
      **Post Tag Management**

      Tag blog posts for better organization and discovery.

      **Key Features:**
      - 🏷️ Create post tags
      - 🔍 Improve discoverability
      - 📊 Tag-based filtering
  - name: Team Member
    description: |
      **Team Member Information**

      Access team member details (read-only).

      **Key Features:**
      - 👤 View member profiles
      - 📧 Access member information
      - 🔒 Read-only access
paths:
  /customfield:
    get:
      tags:
        - Custom Field
      summary: Get all custom fields
      description: |
        Retrieves all custom fields defined for your team.
      operationId: getAllCustomFields
      parameters:
        - name: offset
          in: query
          description: Number of fields to skip for pagination
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: limit
          in: query
          description: Maximum number of fields to return
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: search
          in: query
          description: |
            Search custom fields by name (case-insensitive partial matching).

            **Examples:**
            - `points` - Finds "Loyalty points", "Reward points"
          required: false
          schema:
            type: string
            minLength: 2
            maxLength: 100
      responses:
        '200':
          description: ✅ Custom fields retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RestRCustomField'
              examples:
                fields_list:
                  value:
                    - id: custom_field_abc123def456ghi789
                      name: Account Type
                      type: 0
                      description: Customer account classification
                    - id: custom_field_abc123def456ghi783
                      name: Loyalty Points
                      type: 1
                      description: Current loyalty program points
                    - id: custom_field_abc123def456ghi703
                      name: Last Purchase Date
                      type: 2
                      description: Date of most recent purchase
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - TeamApiKey: []
components:
  schemas:
    RestRCustomField:
      type: object
      properties:
        id:
          type: string
          pattern: ^custom_field_[a-zA-Z0-9]{22}$
          description: Unique field identifier with custom_field_ prefix
          example: custom_field_abc123def456ghi789
        name:
          type: string
          description: Custom field name
          example: Account Type
        type:
          type: integer
          description: |
            Field data type.

            **Values:**
            - `0` - Text (max 255 characters)
            - `1` - Number (integer or decimal)
            - `2` - Date (YYYY-MM-DD format)
            - `3` - Boolean (true/false)
            - `4` - Phone number (international format)
        description:
          type: string
          description: Field description for documentation
          example: Customer account classification
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
          example: error
        message:
          type: string
          description: Human-readable error message
          example: Invalid request format
      required:
        - status
        - message
  responses:
    Unauthorized:
      description: ❌ Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 401
            message: The Team ID or API Key specified is not valid
    InternalServerError:
      description: ❌ Internal Server Error - System error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            message: Internal server error occurred
  securitySchemes:
    TeamApiKey:
      type: apiKey
      in: header
      name: X-Team-ApiKey
      description: >
        Team API key for authentication. Find your API key in SendX Settings →
        Team API Key.


        **Example:**

        ```

        X-Team-ApiKey: your_team_api_key_here

        ```

````