Logo
Search
Docs

Update credential status

PATCH https://app.sulus.ai/api/tools/credentials/{id}/status

Toggle a credential active/inactive

Authentication

Send a bearer token created on your dashboard's Developer page:

Authorization: Bearer <YOUR_API_KEY>

Path parameters

id string Required

The credential's public id.

Validation: the credential's public id, owned by the authenticated user

Request body

status string Required
Validation: required|string|in:active,inactive

Errors

StatusMeaningBody
401 No authenticated user {"success":false,"message":"Unauthenticated."}
404 Credential not found, or not owned by the caller {"success":false,"message":"Credential not found."}
422 Validation failed {"message":"…","errors":{"field":["…"]}}
403 Feature tools not enabled for the account

Notes

  • An inactive credential is excluded from the slim list (GET /tools/credentials) but still exists for the manager view and existing tool references.
curl --request PATCH \
  --url https://app.sulus.ai/api/tools/credentials/{id}/status \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "status": "inactive"
}'
import requests

url = "https://app.sulus.ai/api/tools/credentials/{id}/status"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
  "status": "inactive"
}

response = requests.patch(url, json=payload, headers=headers)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	url := "https://app.sulus.ai/api/tools/credentials/{id}/status"
	payload := strings.NewReader(`{
  "status": "inactive"
}`)
	req, _ := http.NewRequest("PATCH", url, payload)
	req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
	req.Header.Add("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
Response 200
{
    "success": true,
    "data": {
        "id": "3f9c2a10-6b4e-4a2d-9f0a-1c2d3e4f5a6b",
        "provider": "custom-credential",
        "name": "Orders API",
        "auth_type": "bearer",
        "encryption_enabled": false,
        "status": "inactive"
    }
}