Root Insurance Secret keys API

The Secret keys API from Root Insurance — 2 operation(s) for secret keys.

OpenAPI Specification

root-secret-keys-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: 1.0.1
  title: Root Applications Secret keys API
  description: Root is an end-to-end digital insurance platform that enables you to launch new products and digital engagement channels fast.
  termsOfService: https://rootplatform.com/about
  contact:
    name: Root support team
    url: https://rootplatform.com/contact
    email: support@root.co.za
servers:
- url: https://sandbox.uk.rootplatform.com/v1/insurance
  description: United Kingdom multi-tenant - sandbox
- url: https://api.uk.rootplatform.com/v1/insurance
  description: United Kingdom multi-tenant - production
- url: https://sandbox.rootplatform.com/v1/insurance
  description: South Africa multi-tenant - sandbox
- url: https://api.rootplatform.com/v1/insurance
  description: South Africa multi-tenant - production
security:
- basicAuth: []
tags:
- name: Secret keys
paths:
  /secret-keys:
    get:
      operationId: retrieve-secret-keys
      summary: Retrieve all secret keys
      tags:
      - Secret keys
      x-additional-tags:
      - Endpoints
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secret-keys-list'
    post:
      operationId: create-secret-key
      summary: Create a secret key
      tags:
      - Secret keys
      x-additional-tags:
      - Endpoints
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: The unique identifier of the secret key.
                  example: external_vendor_name
                key:
                  type: string
                  description: The value of the secret key.
                  example: your_api_key_value
                description:
                  type: string
                  description: A description for the secret key.
                  example: API Key for Integration X
              required:
              - type
              - key
            example:
              type: api_key_type
              key: your_api_key_value
              description: API Key for Integration X
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secret-keys'
              example:
                organization_id: 4ce6ad99-9576-4d28-84ba-c30d2d536cbe
                secret_key_id: 43c13dc8-2c19-402c-bb70-a7deb56b9f38
                type: api_key_type
                key: your_api_key_value
                description: API Key for Integration X
                created_at: '2023-01-10T12:34:56.789Z'
                created_by:
                  id: 00000000-0000-0000-0000-000000000001
                  type: user
                updated_at: '2023-01-10T12:34:56.789Z'
                updated_by:
                  id: 00000000-0000-0000-0000-000000000001
                  type: user
  /secret-keys/{type}:
    get:
      operationId: retrieve-secret-key-by-type
      summary: Retrieve an secret key by type
      tags:
      - Secret keys
      x-additional-tags:
      - Endpoints
      parameters:
      - name: type
        in: path
        description: The unique identifier of the secret key [secret-keys](ref:secret-keys).
        required: true
        schema:
          type: string
          example: test
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secret-keys'
    patch:
      operationId: upsert-secret-key
      summary: Upsert a secret key
      tags:
      - Secret keys
      x-additional-tags:
      - Endpoints
      parameters:
      - name: type
        in: path
        description: The unique identifier of the secret key [secret-keys](ref:secret-keys).
        required: true
        schema:
          type: string
          example: test
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                key:
                  type: string
                  description: The value of the secret key.
                  example: your_api_key_value
                description:
                  type: string
                  description: A description for the secret key.
                  example: API Key for Integration X
            example:
              key: your_api_key_value
              description: API Key for Integration X
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  secret_key_id:
                    type: string
                    description: The identifier of the secret key.
                  organization_id:
                    type: string
                    description: The identifier of the organization.
                  environment:
                    type: string
                    description: The environment associated with the secret key.
                  description:
                    type: string
                    description: A description of the secret key.
                  type:
                    type: string
                    description: The unique identifier for the secret key.
                  key:
                    type: string
                    description: The encrypted value of the secret key.
                  created_at:
                    type: string
                    format: date-time
                    description: Time at which the secret key was created.
                  created_by:
                    type: object
                    description: An object indicating the user or API key that created the secret key.
                    properties:
                      id:
                        type: string
                        description: The identifier of the creator.
                      type:
                        type: string
                        description: The type of the creator (e.g., user, API).
                  updated_at:
                    type: string
                    format: date-time
                    description: Time at which the secret key was last updated.
                  updated_by:
                    type: object
                    description: An object indicating the user or API key that last updated the secret key.
                    properties:
                      id:
                        type: string
                        description: The identifier of the updater.
                      type:
                        type: string
                        description: The type of the updater (e.g., user, API).
              example:
                organization_id: 4ce6ad99-9576-4d28-84ba-c30d2d536cbe
                secret_key_id: 43c13dc8-2c19-402c-bb70-a7deb56b9f38
                type: test
                key: your_api_key_value
                description: API Key for Integration X
                created_at: '2023-01-10T12:34:56.789Z'
                created_by:
                  id: 00000000-0000-0000-0000-000000000001
                  type: user
                updated_at: '2023-01-10T12:34:56.789Z'
                updated_by:
                  id: 00000000-0000-0000-0000-000000000001
                  type: user
    delete:
      operationId: archive-secret-key
      summary: Archive a secret key
      tags:
      - Secret keys
      x-additional-tags:
      - Endpoints
      parameters:
      - name: type
        in: path
        description: The unique identifier of the secret key [secret-keys](ref:secret-keys).
        required: true
        schema:
          type: string
          example: test
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secret-keys'
components:
  schemas:
    secret-keys:
      type: object
      required:
      - type
      - key
      - created_at
      - created_by
      - updated_at
      - updated_by
      properties:
        secret_key_id:
          type: string
          description: Must be a UUID. The unique identifier of the secret key.
        organization_id:
          type: string
          description: The identifier of the organization.
        environment:
          type: string
          description: The environment associated with the secret key.
        description:
          type: string
          description: A description of the secret key.
        type:
          type: string
          description: 'This field uniquely identifies the secret key.

            '
        key:
          type: string
          description: The encrypted value of the secret key.
        created_at:
          type: string
          format: date-time
          description: Time at which the secret key was created.
        created_by:
          type: object
          description: An object indicating the user or API key that created the secret key.
          properties:
            id:
              type: string
              description: The identifier of the creator.
            type:
              type: string
              description: The type of the creator (e.g., user, API).
        updated_at:
          type: string
          format: date-time
          description: Time at which the secret key was last updated.
        updated_by:
          type: object
          description: An object indicating the user or API key that last updated the secret key.
          properties:
            id:
              type: string
              description: The identifier of the updater.
            type:
              type: string
              description: The type of the updater (e.g., user, API).
      example:
        organization_id: 4ce6ad99-9576-4d28-84ba-c30d2d536cbe
        secret_key_id: 43c13dc8-2c19-402c-bb70-a7deb56b9f38
        type: test
        key: your_api_key_value
        description: API Key for Integration X
        created_at: '2023-01-10T12:34:56.789Z'
        created_by:
          id: 00000000-0000-0000-0000-000000000001
          type: user
        updated_at: '2023-01-10T12:34:56.789Z'
        updated_by:
          id: 00000000-0000-0000-0000-000000000001
          type: user
    secret-keys-list:
      type: array
      items:
        $ref: '#/components/schemas/secret-keys'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
x-readme:
  explorer-enabled: true
  proxy-enabled: true
  samples-enabled: true