Deny an agent request - Spacefast Docs

Deny an agent request

Denies a pending request and returns the receipt. Requires a signed-in session belonging to the grant’s owner. Denial sticks to the action, so asking again in different words returns the same denied decision.

POST /v1/approvals/{approvalId}/deny

Authorization

__Host-better-auth.session_token

API key · cookie required

Dashboard session cookie set at sign-in. An operation that lists only this scheme needs a person: API keys and machine credentials are refused. The same session token also works as Authorization: Bearer.

Path parameters

approvalId string required

Responses

200 Response for status 200

{
  "$schema": "string<uri>",
  "data": {
    "id": "string",
    "status": "string",
    "result": {
      "property1": null,
      "property2": null
    }
  }
}

Error Response

{
  "$schema": "string<uri>",
  "type": "string",
  "title": "string",
  "status": integer,
  "detail": "string",
  "code": "string",
  "pointer": "string",
  "details": {
    "property1": null,
    "property2": null
  },
  "suggestions": ["string"],
  "next": ["string"],
  "requestId": "string"
}

Try it

Server

Base URL: https://api.spacefast.com

cURL Example

curl -X POST "https://api.spacefast.com/v1/approvals/string/deny" \
  -H "Cookie: __Host-better-auth.session_token=YOUR_API_KEY"

JavaScript Example

const response = await fetch("https://api.spacefast.com/v1/approvals/string/deny", {
  method: "POST",
  headers: {
    "Cookie": "__Host-better-auth.session_token=YOUR_API_KEY"
  }
});

Python Example

import requests

response = requests.post(
    "https://api.spacefast.com/v1/approvals/string/deny",
    headers={
        "Cookie": "__Host-better-auth.session_token=YOUR_API_KEY"
    },
)