apicheats.dev openai/llms.txt Raw .md
POST

POST /projects/{project_id}/groups/{group_id}/roles — OpenAI API

OpenAI admin key (required); https://api.openai.com/v1

OpenAI API

Assign project role to group

Base URL
https://api.openai.com/v1
Auth
Authorization: Bearer <OPENAI_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 229 tokens · Vary: Accept

Critical gotchas

The Responses API is the primary interface for new text and tool workflows; Chat Completions remains a separate compatibility API.

Audio transcription uploads use multipart form data rather than a JSON request body.

cURL

curl -X POST 'https://api.openai.com/v1/projects/project-id/groups/group-id/roles' \  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \  -H 'Content-Type: application/json' \  -d '{  "role_id": "role-id"}'

Parameters

Name In Type Required Description
project_id path string Yes The ID of the project to update.
group_id path string Yes The ID of the group that should receive the project role.
role_id body string Yes Identifier of the role to assign.

Response 200 OK

{
  "object": "group.role",
  "group": {
    "object": "group",
    "id": "string",
    "name": "string",
    "created_at": 0,
    "scim_managed": true
  },
  "role": {
    "object": "role",
    "id": "string",
    "name": "string",
    "description": "string",
    "permissions": [
      "string"
    ],
    "resource_type": "string",
    "predefined_role": true
  }
}
Get a free OpenAI API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.