@@ -57246,6 +57246,162 @@
5724657246          "category": "enterprise-admin",
5724757247          "subcategory": "billing"
5724857248        }
57249+       },
57250+       "post": {
57251+         "summary": "Create a new cost center",
57252+         "description": "Creates a new cost center for an enterprise. The authenticated user must be an enterprise admin.",
57253+         "tags": [
57254+           "billing"
57255+         ],
57256+         "operationId": "billing/create-cost-center",
57257+         "externalDocs": {
57258+           "description": "API method documentation",
57259+           "url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#create-a-new-cost-center"
57260+         },
57261+         "parameters": [
57262+           {
57263+             "name": "enterprise",
57264+             "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
57265+             "in": "path",
57266+             "required": true,
57267+             "schema": {
57268+               "type": "string"
57269+             }
57270+           }
57271+         ],
57272+         "requestBody": {
57273+           "required": true,
57274+           "content": {
57275+             "application/json": {
57276+               "schema": {
57277+                 "type": "object",
57278+                 "required": [
57279+                   "name"
57280+                 ],
57281+                 "properties": {
57282+                   "name": {
57283+                     "type": "string",
57284+                     "description": "The name of the cost center (max length 255 characters)"
57285+                   }
57286+                 }
57287+               },
57288+               "examples": {
57289+                 "example-1": {
57290+                   "summary": "Example request to create a cost center",
57291+                   "value": {
57292+                     "name": "Engineering Team"
57293+                   }
57294+                 }
57295+               }
57296+             }
57297+           }
57298+         },
57299+         "responses": {
57300+           "200": {
57301+             "description": "Cost center created successfully",
57302+             "content": {
57303+               "application/json": {
57304+                 "schema": {
57305+                   "type": "object",
57306+                   "properties": {
57307+                     "id": {
57308+                       "type": "string",
57309+                       "description": "Unique identifier for the cost center"
57310+                     },
57311+                     "name": {
57312+                       "type": "string",
57313+                       "description": "Name of the cost center"
57314+                     },
57315+                     "resources": {
57316+                       "type": "array",
57317+                       "description": "List of resources assigned to this cost center",
57318+                       "items": {
57319+                         "type": "object",
57320+                         "properties": {
57321+                           "type": {
57322+                             "type": "string",
57323+                             "description": "Type of resource (User, Org, or Repo)"
57324+                           },
57325+                           "name": {
57326+                             "type": "string",
57327+                             "description": "Name/login of the resource"
57328+                           }
57329+                         }
57330+                       }
57331+                     }
57332+                   }
57333+                 },
57334+                 "examples": {
57335+                   "example-1": {
57336+                     "summary": "Example response for a created cost center",
57337+                     "value": {
57338+                       "id": "abc123",
57339+                       "name": "Engineering Team",
57340+                       "resources": []
57341+                     }
57342+                   }
57343+                 }
57344+               }
57345+             }
57346+           },
57347+           "400": {
57348+             "description": "Bad request",
57349+             "content": {
57350+               "application/json": {
57351+                 "examples": {
57352+                   "missing-name": {
57353+                     "summary": "Missing name",
57354+                     "value": {
57355+                       "message": "Bad request: name is required."
57356+                     }
57357+                   },
57358+                   "limit-reached": {
57359+                     "summary": "Cost center limit reached",
57360+                     "value": {
57361+                       "message": "This enterprise is already at the cost center limit of 1000 active cost centers."
57362+                     }
57363+                   }
57364+                 }
57365+               }
57366+             }
57367+           },
57368+           "409": {
57369+             "description": "Conflict",
57370+             "content": {
57371+               "application/json": {
57372+                 "examples": {
57373+                   "duplicate-name": {
57374+                     "summary": "Duplicate name",
57375+                     "value": {
57376+                       "message": "There's already a cost center created with that name."
57377+                     }
57378+                   }
57379+                 }
57380+               }
57381+             }
57382+           },
57383+           "500": {
57384+             "description": "Internal server error",
57385+             "content": {
57386+               "application/json": {
57387+                 "examples": {
57388+                   "internal-error": {
57389+                     "summary": "Internal error",
57390+                     "value": {
57391+                       "message": "An internal server error occurred. Please try again later."
57392+                     }
57393+                   }
57394+                 }
57395+               }
57396+             }
57397+           }
57398+         },
57399+         "x-github": {
57400+           "githubCloudOnly": true,
57401+           "enabledForGitHubApps": false,
57402+           "category": "enterprise-admin",
57403+           "subcategory": "billing"
57404+         }
5724957405      }
5725057406    },
5725157407    "/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}": {
@@ -58077,15 +58233,15 @@
5807758233    },
5807858234    "/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource": {
5807958235      "post": {
58080-         "summary": "Add users  to a cost center",
58081-         "description": "Adds users  to a cost center.\n\nThe usage for the users  will be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint.",
58236+         "summary": "Add resources  to a cost center",
58237+         "description": "Adds resources  to a cost center.\n\nThe usage for the resources  will be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint.",
5808258238        "tags": [
5808358239          "billing"
5808458240        ],
5808558241        "operationId": "billing/add-resource-to-cost-center",
5808658242        "externalDocs": {
5808758243          "description": "API method documentation",
58088-           "url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#add-users -to-a-cost-center"
58244+           "url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#add-resources -to-a-cost-center"
5808958245        },
5809058246        "parameters": [
5809158247          {
5812058276                    "items": {
5812158277                      "type": "string"
5812258278                    }
58279+                   },
58280+                   "organizations": {
58281+                     "description": "The organizations to add to the cost center.",
58282+                     "type": "array",
58283+                     "items": {
58284+                       "type": "string"
58285+                     }
58286+                   },
58287+                   "repositories": {
58288+                     "description": "The repositories to add to the cost center.",
58289+                     "type": "array",
58290+                     "items": {
58291+                       "type": "string"
58292+                     }
5812358293                  }
5812458294                },
5812558295                "minProperties": 1
@@ -58335,15 +58505,15 @@
5833558505        }
5833658506      },
5833758507      "delete": {
58338-         "summary": "Remove users  from a cost center",
58339-         "description": "Remove users  from a cost center.\n\nThe usage for the users  will no longer be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint.",
58508+         "summary": "Remove resources  from a cost center",
58509+         "description": "Remove resources  from a cost center.\n\nThe usage for the resources  will no longer be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint.",
5834058510        "tags": [
5834158511          "billing"
5834258512        ],
5834358513        "operationId": "billing/remove-resource-from-cost-center",
5834458514        "externalDocs": {
5834558515          "description": "API method documentation",
58346-           "url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#remove-users -from-a-cost-center"
58516+           "url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#remove-resources -from-a-cost-center"
5834758517        },
5834858518        "parameters": [
5834958519          {
5837858548                    "items": {
5837958549                      "type": "string"
5838058550                    }
58551+                   },
58552+                   "organizations": {
58553+                     "description": "The organizations to remove from the cost center.",
58554+                     "type": "array",
58555+                     "items": {
58556+                       "type": "string"
58557+                     }
58558+                   },
58559+                   "repositories": {
58560+                     "description": "The repositories to remove from the cost center.",
58561+                     "type": "array",
58562+                     "items": {
58563+                       "type": "string"
58564+                     }
5838158565                  }
5838258566                },
5838358567                "minProperties": 1
0 commit comments