Sviluppatori

Costruisci con Welley

Puoi usare l'API di Welley per creare client, script, strumenti per la community e integrazioni. Il riferimento Swagger online descrive le operazioni e gli schemi che puoi usare.

In futuro prevediamo di rilasciare Welley come open source. Per ora non sono state annunciate né una data di rilascio né una licenza.

MCPModel Context Protocol

Collega un agente AI

Welley ha un server MCP, quindi un agente AI come Claude, Codex o Cursor può lavorare con il tuo account Welley. Aggiungi il server al tuo agente e accedi con Welley. Poi fai domande sui tuoi gruppi e feed, oppure chiedi all'agente di pubblicare, rispondere o organizzare un evento per te. L'agente agisce come te, quindi può fare solo ciò che puoi fare tu.

server
https://welley.social/mcp
trasporto
Streamable HTTP
accesso
OAuth, client ID welley-mcp, nessun client secret
durata
7 giorni, poi accedi di nuovo
disconnesso
il tuo agente può comunque cercare nell'API e leggere i post pubblici

Il tuo agente

Claude, Codex, Cursor, Gemini e altri

MCP

welley.social/mcp

  • overview
  • find
  • call
HTTPS

API di Welley

Post, gruppi, eventi, messaggi e impostazioni del server

Il tuo agente non carica l'intera API. Cerca l'operazione che gli serve, poi esegue solo quella.
StrumentoCosa fa
overview()Indica cosa può fare l'API, area per area.
find(query)Trova l'operazione giusta a partire da parole semplici, come “rispondere a un post”.
call(operation_id, params, body, mode)Descrive, controlla o esegue una singola operazione. Solo mode: "execute" invia una richiesta reale.

Aggiungi Welley al tuo agente

Claude Code

terminal
claude mcp add --transport http --client-id welley-mcp welley https://welley.social/mcp
claude mcp login welley
  1. Si apre il browser. Accedi a Welley e approva la connessione.
  2. Su un computer senza browser, aggiungi --no-browser al comando di login e apri su un altro dispositivo il link che stampa. Poi incolla l'indirizzo a cui arriva il browser.

Guarda un agente al lavoro

Questa è una sessione reale in Claude Code. Maya è membro di Riverside Garden, un gruppo dedicato a un orto comunitario. Collega Welley, chiede cosa si è persa e poi chiede all'agente di rispondere a una domanda al posto suo. Il gruppo controlla i nuovi post prima che vengano pubblicati, quindi la sua risposta resta in attesa di un moderatore.

~/garden $ claude mcp add --transport http --client-id welley-mcp welley https://welley.social/mcp
Added HTTP MCP server welley with URL: https://welley.social/mcp to local config
 
~/garden $ claude mcp login welley --no-browser
Starting authentication for "welley"…
Visit this URL to authorize:
  https://welley.social/oauth/authorize?response_type=code&client_id=welley-mcp&code_challenge=…
 
Waiting for authorization… (^C to cancel)
Or paste the redirect URL here:
 
# Maya opens the link, signs in to Welley and clicks Allow.
 
~/garden $ claude
 
> What's new in Riverside Garden lately? Is there a question nobody has answered yet?
 
⏺ welley - find (MCP)(query: "community feed recent posts and unanswered questions")
  ⎿  {"status":"task_not_finished_yet","candidates":[{"operationId":"get_api_v1_pos…
 
⏺ Riverside Garden is likely a group. Let me try the group feed with intent to resolve the id.
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_groupid_feed", mode: "execute")
  ⎿  {"ok":false,"operationId":"get_api_v1_groups_groupid_feed","error":{"type":"va…
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_search", params: {"query": "Riverside Garden"}, mode: "execute")
  ⎿  {"ok":false,"operationId":"get_api_v1_groups_search","error":{"type":"validati…
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_search", params: {"substring": "Riverside Garden"}, mode: "execute")
  ⎿  {"status":200,"body":{"groups":[{"groupId":"gr_01m4y6errre80b2101wdbn7kfm","gr…
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_groupid_feed", params: {"groupId": "gr_01m4y6errre80b2101wdbn7kfm", "limit": 30, "includeComments": true, "includePublisher": true}, mode: "execute")
  ⎿  {"status":200,"body":[{"id":"pt_01m67821z8e0qv7eqtf4jb44n3","uri":"https://wel…
 
⏺ The group has 22 posts but the feed returned only 7, so some channels may be missing. I'll look up the group's channels.
 
⏺ welley - find (MCP)(query: "list channels of a group")
  ⎿  {"status":"task_not_finished_yet","candidates":[{"operationId":"get_api_v1_gro…
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_groupid_channels", params: {"groupId": "gr_01m4y6errre80b2101wdbn7kfm"}, mode: "execute")
  ⎿  {"status":200,"body":[{"id":"gc_01m4y6nfrheyeszr37r94fh9r7","username":"rivers…
 
⏺ Questions most likely live in the "Growing advice" forum channel, which isn't in the main feed. Let me fetch its posts.
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts", mode: "describe")
  ⎿  {"operationId":"get_api_v1_posts","method":"GET","path":"/api/v1/posts","title…
 
⏺ Pulling the forum posts (all forum categories) plus the volunteering channel in parallel.
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts", params: {"groupId": "gr_01m4y6errre80b2101wdbn7kfm", "channelAppMeta": "welley.group.forum", "limit": 30, "htmlContent": "false"}, mode: "execute")
  ⎿  {"status":200,"body":[{"id":"pt_01m4y6wn9sejw9pyb4kkpf4fet","uri":"https://wel…
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts", params: {"ownerId": "gc_01m4y6ndqte0naxpd23nxj2zpd", "limit": 20, "htmlContent": "false"}, mode: "execute")
  ⎿  {"status":200,"body":[{"id":"pt_01m6781k5weasa5819xvhzcxwy","uri":"https://wel…
 
⏺ Riverside Garden has been quiet since Oct 30. Nobody has posted in the last six days. And yes, there's one question with no replies.
  
  Recent activity (Oct 30)
  - Water shut-off on Nov 15 (Alex Morgan, Announcements): take your hoses home or hang them in the shed before then. That's 10 days away.
  - Garlic for bed 4 is in (Maya Chen): three kinds from the seed library. It gets planted Saturday, after the compost work.
  - First harvest from bed 12 (Noah Bennett): two pounds of cherry tomatoes. It got 4 likes and 2 comments.
  - Watering shifts (Elena Ruiz, Volunteering): Elena will do Tuesdays until the water goes off and asked if anyone needs Thursday covered. One person has replied.
  
  Older posts still around (Oct 14)
  - Saturday workday plan (Garden projects): 9:00 at the main gate. Turn the compost, mulch the paths, plant the garlic. It has 2 replies.
  - Second compost bay (Sam Rivera): needs about 8 pallets, wire and two people for an afternoon. It has 1 reply.
  - Aphids on the kale in bed 7 (Maya Chen, Growing advice): asks about companion planting. It has 1 reply.
  - Spring seed exchange: March 14 in the community room.
  
  The question nobody has answered
  "When should we sow the fava beans?", posted by Sam Rivera in Growing advice on Oct 14. It has no replies, one 👍 and one view. Sam says the October sowing came through winter well, but the March sowing gave a bigger harvest, and asks if anyone has notes from earlier seasons. If anyone is going to sow this fall, now is the time, so a reply would help soon.
  
  I only read the public channels. I didn't open Staff discussion or Chess, which are private.
 
> Answer Sam for me: we sowed half in late October and half in March last year. The October ones flowered first, but the March ones gave more pods, so I'd do both again.
 
⏺ welley - find (MCP)(query: "reply to a post (create comment)")
  ⎿  {"status":"task_not_finished_yet","candidates":[{"operationId":"post_api_v1_po…
 
⏺ welley - call (MCP)(operation_id: "post_api_v1_posts_postid_comments", params: {"postId": "pt_01m4y6wgw9eve9me2bzs0dap01"}, body_json: {"text": "We sowed half in late October and half in March last year. The October ones flowered first, but the March ones gave more pods, so I'd do both again.", "privacy": "PUBLIC", "kind": "Note"}, mode: "execute")
  ⎿  {"status":202,"body":{"id":"pp_01m6pe5xzde5yttak8e857qfqs","groupId":"gr_01m4y…
 
⏺ The server accepted the reply but marked it as pending. I'll check whether it has gone live.
 
⏺ welley - find (MCP)(query: "get comments of a post", limit: 3)
  ⎿  {"status":"task_not_finished_yet","candidates":[{"operationId":"get_api_v1_pos…
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts_postid_comments", params: {"postId": "pt_01m4y6wgw9eve9me2bzs0dap01", "htmlContent": "false"}, mode: "execute")
  ⎿  {"status":200,"body":[],"request":{"operationId":"get_api_v1_posts_postid_comm…
 
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts_postid_comments", params: {"postId": "pt_01m4y6wgw9eve9me2bzs0dap01", "htmlContent": "false"}, mode: "execute")
  ⎿  {"status":200,"body":[],"request":{"operationId":"get_api_v1_posts_postid_comm…
 
⏺ I sent your reply to Sam's fava bean question, but it isn't showing in the thread yet.
  
  The reply is under your account (Maya Chen) in Growing advice:
  
  > We sowed half in late October and half in March last year. The October ones flowered first, but the March ones gave more pods, so I'd do both again.
  
  Welley accepted it and marked it pending (pending post id pp_01m6pe5xzde5yttak8e857qfqs). I checked the thread twice right after, and both times it still had no comments. It may still be processing, or the group may have to approve it first. If it doesn't appear within a few minutes, look at the post in Growing advice. I can check it again for you if you like.
 
> 

Inizia con una richiesta pubblica

L'API funziona su HTTPS e la maggior parte delle operazioni accetta e restituisce JSON. Le operazioni di lettura pubbliche possono funzionare senza un account.

Leggi le informazioni sul server

Questa richiesta restituisce metadati pubblici sul server. Non modifica nessun dato del server.

curl --fail --silent --show-error "https://welley.social/api/v1/instance"

Cerca l'operazione in Swagger

Prima di scrivere un client, controlla i parametri, lo schema della richiesta, lo schema della risposta e i permessi.

Autentica un'integrazione

Le operazioni protette richiedono un token valido nell'header Authorization. La nostra CLI ufficiale invia il token con il prefisso Bearer.

Leggi i tuoi permessi effettivi sul server

Imposta WELLEY_TOKEN con un tuo token valido, nel modo in cui gestisci di solito i segreti. Questo esempio legge soltanto dati.

curl --fail --silent --show-error \ -H "Authorization: Bearer $WELLEY_TOKEN" \ "https://welley.social/api/v1/rbac/permissions"
  • Per un'integrazione, crea un token di accesso personale nelle impostazioni del tuo account.
  • Dagli un nome e una scadenza. L'API accetta anche expiresInDays=0 per un token senza scadenza memorizzata.
  • Limita quali permessi globali, permessi di gruppo e gruppi il token può usare.
  • Se lasci vuota una lista di elementi consentiti, quel campo è limitato solo dal tuo accesso attuale. Un token non può dare diritti che tu non hai.
  • Vedrai il segreto del token una sola volta. Salvalo prima di chiudere il risultato della creazione.
  • Per gestire i token ti serve una sessione di accesso all'account. Un token di accesso personale non può creare, elencare, copiare o revocare token.

Controlla permessi e ambito

L'autenticazione dice all'API chi sta chiamando. I permessi del ruolo decidono quali operazioni quel chiamante può usare.

  • L'API restituisce 401 quando una richiesta protetta non ha un'autenticazione valida.
  • L'API restituisce 403 quando il chiamante non ha un permesso richiesto.
  • I nomi dei permessi seguono il formato Resource.Action, per esempio GroupSettings.Manage.
  • Per le operazioni su webhook e permessi con ambito, ometti scope per usare l'ambito del server. Per l'ambito di un gruppo, passa il TypeId del gruppo.
  • Leggi la descrizione di ogni operazione. Alcuni endpoint usano firme HTTP o un altro protocollo invece di un token dell'account.

Scegli un'area dell'API

Il riferimento copre funzioni social, integrazioni e amministrazione del server. Gli esempi qui sono solo una piccola parte dell'API.

Account e profili

Leggi i profili, gestisci le identità dell'account e usa le operazioni di esportazione o di spostamento dell'account.

MetodoPercorsoOperazioneAccesso
GET/api/v1/usersLeggi un profilo locale o remoto tramite il nome utente.Pubblico o token facoltativo
POST/api/v1/usersAggiungi un altro profilo all'account attuale, fino al limite del server.Token richiesto

Post e feed

Leggi i feed e crea post. Altre operazioni gestiscono risposte, sondaggi, reazioni, bozze e post salvati.

MetodoPercorsoOperazioneAccesso
GET/api/v1/postsLeggi i post pubblici come ospite, oppure un feed personalizzato quando sei autenticato.Pubblico o token facoltativo
POST/api/v1/postsCrea un post indicando il contenuto e chi può vederlo.Token richiesto

Gruppi ed eventi

Crea strumenti per la community con gruppi, appartenenza, canali, moderazione ed eventi.

MetodoPercorsoOperazioneAccesso
POST/api/v1/groupsCrea un gruppo, usando i permessi dell'utente autenticato.Token richiesto
GET/api/v1/eventsElenca gli eventi pubblici o gli eventi che l'utente autenticato può vedere.Pubblico o token facoltativo
POST/api/v1/eventsCrea un evento. Un evento di gruppo richiede GroupEvents.Create.Token richiesto

Conversazioni e notifiche

Leggi le stanze di conversazione e i loro messaggi. Leggi le raccolte di notifiche e aggiorna il loro stato di lettura.

MetodoPercorsoOperazioneAccesso
GET/api/v1/roomsElenca le stanze dell'utente attuale. Per continuare l'elenco, usa nextCursor dal corpo della risposta.Token richiesto
GET/api/v1/user-notificationsElenca le notifiche dell'utente attuale.Token richiesto

Webhook e agenti IA

Collega servizi esterni con i webhook. Configura gli agenti IA tramite le API per gli agenti.

MetodoPercorsoOperazioneAccesso
GET/api/v1/webhooks/eventsOttieni l'elenco dei tipi di evento webhook supportati.Token richiesto
POST/api/v1/webhooksCrea un webhook in un ambito di server o di gruppo per cui hai il permesso. Il segreto di firma HTTP viene mostrato una sola volta.Token richiesto
GET/api/v1/ai-agentsElenca gli agenti IA che il chiamante può vedere.Token richiesto

Amministrazione di server e gruppi

Usa l'API per impostazioni, segnalazioni, moderazione, controlli della federazione, quote e amministrazione del deployment.

MetodoPercorsoOperazioneAccesso
GET/api/v1/rbac/permissionsLeggi i permessi effettivi per l'utente e l'ambito attuali.Token richiesto
GET/api/v1/settingsLeggi le impostazioni della piattaforma, se l'account ha i permessi necessari.Pubblico o token facoltativo

Gestisci risposte e media

Segui la paginazione e il flusso di caricamento propri di ogni operazione.

  • Per i feed a cursore, segui i link di paginazione che il server restituisce. Non costruire cursori ipotizzando gli ID.
  • Le stanze restituiscono un nextCursor opaco nel corpo della risposta. Quando continui l'elenco, mantieni gli stessi filtri.
  • Per caricare contenuti multimediali, crea una voce di caricamento, poi invia il contenuto all'URL che ricevi.
  • Controlla le risposte di errore e i limiti di ogni operazione. Anche un'operazione documentata può richiedere un ruolo, una configurazione del server o un provider esterno.