Sofa
Account

Create or update integration

Create a new media server integration or update an existing one. Generates a unique webhook token for the provider.

POST
/account/integrations
better-auth.session_token<token>

Better Auth session cookie

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "http://localhost:3000/api/v1/account/integrations" \  -H "Content-Type: application/json" \  -d '{    "provider": "plex"  }'
{
  "id": "string",
  "provider": "string",
  "type": "webhook",
  "token": "string",
  "enabled": true,
  "lastEventAt": "string",
  "createdAt": "string"
}