Skip to main content
POST
https://api.grainledger.com
/
api
/
v1
/
households
Create household
curl --request POST \
  --url https://api.grainledger.com/api/v1/households \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Organization-Id: <x-organization-id>' \
  --data '
{
  "name": "Johnson Family"
}
'
const options = {
  method: 'POST',
  headers: {
    'X-Organization-Id': '<x-organization-id>',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({name: 'Johnson Family'})
};

fetch('https://api.grainledger.com/api/v1/households', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.grainledger.com/api/v1/households"

payload = { "name": "Johnson Family" }
headers = {
    "X-Organization-Id": "<x-organization-id>",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
{
  "id": "<string>",
  "name": "<string>",
  "primaryContactId": "<string>"
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Organization-Id
string
required

Organization ID for multi-tenant data access

Body

application/json
name
string
required
Example:

"Johnson Family"

primaryContactId
string
Example:

"cm456def789ghi"

Response

Created household

id
string
name
string
primaryContactId
string | null
Last modified on July 8, 2026