createCircle
# createCircle
POST
/circles
const url = 'http://localhost:8080/api/v1/circles';const options = { method: 'POST', headers: {cookie: 'hs_session=<hs_session>', 'Content-Type': 'application/json'}, body: '{"name":"example","icon":"example","color":"terracotta","visibility":"household","personIds":["per_01j9x3k8m2q4r5s6t7v8w9y0z1"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/circles \ --header 'Content-Type: application/json' \ --cookie hs_session=<hs_session> \ --data '{ "name": "example", "icon": "example", "color": "terracotta", "visibility": "household", "personIds": [ "per_01j9x3k8m2q4r5s6t7v8w9y0z1" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
icon
string
color
string
visibility
string
personIds
Array<string>
Responses
Section titled “Responses”Created.
Media typeapplication/json
object
id
required
string
name
required
string
icon
required
string
color
required
string
visibility
required
string
preset
string | null
personCount
required
integer
people
Present on getCircle only.
Array<object>
object
id
required
string
displayName
required
string
relationLabel
string | null
kind
required
string
closeness
required
1 = closest. Weights the feed and hearth picks.
integer
inMyFeed
required
boolean
canEdit
required
boolean
sortOrder
required
integer
capturableAccounts
Accounts on platforms the extension can capture.
integer
capturableAccountLimit
integer
lastUpdate
One of:
null
object
runId
required
string
finishedAt
required
string format: date-time
by
newMoments
integer
Examples
Exampleseed
Derived from fixtures/seed.json.
{ "canEdit": true, "capturableAccountLimit": 30, "capturableAccounts": 0, "color": "dusk", "icon": "users-three", "id": "cir_01j9a1b2c3d4e5f6g7h8j9k018", "inMyFeed": true, "lastUpdate": null, "name": "Neighbors", "personCount": 0, "preset": null, "sortOrder": 2, "visibility": "household"}