Attempting to archive an active project using the OpenAI Organization API returns a project_archived error, even though the project is in the active state before the request. The archive request succeeds internally (project becomes archived), but the API response incorrectly reports it as a failure.
jatin@JD:~/workspace/main$ curl -X POST https://api.openai.com/v1/organization/projects -H "Authorization: Bearer $OPENAI_ADMIN_KEY" -H "Content-Type: application/json" -d '{
"name": "Project ABC"
}'
{
"object": "organization.project",
"id": "proj_DyXPEbZner1LOzF9PSlHaKIi",
"name": "Project ABC",
"created_at": 1762762906,
"archived_at": null,
"status": "active"
}
jatin@JD:~/workspace/main$ curl https://api.openai.com/v1/organization/projects/proj_DyXPEbZner1LOzF9PSlHaKIi \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
{
"object": "organization.project",
"id": "proj_DyXPEbZner1LOzF9PSlHaKIi",
"name": "Project ABC",
"created_at": 1762762906,
"archived_at": null,
"status": "active"
}
jatin@JD:~/workspace/main$ curl -X POST https://api.openai.com/v1/organization/projects/proj_DyXPEbZner1LOzF9PSlHaKIi/archive -H "Authorizatio
n: Bearer $OPENAI_ADMIN_KEY" -H "Content-Type: application/json"
{
"error": {
"message": "Project 'proj_DyXPEbZner1LOzF9PSlHaKIi' is archived. You can only update an active project.",
"type": "invalid_request_error",
"param": null,
"code": "project_archived"
}
}
jatin@JD:~/workspace/main$ curl https://api.openai.com/v1/organization/projects/proj_DyXPEbZner1LOzF9PSlHaKIi \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
{
"object": "organization.project",
"id": "proj_DyXPEbZner1LOzF9PSlHaKIi",
"name": "Project ABC",
"created_at": 1762762906,
"archived_at": 1762762943,
"status": "archived"
}
jatin@JD:~/workspace/main$
Similar issue is happening with service account as well.