> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ediphai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ediphai.com/_mcp/server.

# Post Records

POST https://apps.ediphai.com/v1/records
Content-Type: application/json

Reference: https://docs.ediphai.com/api/v1/reference/post-records

## Authentication

- `Authorization` header (bearer token, required) — ediphai_test_... or ediphai_live_...

## Request

### Query parameters

- `validate` (enum, optional) — true: run every check a real submission runs and store nothing
  - Allowed values: `true`, `false`

### Body (application/json)

This endpoint expects a postRecords_Request.

- `postRecords_Request`
  - PostRecordsRequest0
  - PostRecordsRequest1

## Response

### 200

One record: a duplicate of a stored revision, or valid in validate mode. A batch: one outcome per record

- `postRecords_Response_200`
  - RecordReceipt: RecordReceipt
  - RecordBatchResult: RecordBatchResult

### 202

Stored durably; the receipt names its processing state

- `record_type` (string, required)
- `record_id` (string, required)
- `revision` (integer, required)
- `definition` (RecordReceiptDefinition, required)
- `hash` (string, required) — sha256 of the canonical envelope
- `counts` (map from string to integer, required) — Results per definition section
- `outcome` (string, optional) — POST only. accepted: stored now. duplicate: this revision was already stored with the same envelope. valid: validate mode, nothing stored
- `state` (string, optional) — accepted, processed, quarantined, deleted; absent in validate mode. An unknown state is not terminal
- `current` (boolean, optional) — POST only. false when a higher revision was already stored, so this one is kept as history
- `received_at` (string, optional) — When Ediphai stored it; absent in validate mode

## Errors

### 400 Client Request Error

Refused: read rule, pointer, fix and retryable

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `pointer` (string, required) — JSON Pointer into the request; '' when the whole request is at fault
- `rule` (string, required) — A rule from the catalogue in the docs; new rules may be added
- `fix` (string, required)
- `retryable` (boolean, required) — true: send the same request again later. false: change the request first
- `detail` (string, optional)
- `retry_after_ms` (integer, optional)
- `errors` (list of ProblemErrorsItems, optional)

### 500 Server Error

Refused: read rule, pointer, fix and retryable

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `pointer` (string, required) — JSON Pointer into the request; '' when the whole request is at fault
- `rule` (string, required) — A rule from the catalogue in the docs; new rules may be added
- `fix` (string, required)
- `retryable` (boolean, required) — true: send the same request again later. false: change the request first
- `detail` (string, optional)
- `retry_after_ms` (integer, optional)
- `errors` (list of ProblemErrorsItems, optional)

## Types

### PostRecordsRequest0

- `record_type` ("formation.assessment_result", required)
- `record_type_version` (integer, required)
- `record_id` (string, required) — Unique within (source, record_type)
- `revision` (integer, required) — Monotonic per record; a millisecond timestamp is allowed
- `occurred_at` (string, required) — An RFC 3339 timestamp with an offset (2026-10-12T19:04:11Z), a day (2003-05-04), a month (2003-05) or a year (2003)
- `subjects` (list of V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf0SubjectsItems, required)
- `body` (AssessmentResultBody, required) — Validated against record_type@record_type_version and its definition
- `consent` (V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf0Consent, optional) — Optional provenance, stored as sent, never interpreted
- `source_detail` (map from string to any, optional) — At most 32 KB; stored, never modelled

### PostRecordsRequest1

A batch: at most 100 records and at most 5 MB in all

- `records` (list of V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItems, required)

### RecordReceipt

- `record_type` (string, required)
- `record_id` (string, required)
- `revision` (integer, required)
- `definition` (RecordReceiptDefinition, required)
- `hash` (string, required) — sha256 of the canonical envelope
- `counts` (map from string to integer, required) — Results per definition section
- `outcome` (string, optional) — POST only. accepted: stored now. duplicate: this revision was already stored with the same envelope. valid: validate mode, nothing stored
- `state` (string, optional) — accepted, processed, quarantined, deleted; absent in validate mode. An unknown state is not terminal
- `current` (boolean, optional) — POST only. false when a higher revision was already stored, so this one is kept as history
- `received_at` (string, optional) — When Ediphai stored it; absent in validate mode

### RecordBatchResult

- `results` (list of RecordBatchResultResultsItems, required)

### RecordReceiptDefinition

- `key` (string, required)
- `version` (string, required)

### ProblemErrorsItems

- `pointer` (string, required)
- `rule` (string, required)
- `fix` (string, required)

### V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf0SubjectsItems

- `role` (string, required) — Identifier for every section, item, role, level, qualifier and declarer: a lowercase letter, then lowercase letters, digits or underscores, at most 64 characters
- `external_id` (string, required) — One namespace per source across all its record types
- `claims` (V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf0SubjectsItemsClaims, optional)

### AssessmentResultBody

- `definition` (AssessmentResultBodyDefinition, required)
- `status` (enum, required)
  - Allowed values: `completed`
- `completed_at` (string, required) — An RFC 3339 timestamp with an offset (2026-10-12T19:04:11Z), a day (2003-05-04), a month (2003-05) or a year (2003)
- `results` (list of AssessmentResultBodyResultsItems, required)
- `started_at` (string, optional) — An RFC 3339 timestamp with an offset (2026-10-12T19:04:11Z), a day (2003-05-04), a month (2003-05) or a year (2003)
- `respondent` (AssessmentResultBodyRespondent, optional) — self when absent

### V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf0Consent

Optional provenance, stored as sent, never interpreted

- `captured_at` (string, optional) — An RFC 3339 timestamp with an offset (2026-10-12T19:04:11Z), a day (2003-05-04), a month (2003-05) or a year (2003)
- `policy_ref` (string, optional)

### V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItems

- `record_type` ("formation.assessment_result", required)
- `record_type_version` (integer, required)
- `record_id` (string, required) — Unique within (source, record_type)
- `revision` (integer, required) — Monotonic per record; a millisecond timestamp is allowed
- `occurred_at` (string, required) — An RFC 3339 timestamp with an offset (2026-10-12T19:04:11Z), a day (2003-05-04), a month (2003-05) or a year (2003)
- `subjects` (list of V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItemsSubjectsItems, required)
- `body` (AssessmentResultBody, required) — Validated against record_type@record_type_version and its definition
- `consent` (V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItemsConsent, optional) — Optional provenance, stored as sent, never interpreted
- `source_detail` (map from string to any, optional) — At most 32 KB; stored, never modelled

### RecordBatchResultResultsItems

- `index` (integer, required) — The record's position in the batch
- `status` (integer, required) — The status the record would have had alone: 202, 200, or a refusal. Retry only a retryable problem
- `receipt` (RecordBatchResultResultsItemsReceipt, optional)
- `problem` (RecordBatchResultResultsItemsProblem, optional)

### V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf0SubjectsItemsClaims

- `source_refs` (list of V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf0SubjectsItemsClaimsSourceRefsItems, optional)
- `first_name` (string, optional)
- `last_name` (string, optional)
- `date_of_birth` (string, optional) — A full date (1986-03-14)
- `birth_year` (integer, optional) — For sources that know only the year. Never send it with date_of_birth
- `email` (string, optional)
- `phone_e164` (string, optional)
- `phone_verified` (boolean, optional)

### AssessmentResultBodyDefinition

- `key` (string, required) — A key. Platform definitions prefix their declarer's namespace (rock.disc); church keys never contain a dot
- `version` (string, required) — The app's own version label

### AssessmentResultBodyResultsItems

- `item` (string, required) — Identifier for every section, item, role, level, qualifier and declarer: a lowercase letter, then lowercase letters, digits or underscores, at most 64 characters
- `value` (AssessmentResultBodyResultsItemsValue, required, nullable) — Typed by the item. null is reported with no value; "not_offered" means the source never presented it
- `qualifiers` (map from string to AssessmentResultBodyResultsItemsQualifiers, optional)
- `coverage` (AssessmentResultBodyResultsItemsCoverage, optional)
- `source_rank` (integer, optional)
- `source_primary` (boolean, optional)

### AssessmentResultBodyRespondent

self when absent

- AssessmentResultBodyRespondent0
- AssessmentResultBodyRespondent1

### V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItemsSubjectsItems

- `role` (string, required) — Identifier for every section, item, role, level, qualifier and declarer: a lowercase letter, then lowercase letters, digits or underscores, at most 64 characters
- `external_id` (string, required) — One namespace per source across all its record types
- `claims` (V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItemsSubjectsItemsClaims, optional)

### V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItemsConsent

Optional provenance, stored as sent, never interpreted

- `captured_at` (string, optional) — An RFC 3339 timestamp with an offset (2026-10-12T19:04:11Z), a day (2003-05-04), a month (2003-05) or a year (2003)
- `policy_ref` (string, optional)

### RecordBatchResultResultsItemsReceipt

- `record_type` (string, required)
- `record_id` (string, required)
- `revision` (integer, required)
- `definition` (RecordBatchResultResultsItemsReceiptDefinition, required)
- `hash` (string, required) — sha256 of the canonical envelope
- `counts` (map from string to integer, required) — Results per definition section
- `outcome` (string, optional) — POST only. accepted: stored now. duplicate: this revision was already stored with the same envelope. valid: validate mode, nothing stored
- `state` (string, optional) — accepted, processed, quarantined, deleted; absent in validate mode. An unknown state is not terminal
- `current` (boolean, optional) — POST only. false when a higher revision was already stored, so this one is kept as history
- `received_at` (string, optional) — When Ediphai stored it; absent in validate mode

### RecordBatchResultResultsItemsProblem

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `pointer` (string, required) — JSON Pointer into the request; '' when the whole request is at fault
- `rule` (string, required) — A rule from the catalogue in the docs; new rules may be added
- `fix` (string, required)
- `retryable` (boolean, required) — true: send the same request again later. false: change the request first
- `detail` (string, optional)
- `retry_after_ms` (integer, optional)
- `errors` (list of RecordBatchResultResultsItemsProblemErrorsItems, optional)

### V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf0SubjectsItemsClaimsSourceRefsItems

- `system` (string, required) — A referenceable people source in the church's registry, otherwise 422
- `id` (string, required)
- `basis` (enum, required)
  - Allowed values: `staff_assigned`, `staff_entered`, `lookup_confirmed`, `self_reported`

### AssessmentResultBodyResultsItemsValue

Typed by the item. null is reported with no value; "not_offered" means the source never presented it

- double
- string
- boolean
- list of string

### AssessmentResultBodyResultsItemsQualifiers

- string
- double

### AssessmentResultBodyResultsItemsCoverage

- `answered` (integer, required)
- `total` (integer, required)

### AssessmentResultBodyRespondent0

- `kind` ("self", required)

### AssessmentResultBodyRespondent1

- `kind` ("observer", required)
- `role` (string, required) — Identifier for every section, item, role, level, qualifier and declarer: a lowercase letter, then lowercase letters, digits or underscores, at most 64 characters
- `count` (integer, required)

### V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItemsSubjectsItemsClaims

- `source_refs` (list of V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItemsSubjectsItemsClaimsSourceRefsItems, optional)
- `first_name` (string, optional)
- `last_name` (string, optional)
- `date_of_birth` (string, optional) — A full date (1986-03-14)
- `birth_year` (integer, optional) — For sources that know only the year. Never send it with date_of_birth
- `email` (string, optional)
- `phone_e164` (string, optional)
- `phone_verified` (boolean, optional)

### RecordBatchResultResultsItemsReceiptDefinition

- `key` (string, required)
- `version` (string, required)

### RecordBatchResultResultsItemsProblemErrorsItems

- `pointer` (string, required)
- `rule` (string, required)
- `fix` (string, required)

### V1RecordsPostRequestBodyContentApplicationJsonSchemaOneOf1RecordsItemsSubjectsItemsClaimsSourceRefsItems

- `system` (string, required) — A referenceable people source in the church's registry, otherwise 422
- `id` (string, required)
- `basis` (enum, required)
  - Allowed values: `staff_assigned`, `staff_entered`, `lookup_confirmed`, `self_reported`

## Examples

### Example 1

**Request**

```json
{
  "body": {
    "completed_at": "string",
    "definition": {
      "key": "string",
      "version": "string"
    },
    "results": [
      {
        "item": "string",
        "value": 1.1
      }
    ],
    "status": "completed"
  },
  "occurred_at": "string",
  "record_id": "string",
  "record_type": "string",
  "record_type_version": 1,
  "revision": 1,
  "subjects": [
    {
      "external_id": "string",
      "role": "string"
    }
  ]
}
```

**Response**

```json
{
  "counts": {},
  "current": true,
  "definition": {
    "key": "string",
    "version": "string"
  },
  "hash": "string",
  "outcome": "string",
  "received_at": "string",
  "record_id": "string",
  "record_type": "string",
  "revision": 1,
  "state": "string"
}
```

**SDK Code**

```python
import requests

url = "https://apps.ediphai.com/v1/records"

payload = {
    "body": {
        "completed_at": "string",
        "definition": {
            "key": "string",
            "version": "string"
        },
        "results": [
            {
                "item": "string",
                "value": 1.1
            }
        ],
        "status": "completed"
    },
    "occurred_at": "string",
    "record_id": "string",
    "record_type": "string",
    "record_type_version": 1,
    "revision": 1,
    "subjects": [
        {
            "external_id": "string",
            "role": "string"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://apps.ediphai.com/v1/records';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"body":{"completed_at":"string","definition":{"key":"string","version":"string"},"results":[{"item":"string","value":1.1}],"status":"completed"},"occurred_at":"string","record_id":"string","record_type":"string","record_type_version":1,"revision":1,"subjects":[{"external_id":"string","role":"string"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apps.ediphai.com/v1/records"

	payload := strings.NewReader("{\n  \"body\": {\n    \"completed_at\": \"string\",\n    \"definition\": {\n      \"key\": \"string\",\n      \"version\": \"string\"\n    },\n    \"results\": [\n      {\n        \"item\": \"string\",\n        \"value\": 1.1\n      }\n    ],\n    \"status\": \"completed\"\n  },\n  \"occurred_at\": \"string\",\n  \"record_id\": \"string\",\n  \"record_type\": \"string\",\n  \"record_type_version\": 1,\n  \"revision\": 1,\n  \"subjects\": [\n    {\n      \"external_id\": \"string\",\n      \"role\": \"string\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://apps.ediphai.com/v1/records")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"body\": {\n    \"completed_at\": \"string\",\n    \"definition\": {\n      \"key\": \"string\",\n      \"version\": \"string\"\n    },\n    \"results\": [\n      {\n        \"item\": \"string\",\n        \"value\": 1.1\n      }\n    ],\n    \"status\": \"completed\"\n  },\n  \"occurred_at\": \"string\",\n  \"record_id\": \"string\",\n  \"record_type\": \"string\",\n  \"record_type_version\": 1,\n  \"revision\": 1,\n  \"subjects\": [\n    {\n      \"external_id\": \"string\",\n      \"role\": \"string\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://apps.ediphai.com/v1/records")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": {\n    \"completed_at\": \"string\",\n    \"definition\": {\n      \"key\": \"string\",\n      \"version\": \"string\"\n    },\n    \"results\": [\n      {\n        \"item\": \"string\",\n        \"value\": 1.1\n      }\n    ],\n    \"status\": \"completed\"\n  },\n  \"occurred_at\": \"string\",\n  \"record_id\": \"string\",\n  \"record_type\": \"string\",\n  \"record_type_version\": 1,\n  \"revision\": 1,\n  \"subjects\": [\n    {\n      \"external_id\": \"string\",\n      \"role\": \"string\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://apps.ediphai.com/v1/records', [
  'body' => '{
  "body": {
    "completed_at": "string",
    "definition": {
      "key": "string",
      "version": "string"
    },
    "results": [
      {
        "item": "string",
        "value": 1.1
      }
    ],
    "status": "completed"
  },
  "occurred_at": "string",
  "record_id": "string",
  "record_type": "string",
  "record_type_version": 1,
  "revision": 1,
  "subjects": [
    {
      "external_id": "string",
      "role": "string"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://apps.ediphai.com/v1/records");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": {\n    \"completed_at\": \"string\",\n    \"definition\": {\n      \"key\": \"string\",\n      \"version\": \"string\"\n    },\n    \"results\": [\n      {\n        \"item\": \"string\",\n        \"value\": 1.1\n      }\n    ],\n    \"status\": \"completed\"\n  },\n  \"occurred_at\": \"string\",\n  \"record_id\": \"string\",\n  \"record_type\": \"string\",\n  \"record_type_version\": 1,\n  \"revision\": 1,\n  \"subjects\": [\n    {\n      \"external_id\": \"string\",\n      \"role\": \"string\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "body": [
    "completed_at": "string",
    "definition": [
      "key": "string",
      "version": "string"
    ],
    "results": [
      [
        "item": "string",
        "value": 1.1
      ]
    ],
    "status": "completed"
  ],
  "occurred_at": "string",
  "record_id": "string",
  "record_type": "string",
  "record_type_version": 1,
  "revision": 1,
  "subjects": [
    [
      "external_id": "string",
      "role": "string"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apps.ediphai.com/v1/records")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Request**

```json
{
  "body": {
    "completed_at": "string",
    "definition": {
      "key": "string",
      "version": "string"
    },
    "results": [
      {
        "item": "string",
        "value": 1.1
      }
    ],
    "status": "completed"
  },
  "occurred_at": "string",
  "record_id": "string",
  "record_type": "string",
  "record_type_version": 1,
  "revision": 1,
  "subjects": [
    {
      "external_id": "string",
      "role": "string"
    }
  ]
}
```

**Response**

```json
{
  "counts": {},
  "current": true,
  "definition": {
    "key": "string",
    "version": "string"
  },
  "hash": "string",
  "outcome": "string",
  "received_at": "string",
  "record_id": "string",
  "record_type": "string",
  "revision": 1,
  "state": "string"
}
```

**SDK Code**

```python
import requests

url = "https://apps.ediphai.com/v1/records"

payload = {
    "body": {
        "completed_at": "string",
        "definition": {
            "key": "string",
            "version": "string"
        },
        "results": [
            {
                "item": "string",
                "value": 1.1
            }
        ],
        "status": "completed"
    },
    "occurred_at": "string",
    "record_id": "string",
    "record_type": "string",
    "record_type_version": 1,
    "revision": 1,
    "subjects": [
        {
            "external_id": "string",
            "role": "string"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://apps.ediphai.com/v1/records';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"body":{"completed_at":"string","definition":{"key":"string","version":"string"},"results":[{"item":"string","value":1.1}],"status":"completed"},"occurred_at":"string","record_id":"string","record_type":"string","record_type_version":1,"revision":1,"subjects":[{"external_id":"string","role":"string"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apps.ediphai.com/v1/records"

	payload := strings.NewReader("{\n  \"body\": {\n    \"completed_at\": \"string\",\n    \"definition\": {\n      \"key\": \"string\",\n      \"version\": \"string\"\n    },\n    \"results\": [\n      {\n        \"item\": \"string\",\n        \"value\": 1.1\n      }\n    ],\n    \"status\": \"completed\"\n  },\n  \"occurred_at\": \"string\",\n  \"record_id\": \"string\",\n  \"record_type\": \"string\",\n  \"record_type_version\": 1,\n  \"revision\": 1,\n  \"subjects\": [\n    {\n      \"external_id\": \"string\",\n      \"role\": \"string\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://apps.ediphai.com/v1/records")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"body\": {\n    \"completed_at\": \"string\",\n    \"definition\": {\n      \"key\": \"string\",\n      \"version\": \"string\"\n    },\n    \"results\": [\n      {\n        \"item\": \"string\",\n        \"value\": 1.1\n      }\n    ],\n    \"status\": \"completed\"\n  },\n  \"occurred_at\": \"string\",\n  \"record_id\": \"string\",\n  \"record_type\": \"string\",\n  \"record_type_version\": 1,\n  \"revision\": 1,\n  \"subjects\": [\n    {\n      \"external_id\": \"string\",\n      \"role\": \"string\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://apps.ediphai.com/v1/records")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": {\n    \"completed_at\": \"string\",\n    \"definition\": {\n      \"key\": \"string\",\n      \"version\": \"string\"\n    },\n    \"results\": [\n      {\n        \"item\": \"string\",\n        \"value\": 1.1\n      }\n    ],\n    \"status\": \"completed\"\n  },\n  \"occurred_at\": \"string\",\n  \"record_id\": \"string\",\n  \"record_type\": \"string\",\n  \"record_type_version\": 1,\n  \"revision\": 1,\n  \"subjects\": [\n    {\n      \"external_id\": \"string\",\n      \"role\": \"string\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://apps.ediphai.com/v1/records', [
  'body' => '{
  "body": {
    "completed_at": "string",
    "definition": {
      "key": "string",
      "version": "string"
    },
    "results": [
      {
        "item": "string",
        "value": 1.1
      }
    ],
    "status": "completed"
  },
  "occurred_at": "string",
  "record_id": "string",
  "record_type": "string",
  "record_type_version": 1,
  "revision": 1,
  "subjects": [
    {
      "external_id": "string",
      "role": "string"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://apps.ediphai.com/v1/records");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": {\n    \"completed_at\": \"string\",\n    \"definition\": {\n      \"key\": \"string\",\n      \"version\": \"string\"\n    },\n    \"results\": [\n      {\n        \"item\": \"string\",\n        \"value\": 1.1\n      }\n    ],\n    \"status\": \"completed\"\n  },\n  \"occurred_at\": \"string\",\n  \"record_id\": \"string\",\n  \"record_type\": \"string\",\n  \"record_type_version\": 1,\n  \"revision\": 1,\n  \"subjects\": [\n    {\n      \"external_id\": \"string\",\n      \"role\": \"string\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "body": [
    "completed_at": "string",
    "definition": [
      "key": "string",
      "version": "string"
    ],
    "results": [
      [
        "item": "string",
        "value": 1.1
      ]
    ],
    "status": "completed"
  ],
  "occurred_at": "string",
  "record_id": "string",
  "record_type": "string",
  "record_type_version": 1,
  "revision": 1,
  "subjects": [
    [
      "external_id": "string",
      "role": "string"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apps.ediphai.com/v1/records")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```