OpenAI Certificates API

The Certificates API from OpenAI — 7 operation(s) for certificates.

Operations 10

GET /organization/certificates List uploaded certificates for this organization. #
POST /organization/certificates Upload a certificate to the organization. This does **not** automatically activate the certificate. Organizations can upload up to 50 certificates. #
POST /organization/certificates/activate Activate certificates at the organization level. You can atomically and idempotently activate up to 10 certificates at a time. #
POST /organization/certificates/deactivate Deactivate certificates at the organization level. You can atomically and idempotently deactivate up to 10 certificates at a time. #
GET /organization/certificates/{certificate_id} Get a certificate that has been uploaded to the organization. You can get a certificate regardless of whether it is active or not. #
POST /organization/certificates/{certificate_id} Modify a certificate. Note that only the name can be modified. #
DELETE /organization/certificates/{certificate_id} Delete a certificate from the organization. The certificate must be inactive for the organization and all projects. #
GET /organization/projects/{project_id}/certificates List certificates for this project. #
POST /organization/projects/{project_id}/certificates/activate Activate certificates at the project level. You can atomically and idempotently activate up to 10 certificates at a time. #
POST /organization/projects/{project_id}/certificates/deactivate Deactivate certificates at the project level. You can atomically and idempotently deactivate up to 10 certificates at a time. #

Documentation

📖
Documentation
https://platform.openai.com/docs/assistants/overview
📖
Documentation
https://platform.openai.com/docs/api-reference/assistants
📖
Documentation
https://platform.openai.com/docs/guides/text-to-speech
📖
Documentation
https://platform.openai.com/docs/api-reference/audio
📖
Documentation
https://platform.openai.com/docs/guides/speech-to-text
📖
Documentation
https://developers.openai.com/api/docs/guides/audio/
📖
Documentation
https://developers.openai.com/api/docs/guides/voice-agents/
📖
Documentation
https://platform.openai.com/docs/api-reference/chat
📖
Documentation
https://platform.openai.com/docs/guides/embeddings
📖
Documentation
https://platform.openai.com/docs/api-reference/embeddings
📖
Documentation
https://platform.openai.com/docs/api-reference/files
📖
Documentation
https://platform.openai.com/docs/guides/fine-tuning
📖
Documentation
https://platform.openai.com/docs/api-reference/fine-tuning
📖
Documentation
https://platform.openai.com/docs/guides/images
📖
Documentation
https://platform.openai.com/docs/api-reference/images
📖
Documentation
https://platform.openai.com/docs/guides/image-generation
📖
Documentation
https://platform.openai.com/docs/guides/images-vision
📖
Documentation
https://platform.openai.com/docs/models
📖
Documentation
https://platform.openai.com/docs/api-reference/models
📖
Documentation
https://platform.openai.com/docs/assistants/how-it-works/managing-threads-and-messages
📖
Documentation
https://platform.openai.com/docs/api-reference/threads
📖
Documentation
https://platform.openai.com/docs/api-reference/completions

Specifications

Schemas & Data

Other Resources

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/openai-certificates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

openai-certificates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenAI Certificates API
  description: The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
  version: 2.3.0
  termsOfService: https://openai.com/policies/terms-of-use
  contact:
    name: OpenAI Support
    url: https://help.openai.com/
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
servers:
- url: https://api.openai.com/v1
security:
- ApiKeyAuth: []
tags:
- name: Certificates
paths:
  /organization/certificates:
    get:
      security:
      - AdminApiKeyAuth: []
      summary: List uploaded certificates for this organization.
      operationId: listOrganizationCertificates
      tags:
      - Certificates
      parameters:
      - name: limit
        in: query
        description: 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

          '
        required: false
        schema:
          type: integer
          default: 20
      - name: after
        in: query
        description: 'A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

          '
        required: false
        schema:
          type: string
      - name: order
        in: query
        description: 'Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.

          '
        schema:
          type: string
          default: desc
          enum:
          - asc
          - desc
      responses:
        '200':
          description: Certificates listed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCertificatesResponse'
      x-oaiMeta:
        name: List organization certificates
        group: administration
        examples:
          request:
            curl: 'curl https://api.openai.com/v1/organization/certificates \

              -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

              '
            node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateListResponse of client.admin.organization.certificates.list()) {\n  console.log(certificateListResponse.id);\n}"
            python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"),  # This is the default and can be omitted\n)\npage = client.admin.organization.certificates.list()\npage = page.data[0]\nprint(page.id)"
            go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Certificates.List(context.TODO(), openai.AdminOrganizationCertificateListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
            java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.CertificateListPage;\nimport com.openai.models.admin.organization.certificates.CertificateListParams;\n\npublic final class Main {\n    private Main() {}\n\n    public static void main(String[] args) {\n        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n        CertificateListPage page = client.admin().organization().certificates().list();\n    }\n}"
            ruby: 'require "openai"


              openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")


              page = openai.admin.organization.certificates.list


              puts(page)'
          response: "{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n  \"first_id\": \"cert_abc\",\n  \"last_id\": \"cert_abc\",\n  \"has_more\": false\n}\n"
    post:
      security:
      - AdminApiKeyAuth: []
      summary: 'Upload a certificate to the organization. This does **not** automatically activate the certificate.


        Organizations can upload up to 50 certificates.

        '
      operationId: uploadCertificate
      tags:
      - Certificates
      requestBody:
        description: The certificate upload payload.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadCertificateRequest'
      responses:
        '200':
          description: Certificate uploaded successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Certificate'
      x-oaiMeta:
        name: Upload certificate
        group: administration
        examples:
          request:
            curl: "curl -X POST https://api.openai.com/v1/organization/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"name\": \"My Example Certificate\",\n  \"certificate\": \"-----BEGIN CERTIFICATE-----\\\\nMIIDeT...\\\\n-----END CERTIFICATE-----\"\n}'\n"
            node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst certificate = await client.admin.organization.certificates.create({\n  certificate: 'certificate',\n});\n\nconsole.log(certificate.id);"
            python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"),  # This is the default and can be omitted\n)\ncertificate = client.admin.organization.certificates.create(\n    certificate=\"certificate\",\n)\nprint(certificate.id)"
            go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tcertificate, err := client.Admin.Organization.Certificates.New(context.TODO(), openai.AdminOrganizationCertificateNewParams{\n\t\tCertificate: \"certificate\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", certificate.ID)\n}\n"
            java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.Certificate;\nimport com.openai.models.admin.organization.certificates.CertificateCreateParams;\n\npublic final class Main {\n    private Main() {}\n\n    public static void main(String[] args) {\n        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n        CertificateCreateParams params = CertificateCreateParams.builder()\n            .certificate(\"certificate\")\n            .build();\n        Certificate certificate = client.admin().organization().certificates().create(params);\n    }\n}"
            ruby: 'require "openai"


              openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")


              certificate = openai.admin.organization.certificates.create(certificate: "certificate")


              puts(certificate)'
          response: "{\n  \"object\": \"certificate\",\n  \"id\": \"cert_abc\",\n  \"name\": \"My Example Certificate\",\n  \"created_at\": 1234567,\n  \"certificate_details\": {\n    \"valid_at\": 12345667,\n    \"expires_at\": 12345678\n  }\n}\n"
  /organization/certificates/activate:
    post:
      security:
      - AdminApiKeyAuth: []
      summary: 'Activate certificates at the organization level.


        You can atomically and idempotently activate up to 10 certificates at a time.

        '
      operationId: activateOrganizationCertificates
      tags:
      - Certificates
      requestBody:
        description: The certificate activation payload.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleCertificatesRequest'
      responses:
        '200':
          description: Certificates activated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationCertificateActivationResponse'
      x-oaiMeta:
        name: Activate certificates for organization
        group: administration
        examples:
          request:
            curl: "curl https://api.openai.com/v1/organization/certificates/activate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"certificate_ids\": [\"cert_abc\", \"cert_def\"]\n}'\n"
            node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateActivateResponse of client.admin.organization.certificates.activate({\n  certificate_ids: ['cert_abc'],\n})) {\n  console.log(certificateActivateResponse.id);\n}"
            python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"),  # This is the default and can be omitted\n)\npage = client.admin.organization.certificates.activate(\n    certificate_ids=[\"cert_abc\"],\n)\npage = page.data[0]\nprint(page.id)"
            go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Certificates.Activate(context.TODO(), openai.AdminOrganizationCertificateActivateParams{\n\t\tCertificateIDs: []string{\"cert_abc\"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
            java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.CertificateActivatePage;\nimport com.openai.models.admin.organization.certificates.CertificateActivateParams;\n\npublic final class Main {\n    private Main() {}\n\n    public static void main(String[] args) {\n        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n        CertificateActivateParams params = CertificateActivateParams.builder()\n            .addCertificateId(\"cert_abc\")\n            .build();\n        CertificateActivatePage page = client.admin().organization().certificates().activate(params);\n    }\n}"
            ruby: 'require "openai"


              openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")


              page = openai.admin.organization.certificates.activate(certificate_ids: ["cert_abc"])


              puts(page)'
          response: "{\n  \"object\": \"organization.certificate.activation\",\n  \"data\": [\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_def\",\n      \"name\": \"My Example Certificate 2\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n}\n"
  /organization/certificates/deactivate:
    post:
      security:
      - AdminApiKeyAuth: []
      summary: 'Deactivate certificates at the organization level.


        You can atomically and idempotently deactivate up to 10 certificates at a time.

        '
      operationId: deactivateOrganizationCertificates
      tags:
      - Certificates
      requestBody:
        description: The certificate deactivation payload.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleCertificatesRequest'
      responses:
        '200':
          description: Certificates deactivated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationCertificateDeactivationResponse'
      x-oaiMeta:
        name: Deactivate certificates for organization
        group: administration
        examples:
          request:
            curl: "curl https://api.openai.com/v1/organization/certificates/deactivate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"certificate_ids\": [\"cert_abc\", \"cert_def\"]\n}'\n"
            node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateDeactivateResponse of client.admin.organization.certificates.deactivate(\n  { certificate_ids: ['cert_abc'] },\n)) {\n  console.log(certificateDeactivateResponse.id);\n}"
            python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"),  # This is the default and can be omitted\n)\npage = client.admin.organization.certificates.deactivate(\n    certificate_ids=[\"cert_abc\"],\n)\npage = page.data[0]\nprint(page.id)"
            go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Certificates.Deactivate(context.TODO(), openai.AdminOrganizationCertificateDeactivateParams{\n\t\tCertificateIDs: []string{\"cert_abc\"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
            java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.CertificateDeactivatePage;\nimport com.openai.models.admin.organization.certificates.CertificateDeactivateParams;\n\npublic final class Main {\n    private Main() {}\n\n    public static void main(String[] args) {\n        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n        CertificateDeactivateParams params = CertificateDeactivateParams.builder()\n            .addCertificateId(\"cert_abc\")\n            .build();\n        CertificateDeactivatePage page = client.admin().organization().certificates().deactivate(params);\n    }\n}"
            ruby: 'require "openai"


              openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")


              page = openai.admin.organization.certificates.deactivate(certificate_ids: ["cert_abc"])


              puts(page)'
          response: "{\n  \"object\": \"organization.certificate.deactivation\",\n  \"data\": [\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": false,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_def\",\n      \"name\": \"My Example Certificate 2\",\n      \"active\": false,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n}\n"
  /organization/certificates/{certificate_id}:
    get:
      security:
      - AdminApiKeyAuth: []
      summary: 'Get a certificate that has been uploaded to the organization.


        You can get a certificate regardless of whether it is active or not.

        '
      operationId: getCertificate
      tags:
      - Certificates
      parameters:
      - name: certificate_id
        in: path
        description: Unique ID of the certificate to retrieve.
        required: true
        schema:
          type: string
      - name: include
        in: query
        description: A list of additional fields to include in the response. Currently the only supported value is `content` to fetch the PEM content of the certificate.
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - content
      responses:
        '200':
          description: Certificate retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Certificate'
      x-oaiMeta:
        name: Get certificate
        group: administration
        examples:
          request:
            curl: 'curl "https://api.openai.com/v1/organization/certificates/cert_abc?include[]=content" \

              -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

              '
            node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst certificate = await client.admin.organization.certificates.retrieve('certificate_id');\n\nconsole.log(certificate.id);"
            python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"),  # This is the default and can be omitted\n)\ncertificate = client.admin.organization.certificates.retrieve(\n    certificate_id=\"certificate_id\",\n)\nprint(certificate.id)"
            go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tcertificate, err := client.Admin.Organization.Certificates.Get(\n\t\tcontext.TODO(),\n\t\t\"certificate_id\",\n\t\topenai.AdminOrganizationCertificateGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", certificate.ID)\n}\n"
            java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.Certificate;\nimport com.openai.models.admin.organization.certificates.CertificateRetrieveParams;\n\npublic final class Main {\n    private Main() {}\n\n    public static void main(String[] args) {\n        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n        Certificate certificate = client.admin().organization().certificates().retrieve(\"certificate_id\");\n    }\n}"
            ruby: 'require "openai"


              openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")


              certificate = openai.admin.organization.certificates.retrieve("certificate_id")


              puts(certificate)'
          response: "{\n  \"object\": \"certificate\",\n  \"id\": \"cert_abc\",\n  \"name\": \"My Example Certificate\",\n  \"created_at\": 1234567,\n  \"certificate_details\": {\n    \"valid_at\": 1234567,\n    \"expires_at\": 12345678,\n    \"content\": \"-----BEGIN CERTIFICATE-----MIIDeT...-----END CERTIFICATE-----\"\n  }\n}\n"
    post:
      security:
      - AdminApiKeyAuth: []
      summary: 'Modify a certificate. Note that only the name can be modified.

        '
      operationId: modifyCertificate
      tags:
      - Certificates
      parameters:
      - name: certificate_id
        in: path
        description: Unique ID of the certificate to modify.
        required: true
        schema:
          type: string
      requestBody:
        description: The certificate modification payload.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifyCertificateRequest'
      responses:
        '200':
          description: Certificate modified successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Certificate'
      x-oaiMeta:
        name: Modify certificate
        group: administration
        examples:
          request:
            curl: "curl -X POST https://api.openai.com/v1/organization/certificates/cert_abc \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"name\": \"Renamed Certificate\"\n}'\n"
            node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst certificate = await client.admin.organization.certificates.update('certificate_id');\n\nconsole.log(certificate.id);"
            python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"),  # This is the default and can be omitted\n)\ncertificate = client.admin.organization.certificates.update(\n    certificate_id=\"certificate_id\",\n)\nprint(certificate.id)"
            go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tcertificate, err := client.Admin.Organization.Certificates.Update(\n\t\tcontext.TODO(),\n\t\t\"certificate_id\",\n\t\topenai.AdminOrganizationCertificateUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", certificate.ID)\n}\n"
            java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.Certificate;\nimport com.openai.models.admin.organization.certificates.CertificateUpdateParams;\n\npublic final class Main {\n    private Main() {}\n\n    public static void main(String[] args) {\n        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n        Certificate certificate = client.admin().organization().certificates().update(\"certificate_id\");\n    }\n}"
            ruby: 'require "openai"


              openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")


              certificate = openai.admin.organization.certificates.update("certificate_id")


              puts(certificate)'
          response: "{\n  \"object\": \"certificate\",\n  \"id\": \"cert_abc\",\n  \"name\": \"Renamed Certificate\",\n  \"created_at\": 1234567,\n  \"certificate_details\": {\n    \"valid_at\": 12345667,\n    \"expires_at\": 12345678\n  }\n}\n"
    delete:
      security:
      - AdminApiKeyAuth: []
      summary: 'Delete a certificate from the organization.


        The certificate must be inactive for the organization and all projects.

        '
      operationId: deleteCertificate
      tags:
      - Certificates
      parameters:
      - name: certificate_id
        in: path
        description: Unique ID of the certificate to delete.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Certificate deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteCertificateResponse'
      x-oaiMeta:
        name: Delete certificate
        group: administration
        examples:
          request:
            curl: 'curl -X DELETE https://api.openai.com/v1/organization/certificates/cert_abc \

              -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

              '
            node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst certificate = await client.admin.organization.certificates.delete('certificate_id');\n\nconsole.log(certificate.id);"
            python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"),  # This is the default and can be omitted\n)\ncertificate = client.admin.organization.certificates.delete(\n    \"certificate_id\",\n)\nprint(certificate.id)"
            go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tcertificate, err := client.Admin.Organization.Certificates.Delete(context.TODO(), \"certificate_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", certificate.ID)\n}\n"
            java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.CertificateDeleteParams;\nimport com.openai.models.admin.organization.certificates.CertificateDeleteResponse;\n\npublic final class Main {\n    private Main() {}\n\n    public static void main(String[] args) {\n        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n        CertificateDeleteResponse certificate = client.admin().organization().certificates().delete(\"certificate_id\");\n    }\n}"
            ruby: 'require "openai"


              openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")


              certificate = openai.admin.organization.certificates.delete("certificate_id")


              puts(certificate)'
          response: "{\n  \"object\": \"certificate.deleted\",\n  \"id\": \"cert_abc\"\n}\n"
  /organization/projects/{project_id}/certificates:
    get:
      security:
      - AdminApiKeyAuth: []
      summary: List certificates for this project.
      operationId: listProjectCertificates
      tags:
      - Certificates
      parameters:
      - name: project_id
        in: path
        description: The ID of the project.
        required: true
        schema:
          type: string
      - name: limit
        in: query
        description: 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

          '
        required: false
        schema:
          type: integer
          default: 20
      - name: after
        in: query
        description: 'A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

          '
        required: false
        schema:
          type: string
      - name: order
        in: query
        description: 'Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.

          '
        schema:
          type: string
          default: desc
          enum:
          - asc
          - desc
      responses:
        '200':
          description: Certificates listed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListProjectCertificatesResponse'
      x-oaiMeta:
        name: List project certificates
        group: administration
        examples:
          request:
            curl: 'curl https://api.openai.com/v1/organization/projects/proj_abc/certificates \

              -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

              '
            node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateListResponse of client.admin.organization.projects.certificates.list(\n  'project_id',\n)) {\n  console.log(certificateListResponse.id);\n}"
            python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"),  # This is the default and can be omitted\n)\npage = client.admin.organization.projects.certificates.list(\n    project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.id)"
            go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.Certificates.List(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectCertificateListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
            java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.certificates.CertificateListPage;\nimport com.openai.models.admin.organization.projects.certificates.CertificateListParams;\n\npublic final class Main {\n    private Main() {}\n\n    public static void main(String[] args) {\n        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n        CertificateListPage page = client.admin().organization().projects().certificates().list(\"project_id\");\n    }\n}"
            ruby: 'require "openai"


              openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")


              page = openai.admin.organization.projects.certificates.list("project_id")


              puts(page)'
          response: "{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"organization.project.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n  \"first_id\": \"cert_abc\",\n  \"last_id\": \"cert_abc\",\n  \"has_more\": false\n}\n"
  /organization/projects/{project_id}/certificates/activate:
    post:
      security:
      - AdminApiKeyAuth: []
      summary: 'Activate certificates at the project level.


        You can atomically and idempotently activate up to 10 certificates at a time.

        '
      operationId: activateProjectCertificates
      tags:
      - Certificates
      parameters:
      - name: project_id
        in: path
        description: The ID of the project.
        required: true
        schema:
          type: string
      requestBody:
        description: The certificate activation payload.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleCertificatesRequest'
      responses:
        '200':
          description: Certificates activated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationProjectCertificateActivationResponse'
      x-oaiMeta:
        name: Activate certificates for project
        group: administration
        examples:
          request:
            curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/activate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"certificate_ids\": [\"cert_abc\", \"cert_def\"]\n}'\n"
            node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateActivateResponse of c

# --- truncated at 32 KB (69 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/openai/refs/heads/main/openapi/openai-certificates-api-openapi.yml