FansquareAPI reference
Open the app

AI control

Acquire or refresh the AI lock

PUT/v1/accounts/{account_id}/fans/{fan_id}/ai-lock

Marks the fan as currently handled by an AI in the Fansquare CRM. Without ttl_seconds the lock never expires: it holds until you release it with DELETE. With ttl_seconds the same request acquires and refreshes the lock: send it again before expiry to keep it active, or let it expire automatically if the client stops renewing.

Required scopewrite:ai_locks
Rate limit60 requests per minute
curl -X PUT 'https://api.fansquare.so/v1/accounts/c851d9d6-b90b-4958-aed2-2fdaa2fe21a3/fans/a6df8022-e509-4575-ad28-e29c2d1d42dc/ai-lock' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste" \
  -H "Content-Type: application/json" \
  -d '{
  "ttl_seconds": 300
}'
{
  "expires_at": "2026-10-12T21:19:00.000Z"
}

Parameters

Headers

  • Fansquare-Versionstringrequired

    API version to pin. Accepts the mineral name or the release date of a version.

Path

  • account_idstringrequired

    MYM account id (account.external_id in GET /v1/creators).

    min length 1
  • fan_idstringrequired

    MYM fan id.

    format uuid

Body

application/json

  • ttl_secondsinteger

    Optional lock lifetime in seconds. Omit it for a lock that never expires (released only by DELETE). When set, send the request again before expiry to keep the lock active.

    min 30max 86400

Response

OK, application/json

  • expires_atstring | nullrequired

    When the lock expires (ISO 8601), or null when it never expires.

    format date-time
curl -X PUT 'https://api.fansquare.so/v1/accounts/c851d9d6-b90b-4958-aed2-2fdaa2fe21a3/fans/a6df8022-e509-4575-ad28-e29c2d1d42dc/ai-lock' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste" \
  -H "Content-Type: application/json" \
  -d '{
  "ttl_seconds": 300
}'
{
  "expires_at": "2026-10-12T21:19:00.000Z"
}