> For the complete documentation index, see [llms.txt](https://knowledgebase.fabricdata.com/studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.fabricdata.com/studio/integrations-and-apis/api-overview/requests-and-responses.md).

# Requests & Responses

### Request Format

The Origin Studio API follows REST principles and the JSON:API 1.1 specification.

#### All requests must:

* Use **HTTPS**
* Include a valid `Authorization` header
* Include `Content-Type: application/json` for requests with a body
* Include `Accept: application/json`

***

### Required Headers

```
Authorization: Bearer YOUR_API_KEY
Accept: application/json
Content-Type: application/json
```

⚠️ The `Content-Type` header is required for `POST`, `PUT`, and `PATCH` requests.

***

### Example: Create a Record

```
POST /v1/records
```

Headers:

```
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: application/json
```

Body:

```
{
  "data": {
    "type": "records",
    "attributes": {
      "primaryTitle": "Example Movie",
      "workType": "Movie"
    }
  }
}
```

***

## Response Format

All responses are returned in **JSON** and conform to the **JSON:API 1.1** specification.

A typical response includes:

* `data` — the primary resource object
* `attributes` — record properties
* `relationships` — linked resources
* `meta` — additional metadata
* `links` — related resource URLs
* `jsonapi` — API version information

***

### Example Response Structure

```
{
  "data": {
    "id": "RESOURCE_ID",
    "type": "records",
    "attributes": { },
    "relationships": { }
  },
  "meta": { },
  "links": { },
  "jsonapi": {
    "version": "1.1"
  }
}
```

***

### Example: Search Record

```
POST /v1/records/search
```

Headers:

```
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: application/json
```

Body:

```
{
  "data": {
    "type": "searchQueries",
    "attributes": {
      "group": {
        "operator": "AND",
        "conditions": [
          {
            "field": "primaryTitle",
            "operator": "eq",
            "value": "Rocky"
          }
        ]
      }
    }
  }
}
```

***

## Response Format

All responses are returned in **JSON** and conform to the **JSON:API 1.1** specification.

A typical response includes:

* `data` — the primary resource object
* `attributes` — record properties
* `relationships` — linked resources
* `meta` — additional metadata
* `links` — related resource URLs
* `jsonapi` — API version information

***

### Example Response Structure

```
{
  "data": {
    "id": "RESOURCE_ID",
    "type": "records",
    "attributes": { },
    "relationships": { }
  },
  "meta": { },
  "links": { },
  "jsonapi": {
    "version": "1.1"
  }
}
```
