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

# Add Email Custom Field

> Adds a custom field to a specific email.



## OpenAPI

````yaml POST /public/emails/{email_id}/custom-fields
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers:
  - url: https://app.revyops.com/api
security:
  - ApiKeyAuth: []
paths:
  /public/emails/{email_id}/custom-fields:
    post:
      tags:
        - public
      description: Adds a custom field to a specific email.
      operationId: Add email custom field
      parameters:
        - in: path
          name: email_id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailCustomFields'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EmailCustomFields'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EmailCustomFields'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailCustomFields'
          description: Created. The custom field was successfully created.
        '400':
          description: Bad Request. Invalid data has been provided.
        '401':
          description: Unauthorized. Email does not belong to this client.
        '403':
          description: Forbidden. Missing authentication credentials or invalid API key.
        '404':
          description: Not Found. Email with this ID does not exist.
        '500':
          description: Internal Server Error. An unexpected error occurred on the server.
components:
  schemas:
    EmailCustomFields:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        field_name:
          type: string
        field_value:
          type: string
          maxLength: 2500
      required:
        - field_name
        - field_value
        - id
        - updated_time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````