---
title: "API update methods"
canonical: "https://support.appfire.com/space/OFJ/603653011/API%20update%20methods"
format: markdown
---
> Macro (aura-html)

> ℹ️ This page is about **OKR for Jira Cloud**. Using** Data Center**? **[Click here](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=ofj&title=OKR%20for%20Jira%20Data%20Center&linkCreation=true&fromPageId=603653011)**.

#### **Base URL for all API calls**

- If you are in the EU region: [https://eu.okr-jira-prod.appfire.com](https://eu.okr-jira-prod.appfire.com/)
- Everywhere else: [https://okr-jira-prod.appfire.com](https://okr-jira-prod.appfire.com/)

#### Prerequisites

- All update methods are carried out using the POST HTTP method, and necessitate a JSON object with specified properties in the request body.
- Authentication is executed in the same manner as for query methods, by utilizing the `API-Token: {token}` header along with your authentication token.
- Additionally, the `Content-Type: application/json` header is mandatory to ensure that the server correctly interprets your request.

#### 1. Update objective

Create updates for specified objectives.

<span style="color: #36b37e">**POST **</span>`/api/v2/api-update/objectives`

| **Property** | **Description** | **Mandatory** |
| --- | --- | --- |
| `objectiveId` | ID of objective to update. | :check_mark: |
| `status` | New state of the objective. Allowed statuses:  
`NOT STARTED`, `ON TRACK`, `AT RISK`, `OFF TRACK` | :cross_mark: |
| `description` | A description to appear on created update. | :cross_mark: |

**Example request**

<span style="color: #36b37e">**POST **</span> `https://okr-jira-prod.appfire.com/api/v2/api-update/objectives`

**Request body**

```json
{
  "objectiveId": "62334eac00ee2b102e34fdb7",
  "status" : "ON TRACK",
  "description" : "Spaceship assembly docks are delivering on time"
}
```

<details>
<summary>curl</summary>

```shell
curl -X POST https://okr-jira-prod.appfire.com/api/v2/api-update/objectives \
-H 'Content-Type: application/json' \
-H 'API-Token: {token}' \
-d '{"objectiveId":"62334eac00ee2b102e34fdb7", "status":"ON TRACK", "description":"Spaceship assembly docks are delivering on time"}' 
```
</details>

<details>
<summary>Example response:</summary>

```json
{
	"entityId": "62334eac00ee2b102e34fdb7",
	"status": "ON TRACK",
	"created": "2022-05-20T09:58:09+0000",
	"value": null,
	"description": "Spaceship assembly docks are delivering on time"
}
```
</details>

#### 2. Update key result

Create updates for the specified key results.

<span style="color: #36b37e">**POST **</span>`/api/v2/api-update/keyResults`

| **Property** | **Description** | **Mandatory** |
| --- | --- | --- |
| `keyResultId` | ID of key result to update. | :check_mark: |
| `status` | New state of the key result. Allowed statuses:  
`NOT STARTED`, `ON TRACK`, `AT RISK`, `OFF TRACK` | :cross_mark: |
| `newValue` | Progress value to set in update.   
Can not be set for auto key results, as their value comes from JQL query.<br>In case KR progress unit is currency, value should still be a number, without currency symbol. | :cross_mark: |
| `description` | A description to appear on created update. | :cross_mark: |

**Example request:**

<span style="color: #36b37e">**POST **</span> `https://okr-jira-prod.appfire.com/api/v2/api-update/keyResults`

**Request body:**

```json
{
  "keyResultId": "62384a6942adda046598b3bd",
  "status" : "AT RISK",
  "newValue" : 13500.5,
  "description" : "Reduction in ship hull output is caused by Unobtainium supply disruptions."
}
```

<details>
<summary>curl</summary>

```shell
curl -X POST https://okr-jira-prod.appfire.com/api/v2/api-update/keyResults \
-H 'Content-Type: application/json' \
-H 'API-Token: {token}' \
-d '{"keyResultId":"62384a6942adda046598b3bd","status":"AT RISK","newValue":13500.5,"description":"Spaceship assembly docks are delivering on time"}'
```
</details>

<details>
<summary>Example response:</summary>

```json
{
	"entityId": "62384a6942adda046598b3bd",
	"status": "AT RISK",
	"created": "2022-05-20T13:01:35+0000",
	"value": 13500.5,
	"description": "Reduction in ship hull output is caused by Unobtainium supply disruptions."
}
```
</details>