Update privacy settings - Spacefast Docs

Update privacy settings

Applies the opt-out elections in the body and returns both settings. Omitted fields keep their value. A field that would not change is not written, so repeating the same call records nothing; an actual change is written to the account activity log. Requires a browser session; read the current settings from GET /v1/me.

PATCH /v1/me/privacy

Authorization

Authorization Bearer token · header required

Authorization: Bearer <token> with an API key (sfa_ prefix), an OAuth access token, a session token, or a Space machine credential (sfm_ prefix).

Request body

required application/json

The settings to change. Anything omitted keeps the value it has.

Responses

200 Response for status 200

default Error

Every 4xx and 5xx response is one RFC 9457 problem document served as application/problem+json.

Try it

Server

Base URL: https://api.spacefast.com Custom base URL: Overrides the selected server when set.

Authorization

Bearer token Remember on this device Include my values in samples

Body

application/json

Send

Request

cURL

curl -X PATCH "https://api.spacefast.com/v1/me/privacy" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "analyticsOptOut": true,
  "advertisingOptOut": true
}'

JavaScript

const response = await fetch("https://api.spacefast.com/v1/me/privacy", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"analyticsOptOut\": true,\n  \"advertisingOptOut\": true\n}"
});

Python

import requests

response = requests.patch(
    "https://api.spacefast.com/v1/me/privacy",
    headers={
        "Authorization": "Bearer YOUR_TOKEN",
        "Content-Type": "application/json"
    },
    data="{\n  \"analyticsOptOut\": true,\n  \"advertisingOptOut\": true\n}",
)

Response

200 default

{
  "$schema": "http://example.com",
  "data": {
    "analyticsOptOut": true,
    "advertisingOptOut": true
  }
}

Error Response

{
  "$schema": "http://example.com",
  "type": "string",
  "title": "string",
  "status": -9007199254740991,
  "detail": "string",
  "code": "string",
  "pointer": "string",
  "details": {
    "property1": null,
    "property2": null
  },
  "suggestions": [
    "string"
  ],
  "next": [
    "string"
  ],
  "requestId": "string"
}