Skip to content
API Reference
Records

Organizations

Organizations in Prism / Objects — Micro Python reference.

Reference for Python SDK 0.8.0.

Release source · Setup and client configuration

create

POST /v2/prism/{teamId}/organization

client.prism.objects.organizations.create(*, team_id, **params) -> OrganizationCreateResponse

Create object

update

PATCH /v2/prism/{teamId}/organization/{organizationId}

client.prism.objects.organizations.update(organization_id, *, team_id, **params) -> OrganizationUpdateResponse

Patch object

list

GET /v2/prism/{teamId}/organization

client.prism.objects.organizations.list(*, team_id, **params) -> OrganizationListResponse

Convenience list endpoint. Equivalent to POST /v2/prism/{teamId}/{objectType}/query with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for in. Values are received as strings, so non-string property filters via this endpoint may not work — use the query endpoint for typed comparisons or anything beyond simple equality.

delete

DELETE /v2/prism/{teamId}/organization/{organizationId}

client.prism.objects.organizations.delete(organization_id, *, team_id) -> None

Delete object

bulk_create

POST /v2/prism/{teamId}/organization/import

client.prism.objects.organizations.bulk_create(*, team_id, **params) -> OrganizationBulkCreateResponse

Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final ImportJob; large batches start an async job, return 202 with status: processing and a Location header, and can be polled via GET /v2/prism/{teamId}/imports/{jobId}.

bulk_delete

POST /v2/prism/{teamId}/organization/batch/delete

client.prism.objects.organizations.bulk_delete(*, team_id, **params) -> OrganizationBulkDeleteResponse

Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update.

bulk_update

POST /v2/prism/{teamId}/organization/batch/update

client.prism.objects.organizations.bulk_update(*, team_id, **params) -> OrganizationBulkUpdateResponse

Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect results[].status per item.

count

GET /v2/prism/{teamId}/organization/count

client.prism.objects.organizations.count(*, team_id, **params) -> OrganizationCountResponse

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until has_more flips false to discover the total. Currently does not apply query filters; for a filtered total, pass include_total: true in a POST /query body.

duplicate

POST /v2/prism/{teamId}/organization/{organizationId}/duplicate

client.prism.objects.organizations.duplicate(organization_id, *, team_id) -> OrganizationDuplicateResponse

Duplicate object

find

GET /v2/prism/{teamId}/organization/by/{slug}/{value}

client.prism.objects.organizations.find(value, *, team_id, slug, **params) -> OrganizationFindResponse

Returns the single record whose property {slug} equals {value}. 404 if nothing matches; 409 if more than one record matches.

get

GET /v2/prism/{teamId}/organization/{organizationId}

client.prism.objects.organizations.get(organization_id, *, team_id, **params) -> OrganizationGetResponse

Get object

query

POST /v2/prism/{teamId}/organization/query

client.prism.objects.organizations.query(*, team_id, **params) -> OrganizationQueryResponse

Query

restore

POST /v2/prism/{teamId}/organization/{organizationId}/restore

client.prism.objects.organizations.restore(organization_id, *, team_id) -> OrganizationRestoreResponse

Restore object

upsert

PUT /v2/prism/{teamId}/organization/by/{slug}/{value}

client.prism.objects.organizations.upsert(value, *, team_id, slug, **params) -> OrganizationUpsertResponse

Idempotent create-or-update keyed on {slug}={value}. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead.

Parameter and response types

These declarations show the request parameters and response shapes used by the methods above.

OrganizationCreateParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
defaultDict[str, object]NoProperties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read.
listobjectNo
idempotency_keystrNoAPI name: Idempotency-Key.

OrganizationCreateResponse

Source

Object returned by reads (get/create/patch/restore). id is always present.

FieldTypeRequiredDescription
idstrYes
defaultOptional[Dict[str, object]]NoProperties keyed by property slug.
listOptional[object]No

OrganizationUpdateParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
defaultDict[str, object]NoProperties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read.
listobjectNo
idempotency_keystrNoAPI name: Idempotency-Key.
if_matchstrNoAPI name: If-Match.

OrganizationUpdateResponse

Source

Object returned by reads (get/create/patch/restore). id is always present.

FieldTypeRequiredDescription
idstrYes
defaultOptional[Dict[str, object]]NoProperties keyed by property slug.
listOptional[object]No

OrganizationListParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
cursorstrNoOpaque cursor from a previous response's next_cursor. Pass it back unchanged to fetch the next page.
deletedboolNoInclude soft-deleted records. Pass the literal string true.
include_totalboolNoWhen set to true, the response includes a total field with the unpaginated row count. Costs an extra pass; prefer GET .../count for the unfiltered total.
limitintNoMaximum number of rows to return. Capped server-side at 50.
list_idstrNoScope properties to a specific list/app.
selectstrNoComma-separated property slugs to return. Use dot notation for relationships. id is always returned at the top level. Defaults to all properties.
sortstrNoComma-separated list of slugs. Prefix with - for descending. Example: sort=-updated_at,name.

Data

Source

Row returned by the query endpoint. id is always present at the top level. Selected property values are returned under properties, keyed by property slug. Reference-typed values are returned as nested { id, properties } objects.

FieldTypeRequiredDescription
idstrYes
is_user_objectOptional[bool]No
propertiesOptional[Dict[str, object]]NoSelected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested { id, properties } objects.
sourceOptional[List[str]]No

OrganizationListResponse

Source

FieldTypeRequiredDescription
dataList[Data]Yes
has_moreboolYesAccurate end-of-data signal — false on the last page, never forces clients to overshoot.
next_cursorOptional[str]No
totalOptional[int]NoPopulated only when ?include_total=true was passed.

OrganizationBulkCreateParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
objectsRequired[Iterable[PrismObjectPropertiesParam]]YesArray of objects to import with property values keyed by slug
optionsOptionsNo
idempotency_keystrNoAPI name: Idempotency-Key.

Options

Source

FieldTypeRequiredDescription
case_insensitiveboolNoWhether deduplication should be case insensitive API name: caseInsensitive.
dedupe_bystrNoProperty slug to deduplicate on
list_idstrNoApp/CRM ID for context (optional)

Error

Source

Set when status=failed; describes the job-level failure (not per-row).

FieldTypeRequiredDescription
codeOptional[str]No
messageOptional[str]No

ResultError

Source

FieldTypeRequiredDescription
codeOptional[str]No
messageOptional[str]No

Result

Source

FieldTypeRequiredDescription
idOptional[str]No
createdOptional[bool]No
errorOptional[ResultError]No
existingOptional[bool]NoTrue if the row matched an existing record via the dedupe key.

OrganizationBulkCreateResponse

Source

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

FieldTypeRequiredDescription
job_idOptional[str]NoNull for sync imports (results inlined). Set for async imports.
statusLiteral["complete", "processing", "failed"]Yes
totalintYesTotal number of rows in the import.
created_atOptional[datetime]No
errorOptional[Error]NoSet when status=failed; describes the job-level failure (not per-row).
expires_atOptional[datetime]No
failedOptional[int]No
processedOptional[int]NoRows that have been attempted (succeeded + failed).
resultsOptional[List[Result]]NoPer-row outcomes. Always present for sync imports; populated for async imports once the job reaches complete.
succeededOptional[int]No
updated_atOptional[datetime]No

OrganizationBulkDeleteParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
idsRequired[SequenceNotStr[str]]Yes
idempotency_keystrNoAPI name: Idempotency-Key.

ResultRecord

Source

Object returned by reads (get/create/patch/restore). id is always present.

FieldTypeRequiredDescription
idstrYes
defaultOptional[Dict[str, object]]NoProperties keyed by property slug.
listOptional[object]No

Summary

Source

FieldTypeRequiredDescription
failedintYes
succeededintYes
totalintYes

OrganizationBulkDeleteResponse

Source

Partial-success bulk operation result. Inspect results[].status per item; the operation as a whole returns 200 even if some items failed.

FieldTypeRequiredDescription
resultsList[Result]Yes
summarySummaryYes

OrganizationBulkUpdateParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
itemsRequired[Iterable[Item]]Yes
idempotency_keystrNoAPI name: Idempotency-Key.
idRequired[str]Yes

OrganizationBulkUpdateResponse

Source

Partial-success bulk operation result. Inspect results[].status per item; the operation as a whole returns 200 even if some items failed.

FieldTypeRequiredDescription
resultsList[Result]Yes
summarySummaryYes

OrganizationCountParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
list_idstrNoScope the count to a specific list/app.

OrganizationCountResponse

Source

FieldTypeRequiredDescription
totalintYesNumber of records matching the access scope.

OrganizationDuplicateResponse

Source

Object returned by reads (get/create/patch/restore). id is always present.

FieldTypeRequiredDescription
idstrYes
defaultOptional[Dict[str, object]]NoProperties keyed by property slug.
listOptional[object]No

OrganizationFindParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
slugRequired[str]Yes
list_idstrNoScope the lookup to a specific list/app.

OrganizationFindResponse

Source

Object returned by reads (get/create/patch/restore). id is always present.

FieldTypeRequiredDescription
idstrYes
defaultOptional[Dict[str, object]]NoProperties keyed by property slug.
listOptional[object]No

OrganizationGetParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
selectstrNoComma-separated property slugs to return. Use dot notation for relationships. id is always returned at the top level. Defaults to all properties.

OrganizationGetResponse

Source

Object returned by reads (get/create/patch/restore). id is always present.

FieldTypeRequiredDescription
idstrYes
defaultOptional[Dict[str, object]]NoProperties keyed by property slug.
listOptional[object]No

OrganizationQueryParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
queryRequired[Query]Yes
idUnion[str, SequenceNotStr[str]]No
boxesSequenceNotStr[str]No
cursorstrNoAlternative location for the opaque cursor (a sibling of query). Use whichever feels more natural; if both are present, query.cursor wins.
deletedboolNo
include_totalboolNoWhen true, the response includes a total field with the unpaginated row count. Costs an additional pass over the result set — for unfiltered totals prefer GET /v2/prism/{teamId}/{objectType}/count instead.
sourcesSequenceNotStr[str]No

QueryFilterQueryFilterItemPrismQueryFilterEq

Source

FieldTypeRequiredDescription
api_emptyRequired[Annotated[Union[str, bool], PropertyInfo(alias="=")]]YesAPI name: =.

QueryFilterQueryFilterItemPrismQueryFilterNe

Source

FieldTypeRequiredDescription
api_emptyRequired[Annotated[Union[str, bool], PropertyInfo(alias="!=")]]YesAPI name: !=.

QueryFilterQueryFilterItemPrismQueryFilterLt

Source

FieldTypeRequiredDescription
api_emptyRequired[str]YesAPI name: <.

QueryFilterQueryFilterItemPrismQueryFilterGt

Source

FieldTypeRequiredDescription
api_emptyRequired[str]YesAPI name: >.

QueryFilterQueryFilterItemPrismQueryFilterLte

Source

FieldTypeRequiredDescription
api_emptyRequired[str]YesAPI name: <=.

QueryFilterQueryFilterItemPrismQueryFilterGte

Source

FieldTypeRequiredDescription
api_emptyRequired[str]YesAPI name: >=.

QueryFilterQueryFilterItemContains

Source

FieldTypeRequiredDescription
containsRequired[Union[str, bool, SequenceNotStr[str]]]Yes

QueryFilterQueryFilterItemBeginsWith

Source

FieldTypeRequiredDescription
begins_withRequired[str]Yes

QueryFilterQueryFilterItemEndsWith

Source

FieldTypeRequiredDescription
ends_withRequired[str]Yes

QueryFilterQueryFilterItemNotContains

Source

FieldTypeRequiredDescription
not_containsRequired[str]Yes

QueryFilterQueryFilterItemExists

Source

FieldTypeRequiredDescription
existsRequired[bool]Yes

QueryFilterQueryFilterItemNotExists

Source

FieldTypeRequiredDescription
not_existsRequired[bool]Yes

QueryFilterQueryFilterItemIsNull

Source

FieldTypeRequiredDescription
is_nullRequired[Union[str, bool, SequenceNotStr[str]]]Yes

QueryFilterQueryFilterItemIsNotNull

Source

FieldTypeRequiredDescription
is_not_nullRequired[Union[str, bool, SequenceNotStr[str]]]Yes

QueryFilterQueryFilterItemBetween

Source

FieldTypeRequiredDescription
betweenRequired[Union[str, bool, SequenceNotStr[str]]]Yes

QueryFilterQueryFilterItemIn

Source

class QueryFilterQueryFilterItemIn(_QueryFilterQueryFilterItemInReservedKeywords, total=False):

QueryFilterQueryFilterItemNotIn

Source

FieldTypeRequiredDescription
not_inRequired[SequenceNotStr[str]]Yes

QueryFilterQueryFilterItem

Source

QueryFilterQueryFilterItem = Union[

Query

Source

FieldTypeRequiredDescription
selectRequired[SequenceNotStr[str]]YesProperty slugs to select. Use dot notation for relationships (e.g. attendee.contact.first_name). id is always returned at the top level of each row and does not need to be selected.
combinatorLiteral["AND", "OR"]NoLogical operator for combining filters
cursorstrNoOpaque cursor from a previous response's next_cursor. Pass it back unchanged to fetch the next page. When set, page and limit are derived from the cursor and any explicit values are ignored.
filterIterable[Dict[str, QueryFilterQueryFilterItem]]NoFilters as [{ slug: { operator: value } }]. For select/multiselect properties, values may be option slugs or option UUIDs.
limitintNoMaximum number of rows to return. Capped server-side at 50; requests above the cap are rejected.
list_idstrNo
pageintNoPage number (1-based). Prefer cursor. Page-number pagination drifts under concurrent writes; use it only for one-shot exports.
sortIterable[Dict[str, Literal["asc", "desc"]]]NoSort order as [{ slug: direction }]. Array order determines sort priority

OrganizationQueryResponse

Source

FieldTypeRequiredDescription
dataList[Data]Yes
has_moreboolYesAccurate end-of-data signal. False when this page contains the last record; true only when at least one more record exists. (Implementation note: the server fetches one extra row internally to determine this — clients never need to overshoot to discover the end.)
next_cursorOptional[str]NoOpaque cursor pointing at the next page. Pass it back unchanged in the request body (cursor) of the next call. Null when has_more is false.
totalOptional[int]NoOnly populated when the request set include_total: true. Total number of records matching the query, ignoring pagination. Opt-in because it costs an additional pass over the result set.

OrganizationRestoreResponse

Source

Object returned by reads (get/create/patch/restore). id is always present.

FieldTypeRequiredDescription
idstrYes
defaultOptional[Dict[str, object]]NoProperties keyed by property slug.
listOptional[object]No

OrganizationUpsertParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
slugRequired[str]Yes
defaultDict[str, object]NoProperties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read.
listobjectNo
idempotency_keystrNoAPI name: Idempotency-Key.

OrganizationUpsertResponse

Source

Object returned by reads (get/create/patch/restore). id is always present.

FieldTypeRequiredDescription
idstrYes
defaultOptional[Dict[str, object]]NoProperties keyed by property slug.
listOptional[object]No

PrismObjectPropertiesParam

Source

FieldTypeRequiredDescription
defaultDict[str, object]NoProperties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read.
listobjectNo
micro.so