## Add a criterion to a rubric

`client.Rubrics.Criteria.New(ctx, rubricID, body) (*RubricCriteriaResponse, error)`

**post** `/v5/rubrics/{rubric_id}/criteria`

Add a single criterion to an existing rubric.

Creates a new criterion at version 1 under the given rubric. Criteria are
versioned independently of the rubric they belong to. The request is rejected
if the target rubric is archived.

### Parameters

- `rubricID string`

- `body RubricCriterionNewParams`

  - `RubricCriteriaInput param.Field[RubricCriteriaInput]`

### Returns

- `type RubricCriteriaResponse struct{…}`

  - `ID string`

  - `CreatedAt Time`

  - `RubricID string`

  - `Title string`

  - `Version int64`

  - `Annotations map[string, any]`

  - `Object RubricCriteriaResponseObject`

    - `const RubricCriteriaResponseObjectRubricCriteria RubricCriteriaResponseObject = "rubric_criteria"`

  - `Weight float64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/scaleapi/sgp-dev-go"
  "github.com/scaleapi/sgp-dev-go/option"
)

func main() {
  client := sgpdev.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithAccountID("My Account ID"),
  )
  rubricCriteriaResponse, err := client.Rubrics.Criteria.New(
    context.TODO(),
    "rubric_id",
    sgpdev.RubricCriterionNewParams{
      RubricCriteriaInput: sgpdev.RubricCriteriaInputParam{
        Title: "x",
      },
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", rubricCriteriaResponse.ID)
}
```

#### Response

```json
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "rubric_id": "rubric_id",
  "title": "title",
  "version": 0,
  "annotations": {
    "foo": "bar"
  },
  "object": "rubric_criteria",
  "weight": 0
}
```
