publications:upsert

Description: Create a publication or update a single publication by ID.


Request Schema

{
  "payload": {
    "id": 1, // When set, update existing record, else create new record
    "type": "publications:upsert",
    "name": "Superb Article!",
    "locale": "en",
    "introduction": "The introduction as text",
    "content": "<p>She said, \"Hello there!\" and smiled.</p>",
    "image_url": "https://unsplash.com/photos/OEvLi8LM7cc/download?force=true&w=640"
  },
  "signature": "payload_ed25519_hex_signature",
  "source_public_key": "your_client_public_key"
}

Request Attributes

  • See global request attributes
  • payload.id - Integer - The publication’s ID in the remote Arkipel community - when not set, a record will be created
  • payload.import_id - String - External publication reference - Compulsory and unique, auto-generated if blank
  • payload.name - String - The publication’s name - Compulsory

Additional values

  • payload.locale - Enum (fr, en) - The publication’s language
  • payload.introduction - String - The publication’s introduction text
  • payload.content - Html - See the HTML Content Guide for detailed specifications
  • payload.image_url - String (URL) - A publicly accessible HTTP URL to an image file, content_type accepted: [:png, :jpg, :jpeg, :gif]
  • payload.video_url - String (URL) - A publicly accessible HTTP URL to a video file, content_type accepted: ['video/mp4', 'video/webm', 'video/quicktime']

Response Schema

{
  "source_public_key": "community_public_key",
  "source_site": {
    "protocol": "http",
    "fqdn": "arkipel.localhost:3000"
  },
  "created_at": "2025-11-13T20:52:49Z",
  "signature": "8b6392d5550605bd6ccddf9c21ebec470de4b44e4b4deb746076e37ab61c5346e07e7c7c7cebb5bbee41cdd92a476bcd3f02373d146ec165b31c31fc31c9ce0d",
  "payload": {
    "message_id": "6916452112f746b2b4cf48c1",
    "type": "publications:upsert"
  }
}