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

# Archive program



## OpenAPI

````yaml /openapi.json delete /programs/{id}
openapi: 3.1.0
info:
  title: AgentRef REST API
  version: 1.0.0
  description: >-
    REST API v1 for merchants and affiliates. Authentication via API keys
    (Authorization: Bearer ak_...).
servers:
  - url: /api/v1
    description: Current API version
security:
  - ApiKeyAuth: []
tags:
  - name: Auth
  - name: Onboarding
  - name: Programs
  - name: Merchant
  - name: Applications
  - name: Affiliates
  - name: Me
  - name: Coupons
  - name: Invites
  - name: Conversions
  - name: Payouts
  - name: Flags
  - name: Billing
  - name: Marketplace
  - name: Marketing Resources
  - name: Notifications
  - name: Webhooks
  - name: Docs
  - name: Meta
paths:
  /programs/{id}:
    delete:
      tags:
        - Programs
      summary: Archive program
      operationId: archiveProgram
      parameters:
        - $ref: '#/components/parameters/UuidPathId'
      responses:
        '200':
          description: Archived program
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Program'
                  meta:
                    $ref: '#/components/schemas/RequestMeta'
                required:
                  - data
                  - meta
        '404':
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    UuidPathId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Program:
      type: object
      properties:
        id:
          type: string
          format: uuid
        merchantId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        slug:
          type: string
        website:
          type:
            - string
            - 'null'
          format: uri
        landingPageUrl:
          type:
            - string
            - 'null'
          format: uri
        portalSlug:
          type:
            - string
            - 'null'
        portalTheme:
          type: string
          enum:
            - classic
            - ocean
            - ember
        status:
          type: string
          enum:
            - active
            - paused
            - archived
        marketplaceStatus:
          type: string
          enum:
            - private
            - draft
            - public
          default: private
        applicationAccess:
          type: string
          enum:
            - open
            - invite_only
          default: open
        marketplaceCategory:
          type:
            - string
            - 'null'
        marketplaceDescription:
          type:
            - string
            - 'null'
        marketplaceLogoUrl:
          type:
            - string
            - 'null'
          format: uri
        commissionType:
          type: string
          enum:
            - one_time
            - recurring
            - recurring_limited
        commissionPercent:
          type: integer
        commissionLimitMonths:
          type:
            - integer
            - 'null'
        commissionHoldDays:
          type: integer
        cookieDuration:
          type: integer
        trackingRequiresConsent:
          type:
            - boolean
            - 'null'
        trackingParamAliases:
          type:
            - array
            - 'null'
          items:
            type: string
        payoutThreshold:
          type: integer
        payoutFrequency:
          type: string
          enum:
            - weekly
            - monthly
            - quarterly
        currency:
          type: string
        autoApproveAffiliates:
          type: boolean
          default: false
        termsUrl:
          type:
            - string
            - 'null'
          format: uri
        stripeAccountId:
          type:
            - string
            - 'null'
        stripeAccountDisplayName:
          type:
            - string
            - 'null'
        stripeConnectedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - merchantId
        - name
        - description
        - slug
        - website
        - landingPageUrl
        - portalSlug
        - portalTheme
        - status
        - marketplaceStatus
        - applicationAccess
        - marketplaceCategory
        - marketplaceDescription
        - marketplaceLogoUrl
        - commissionType
        - commissionPercent
        - commissionLimitMonths
        - commissionHoldDays
        - cookieDuration
        - trackingRequiresConsent
        - trackingParamAliases
        - payoutThreshold
        - payoutFrequency
        - currency
        - autoApproveAffiliates
        - termsUrl
        - stripeAccountId
        - stripeAccountDisplayName
        - stripeConnectedAt
        - createdAt
        - updatedAt
    RequestMeta:
      type: object
      properties:
        requestId:
          type: string
      required:
        - requestId
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
        meta:
          $ref: '#/components/schemas/RequestMeta'
      required:
        - error
        - meta
  responses:
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use API key as Bearer token, for example: Bearer ak_live_xxx'

````