Riferimento API

Post

I post sono il cuore della Community del tuo Sublaunch. L'API li legge con i loro commenti e conteggi, e li pubblica, li fissa, li modifica e li elimina come creator del Sublaunch.

Post e commenti sono pubblicati subito, mai nella bozza. I membri ricevono una notifica per un nuovo post, e l'autore di un commento per una risposta.

L'oggetto post

Un post della Community del tuo Sublaunch, come lo vede il suo creator.

Attributi

  • idstring
    Identificatore univoco del post.
  • objectstring
    Sempre post.
  • titlestring
    Il titolo del post.
  • textstring
    Il testo del post. Testo semplice, con una riga vuota tra i paragrafi.
  • category_idstring o null
    La sua categoria.
  • accessstring
    Chi lo legge. public è chiunque, anche senza accesso. Un post paid si acquista a parte, al prezzo price.
    memberspublicpaid
  • pricenumber o null
    Il suo prezzo nella valuta del Sublaunch, per un post paid.
  • pinnedboolean
    Se è fissato in cima al feed.
  • comments_offboolean
    Se i commenti sono disattivati.
  • author_idstring o null
    Il membro che l'ha scritto, null per il creator del Sublaunch.
  • by_creatorboolean
    Se l'ha scritto il creator del Sublaunch.
  • mediaarray di objects
    Le sue immagini e i suoi video.
  • attachmentsarray di objects
    I suoi file.
  • pollobject o null
    Il suo sondaggio.
  • likesinteger
    Quanti like ha.
  • comments_countinteger
    Quanti commenti ha, risposte comprese.
  • statusstring
    Il suo stato, published una volta pubblicato.
  • urlstring
    Il post nella Community del Sublaunch.
  • published_atstring
    Quando è stato pubblicato, ISO 8601.
  • updated_atstring o null
    Quando è cambiato l'ultima volta, ISO 8601.
L'oggetto post
{
  "id": "Pt9xK3mQ2L",
  "object": "post",
  "title": "Weekly outlook",
  "text": "Three levels I watch this week on the S&P.\n\nCharts below, questions welcome.",
  "category_id": "x7Lp2QaZ",
  "access": "members",
  "price": null,
  "pinned": true,
  "comments_off": false,
  "author_id": null,
  "by_creator": true,
  "media": [
    {
      "kind": "image",
      "url": "https://example.com/weekly-chart.png"
    }
  ],
  "attachments": [],
  "poll": null,
  "likes": 48,
  "comments_count": 12,
  "status": "published",
  "url": "https://sublaunch.com/alphadesk/community/weekly-outlook",
  "published_at": "2026-11-15T17:02:40.000Z",
  "updated_at": "2026-11-16T08:11:05.000Z"
}

Elenca i post

GET/v1/postsScope readMCPlist_posts

Restituisce i post della Community, prima i fissati e poi i più recenti, o in un altro ordine.

Parametri di query

  • category_idstring
    Solo i post di questa categoria.
  • sortstring
    default mette prima i post fissati, poi i più recenti. new mette prima i più recenti, top quelli con più like.
    defaultnewtop
  • limitinteger
    Quanti oggetti restituire, da 1 a 100. 25 di default.
  • cursorstring
    Il next_cursor della pagina precedente, per avere la pagina successiva. Lascia uguali gli altri parametri. Vedi Paginazione.

Restituisce

Un elenco di oggetti post.

Errori

  • Un parametro ha un valore che l'API non accetta. param lo indica.
  • Il cursor non è uno di quelli forniti da questo elenco, è stato creato per altri filtri o va oltre il suo limite di profondità.
GET/v1/posts
curl -G https://api.sublaunch.com/v1/posts \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -d sort=new \
  -d limit=10
Risposta200
{
  "object": "list",
  "data": [
    {
      "id": "Pt9xK3mQ2L",
      "object": "post",
      "title": "Weekly outlook",
      "text": "Three levels I watch this week on the S&P.\n\nCharts below, questions welcome.",
      "category_id": "x7Lp2QaZ",
      "access": "members",
      "price": null,
      "pinned": true,
      "comments_off": false,
      "author_id": null,
      "by_creator": true,
      "media": [
        {
          "kind": "image",
          "url": "https://example.com/weekly-chart.png"
        }
      ],
      "attachments": [],
      "poll": null,
      "likes": 48,
      "comments_count": 12,
      "status": "published",
      "url": "https://sublaunch.com/alphadesk/community/weekly-outlook",
      "published_at": "2026-11-15T17:02:40.000Z",
      "updated_at": "2026-11-16T08:11:05.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJ0IjoiMjAyNi0xMS0xNVQxNzowMjo0MC4wMDBaIn0"
}

Recupera un post

GET/v1/posts/:post_idScope readMCPget_post

Restituisce un post con il suo testo, i media, il sondaggio e i conteggi.

Parametri di percorso

  • post_idstringObbligatorio
    L'ID del post, come lo restituisce Elenca i post.

Restituisce

Un oggetto post.

Errori

GET/v1/posts/:post_id
curl https://api.sublaunch.com/v1/posts/Pt9xK3mQ2L \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Risposta200
{
  "id": "Pt9xK3mQ2L",
  "object": "post",
  "title": "Weekly outlook",
  "text": "Three levels I watch this week on the S&P.\n\nCharts below, questions welcome.",
  "category_id": "x7Lp2QaZ",
  "access": "members",
  "price": null,
  "pinned": true,
  "comments_off": false,
  "author_id": null,
  "by_creator": true,
  "media": [
    {
      "kind": "image",
      "url": "https://example.com/weekly-chart.png"
    }
  ],
  "attachments": [],
  "poll": null,
  "likes": 48,
  "comments_count": 12,
  "status": "published",
  "url": "https://sublaunch.com/alphadesk/community/weekly-outlook",
  "published_at": "2026-11-15T17:02:40.000Z",
  "updated_at": "2026-11-16T08:11:05.000Z"
}

Crea un post

POST/v1/postsScope writeMCPcreate_post

Pubblica subito un post nella Community come creator del Sublaunch. I membri lo vedono e ricevono una notifica.

Parametri del body

  • titlestringObbligatorio
    Il titolo del post, da 1 a 150 caratteri.
  • textstring
    Il testo del post, al massimo 20 000 caratteri. Testo semplice, con una riga vuota tra i paragrafi.
  • category_idstring
    L'ID di una categoria, da Elenca le categorie. Vuoto per nessuna categoria.
  • accessstring
    Chi lo legge. members di default, public per chiunque anche senza accesso, paid per un post che si acquista a parte al prezzo price.
    memberspublicpaid
  • pricenumber
    Con access impostato su paid, il suo prezzo nella valuta del Sublaunch, almeno 1.
  • mediaarray di objects
    Immagini e video, al massimo 4.
  • attachmentsarray di objects
    File, al massimo 10.
  • pollobject o null
    Un sondaggio sotto il post, da 2 a 10 opzioni. null lo rimuove, prima che qualcuno voti.

Restituisce

Il nuovo oggetto post.

Errori

POST/v1/posts
curl -X POST https://api.sublaunch.com/v1/posts \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Live session tonight",
    "text": "We go live at 8pm New York time.\n\nWhich market first?",
    "category_id": "x7Lp2QaZ",
    "poll": {
      "options": ["Indices", "Crypto"]
    }
  }'
Risposta201
{
  "id": "Pq4mX8kR2T",
  "object": "post",
  "title": "Live session tonight",
  "text": "We go live at 8pm New York time.\n\nWhich market first?",
  "category_id": "x7Lp2QaZ",
  "access": "members",
  "price": null,
  "pinned": false,
  "comments_off": false,
  "author_id": null,
  "by_creator": true,
  "media": [],
  "attachments": [],
  "poll": {
    "options": [
      {
        "id": "o1",
        "text": "Indices",
        "votes": 0
      },
      {
        "id": "o2",
        "text": "Crypto",
        "votes": 0
      }
    ],
    "votes_count": 0
  },
  "likes": 0,
  "comments_count": 0,
  "status": "published",
  "url": "https://sublaunch.com/alphadesk/community/live-session-tonight",
  "published_at": "2026-11-17T09:30:00.000Z",
  "updated_at": null
}

Aggiorna un post

PATCH/v1/posts/:post_idScope writeMCPupdate_post

Modifica un post. Titolo, testo, media, allegati, sondaggio, accesso e prezzo si possono cambiare solo finché nessuno ha messo like, votato o commentato. Categoria e commenti si possono cambiare sempre.

Parametri di percorso

  • post_idstringObbligatorio
    L'ID del post, come lo restituisce Elenca i post.

Parametri del body

  • titlestring
    Il titolo del post, da 1 a 150 caratteri.
  • textstring
    Il testo del post, al massimo 20 000 caratteri. Testo semplice, con una riga vuota tra i paragrafi.
  • category_idstring
    L'ID di una categoria, da Elenca le categorie. Vuoto per nessuna categoria.
  • accessstring
    Chi lo legge. members di default, public per chiunque anche senza accesso, paid per un post che si acquista a parte al prezzo price.
    memberspublicpaid
  • pricenumber
    Con access impostato su paid, il suo prezzo nella valuta del Sublaunch, almeno 1.
  • mediaarray di objects
    Immagini e video, al massimo 4.
  • attachmentsarray di objects
    File, al massimo 10.
  • pollobject o null
    Un sondaggio sotto il post, da 2 a 10 opzioni. null lo rimuove, prima che qualcuno voti.
  • comments_offboolean
    true disattiva i commenti, false li riattiva.

Restituisce

L'oggetto post aggiornato.

Errori

  • Nessun post con questo ID nel Sublaunch della chiave.
  • Un parametro ha un valore che l'API non accetta. param lo indica.
  • Il body ha un campo che questo endpoint non accetta.
  • Qualcuno ha messo like, votato o commentato, quindi il suo testo non può più cambiare.
PATCH/v1/posts/:post_id
curl -X PATCH https://api.sublaunch.com/v1/posts/Pt9xK3mQ2L \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "comments_off": true
  }'
Risposta200
{
  "id": "Pt9xK3mQ2L",
  "object": "post",
  "title": "Weekly outlook",
  "text": "Three levels I watch this week on the S&P.\n\nCharts below, questions welcome.",
  "category_id": "x7Lp2QaZ",
  "access": "members",
  "price": null,
  "pinned": true,
  "comments_off": true,
  "author_id": null,
  "by_creator": true,
  "media": [
    {
      "kind": "image",
      "url": "https://example.com/weekly-chart.png"
    }
  ],
  "attachments": [],
  "poll": null,
  "likes": 48,
  "comments_count": 12,
  "status": "published",
  "url": "https://sublaunch.com/alphadesk/community/weekly-outlook",
  "published_at": "2026-11-15T17:02:40.000Z",
  "updated_at": "2026-11-17T09:30:00.000Z"
}

Elimina un post

DELETE/v1/posts/:post_idScope writeMCPdelete_post

Elimina un post con i suoi commenti. Non si può annullare.

Parametri di percorso

  • post_idstringObbligatorio
    L'ID del post, come lo restituisce Elenca i post.

Restituisce

Un oggetto con l'id del post e deleted impostato su true.

Errori

DELETE/v1/posts/:post_id
curl -X DELETE https://api.sublaunch.com/v1/posts/Pq4mX8kR2T \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Risposta200
{
  "id": "Pq4mX8kR2T",
  "object": "post",
  "deleted": true
}

Fissa un post

POST/v1/posts/:post_id/pinScope writeMCPpin_post

Fissa un post in cima al feed, o lo toglie dai fissati.

Parametri di percorso

  • post_idstringObbligatorio
    L'ID del post, come lo restituisce Elenca i post.

Parametri del body

  • pinnedboolean
    true lo fissa, false lo toglie dai fissati. true di default.

Restituisce

L'oggetto post.

Errori

POST/v1/posts/:post_id/pin
curl -X POST \
  https://api.sublaunch.com/v1/posts/Pt9xK3mQ2L/pin \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "pinned": true
  }'
Risposta200
{
  "id": "Pt9xK3mQ2L",
  "object": "post",
  "title": "Weekly outlook",
  "text": "Three levels I watch this week on the S&P.\n\nCharts below, questions welcome.",
  "category_id": "x7Lp2QaZ",
  "access": "members",
  "price": null,
  "pinned": true,
  "comments_off": false,
  "author_id": null,
  "by_creator": true,
  "media": [
    {
      "kind": "image",
      "url": "https://example.com/weekly-chart.png"
    }
  ],
  "attachments": [],
  "poll": null,
  "likes": 48,
  "comments_count": 12,
  "status": "published",
  "url": "https://sublaunch.com/alphadesk/community/weekly-outlook",
  "published_at": "2026-11-15T17:02:40.000Z",
  "updated_at": "2026-11-16T08:11:05.000Z"
}

L'oggetto commento

Un commento a un post, o una risposta a un commento.

Attributi

  • idstring
    Identificatore univoco del commento.
  • objectstring
    Sempre comment.
  • post_idstring
    Il post a cui si riferisce.
  • parent_idstring o null
    Il commento a cui risponde, null per un commento al post.
  • textstring
    Il commento.
  • author_idstring o null
    L'utente che l'ha scritto.
  • likesinteger
    Quanti like ha.
  • statusstring
    Il suo stato, published una volta pubblicato.
  • created_atstring
    Quando è stato scritto, ISO 8601.
L'oggetto commento
{
  "id": "Cm2kX8pQ7R",
  "object": "comment",
  "post_id": "Pt9xK3mQ2L",
  "parent_id": null,
  "text": "Thanks, the 4 hour chart helps a lot.",
  "author_id": "Us4kP9xQ2M",
  "likes": 3,
  "status": "published",
  "created_at": "2026-11-15T18:20:13.000Z"
}

Elenca i commenti

GET/v1/posts/:post_id/commentsScope readMCPlist_comments

Restituisce i commenti e le risposte di un post, dal più vecchio. Una risposta ha il parent_id del suo commento.

Parametri di percorso

  • post_idstringObbligatorio
    L'ID del post, come lo restituisce Elenca i post.

Parametri di query

  • limitinteger
    Quanti oggetti restituire, da 1 a 100. 25 di default.
  • cursorstring
    Il next_cursor della pagina precedente, per avere la pagina successiva. Lascia uguali gli altri parametri. Vedi Paginazione.

Restituisce

Un elenco di oggetti commento.

Errori

  • Nessun post con questo ID nel Sublaunch della chiave.
  • Un parametro ha un valore che l'API non accetta. param lo indica.
  • Il cursor non è uno di quelli forniti da questo elenco, è stato creato per altri filtri o va oltre il suo limite di profondità.
GET/v1/posts/:post_id/comments
curl https://api.sublaunch.com/v1/posts/Pt9xK3mQ2L/comments \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Risposta200
{
  "object": "list",
  "data": [
    {
      "id": "Cm2kX8pQ7R",
      "object": "comment",
      "post_id": "Pt9xK3mQ2L",
      "parent_id": null,
      "text": "Thanks, the 4 hour chart helps a lot.",
      "author_id": "Us4kP9xQ2M",
      "likes": 3,
      "status": "published",
      "created_at": "2026-11-15T18:20:13.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJ0IjoiMjAyNi0xMS0xNVQxNzowMjo0MC4wMDBaIn0"
}

Crea un commento

POST/v1/posts/:post_id/commentsScope writeMCPcreate_comment

Commenta un post come creator del Sublaunch, o risponde a un commento con parent_id. Viene pubblicato subito, e l'autore del post o del commento riceve una notifica.

Parametri di percorso

  • post_idstringObbligatorio
    L'ID del post, come lo restituisce Elenca i post.

Parametri del body

  • textstringObbligatorio
    Il commento, da 1 a 2 000 caratteri.
  • parent_idstring
    Il commento a cui risponde, da Elenca i commenti.

Restituisce

Il nuovo oggetto commento.

Errori

POST/v1/posts/:post_id/comments
curl -X POST \
  https://api.sublaunch.com/v1/posts/Pt9xK3mQ2L/comments \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Glad it helps. Same levels on Thursday.",
    "parent_id": "Cm2kX8pQ7R"
  }'
Risposta201
{
  "id": "Cr7mQ2xK9P",
  "object": "comment",
  "post_id": "Pt9xK3mQ2L",
  "parent_id": "Cm2kX8pQ7R",
  "text": "Glad it helps. Same levels on Thursday.",
  "author_id": null,
  "likes": 0,
  "status": "published",
  "created_at": "2026-11-17T09:30:00.000Z"
}

Elimina un commento

DELETE/v1/comments/:comment_idScope writeMCPdelete_comment

Elimina un commento con tutte le sue risposte. Non si può annullare.

Parametri di percorso

  • comment_idstringObbligatorio
    L'ID del commento, come lo restituisce Elenca i commenti.

Restituisce

Un oggetto con l'id del commento e deleted impostato su true.

Errori

DELETE/v1/comments/:comment_id
curl -X DELETE \
  https://api.sublaunch.com/v1/comments/Cm2kX8pQ7R \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Risposta200
{
  "id": "Cm2kX8pQ7R",
  "object": "comment",
  "deleted": true
}