SVILUPPATORI · API

Una sola API REST. Un client in qualsiasi linguaggio.

Ogni endpoint è descritto in una specifica OpenAPI 3.1. Genera un client type-safe nel linguaggio che preferisci, oppure chiama l'API REST direttamente con gli strumenti che già usi. L'autenticazione con chiave API, l'idempotency-key e il versionamento fanno parte del contratto stesso.

OpenAPI 3.1 · un client type-safe in qualsiasi linguaggio · l'API REST è disponibile oggi
cURL
Qualsiasi terminale
curl https://api.sendnomi.com/v1/messages \
  -H "Authorization: Bearer sn_live_•••" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Benvenuto",
    "html": "<h1>Ciao</h1>"
  }'
Node.js
fetch nativo
const res = await fetch(
  "https://api.sendnomi.com/v1/messages",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer sn_live_•••",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      from: "[email protected]",
      to: "[email protected]",
      subject: "Benvenuto",
      html: "<h1>Ciao</h1>",
    }),
  },
);
Python
requests
import requests

requests.post(
    "https://api.sendnomi.com/v1/messages",
    headers={"Authorization": "Bearer sn_live_•••"},
    json={
        "from": "[email protected]",
        "to": "[email protected]",
        "subject": "Benvenuto",
        "html": "<h1>Ciao</h1>",
    },
)
OpenAPI 3.1
Client generato
# Contratto dell'API
GET https://api.sendnomi.com/v1/openapi.json

# Importalo nel generatore che preferisci
# e ottieni un client type-safe nel tuo
# linguaggio — lo stesso contratto per
# tutte le superfici.

Un client nel tuo linguaggio

Importa la specifica OpenAPI 3.1 nel generatore che preferisci e ottieni un client type-safe. Lo stesso contratto dell'API si traduce direttamente in:

  • TypeScript
  • Python
  • PHP
  • Go
  • Ruby
  • Java
  • .NET
  • Rust

Tutte le superfici chiamano gli stessi endpoint con gli stessi nomi di parametri — cambiare linguaggio non cambia il contratto. Autenticazione con chiave API (Bearer), idempotency-key sulle richieste POST e versionamento nell'URL: identico ovunque.