> ## Documentation Index
> Fetch the complete documentation index at: https://docs.timeback.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upsert a Verifiable Open Badge Credential

> Upserts (creates or updates) a Verifiable Open Badge Credential. This endpoint follows the
    Open Badges 3.0 specification for credential upsert operations. A credential is considered the same as
    another when both the issuer.id and the credential.id are equal.

    - If a credential with the same issuer.id and credential.id already exists, it will be updated (HTTP 200)
    - If no matching credential is found, a new credential will be created (HTTP 201)

    The platform acts as the repository for these credentials, ensuring their authenticity and integrity
    through cryptographic proofs. All upserted credentials must be valid according to the Open Badges 3.0
    specification and include proper verification methods.



## OpenAPI

````yaml /openapi/beyond-ai/openbadges-api.yaml post /ims/ob/v3p0/credentials/
openapi: 3.1.0
info:
  title: OpenBadge API
  version: 1.0.0
  description: >-
    Open Badges is a global standard for creating, issuing, and verifying
    digital micro-credentials that represent skills, achievements, learning
    outcomes, and experiences.
      It provides a common, interoperable language for recognizing accomplishments in a way that is portable, verifiable, and data-rich.
servers:
  - url: https://api.alpha-1edtech.ai
    description: OpenBadge API
security:
  - OAuth2: []
tags:
  - name: OpenBadge - Achievements
    description: Manage Open Badges Achievements
  - name: OpenBadge - Credentials
    description: Manage Open Badges Credentials
  - name: OpenBadge - Discovery
    description: Discover Open Badges v3.0 API capabilities and endpoints
  - name: OpenBadge - Issue Badge
    description: >-
      Endpoints dedicated to the creation, signing, and verification of Open
      Badges v3.0 compliant Verifiable Credentials.
        These routes enable authorized issuers to transform learner achievements into secure, portable, and cryptographically verifiable digital badges,
        and allow any party to verify the authenticity and integrity of such badges.
paths:
  /ims/ob/v3p0/credentials/:
    post:
      tags:
        - OpenBadge - Credentials
      summary: Upsert a Verifiable Open Badge Credential
      description: >-
        Upserts (creates or updates) a Verifiable Open Badge Credential. This
        endpoint follows the
            Open Badges 3.0 specification for credential upsert operations. A credential is considered the same as
            another when both the issuer.id and the credential.id are equal.

            - If a credential with the same issuer.id and credential.id already exists, it will be updated (HTTP 200)
            - If no matching credential is found, a new credential will be created (HTTP 201)

            The platform acts as the repository for these credentials, ensuring their authenticity and integrity
            through cryptographic proofs. All upserted credentials must be valid according to the Open Badges 3.0
            specification and include proper verification methods.
      operationId: upsertCredential
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                '@context':
                  type: array
                  items:
                    type: string
                id:
                  type: string
                type:
                  type: array
                  items:
                    type: string
                issuer:
                  anyOf:
                    - type: string
                    - type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: array
                          items:
                            type: string
                        name:
                          type: string
                        url:
                          type: string
                        email:
                          type: string
                        phone:
                          type: string
                        address:
                          type: string
                      required:
                        - id
                        - type
                name:
                  type: string
                description:
                  type: string
                image:
                  type: object
                  properties:
                    id:
                      type: string
                    type:
                      type: string
                    caption:
                      type: string
                  required:
                    - id
                    - type
                credentialSubject:
                  type: object
                  properties:
                    id:
                      type: string
                    type:
                      type: array
                      items:
                        type: string
                    achievement:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: array
                          items:
                            type: string
                        name:
                          type: string
                        description:
                          type: string
                        criteria:
                          type: object
                          properties:
                            narrative:
                              type: string
                          required:
                            - narrative
                        image:
                          type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                            caption:
                              type: string
                          required:
                            - id
                            - type
                        achievementType:
                          type: string
                        creator:
                          type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: array
                              items:
                                type: string
                            name:
                              type: string
                            url:
                              type: string
                            email:
                              type: string
                            phone:
                              type: string
                            address:
                              type: string
                          required:
                            - id
                            - type
                      required:
                        - id
                        - type
                        - name
                        - description
                        - criteria
                    identifier:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                          identityHash:
                            type: string
                          identityType:
                            type: string
                          hashed:
                            type: boolean
                        required:
                          - type
                          - identityHash
                          - identityType
                          - hashed
                  required:
                    - id
                    - type
                    - achievement
                    - identifier
                proof:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      cryptosuite:
                        type: string
                      created:
                        type: string
                      proofPurpose:
                        type: string
                      verificationMethod:
                        type: string
                      proofValue:
                        type: string
                    required:
                      - type
                      - cryptosuite
                      - created
                      - proofPurpose
                      - verificationMethod
                      - proofValue
                validFrom:
                  type: string
                validUntil:
                  type: string
                credentialSchema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                    required:
                      - id
                      - type
              required:
                - '@context'
                - id
                - type
                - issuer
                - credentialSubject
                - validFrom
      responses:
        '200':
          description: Credential successfully updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  '@context':
                    type: array
                    items:
                      type: string
                  id:
                    type: string
                  type:
                    type: array
                    items:
                      type: string
                  issuer:
                    anyOf:
                      - type: string
                      - type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: array
                            items:
                              type: string
                          name:
                            type: string
                          url:
                            type: string
                          email:
                            type: string
                          phone:
                            type: string
                          address:
                            type: string
                        required:
                          - id
                          - type
                  name:
                    type: string
                  description:
                    type: string
                  image:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      caption:
                        type: string
                    required:
                      - id
                      - type
                  credentialSubject:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: array
                        items:
                          type: string
                      achievement:
                        type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: array
                            items:
                              type: string
                          name:
                            type: string
                          description:
                            type: string
                          criteria:
                            type: object
                            properties:
                              narrative:
                                type: string
                            required:
                              - narrative
                          image:
                            type: object
                            properties:
                              id:
                                type: string
                              type:
                                type: string
                              caption:
                                type: string
                            required:
                              - id
                              - type
                          achievementType:
                            type: string
                          creator:
                            type: object
                            properties:
                              id:
                                type: string
                              type:
                                type: array
                                items:
                                  type: string
                              name:
                                type: string
                              url:
                                type: string
                              email:
                                type: string
                              phone:
                                type: string
                              address:
                                type: string
                            required:
                              - id
                              - type
                        required:
                          - id
                          - type
                          - name
                          - description
                          - criteria
                      identifier:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                            identityHash:
                              type: string
                            identityType:
                              type: string
                            hashed:
                              type: boolean
                          required:
                            - type
                            - identityHash
                            - identityType
                            - hashed
                    required:
                      - id
                      - type
                      - achievement
                      - identifier
                  proof:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                        cryptosuite:
                          type: string
                        created:
                          type: string
                        proofPurpose:
                          type: string
                        verificationMethod:
                          type: string
                        proofValue:
                          type: string
                      required:
                        - type
                        - cryptosuite
                        - created
                        - proofPurpose
                        - verificationMethod
                        - proofValue
                  validFrom:
                    type: string
                  validUntil:
                    type: string
                  credentialSchema:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                      required:
                        - id
                        - type
                required:
                  - '@context'
                  - id
                  - type
                  - issuer
                  - credentialSubject
                  - validFrom
        '201':
          description: Credential successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  '@context':
                    type: array
                    items:
                      type: string
                  id:
                    type: string
                  type:
                    type: array
                    items:
                      type: string
                  issuer:
                    anyOf:
                      - type: string
                      - type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: array
                            items:
                              type: string
                          name:
                            type: string
                          url:
                            type: string
                          email:
                            type: string
                          phone:
                            type: string
                          address:
                            type: string
                        required:
                          - id
                          - type
                  name:
                    type: string
                  description:
                    type: string
                  image:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      caption:
                        type: string
                    required:
                      - id
                      - type
                  credentialSubject:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: array
                        items:
                          type: string
                      achievement:
                        type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: array
                            items:
                              type: string
                          name:
                            type: string
                          description:
                            type: string
                          criteria:
                            type: object
                            properties:
                              narrative:
                                type: string
                            required:
                              - narrative
                          image:
                            type: object
                            properties:
                              id:
                                type: string
                              type:
                                type: string
                              caption:
                                type: string
                            required:
                              - id
                              - type
                          achievementType:
                            type: string
                          creator:
                            type: object
                            properties:
                              id:
                                type: string
                              type:
                                type: array
                                items:
                                  type: string
                              name:
                                type: string
                              url:
                                type: string
                              email:
                                type: string
                              phone:
                                type: string
                              address:
                                type: string
                            required:
                              - id
                              - type
                        required:
                          - id
                          - type
                          - name
                          - description
                          - criteria
                      identifier:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                            identityHash:
                              type: string
                            identityType:
                              type: string
                            hashed:
                              type: boolean
                          required:
                            - type
                            - identityHash
                            - identityType
                            - hashed
                    required:
                      - id
                      - type
                      - achievement
                      - identifier
                  proof:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                        cryptosuite:
                          type: string
                        created:
                          type: string
                        proofPurpose:
                          type: string
                        verificationMethod:
                          type: string
                        proofValue:
                          type: string
                      required:
                        - type
                        - cryptosuite
                        - created
                        - proofPurpose
                        - verificationMethod
                        - proofValue
                  validFrom:
                    type: string
                  validUntil:
                    type: string
                  credentialSchema:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                      required:
                        - id
                        - type
                required:
                  - '@context'
                  - id
                  - type
                  - issuer
                  - credentialSubject
                  - validFrom
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
components:
  schemas:
    BadRequestResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: invaliddata
                    description: The field value for the minor code
                    example: invaliddata
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    UnauthorizedRequestResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: unauthorisedrequest
                    description: The field value for the minor code
                    example: unauthorisedrequest
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    ForbiddenResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: forbidden
                    description: The field value for the minor code
                    example: forbidden
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    NotFoundResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: unknownobject
                    description: The field value for the minor code
                    example: unknownobject
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    UnprocessableEntityResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: invaliddata
                    description: The field value for the minor code
                    example: invaliddata
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    TooManyRequestsResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: server_busy
                    description: The field value for the minor code
                    example: server_busy
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    InternalServerErrorResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: internal_server_error
                    description: The field value for the minor code
                    example: internal_server_error
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          scopes:
            https://purl.imsglobal.org/spec/or/v1p1/scope/admin: Admin access to the API
            https://purl.imsglobal.org/spec/or/v1p2/scope/admin.own: Admin access restricted to own resources
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-core.readonly: Read access to roster core
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster.readonly: Read access to roster
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster.createput: Create and update access to roster
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster.delete: Delete access to roster
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-demographics.readonly: Read access to roster demographics
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-demographics.createput: Create and update access to roster demographics
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-demographics.delete: Delete access to roster demographics
            https://purl.imsglobal.org/spec/or/v1p1/scope/resource.readonly: Read access to resource
            https://purl.imsglobal.org/spec/or/v1p1/scope/resource.createput: Create and update access to resource
            https://purl.imsglobal.org/spec/or/v1p1/scope/resource.delete: Delete access to resource
            https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.readonly: Read access to gradebook
            https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.createput: Create and update access to gradebook
            https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.delete: Delete access to gradebook
            https://purl.imsglobal.org/spec/powerpath/v1p1/scope/powerpath.readonly: Read access to powerpath
            https://purl.imsglobal.org/spec/powerpath/v1p1/scope/powerpath.createput: Create and update access to powerpath
            https://purl.imsglobal.org/spec/powerpath/v1p1/scope/powerpath.delete: Delete access to powerpath
            https://purl.imsglobal.org/spec/powerpath/v1p1/scope/powerpath.admin: Admin access to powerpath
            https://purl.imsglobal.org/spec/ob/v3p0/scope/credential.readonly: Read your issued badges
            https://purl.imsglobal.org/spec/ob/v3p0/scope/credential.upsert: Store new badges in your account
            https://purl.imsglobal.org/spec/ob/v3p0/scope/credential.delete: Delete access to open badges
            https://purl.imsglobal.org/spec/ob/v3p0/scope/credential.admin: Administrative access to open badges
            https://purl.imsglobal.org/spec/clr/v2p0/scope/credential.readonly: Read access to CLR
            https://purl.imsglobal.org/spec/clr/v2p0/scope/credential.upsert: Create and update access to CLR
            https://purl.imsglobal.org/spec/clr/v2p0/scope/credential.admin: Administrative access to CLR
            https://api.alpha-1edtech.ai/edubridge/progression.readonly: Browse lesson catalog via progression proxy
            https://api.alpha-1edtech.ai/edubridge/progression.createput: Create hole-filling courses via progression proxy
          tokenUrl: >-
            https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/token

````