Skip to main content
PATCH
https://example.com
/
api
/
indexes
/
{indexId}
/
sources
/
{sourceId}
Toggle source enabled state
curl --request PATCH \
  --url https://example.com/api/indexes/{indexId}/sources/{sourceId} \
  --header 'Content-Type: application/json' \
  --cookie better-auth.session_token= \
  --data '
{
  "enabled": true
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>",
    "requestId": "<string>",
    "statusCode": 123,
    "details": [
      {
        "message": "<string>",
        "path": "<string>"
      }
    ]
  }
}

Authorizations

better-auth.session_token
string
cookie
required

Path Parameters

indexId
string
required
Minimum string length: 1
sourceId
string
required
Minimum string length: 1

Body

application/json
enabled
boolean
required

Response

Request validation failed

error
object
required