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

# Reorder article fields

> Reorders the definitions. Requires the manage:organization permission. Every field must appear exactly once, each carrying the revision the client loaded; a stale entry yields 409 and nothing changes.



## OpenAPI

````yaml PUT /api/v1/organization/article-fields/order
openapi: 3.1.0
info:
  title: Weelkit Publishing Integrations API
  description: >-
    Public endpoints for organization custom article fields, API webhook
    destinations, and WordPress.com site discovery. All requests require a
    bearer token and an X-Org-Id organization header.
  version: 1.0.0
servers:
  - url: https://api.weelkit.com
security:
  - bearerAuth: []
paths:
  /api/v1/organization/article-fields/order:
    put:
      summary: Reorder article fields
      description: >-
        Reorders the definitions. Requires the manage:organization permission.
        Every field must appear exactly once, each carrying the revision the
        client loaded; a stale entry yields 409 and nothing changes.
      operationId: reorderOrganizationArticleFields
      parameters:
        - name: X-Org-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: The organization the request acts on.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - orderedFields
              properties:
                orderedFields:
                  type: array
                  items:
                    type: object
                    required:
                      - fieldId
                      - expectedRevision
                    properties:
                      fieldId:
                        type: string
                        format: uuid
                      expectedRevision:
                        type: integer
                        description: >-
                          The revision the client loaded; a stale value yields
                          409.
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrganizationArticleField'
        '400':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid authentication, or no organization context.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The caller lacks the manage:organization permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The resource was not found in this organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The resource changed since it was loaded (stale revision) or is
            currently being processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OrganizationArticleField:
      type: object
      description: An organization-defined custom article output field definition.
      required:
        - id
        - key
        - label
        - fieldType
        - required
        - options
        - isActive
        - sortOrder
        - revision
        - createdAtUtc
        - updatedAtUtc
      properties:
        id:
          type: string
          format: uuid
        key:
          type: string
          description: Backend-generated stable internal key. Immutable after creation.
          pattern: ^[a-z][a-zA-Z0-9]{1,63}$
        label:
          type: string
          maxLength: 120
        fieldType:
          type: string
          enum:
            - string
            - text
            - number
            - boolean
            - select
            - multiselect
            - date
            - url
          description: Allowlisted field type. Immutable after creation.
        required:
          type: boolean
        description:
          type:
            - string
            - 'null'
          maxLength: 500
        generationInstruction:
          type:
            - string
            - 'null'
          maxLength: 500
          description: Bounded instruction rendered to the model during generation.
        options:
          type: array
          items:
            type: object
            required:
              - label
              - value
            properties:
              label:
                type: string
                maxLength: 200
              value:
                type: string
                maxLength: 200
        defaultValue:
          description: Default value validated against the field type and options.
        isActive:
          type: boolean
        sortOrder:
          type: integer
        revision:
          type: integer
          description: >-
            Optimistic-concurrency revision. Send it back as expectedRevision on
            writes; a stale value yields 409.
        createdAtUtc:
          type: string
          format: date-time
        updatedAtUtc:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable error code, e.g. Validation, Conflict, NotFound, Forbidden.
        message:
          type: string
        errors:
          type:
            - array
            - 'null'
          items:
            type: object
            required:
              - field
              - message
            properties:
              field:
                type: string
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Weelkit access token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.