CodeCarbon Organizations API

The Organizations API from CodeCarbon — 6 operation(s) for organizations.

GitHub OpenAPI

Operations 8

GET /organizations List Organizations #
POST /organizations Add Organization #
PATCH /organizations/{organization_id} Update Organization #
GET /organizations/{organization_id} Read Organization #
GET /organizations/{organization_id}/sums Read Organization Detailed Sums #
GET /organizations/{organization_id}/users List Organization Users #
POST /organizations/{organization_id}/add-user Organization Add User #
DELETE /organizations/{organization_id}/users/{user_id} Organization Remove User #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/codecarbon:codecarbon-organizations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

codecarbon-organizations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codecarbon Organizations API
  version: 0.1.0
  x-refined-note:
  - x-original-title differs across the merged source definitions and was not carried
  description: 'Operations tagged Organizations across 2 of this provider''s published API definitions: codecarbon-openapi.json, codecarbon-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /api/
- url: https://api.codecarbon.io/api
  description: Resolved from the relative server /api/ as served at https://api.codecarbon.io/openapi.json
tags:
- name: Organizations
paths:
  /organizations:
    get:
      tags:
      - Organizations
      summary: List Organizations
      operationId: list_organizations_organizations_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/OrganizationWithRole'
                type: array
                title: Response List Organizations Organizations Get
      security:
      - APIKeyCookie: []
      - HTTPBearer: []
    post:
      tags:
      - Organizations
      summary: Add Organization
      operationId: add_organization_organizations_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyCookie: []
      - HTTPBearer: []
    servers:
    - url: /api/
  /organizations/{organization_id}:
    patch:
      tags:
      - Organizations
      summary: Update Organization
      operationId: update_organization_organizations__organization_id__patch
      security:
      - APIKeyCookie: []
      - HTTPBearer: []
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          title: Organization Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationPatch'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Organizations
      summary: Read Organization
      operationId: read_organization_organizations__organization_id__get
      security:
      - APIKeyCookie: []
      - HTTPBearer: []
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          title: Organization Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: /api/
  /organizations/{organization_id}/sums:
    get:
      tags:
      - Organizations
      summary: Read Organization Detailed Sums
      operationId: read_organization_detailed_sums_organizations__organization_id__sums_get
      security:
      - APIKeyCookie: []
      - HTTPBearer: []
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          title: Organization Id
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Start Date
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: End Date
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationReport'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: /api/
  /organizations/{organization_id}/users:
    get:
      tags:
      - Organizations
      summary: List Organization Users
      operationId: list_organization_users_organizations__organization_id__users_get
      security:
      - APIKeyCookie: []
      - HTTPBearer: []
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          title: Organization Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrganizationUser'
                title: Response List Organization Users Organizations  Organization Id  Users Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: /api/
  /organizations/{organization_id}/add-user:
    post:
      tags:
      - Organizations
      summary: Organization Add User
      operationId: organization_add_user_organizations__organization_id__add_user_post
      security:
      - APIKeyCookie: []
      - HTTPBearer: []
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          title: Organization Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserEmailInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: /api/
  /organizations/{organization_id}/users/{user_id}:
    delete:
      tags:
      - Organizations
      summary: Organization Remove User
      operationId: organization_remove_user_organizations__organization_id__users__user_id__delete
      security:
      - APIKeyCookie: []
      - HTTPBearer: []
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          title: Organization Id
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: /api/
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OrganizationUser:
      properties:
        email:
          type: string
          format: email
          title: Email
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        organizations:
          anyOf:
          - items:
              type: string
              format: uuid
            type: array
          - type: 'null'
          title: Organizations
        is_active:
          type: boolean
          title: Is Active
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        is_admin:
          type: boolean
          title: Is Admin
      type: object
      required:
      - email
      - id
      - name
      - is_active
      - organization_id
      - is_admin
      title: OrganizationUser
    OrganizationWithRole:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        id:
          type: string
          format: uuid
          title: Id
        is_admin:
          type: boolean
          title: Is Admin
          default: false
      type: object
      required:
      - name
      - description
      - id
      title: OrganizationWithRole
      description: An organization as listed for a user, with whether they administer it.
      example:
        description: Save the world, one run at a time.
        name: Code Carbon
    UserEmailInput:
      properties:
        email:
          type: string
          format: email
          title: Email
      type: object
      required:
      - email
      title: UserEmailInput
    OrganizationCreate:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
      type: object
      required:
      - name
      - description
      title: OrganizationCreate
      example:
        description: Save the world, one run at a time.
        name: Code Carbon
    Organization:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        id:
          type: string
          format: uuid
          title: Id
      type: object
      required:
      - name
      - description
      - id
      title: Organization
      example:
        description: Save the world, one run at a time.
        name: Code Carbon
    OrganizationReport:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        emissions:
          type: number
          title: Emissions
        cpu_power:
          type: number
          title: Cpu Power
        gpu_power:
          type: number
          title: Gpu Power
        ram_power:
          type: number
          title: Ram Power
        cpu_energy:
          type: number
          title: Cpu Energy
        gpu_energy:
          type: number
          title: Gpu Energy
        ram_energy:
          type: number
          title: Ram Energy
        energy_consumed:
          type: number
          title: Energy Consumed
        duration:
          type: number
          title: Duration
        emissions_rate:
          type: number
          title: Emissions Rate
        emissions_count:
          type: integer
          title: Emissions Count
        cpu_utilization_percent:
          anyOf:
          - type: number
          - type: 'null'
          title: Cpu Utilization Percent
        gpu_utilization_percent:
          anyOf:
          - type: number
          - type: 'null'
          title: Gpu Utilization Percent
        ram_utilization_percent:
          anyOf:
          - type: number
          - type: 'null'
          title: Ram Utilization Percent
      type: object
      required:
      - name
      - description
      - organization_id
      - emissions
      - cpu_power
      - gpu_power
      - ram_power
      - cpu_energy
      - gpu_energy
      - ram_energy
      - energy_consumed
      - duration
      - emissions_rate
      - emissions_count
      title: OrganizationReport
      example:
        description: Save the world, one run at a time.
        name: Code Carbon
    OrganizationPatch:
      properties:
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
      type: object
      title: OrganizationPatch
      example:
        description: Save the world, one run at a time.
        name: Code Carbon
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: user_session
    HTTPBearer:
      type: http
      scheme: bearer
x-refined-from:
- codecarbon-openapi.json
- codecarbon-openapi.yml