> For the complete documentation index, see [llms.txt](https://rc.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rc.sunbird.org/v1.0.0/api-reference/claims-api/attest-a-claim.md).

# Attest A Claim

## Attest a particular claim

<mark style="color:green;">`POST`</mark> `/api/v1/{entity-type}/claims/{claimId}/attest`

#### Path Parameters

| Name                                          | Type   | Description                            |
| --------------------------------------------- | ------ | -------------------------------------- |
| entity-type<mark style="color:red;">\*</mark> | String | Type of entity to which claim was sent |
| claimId<mark style="color:red;">\*</mark>     | String | ID of claim that is to be attested     |

#### Headers

| Name                                            | Type   | Description                                                                                |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------------------------ |
| authorization<mark style="color:red;">\*</mark> | String | Set to `Bearer {access-token}`. `access-token` should have a role with name as entity-type |
| content-type<mark style="color:red;">\*</mark>  | String | Set to `application/json`                                                                  |

#### Request Body

| Name | Type   | Description                                               |
| ---- | ------ | --------------------------------------------------------- |
| {    | String | action type can be either `GRANT_CLAIM` or `REJECT_CLAIM` |

### Usage

#### cURL

```shell
curl --location --request POST '{registry-url}/api/v1/{entity-type}/claims/a52708f8-c06f-4df7-a078-d567ec769637/attest' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "action":"GRANT_CLAIM"
}'
```

#### HTTPie

```shell
printf '{
    "action":"GRANT_CLAIM"
}'| http POST '{registry-url}/api/v1/{entity-type}/claims/a52708f8-c06f-4df7-a078-d567ec769637/attest' \
 Authorization:'Bearer {access-token}' \
 Content-Type:'application/json'
```

`{registry-url}` is usually [http://localhost:{port}](https://rc.sunbird.org/v1.0.0/api-reference/claims-api/http:/localhost:{port}). The port can be found under the `registry` section in the `docker-compose.yml` file and is usually `8081`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://rc.sunbird.org/v1.0.0/api-reference/claims-api/attest-a-claim.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
