Base URL

L’endpoint REST API attuale è:

https://www.app.ocoya.com/api/_public/v1

Invia la tua API key nell’header X-API-Key.

X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: application/json

Create API key

Test Your API Key

Chiama /me per verificare la key.

curl -X GET "https://www.app.ocoya.com/api/_public/v1/me" \
  -H "X-API-Key: YOUR_API_KEY"

Se la key è valida, l’API risponde con il tuo contesto utente invece che con un errore di autenticazione.

Authentication Errors

Missing API key

Se non viene fornita alcuna API key, l’API restituisce 401 Unauthorized.

{
  "message": "Missing API token."
}

Invalid API key

Se la API key non è valida, l’API restituisce 403 Forbidden.

{
  "message": "Invalid API token."
}

Security Notes

Keep keys server-side

Le API key sono pensate per richieste dal backend. Non usarle direttamente nel codice che gira nel browser.

Store keys securely

Conserva le API key in variabili d’ambiente o in un secrets manager.

Rotate exposed keys

Sostituisci una API key se compare in codice client, log, screenshot o repository pubblici.

MCP Authentication

MCP non usa le Ocoya API key. I client MCP si autenticano tramite OAuth e chiedono all’utente di approvare l’accesso al brand.

Vedi MCP per le istruzioni di configurazione.