Skip to main content
POST
/
external-api
/
publications
Create Publication
curl --request POST \
  --url https://api.example.com/external-api/publications \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "external_id": "pub-3",
    "channel_id": -1001568992973,
    "payment_status": "not_paid",
    "text": "some text",
    "text_len": 9,
    "media_type": "photo",
    "file_id": null,
    "file_url": "https://nts-tv.ru/_next/image/?url=https%3A%2F%2Fnts-tv.ru%2F%2Fdev%2Fimages%2F2025-04-16__hGIxPO.jpg&w=2048&q=60",
    "album": null,
    "poll": null,
    "inline_buttons": null,
    "auto_delete": 1440,
    "with_sound_notification": false,
    "price": 1,
    "publish_date": "2025-10-24T14:15:22Z",
    "wp_preview": false,
    "allow_comments": false,
    "has_spoiler": false,
    "protect_content": true,
    "wp_preview_config": null,
    "comment": "some comment anyway"
  }
]
'
{
  "publications": [
    {
      "id": 393,
      "external_id": "pub-1"
    }
  ]
}

Headers

X-Partner-Id
string

Body

application/json
external_id
string
channel_id
integer
payment_status
string
text
string
text_len
integer
media_type
string
file_id
string
file_url
string
album
object
poll
object
inline_buttons
object
auto_delete
integer
with_sound_notification
boolean
price
integer
publish_date
string
wp_preview
boolean
allow_comments
boolean
has_spoiler
boolean
protect_content
boolean
wp_preview_config
object
comment
string

Response

201 - application/json
publications
object[]
required