The API answered with HTTP 401 and the error code legacy_token.
The token is an older workspace token and no longer works. Create a new token in Settings > API.
Every error is an RFC 9457 problem document (application/problem+json). Match on code, never on the message text. See errors for the full list.