Slaikydocs

    You say#views.publish

    views.publish

    Draw a person’s Home tab of this app (the app has Home turned on).

    POST https://app.slaiky.xyz/api/methods/views.publish · needs the bot token

    Arguments

    ArgumentTypeRequiredWhat
    userIdidyesMember id.
    viewviewyes
    hashstringnoUp to 64 characters.

    Answer

    { "ok": true, … } with: view: View. A refusal is { "ok": false, "error": { "code", "message" } } (errors).

    Example

    Recorded on a real server (ids replaced).

    you run
    
    curl -s https://app.slaiky.xyz/api/methods/views.publish \
      -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \
      -H 'content-type: application/json' \
      -d '{"userId":"7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07","view":{"type":"home","blocks":[{"type":"header","text":"Hi there"},{"type":"section","text":"Your week, at a glance."}]}}'
    
    Slaiky → your appanswer
    
    {
      "ok": true,
      "view": {
        "id": "7f3c0023-5a1e-4c2b-9d6f-1a2b3c4d5e16",
        "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01",
        "botUserId": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03",
        "type": "home",
        "title": null,
        "submit": null,
        "close": null,
        "blocks": [
          {
            "text": "Hi there",
            "type": "header"
          },
          {
            "text": "Your week, at a glance.",
            "type": "section"
          }
        ],
        "callbackId": null,
        "previousId": null,
        "hash": "1731240000.docs"
      }
    }
    

    Updated . Every method, scope, event and limit here is generated from the server’s own code.