Agents

Delete an agent session

Changed on

Removes a managed agent session from the public API and returns a deletion confirmation. If backend execution has ended, deletion can cancel a still-open public turn and abandon unpublished outputs. Running execution must be cancelled first. Physical cleanup may continue asynchronously. See managing sessions.

delete/agents/sessions/{session_id}

Request

  • Base URL
    https://api.openai.com/v1
  • URL
    https://api.openai.com/v1/agents/sessions/{session_id}
  • Auth
    HTTP bearer

Path parameters

session_idstring required

The ID of the session.

Response

The deleted session.

idstring required

The ID of the deleted session.

object'agent.session.deleted' required

The object type. Always agent.session.deleted.

deletedboolean required

Whether the session has been removed from the public API. Always true. Physical cleanup may still be in progress.

Changes