Creates a new service account in the project. This also returns an unredacted API key for the service account.
POST
/organization/projects/{project_id}/service_accounts
curl \
--request POST 'https://api.openai.com/v1/organization/projects/{project_id}/service_accounts' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"name":"string"}'
Request examples
{
"name": "string"
}
Response examples (200)
{
"object": "organization.project.service_account",
"id": "string",
"name": "string",
"role": "member",
"created_at": 42,
"api_key": {
"object": "organization.project.service_account.api_key",
"value": "string",
"name": "string",
"created_at": 42,
"id": "string"
}
}
Response examples (400)
{
"error": {
"code": "string",
"message": "string",
"param": "string",
"type": "string"
}
}