500 internal error in archive API endpoint

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

POST requests to https://api.cursor.com/v1/agents/AGENTID/archive on some agents gives me 500 Internal Server Error with { “code”: “internal”, “message”: “Error” } as a response body.
This seems to happen to some agents only. When I open the agent by its URL, I can archive it manually with no errors.
Other API endpoints work fine with the same api key.

Steps to Reproduce

One of the agent IDs it happened to is bc-40acbef5-7d68-42bf-84b8-1ae3730a5a10. I have archived it manually from the web interface, but it still produces that error if I send a POST request to https://api.cursor.com/v1/agents/bc-40acbef5-7d68-42bf-84b8-1ae3730a5a10/archive

Operating System

MacOS

Version Information

It’s not about the IDE

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey there!

Thanks for the report. I believe this is a known issue where the /v1/agents/{id}/archive endpoint returns a 500 when the request includes a Content-Type: application/json header with no body (or an empty body).

In the meantime, you can work around it by either:

  1. Omitting the Content-Type header entirely, or
  2. Sending an empty JSON object as the body: -d '{}'

Let me know if that unblocks you!

Thank you Colin! It worked.