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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.kosli.com/feedback

```json
{
  "path": "/api-reference/custom-attestation-types/create-or-update-custom-attestation-type",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Create or update custom attestation type

> Create or update a custom attestation type for an org.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json post /custom-attestation-types/{org}
openapi: 3.1.0
info:
  title: Kosli API
  summary: The API for communicating with Kosli
  description: >

    # Authentication 


    When making requests against Kosli API, you can authenticate your requests
    using a bearer token. 

    Set the bearer token in the request Authorization header to a valid API
    key. 

    API Keys can be personal or for service accounts. Check the [service
    accounts
    documentation](https://docs.kosli.com/getting_started/service-accounts/) for
    details. 


    ## Curl example


    ```shell

    curl -H "Authorization: Bearer <<your-api-key>>"
    https://app.kosli.com/api/v2/environments/<<your-org-name>>

    ```
  version: '2.0'
servers:
  - url: https://app.kosli.com/api/v2
    description: EU
  - url: https://app.us.kosli.com/api/v2
    description: US
security:
  - HTTPBearer: []
paths:
  /custom-attestation-types/{org}:
    post:
      tags:
        - Custom Attestation Types
      summary: Create or update custom attestation type
      description: Create or update a custom attestation type for an org.
      operationId: post_custom_attestation_type_custom_attestation_types__org__post
      parameters:
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_post_custom_attestation_type_custom_attestation_types__org__post
      responses:
        '201':
          description: Creation Success
          content:
            application/json:
              schema: {}
        '400':
          description: Validation Error
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    Body_post_custom_attestation_type_custom_attestation_types__org__post:
      properties:
        data_json:
          $ref: '#/components/schemas/CustomAttestationTypePostInput'
          description: Custom attestation description in JSON format
        type_schema:
          anyOf:
            - type: string
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Type Schema
          description: Optional attestation schema file
      type: object
      required:
        - data_json
      title: Body_post_custom_attestation_type_custom_attestation_types__org__post
    CustomAttestationTypePostInput:
      properties:
        name:
          type: string
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_~]*$
          title: Name
          examples:
            - my-type
            - source_code_review
            - CCF-00320-No_Passwords_In_Code
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        evaluator:
          anyOf:
            - $ref: '#/components/schemas/JQEvaluator'
            - $ref: '#/components/schemas/DefaultEvaluator'
            - type: 'null'
          title: Evaluator
          default:
            content_type: default
      additionalProperties: false
      type: object
      required:
        - name
      title: CustomAttestationTypePostInput
      examples:
        - description: A person that is over 21 year
          evaluator:
            content_type: jq
            rules:
              - .age > 21
          name: person-over-21
    JQEvaluator:
      properties:
        content_type:
          type: string
          const: jq
          title: Content Type
          default: jq
        rules:
          items:
            type: string
          type: array
          title: Rules
      type: object
      required:
        - rules
      title: JQEvaluator
    DefaultEvaluator:
      properties:
        content_type:
          type: string
          const: default
          title: Content Type
          default: default
      type: object
      title: DefaultEvaluator
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````