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

# Статус публикации

> Проверить текущий статус публикации.



## OpenAPI

````yaml /api/openapi.json post /external-api/publications/status
openapi: 3.0.1
info:
  title: Rekla External API
  description: API для интеграции внешних партнёров с платформой Rekla
  version: 1.0.0
servers:
  - url: https://api.rek.la
    description: Production
security: []
tags:
  - name: External API
    description: Эндпоинты для внешних партнёров
paths:
  /external-api/publications/status:
    post:
      tags:
        - External API
      summary: Статус публикации
      description: Проверить текущий статус публикации.
      parameters:
        - $ref: '#/components/parameters/XApiKey'
        - $ref: '#/components/parameters/XPartnerId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicationActionRequest'
            example:
              publication_id: 11607
              channel_id: -1001568992973
      responses:
        '200':
          description: Статус публикации
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicationStatusResponse'
              example:
                publication_id: 11607
                publication_link: https://t.me/c/1568992973/42
                publish_date: '2030-03-01T12:00:00'
                auto_delete: null
                publish_status: published
                payment_status: not_paid
                delete_date: null
        '401':
          description: Ошибка аутентификации
        '403':
          description: Нет доступа к каналу
        '404':
          description: Публикация не найдена или не принадлежит партнёру
components:
  parameters:
    XApiKey:
      name: X-API-Key
      in: header
      required: true
      description: API-ключ, полученный через Telegram-бота Rekla
      schema:
        type: string
      example: rekla_api:abc123...
    XPartnerId:
      name: X-Partner-Id
      in: header
      required: true
      description: Публичный идентификатор партнёра, выданный при регистрации
      schema:
        type: string
      example: 568d4f6f505e0458801cbd695d31f7af
  schemas:
    PublicationActionRequest:
      type: object
      required:
        - publication_id
        - channel_id
      properties:
        publication_id:
          type: integer
          description: ID публикации в Rekla
        channel_id:
          type: integer
          description: Telegram ID канала
    PublicationStatusResponse:
      type: object
      required:
        - publication_id
        - publish_date
        - publish_status
        - payment_status
      properties:
        publication_id:
          type: integer
          description: ID публикации
        publication_link:
          type: string
          nullable: true
          description: Ссылка на публикацию в Telegram
        publish_date:
          type: string
          format: date-time
          description: Дата публикации
        auto_delete:
          type: integer
          nullable: true
          description: Автоудаление через N минут
        publish_status:
          type: string
          enum:
            - draft
            - reserved
            - created
            - canceled
            - on_publish
            - published
            - completed
            - error
            - pub_error
            - on_delete
            - delete_error
            - on_unpin
            - unpin_error
          description: Статус публикации
        payment_status:
          type: string
          enum:
            - not_paid
            - paid
            - partial_paid
            - overpaid
            - refund
            - refund_partial
          description: Статус оплаты
        delete_date:
          type: string
          format: date-time
          nullable: true
          description: Дата удаления

````