# Add or Update Blockout Space

<mark style="color:green;">`POST`</mark> `[PlatformAddress]/api/1.0/venue?action=addOrUpdateSpaceBlockout`

{% tabs %}
{% tab title="200 " %}

```
{
  "success": true,
  "id": 10
}
```

{% endtab %}
{% endtabs %}

### Example Request

#### Add Space Blockout

```javascript
{
  "venueId": "107",
  "name": "Space Blockout API",
  "spaceId": 1,
  "startDateTime": "2018-03-05 03:00:00 UTC",
  "endDateTime": "2018-03-05 06:00:00 UTC",
}
```

#### Update Space Blockout

```javascript
{
  "id": 10,
  "venueId": "107",
  "name": "Updated Name"
}
```

### Returns

| Property | Description                                              |
| -------- | -------------------------------------------------------- |
| success  | Whether or not the Space Blockout was added to the venue |
| id       | The unique id of the Space Blockout                      |

### Throws

| Code                 | Description                            |
| -------------------- | -------------------------------------- |
| Specific Code: 24270 | The request is empty                   |
| Specific Code: 24271 | The Space Blockout does not exist      |
| Specific Code: 24272 | The Space Blockout details are invalid |
| Specific Code: 24273 | An unknown error has occurred          |

This call takes values for a Space Blockout, and either

1. Updates the values for that Space Blockout (after you have provided an id in the parameters), or
2. Adds the Space Blockout to the system (if the id parameter is missing)
   1. The result of this call will contain the status of the result (either true or false) and the Space Blockout identifier of the updated or newly created Space Blockout.


---

# Agent Instructions: 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:

```
GET https://developer.ivvy.com/venues/getoraddbookingdata/add-or-update-blockoutspace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
