@iblai/iblai-api 4.261.1-core → 4.262.0-core

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/index.cjs.js +943 -123
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +941 -124
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +943 -123
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +16 -0
  8. package/dist/types/models/LifecycleStageEnum.d.ts +14 -0
  9. package/dist/types/models/Organization.d.ts +34 -0
  10. package/dist/types/models/PaginatedOrganizationList.d.ts +7 -0
  11. package/dist/types/models/PaginatedPersonList.d.ts +7 -0
  12. package/dist/types/models/PatchedOrganization.d.ts +34 -0
  13. package/dist/types/models/PatchedPerson.d.ts +73 -0
  14. package/dist/types/models/Person.d.ts +73 -0
  15. package/dist/types/models/PersonInviteConflict.d.ts +12 -0
  16. package/dist/types/models/PersonInviteRequest.d.ts +18 -0
  17. package/dist/types/models/PersonInviteResponse.d.ts +37 -0
  18. package/dist/types/models/PersonLinkUserRequest.d.ts +6 -0
  19. package/dist/types/models/PersonMergeRequest.d.ts +10 -0
  20. package/dist/types/models/PersonMergeResponse.d.ts +17 -0
  21. package/dist/types/services/CrmService.d.ts +222 -0
  22. package/dist/types/services/OrganizationsService.d.ts +83 -0
  23. package/dist/types/services/PersonsService.d.ts +142 -0
  24. package/package.json +1 -1
  25. package/sdk_schema.yml +1803 -1
  26. package/src/core/OpenAPI.ts +1 -1
  27. package/src/index.ts +16 -0
  28. package/src/models/LifecycleStageEnum.ts +18 -0
  29. package/src/models/Organization.ts +39 -0
  30. package/src/models/PaginatedOrganizationList.ts +12 -0
  31. package/src/models/PaginatedPersonList.ts +12 -0
  32. package/src/models/PatchedOrganization.ts +39 -0
  33. package/src/models/PatchedPerson.ts +78 -0
  34. package/src/models/Person.ts +78 -0
  35. package/src/models/PersonInviteConflict.ts +17 -0
  36. package/src/models/PersonInviteRequest.ts +23 -0
  37. package/src/models/PersonInviteResponse.ts +42 -0
  38. package/src/models/PersonLinkUserRequest.ts +11 -0
  39. package/src/models/PersonMergeRequest.ts +15 -0
  40. package/src/models/PersonMergeResponse.ts +22 -0
  41. package/src/services/CrmService.ts +481 -0
  42. package/src/services/OrganizationsService.ts +186 -0
  43. package/src/services/PersonsService.ts +304 -0
package/sdk_schema.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ibl-data-manager
4
- version: 4.261.1-core
4
+ version: 4.262.0-core
5
5
  description: API for iblai
6
6
  paths:
7
7
  /access-check/{item_type}/{item_id}/:
@@ -24791,6 +24791,679 @@ paths:
24791
24791
  schema:
24792
24792
  $ref: '#/components/schemas/Assertion'
24793
24793
  description: ''
24794
+ /api/crm/organizations/:
24795
+ get:
24796
+ operationId: crm_organizations_list
24797
+ description: |-
24798
+ Returns a paginated list of organizations in your Platform. Supports filtering by `owner` and by `name` (case-insensitive substring match).
24799
+
24800
+ **Required permission:** `Ibl.CRM/Organizations/list`.
24801
+ summary: List organizations
24802
+ parameters:
24803
+ - in: query
24804
+ name: name
24805
+ schema:
24806
+ type: string
24807
+ - in: query
24808
+ name: owner
24809
+ schema:
24810
+ type: number
24811
+ - name: page
24812
+ required: false
24813
+ in: query
24814
+ description: A page number within the paginated result set.
24815
+ schema:
24816
+ type: integer
24817
+ - name: page_size
24818
+ required: false
24819
+ in: query
24820
+ description: Number of results to return per page.
24821
+ schema:
24822
+ type: integer
24823
+ tags:
24824
+ - crm
24825
+ security:
24826
+ - PlatformApiKeyAuthentication: []
24827
+ responses:
24828
+ '200':
24829
+ content:
24830
+ application/json:
24831
+ schema:
24832
+ $ref: '#/components/schemas/PaginatedOrganizationList'
24833
+ description: ''
24834
+ '401':
24835
+ description: Authentication required.
24836
+ '403':
24837
+ description: Missing required permission `Ibl.CRM/Organizations/list`.
24838
+ post:
24839
+ operationId: crm_organizations_create
24840
+ description: |-
24841
+ Creates a new organization in your Platform. The Platform is inferred from your credentials. `name` must be unique within your Platform.
24842
+
24843
+ **Required permission:** `Ibl.CRM/Organizations/write`.
24844
+ summary: Create an organization
24845
+ tags:
24846
+ - crm
24847
+ requestBody:
24848
+ content:
24849
+ application/json:
24850
+ schema:
24851
+ $ref: '#/components/schemas/Organization'
24852
+ application/scim+json:
24853
+ schema:
24854
+ $ref: '#/components/schemas/Organization'
24855
+ application/x-www-form-urlencoded:
24856
+ schema:
24857
+ $ref: '#/components/schemas/Organization'
24858
+ multipart/form-data:
24859
+ schema:
24860
+ $ref: '#/components/schemas/Organization'
24861
+ '*/*':
24862
+ schema:
24863
+ $ref: '#/components/schemas/Organization'
24864
+ required: true
24865
+ security:
24866
+ - PlatformApiKeyAuthentication: []
24867
+ responses:
24868
+ '201':
24869
+ content:
24870
+ application/json:
24871
+ schema:
24872
+ $ref: '#/components/schemas/Organization'
24873
+ description: ''
24874
+ '400':
24875
+ description: Validation error (for example, duplicate name).
24876
+ '403':
24877
+ description: Missing required permission `Ibl.CRM/Organizations/write`.
24878
+ /api/crm/organizations/{id}/:
24879
+ get:
24880
+ operationId: crm_organizations_retrieve
24881
+ description: |-
24882
+ Returns a single organization by id.
24883
+
24884
+ **Required permission:** `Ibl.CRM/Organizations/read`.
24885
+ summary: Retrieve an organization
24886
+ parameters:
24887
+ - in: path
24888
+ name: id
24889
+ schema:
24890
+ type: string
24891
+ format: uuid
24892
+ description: Opaque UUID — used in API URLs and external references.
24893
+ required: true
24894
+ tags:
24895
+ - crm
24896
+ security:
24897
+ - PlatformApiKeyAuthentication: []
24898
+ responses:
24899
+ '200':
24900
+ content:
24901
+ application/json:
24902
+ schema:
24903
+ $ref: '#/components/schemas/Organization'
24904
+ description: ''
24905
+ '403':
24906
+ description: Missing required permission `Ibl.CRM/Organizations/read`.
24907
+ '404':
24908
+ description: Organization not found.
24909
+ put:
24910
+ operationId: crm_organizations_update
24911
+ description: |-
24912
+ Replaces all editable fields on the organization.
24913
+
24914
+ **Required permission:** `Ibl.CRM/Organizations/write`.
24915
+ summary: Replace an organization
24916
+ parameters:
24917
+ - in: path
24918
+ name: id
24919
+ schema:
24920
+ type: string
24921
+ format: uuid
24922
+ description: Opaque UUID — used in API URLs and external references.
24923
+ required: true
24924
+ tags:
24925
+ - crm
24926
+ requestBody:
24927
+ content:
24928
+ application/json:
24929
+ schema:
24930
+ $ref: '#/components/schemas/Organization'
24931
+ application/scim+json:
24932
+ schema:
24933
+ $ref: '#/components/schemas/Organization'
24934
+ application/x-www-form-urlencoded:
24935
+ schema:
24936
+ $ref: '#/components/schemas/Organization'
24937
+ multipart/form-data:
24938
+ schema:
24939
+ $ref: '#/components/schemas/Organization'
24940
+ '*/*':
24941
+ schema:
24942
+ $ref: '#/components/schemas/Organization'
24943
+ required: true
24944
+ security:
24945
+ - PlatformApiKeyAuthentication: []
24946
+ responses:
24947
+ '200':
24948
+ content:
24949
+ application/json:
24950
+ schema:
24951
+ $ref: '#/components/schemas/Organization'
24952
+ description: ''
24953
+ '400':
24954
+ description: Validation error.
24955
+ '403':
24956
+ description: Missing required permission `Ibl.CRM/Organizations/write`.
24957
+ '404':
24958
+ description: Organization not found.
24959
+ patch:
24960
+ operationId: crm_organizations_partial_update
24961
+ description: |-
24962
+ Updates only the supplied fields on the organization.
24963
+
24964
+ **Required permission:** `Ibl.CRM/Organizations/write`.
24965
+ summary: Update an organization
24966
+ parameters:
24967
+ - in: path
24968
+ name: id
24969
+ schema:
24970
+ type: string
24971
+ format: uuid
24972
+ description: Opaque UUID — used in API URLs and external references.
24973
+ required: true
24974
+ tags:
24975
+ - crm
24976
+ requestBody:
24977
+ content:
24978
+ application/json:
24979
+ schema:
24980
+ $ref: '#/components/schemas/PatchedOrganization'
24981
+ application/scim+json:
24982
+ schema:
24983
+ $ref: '#/components/schemas/PatchedOrganization'
24984
+ application/x-www-form-urlencoded:
24985
+ schema:
24986
+ $ref: '#/components/schemas/PatchedOrganization'
24987
+ multipart/form-data:
24988
+ schema:
24989
+ $ref: '#/components/schemas/PatchedOrganization'
24990
+ '*/*':
24991
+ schema:
24992
+ $ref: '#/components/schemas/PatchedOrganization'
24993
+ security:
24994
+ - PlatformApiKeyAuthentication: []
24995
+ responses:
24996
+ '200':
24997
+ content:
24998
+ application/json:
24999
+ schema:
25000
+ $ref: '#/components/schemas/Organization'
25001
+ description: ''
25002
+ '400':
25003
+ description: Validation error.
25004
+ '403':
25005
+ description: Missing required permission `Ibl.CRM/Organizations/write`.
25006
+ '404':
25007
+ description: Organization not found.
25008
+ delete:
25009
+ operationId: crm_organizations_destroy
25010
+ description: |-
25011
+ Deletes the organization. Any persons linked to it are kept; their organization reference is cleared.
25012
+
25013
+ **Required permission:** `Ibl.CRM/Organizations/delete`.
25014
+ summary: Delete an organization
25015
+ parameters:
25016
+ - in: path
25017
+ name: id
25018
+ schema:
25019
+ type: string
25020
+ format: uuid
25021
+ description: Opaque UUID — used in API URLs and external references.
25022
+ required: true
25023
+ tags:
25024
+ - crm
25025
+ security:
25026
+ - PlatformApiKeyAuthentication: []
25027
+ responses:
25028
+ '204':
25029
+ description: Deleted.
25030
+ '403':
25031
+ description: Missing required permission `Ibl.CRM/Organizations/delete`.
25032
+ '404':
25033
+ description: Organization not found.
25034
+ /api/crm/persons/:
25035
+ get:
25036
+ operationId: crm_persons_list
25037
+ description: |-
25038
+ Returns a paginated list of persons in your Platform. Supports filtering by `lifecycle_stage`, `owner`, `organization`, `created_at__gte`/`created_at__lte`, and `metadata__has_key`.
25039
+
25040
+ **Required permission:** `Ibl.CRM/Persons/list`.
25041
+ summary: List persons
25042
+ parameters:
25043
+ - in: query
25044
+ name: created_at__gte
25045
+ schema:
25046
+ type: string
25047
+ format: date-time
25048
+ - in: query
25049
+ name: created_at__lte
25050
+ schema:
25051
+ type: string
25052
+ format: date-time
25053
+ - in: query
25054
+ name: lifecycle_stage
25055
+ schema:
25056
+ type: string
25057
+ enum:
25058
+ - churned
25059
+ - customer
25060
+ - lead
25061
+ - opportunity
25062
+ - qualified
25063
+ description: |-
25064
+ Funnel position. Free-form transitions in v0.
25065
+
25066
+ * `lead` - Lead
25067
+ * `qualified` - Qualified
25068
+ * `opportunity` - Opportunity
25069
+ * `customer` - Customer
25070
+ * `churned` - Churned
25071
+ - in: query
25072
+ name: metadata__has_key
25073
+ schema:
25074
+ type: string
25075
+ - in: query
25076
+ name: organization
25077
+ schema:
25078
+ type: string
25079
+ format: uuid
25080
+ - in: query
25081
+ name: owner
25082
+ schema:
25083
+ type: number
25084
+ - name: page
25085
+ required: false
25086
+ in: query
25087
+ description: A page number within the paginated result set.
25088
+ schema:
25089
+ type: integer
25090
+ - name: page_size
25091
+ required: false
25092
+ in: query
25093
+ description: Number of results to return per page.
25094
+ schema:
25095
+ type: integer
25096
+ tags:
25097
+ - crm
25098
+ security:
25099
+ - PlatformApiKeyAuthentication: []
25100
+ responses:
25101
+ '200':
25102
+ content:
25103
+ application/json:
25104
+ schema:
25105
+ $ref: '#/components/schemas/PaginatedPersonList'
25106
+ description: ''
25107
+ '401':
25108
+ description: Authentication required.
25109
+ '403':
25110
+ description: Missing required permission `Ibl.CRM/Persons/list`.
25111
+ post:
25112
+ operationId: crm_persons_create
25113
+ description: |-
25114
+ Creates a new person in your Platform. The Platform is inferred from your credentials. If `organization` is supplied, it must reference an organization in your Platform.
25115
+
25116
+ **Required permission:** `Ibl.CRM/Persons/write`.
25117
+ summary: Create a person
25118
+ tags:
25119
+ - crm
25120
+ requestBody:
25121
+ content:
25122
+ application/json:
25123
+ schema:
25124
+ $ref: '#/components/schemas/Person'
25125
+ application/scim+json:
25126
+ schema:
25127
+ $ref: '#/components/schemas/Person'
25128
+ application/x-www-form-urlencoded:
25129
+ schema:
25130
+ $ref: '#/components/schemas/Person'
25131
+ multipart/form-data:
25132
+ schema:
25133
+ $ref: '#/components/schemas/Person'
25134
+ '*/*':
25135
+ schema:
25136
+ $ref: '#/components/schemas/Person'
25137
+ required: true
25138
+ security:
25139
+ - PlatformApiKeyAuthentication: []
25140
+ responses:
25141
+ '201':
25142
+ content:
25143
+ application/json:
25144
+ schema:
25145
+ $ref: '#/components/schemas/Person'
25146
+ description: ''
25147
+ '400':
25148
+ description: Validation error.
25149
+ '403':
25150
+ description: Missing required permission `Ibl.CRM/Persons/write`.
25151
+ /api/crm/persons/{id}/:
25152
+ get:
25153
+ operationId: crm_persons_retrieve
25154
+ description: |-
25155
+ Returns a single person by id.
25156
+
25157
+ **Required permission:** `Ibl.CRM/Persons/read`.
25158
+ summary: Retrieve a person
25159
+ parameters:
25160
+ - in: path
25161
+ name: id
25162
+ schema:
25163
+ type: string
25164
+ format: uuid
25165
+ description: Opaque UUID — used in API URLs and external references.
25166
+ required: true
25167
+ tags:
25168
+ - crm
25169
+ security:
25170
+ - PlatformApiKeyAuthentication: []
25171
+ responses:
25172
+ '200':
25173
+ content:
25174
+ application/json:
25175
+ schema:
25176
+ $ref: '#/components/schemas/Person'
25177
+ description: ''
25178
+ '403':
25179
+ description: Missing required permission `Ibl.CRM/Persons/read`.
25180
+ '404':
25181
+ description: Person not found.
25182
+ put:
25183
+ operationId: crm_persons_update
25184
+ description: |-
25185
+ Replaces all editable fields on the person.
25186
+
25187
+ **Required permission:** `Ibl.CRM/Persons/write`.
25188
+ summary: Replace a person
25189
+ parameters:
25190
+ - in: path
25191
+ name: id
25192
+ schema:
25193
+ type: string
25194
+ format: uuid
25195
+ description: Opaque UUID — used in API URLs and external references.
25196
+ required: true
25197
+ tags:
25198
+ - crm
25199
+ requestBody:
25200
+ content:
25201
+ application/json:
25202
+ schema:
25203
+ $ref: '#/components/schemas/Person'
25204
+ application/scim+json:
25205
+ schema:
25206
+ $ref: '#/components/schemas/Person'
25207
+ application/x-www-form-urlencoded:
25208
+ schema:
25209
+ $ref: '#/components/schemas/Person'
25210
+ multipart/form-data:
25211
+ schema:
25212
+ $ref: '#/components/schemas/Person'
25213
+ '*/*':
25214
+ schema:
25215
+ $ref: '#/components/schemas/Person'
25216
+ required: true
25217
+ security:
25218
+ - PlatformApiKeyAuthentication: []
25219
+ responses:
25220
+ '200':
25221
+ content:
25222
+ application/json:
25223
+ schema:
25224
+ $ref: '#/components/schemas/Person'
25225
+ description: ''
25226
+ '400':
25227
+ description: Validation error.
25228
+ '403':
25229
+ description: Missing required permission `Ibl.CRM/Persons/write`.
25230
+ '404':
25231
+ description: Person not found.
25232
+ patch:
25233
+ operationId: crm_persons_partial_update
25234
+ description: |-
25235
+ Updates only the supplied fields on the person.
25236
+
25237
+ **Required permission:** `Ibl.CRM/Persons/write`.
25238
+ summary: Update a person
25239
+ parameters:
25240
+ - in: path
25241
+ name: id
25242
+ schema:
25243
+ type: string
25244
+ format: uuid
25245
+ description: Opaque UUID — used in API URLs and external references.
25246
+ required: true
25247
+ tags:
25248
+ - crm
25249
+ requestBody:
25250
+ content:
25251
+ application/json:
25252
+ schema:
25253
+ $ref: '#/components/schemas/PatchedPerson'
25254
+ application/scim+json:
25255
+ schema:
25256
+ $ref: '#/components/schemas/PatchedPerson'
25257
+ application/x-www-form-urlencoded:
25258
+ schema:
25259
+ $ref: '#/components/schemas/PatchedPerson'
25260
+ multipart/form-data:
25261
+ schema:
25262
+ $ref: '#/components/schemas/PatchedPerson'
25263
+ '*/*':
25264
+ schema:
25265
+ $ref: '#/components/schemas/PatchedPerson'
25266
+ security:
25267
+ - PlatformApiKeyAuthentication: []
25268
+ responses:
25269
+ '200':
25270
+ content:
25271
+ application/json:
25272
+ schema:
25273
+ $ref: '#/components/schemas/Person'
25274
+ description: ''
25275
+ '400':
25276
+ description: Validation error.
25277
+ '403':
25278
+ description: Missing required permission `Ibl.CRM/Persons/write`.
25279
+ '404':
25280
+ description: Person not found.
25281
+ delete:
25282
+ operationId: crm_persons_destroy
25283
+ description: |-
25284
+ Deletes the person.
25285
+
25286
+ **Required permission:** `Ibl.CRM/Persons/delete`.
25287
+ summary: Delete a person
25288
+ parameters:
25289
+ - in: path
25290
+ name: id
25291
+ schema:
25292
+ type: string
25293
+ format: uuid
25294
+ description: Opaque UUID — used in API URLs and external references.
25295
+ required: true
25296
+ tags:
25297
+ - crm
25298
+ security:
25299
+ - PlatformApiKeyAuthentication: []
25300
+ responses:
25301
+ '204':
25302
+ description: Deleted.
25303
+ '403':
25304
+ description: Missing required permission `Ibl.CRM/Persons/delete`.
25305
+ '404':
25306
+ description: Person not found.
25307
+ /api/crm/persons/{id}/invite/:
25308
+ post:
25309
+ operationId: crm_persons_invite_create
25310
+ description: |-
25311
+ Sends a platform invitation to the person's `primary_email`. On acceptance, the invitee joins your Platform with the privileges configured in the request body.
25312
+
25313
+ Returns `409 Conflict` if an active invitation already exists for this email in your Platform, and `422 Unprocessable Entity` if the person is already linked to a platform user.
25314
+
25315
+ **Required permission:** `Ibl.CRM/Invite/action`.
25316
+ summary: Invite a person to the platform
25317
+ parameters:
25318
+ - in: path
25319
+ name: id
25320
+ schema:
25321
+ type: string
25322
+ format: uuid
25323
+ description: Opaque UUID — used in API URLs and external references.
25324
+ required: true
25325
+ tags:
25326
+ - crm
25327
+ requestBody:
25328
+ content:
25329
+ application/json:
25330
+ schema:
25331
+ $ref: '#/components/schemas/PersonInviteRequest'
25332
+ application/scim+json:
25333
+ schema:
25334
+ $ref: '#/components/schemas/PersonInviteRequest'
25335
+ application/x-www-form-urlencoded:
25336
+ schema:
25337
+ $ref: '#/components/schemas/PersonInviteRequest'
25338
+ multipart/form-data:
25339
+ schema:
25340
+ $ref: '#/components/schemas/PersonInviteRequest'
25341
+ '*/*':
25342
+ schema:
25343
+ $ref: '#/components/schemas/PersonInviteRequest'
25344
+ security:
25345
+ - PlatformApiKeyAuthentication: []
25346
+ responses:
25347
+ '201':
25348
+ content:
25349
+ application/json:
25350
+ schema:
25351
+ $ref: '#/components/schemas/PersonInviteResponse'
25352
+ description: ''
25353
+ '400':
25354
+ description: Person has no `primary_email`; cannot invite.
25355
+ '403':
25356
+ description: Missing required permission `Ibl.CRM/Invite/action`.
25357
+ '404':
25358
+ description: Person not found.
25359
+ '409':
25360
+ content:
25361
+ application/json:
25362
+ schema:
25363
+ $ref: '#/components/schemas/PersonInviteConflict'
25364
+ description: ''
25365
+ '422':
25366
+ description: Person is already linked to a platform user.
25367
+ /api/crm/persons/{id}/link-user/:
25368
+ post:
25369
+ operationId: crm_persons_link_user_create
25370
+ description: |-
25371
+ Links this person to an existing platform user. The target user must already be a member of your Platform — if they are not, send them an invitation via `POST /persons/{id}/invite/` instead.
25372
+
25373
+ This call is idempotent: linking a person that is already bound to the same user is a no-op. Re-linking a person that is already bound to a *different* user is refused; the existing binding is preserved and the unchanged person is returned.
25374
+
25375
+ **Required permission:** `Ibl.CRM/Persons/write`.
25376
+ summary: Bind a person to an existing platform user
25377
+ parameters:
25378
+ - in: path
25379
+ name: id
25380
+ schema:
25381
+ type: string
25382
+ format: uuid
25383
+ description: Opaque UUID — used in API URLs and external references.
25384
+ required: true
25385
+ tags:
25386
+ - crm
25387
+ requestBody:
25388
+ content:
25389
+ application/json:
25390
+ schema:
25391
+ $ref: '#/components/schemas/PersonLinkUserRequest'
25392
+ application/scim+json:
25393
+ schema:
25394
+ $ref: '#/components/schemas/PersonLinkUserRequest'
25395
+ application/x-www-form-urlencoded:
25396
+ schema:
25397
+ $ref: '#/components/schemas/PersonLinkUserRequest'
25398
+ multipart/form-data:
25399
+ schema:
25400
+ $ref: '#/components/schemas/PersonLinkUserRequest'
25401
+ '*/*':
25402
+ schema:
25403
+ $ref: '#/components/schemas/PersonLinkUserRequest'
25404
+ required: true
25405
+ security:
25406
+ - PlatformApiKeyAuthentication: []
25407
+ responses:
25408
+ '200':
25409
+ content:
25410
+ application/json:
25411
+ schema:
25412
+ $ref: '#/components/schemas/Person'
25413
+ description: ''
25414
+ '400':
25415
+ description: Validation error.
25416
+ '403':
25417
+ description: Missing required permission `Ibl.CRM/Persons/write`, or the
25418
+ target user is not a member of your Platform.
25419
+ '404':
25420
+ description: Person or user not found.
25421
+ /api/crm/persons/merge/:
25422
+ post:
25423
+ operationId: crm_persons_merge_create
25424
+ description: |-
25425
+ Marks each person in `duplicate_ids` as inactive and reports how many related records (deals, activities, tags) were re-parented onto `primary_id`.
25426
+
25427
+ All ids — both the primary and every duplicate — must belong to your Platform. `primary_id` may not appear in `duplicate_ids`.
25428
+
25429
+ **Required permission:** `Ibl.CRM/Persons/write`.
25430
+ summary: Merge duplicate persons into a primary
25431
+ tags:
25432
+ - crm
25433
+ requestBody:
25434
+ content:
25435
+ application/json:
25436
+ schema:
25437
+ $ref: '#/components/schemas/PersonMergeRequest'
25438
+ application/scim+json:
25439
+ schema:
25440
+ $ref: '#/components/schemas/PersonMergeRequest'
25441
+ application/x-www-form-urlencoded:
25442
+ schema:
25443
+ $ref: '#/components/schemas/PersonMergeRequest'
25444
+ multipart/form-data:
25445
+ schema:
25446
+ $ref: '#/components/schemas/PersonMergeRequest'
25447
+ '*/*':
25448
+ schema:
25449
+ $ref: '#/components/schemas/PersonMergeRequest'
25450
+ required: true
25451
+ security:
25452
+ - PlatformApiKeyAuthentication: []
25453
+ responses:
25454
+ '200':
25455
+ content:
25456
+ application/json:
25457
+ schema:
25458
+ $ref: '#/components/schemas/PersonMergeResponse'
25459
+ description: ''
25460
+ '400':
25461
+ description: 'Validation error: the primary appears in duplicates, or one
25462
+ or more ids belong to another Platform.'
25463
+ '403':
25464
+ description: Missing required permission `Ibl.CRM/Persons/write`.
25465
+ '404':
25466
+ description: Primary person not found.
24794
25467
  /api/custom-domains/:
24795
25468
  get:
24796
25469
  operationId: custom_domains_retrieve
@@ -36355,6 +37028,679 @@ paths:
36355
37028
  schema:
36356
37029
  $ref: '#/components/schemas/PublicItemPricing'
36357
37030
  description: ''
37031
+ /organizations/:
37032
+ get:
37033
+ operationId: organizations_list
37034
+ description: |-
37035
+ Returns a paginated list of organizations in your Platform. Supports filtering by `owner` and by `name` (case-insensitive substring match).
37036
+
37037
+ **Required permission:** `Ibl.CRM/Organizations/list`.
37038
+ summary: List organizations
37039
+ parameters:
37040
+ - in: query
37041
+ name: name
37042
+ schema:
37043
+ type: string
37044
+ - in: query
37045
+ name: owner
37046
+ schema:
37047
+ type: number
37048
+ - name: page
37049
+ required: false
37050
+ in: query
37051
+ description: A page number within the paginated result set.
37052
+ schema:
37053
+ type: integer
37054
+ - name: page_size
37055
+ required: false
37056
+ in: query
37057
+ description: Number of results to return per page.
37058
+ schema:
37059
+ type: integer
37060
+ tags:
37061
+ - organizations
37062
+ security:
37063
+ - PlatformApiKeyAuthentication: []
37064
+ responses:
37065
+ '200':
37066
+ content:
37067
+ application/json:
37068
+ schema:
37069
+ $ref: '#/components/schemas/PaginatedOrganizationList'
37070
+ description: ''
37071
+ '401':
37072
+ description: Authentication required.
37073
+ '403':
37074
+ description: Missing required permission `Ibl.CRM/Organizations/list`.
37075
+ post:
37076
+ operationId: organizations_create
37077
+ description: |-
37078
+ Creates a new organization in your Platform. The Platform is inferred from your credentials. `name` must be unique within your Platform.
37079
+
37080
+ **Required permission:** `Ibl.CRM/Organizations/write`.
37081
+ summary: Create an organization
37082
+ tags:
37083
+ - organizations
37084
+ requestBody:
37085
+ content:
37086
+ application/json:
37087
+ schema:
37088
+ $ref: '#/components/schemas/Organization'
37089
+ application/scim+json:
37090
+ schema:
37091
+ $ref: '#/components/schemas/Organization'
37092
+ application/x-www-form-urlencoded:
37093
+ schema:
37094
+ $ref: '#/components/schemas/Organization'
37095
+ multipart/form-data:
37096
+ schema:
37097
+ $ref: '#/components/schemas/Organization'
37098
+ '*/*':
37099
+ schema:
37100
+ $ref: '#/components/schemas/Organization'
37101
+ required: true
37102
+ security:
37103
+ - PlatformApiKeyAuthentication: []
37104
+ responses:
37105
+ '201':
37106
+ content:
37107
+ application/json:
37108
+ schema:
37109
+ $ref: '#/components/schemas/Organization'
37110
+ description: ''
37111
+ '400':
37112
+ description: Validation error (for example, duplicate name).
37113
+ '403':
37114
+ description: Missing required permission `Ibl.CRM/Organizations/write`.
37115
+ /organizations/{id}/:
37116
+ get:
37117
+ operationId: organizations_retrieve
37118
+ description: |-
37119
+ Returns a single organization by id.
37120
+
37121
+ **Required permission:** `Ibl.CRM/Organizations/read`.
37122
+ summary: Retrieve an organization
37123
+ parameters:
37124
+ - in: path
37125
+ name: id
37126
+ schema:
37127
+ type: string
37128
+ format: uuid
37129
+ description: Opaque UUID — used in API URLs and external references.
37130
+ required: true
37131
+ tags:
37132
+ - organizations
37133
+ security:
37134
+ - PlatformApiKeyAuthentication: []
37135
+ responses:
37136
+ '200':
37137
+ content:
37138
+ application/json:
37139
+ schema:
37140
+ $ref: '#/components/schemas/Organization'
37141
+ description: ''
37142
+ '403':
37143
+ description: Missing required permission `Ibl.CRM/Organizations/read`.
37144
+ '404':
37145
+ description: Organization not found.
37146
+ put:
37147
+ operationId: organizations_update
37148
+ description: |-
37149
+ Replaces all editable fields on the organization.
37150
+
37151
+ **Required permission:** `Ibl.CRM/Organizations/write`.
37152
+ summary: Replace an organization
37153
+ parameters:
37154
+ - in: path
37155
+ name: id
37156
+ schema:
37157
+ type: string
37158
+ format: uuid
37159
+ description: Opaque UUID — used in API URLs and external references.
37160
+ required: true
37161
+ tags:
37162
+ - organizations
37163
+ requestBody:
37164
+ content:
37165
+ application/json:
37166
+ schema:
37167
+ $ref: '#/components/schemas/Organization'
37168
+ application/scim+json:
37169
+ schema:
37170
+ $ref: '#/components/schemas/Organization'
37171
+ application/x-www-form-urlencoded:
37172
+ schema:
37173
+ $ref: '#/components/schemas/Organization'
37174
+ multipart/form-data:
37175
+ schema:
37176
+ $ref: '#/components/schemas/Organization'
37177
+ '*/*':
37178
+ schema:
37179
+ $ref: '#/components/schemas/Organization'
37180
+ required: true
37181
+ security:
37182
+ - PlatformApiKeyAuthentication: []
37183
+ responses:
37184
+ '200':
37185
+ content:
37186
+ application/json:
37187
+ schema:
37188
+ $ref: '#/components/schemas/Organization'
37189
+ description: ''
37190
+ '400':
37191
+ description: Validation error.
37192
+ '403':
37193
+ description: Missing required permission `Ibl.CRM/Organizations/write`.
37194
+ '404':
37195
+ description: Organization not found.
37196
+ patch:
37197
+ operationId: organizations_partial_update
37198
+ description: |-
37199
+ Updates only the supplied fields on the organization.
37200
+
37201
+ **Required permission:** `Ibl.CRM/Organizations/write`.
37202
+ summary: Update an organization
37203
+ parameters:
37204
+ - in: path
37205
+ name: id
37206
+ schema:
37207
+ type: string
37208
+ format: uuid
37209
+ description: Opaque UUID — used in API URLs and external references.
37210
+ required: true
37211
+ tags:
37212
+ - organizations
37213
+ requestBody:
37214
+ content:
37215
+ application/json:
37216
+ schema:
37217
+ $ref: '#/components/schemas/PatchedOrganization'
37218
+ application/scim+json:
37219
+ schema:
37220
+ $ref: '#/components/schemas/PatchedOrganization'
37221
+ application/x-www-form-urlencoded:
37222
+ schema:
37223
+ $ref: '#/components/schemas/PatchedOrganization'
37224
+ multipart/form-data:
37225
+ schema:
37226
+ $ref: '#/components/schemas/PatchedOrganization'
37227
+ '*/*':
37228
+ schema:
37229
+ $ref: '#/components/schemas/PatchedOrganization'
37230
+ security:
37231
+ - PlatformApiKeyAuthentication: []
37232
+ responses:
37233
+ '200':
37234
+ content:
37235
+ application/json:
37236
+ schema:
37237
+ $ref: '#/components/schemas/Organization'
37238
+ description: ''
37239
+ '400':
37240
+ description: Validation error.
37241
+ '403':
37242
+ description: Missing required permission `Ibl.CRM/Organizations/write`.
37243
+ '404':
37244
+ description: Organization not found.
37245
+ delete:
37246
+ operationId: organizations_destroy
37247
+ description: |-
37248
+ Deletes the organization. Any persons linked to it are kept; their organization reference is cleared.
37249
+
37250
+ **Required permission:** `Ibl.CRM/Organizations/delete`.
37251
+ summary: Delete an organization
37252
+ parameters:
37253
+ - in: path
37254
+ name: id
37255
+ schema:
37256
+ type: string
37257
+ format: uuid
37258
+ description: Opaque UUID — used in API URLs and external references.
37259
+ required: true
37260
+ tags:
37261
+ - organizations
37262
+ security:
37263
+ - PlatformApiKeyAuthentication: []
37264
+ responses:
37265
+ '204':
37266
+ description: Deleted.
37267
+ '403':
37268
+ description: Missing required permission `Ibl.CRM/Organizations/delete`.
37269
+ '404':
37270
+ description: Organization not found.
37271
+ /persons/:
37272
+ get:
37273
+ operationId: persons_list
37274
+ description: |-
37275
+ Returns a paginated list of persons in your Platform. Supports filtering by `lifecycle_stage`, `owner`, `organization`, `created_at__gte`/`created_at__lte`, and `metadata__has_key`.
37276
+
37277
+ **Required permission:** `Ibl.CRM/Persons/list`.
37278
+ summary: List persons
37279
+ parameters:
37280
+ - in: query
37281
+ name: created_at__gte
37282
+ schema:
37283
+ type: string
37284
+ format: date-time
37285
+ - in: query
37286
+ name: created_at__lte
37287
+ schema:
37288
+ type: string
37289
+ format: date-time
37290
+ - in: query
37291
+ name: lifecycle_stage
37292
+ schema:
37293
+ type: string
37294
+ enum:
37295
+ - churned
37296
+ - customer
37297
+ - lead
37298
+ - opportunity
37299
+ - qualified
37300
+ description: |-
37301
+ Funnel position. Free-form transitions in v0.
37302
+
37303
+ * `lead` - Lead
37304
+ * `qualified` - Qualified
37305
+ * `opportunity` - Opportunity
37306
+ * `customer` - Customer
37307
+ * `churned` - Churned
37308
+ - in: query
37309
+ name: metadata__has_key
37310
+ schema:
37311
+ type: string
37312
+ - in: query
37313
+ name: organization
37314
+ schema:
37315
+ type: string
37316
+ format: uuid
37317
+ - in: query
37318
+ name: owner
37319
+ schema:
37320
+ type: number
37321
+ - name: page
37322
+ required: false
37323
+ in: query
37324
+ description: A page number within the paginated result set.
37325
+ schema:
37326
+ type: integer
37327
+ - name: page_size
37328
+ required: false
37329
+ in: query
37330
+ description: Number of results to return per page.
37331
+ schema:
37332
+ type: integer
37333
+ tags:
37334
+ - persons
37335
+ security:
37336
+ - PlatformApiKeyAuthentication: []
37337
+ responses:
37338
+ '200':
37339
+ content:
37340
+ application/json:
37341
+ schema:
37342
+ $ref: '#/components/schemas/PaginatedPersonList'
37343
+ description: ''
37344
+ '401':
37345
+ description: Authentication required.
37346
+ '403':
37347
+ description: Missing required permission `Ibl.CRM/Persons/list`.
37348
+ post:
37349
+ operationId: persons_create
37350
+ description: |-
37351
+ Creates a new person in your Platform. The Platform is inferred from your credentials. If `organization` is supplied, it must reference an organization in your Platform.
37352
+
37353
+ **Required permission:** `Ibl.CRM/Persons/write`.
37354
+ summary: Create a person
37355
+ tags:
37356
+ - persons
37357
+ requestBody:
37358
+ content:
37359
+ application/json:
37360
+ schema:
37361
+ $ref: '#/components/schemas/Person'
37362
+ application/scim+json:
37363
+ schema:
37364
+ $ref: '#/components/schemas/Person'
37365
+ application/x-www-form-urlencoded:
37366
+ schema:
37367
+ $ref: '#/components/schemas/Person'
37368
+ multipart/form-data:
37369
+ schema:
37370
+ $ref: '#/components/schemas/Person'
37371
+ '*/*':
37372
+ schema:
37373
+ $ref: '#/components/schemas/Person'
37374
+ required: true
37375
+ security:
37376
+ - PlatformApiKeyAuthentication: []
37377
+ responses:
37378
+ '201':
37379
+ content:
37380
+ application/json:
37381
+ schema:
37382
+ $ref: '#/components/schemas/Person'
37383
+ description: ''
37384
+ '400':
37385
+ description: Validation error.
37386
+ '403':
37387
+ description: Missing required permission `Ibl.CRM/Persons/write`.
37388
+ /persons/{id}/:
37389
+ get:
37390
+ operationId: persons_retrieve
37391
+ description: |-
37392
+ Returns a single person by id.
37393
+
37394
+ **Required permission:** `Ibl.CRM/Persons/read`.
37395
+ summary: Retrieve a person
37396
+ parameters:
37397
+ - in: path
37398
+ name: id
37399
+ schema:
37400
+ type: string
37401
+ format: uuid
37402
+ description: Opaque UUID — used in API URLs and external references.
37403
+ required: true
37404
+ tags:
37405
+ - persons
37406
+ security:
37407
+ - PlatformApiKeyAuthentication: []
37408
+ responses:
37409
+ '200':
37410
+ content:
37411
+ application/json:
37412
+ schema:
37413
+ $ref: '#/components/schemas/Person'
37414
+ description: ''
37415
+ '403':
37416
+ description: Missing required permission `Ibl.CRM/Persons/read`.
37417
+ '404':
37418
+ description: Person not found.
37419
+ put:
37420
+ operationId: persons_update
37421
+ description: |-
37422
+ Replaces all editable fields on the person.
37423
+
37424
+ **Required permission:** `Ibl.CRM/Persons/write`.
37425
+ summary: Replace a person
37426
+ parameters:
37427
+ - in: path
37428
+ name: id
37429
+ schema:
37430
+ type: string
37431
+ format: uuid
37432
+ description: Opaque UUID — used in API URLs and external references.
37433
+ required: true
37434
+ tags:
37435
+ - persons
37436
+ requestBody:
37437
+ content:
37438
+ application/json:
37439
+ schema:
37440
+ $ref: '#/components/schemas/Person'
37441
+ application/scim+json:
37442
+ schema:
37443
+ $ref: '#/components/schemas/Person'
37444
+ application/x-www-form-urlencoded:
37445
+ schema:
37446
+ $ref: '#/components/schemas/Person'
37447
+ multipart/form-data:
37448
+ schema:
37449
+ $ref: '#/components/schemas/Person'
37450
+ '*/*':
37451
+ schema:
37452
+ $ref: '#/components/schemas/Person'
37453
+ required: true
37454
+ security:
37455
+ - PlatformApiKeyAuthentication: []
37456
+ responses:
37457
+ '200':
37458
+ content:
37459
+ application/json:
37460
+ schema:
37461
+ $ref: '#/components/schemas/Person'
37462
+ description: ''
37463
+ '400':
37464
+ description: Validation error.
37465
+ '403':
37466
+ description: Missing required permission `Ibl.CRM/Persons/write`.
37467
+ '404':
37468
+ description: Person not found.
37469
+ patch:
37470
+ operationId: persons_partial_update
37471
+ description: |-
37472
+ Updates only the supplied fields on the person.
37473
+
37474
+ **Required permission:** `Ibl.CRM/Persons/write`.
37475
+ summary: Update a person
37476
+ parameters:
37477
+ - in: path
37478
+ name: id
37479
+ schema:
37480
+ type: string
37481
+ format: uuid
37482
+ description: Opaque UUID — used in API URLs and external references.
37483
+ required: true
37484
+ tags:
37485
+ - persons
37486
+ requestBody:
37487
+ content:
37488
+ application/json:
37489
+ schema:
37490
+ $ref: '#/components/schemas/PatchedPerson'
37491
+ application/scim+json:
37492
+ schema:
37493
+ $ref: '#/components/schemas/PatchedPerson'
37494
+ application/x-www-form-urlencoded:
37495
+ schema:
37496
+ $ref: '#/components/schemas/PatchedPerson'
37497
+ multipart/form-data:
37498
+ schema:
37499
+ $ref: '#/components/schemas/PatchedPerson'
37500
+ '*/*':
37501
+ schema:
37502
+ $ref: '#/components/schemas/PatchedPerson'
37503
+ security:
37504
+ - PlatformApiKeyAuthentication: []
37505
+ responses:
37506
+ '200':
37507
+ content:
37508
+ application/json:
37509
+ schema:
37510
+ $ref: '#/components/schemas/Person'
37511
+ description: ''
37512
+ '400':
37513
+ description: Validation error.
37514
+ '403':
37515
+ description: Missing required permission `Ibl.CRM/Persons/write`.
37516
+ '404':
37517
+ description: Person not found.
37518
+ delete:
37519
+ operationId: persons_destroy
37520
+ description: |-
37521
+ Deletes the person.
37522
+
37523
+ **Required permission:** `Ibl.CRM/Persons/delete`.
37524
+ summary: Delete a person
37525
+ parameters:
37526
+ - in: path
37527
+ name: id
37528
+ schema:
37529
+ type: string
37530
+ format: uuid
37531
+ description: Opaque UUID — used in API URLs and external references.
37532
+ required: true
37533
+ tags:
37534
+ - persons
37535
+ security:
37536
+ - PlatformApiKeyAuthentication: []
37537
+ responses:
37538
+ '204':
37539
+ description: Deleted.
37540
+ '403':
37541
+ description: Missing required permission `Ibl.CRM/Persons/delete`.
37542
+ '404':
37543
+ description: Person not found.
37544
+ /persons/{id}/invite/:
37545
+ post:
37546
+ operationId: persons_invite_create
37547
+ description: |-
37548
+ Sends a platform invitation to the person's `primary_email`. On acceptance, the invitee joins your Platform with the privileges configured in the request body.
37549
+
37550
+ Returns `409 Conflict` if an active invitation already exists for this email in your Platform, and `422 Unprocessable Entity` if the person is already linked to a platform user.
37551
+
37552
+ **Required permission:** `Ibl.CRM/Invite/action`.
37553
+ summary: Invite a person to the platform
37554
+ parameters:
37555
+ - in: path
37556
+ name: id
37557
+ schema:
37558
+ type: string
37559
+ format: uuid
37560
+ description: Opaque UUID — used in API URLs and external references.
37561
+ required: true
37562
+ tags:
37563
+ - persons
37564
+ requestBody:
37565
+ content:
37566
+ application/json:
37567
+ schema:
37568
+ $ref: '#/components/schemas/PersonInviteRequest'
37569
+ application/scim+json:
37570
+ schema:
37571
+ $ref: '#/components/schemas/PersonInviteRequest'
37572
+ application/x-www-form-urlencoded:
37573
+ schema:
37574
+ $ref: '#/components/schemas/PersonInviteRequest'
37575
+ multipart/form-data:
37576
+ schema:
37577
+ $ref: '#/components/schemas/PersonInviteRequest'
37578
+ '*/*':
37579
+ schema:
37580
+ $ref: '#/components/schemas/PersonInviteRequest'
37581
+ security:
37582
+ - PlatformApiKeyAuthentication: []
37583
+ responses:
37584
+ '201':
37585
+ content:
37586
+ application/json:
37587
+ schema:
37588
+ $ref: '#/components/schemas/PersonInviteResponse'
37589
+ description: ''
37590
+ '400':
37591
+ description: Person has no `primary_email`; cannot invite.
37592
+ '403':
37593
+ description: Missing required permission `Ibl.CRM/Invite/action`.
37594
+ '404':
37595
+ description: Person not found.
37596
+ '409':
37597
+ content:
37598
+ application/json:
37599
+ schema:
37600
+ $ref: '#/components/schemas/PersonInviteConflict'
37601
+ description: ''
37602
+ '422':
37603
+ description: Person is already linked to a platform user.
37604
+ /persons/{id}/link-user/:
37605
+ post:
37606
+ operationId: persons_link_user_create
37607
+ description: |-
37608
+ Links this person to an existing platform user. The target user must already be a member of your Platform — if they are not, send them an invitation via `POST /persons/{id}/invite/` instead.
37609
+
37610
+ This call is idempotent: linking a person that is already bound to the same user is a no-op. Re-linking a person that is already bound to a *different* user is refused; the existing binding is preserved and the unchanged person is returned.
37611
+
37612
+ **Required permission:** `Ibl.CRM/Persons/write`.
37613
+ summary: Bind a person to an existing platform user
37614
+ parameters:
37615
+ - in: path
37616
+ name: id
37617
+ schema:
37618
+ type: string
37619
+ format: uuid
37620
+ description: Opaque UUID — used in API URLs and external references.
37621
+ required: true
37622
+ tags:
37623
+ - persons
37624
+ requestBody:
37625
+ content:
37626
+ application/json:
37627
+ schema:
37628
+ $ref: '#/components/schemas/PersonLinkUserRequest'
37629
+ application/scim+json:
37630
+ schema:
37631
+ $ref: '#/components/schemas/PersonLinkUserRequest'
37632
+ application/x-www-form-urlencoded:
37633
+ schema:
37634
+ $ref: '#/components/schemas/PersonLinkUserRequest'
37635
+ multipart/form-data:
37636
+ schema:
37637
+ $ref: '#/components/schemas/PersonLinkUserRequest'
37638
+ '*/*':
37639
+ schema:
37640
+ $ref: '#/components/schemas/PersonLinkUserRequest'
37641
+ required: true
37642
+ security:
37643
+ - PlatformApiKeyAuthentication: []
37644
+ responses:
37645
+ '200':
37646
+ content:
37647
+ application/json:
37648
+ schema:
37649
+ $ref: '#/components/schemas/Person'
37650
+ description: ''
37651
+ '400':
37652
+ description: Validation error.
37653
+ '403':
37654
+ description: Missing required permission `Ibl.CRM/Persons/write`, or the
37655
+ target user is not a member of your Platform.
37656
+ '404':
37657
+ description: Person or user not found.
37658
+ /persons/merge/:
37659
+ post:
37660
+ operationId: persons_merge_create
37661
+ description: |-
37662
+ Marks each person in `duplicate_ids` as inactive and reports how many related records (deals, activities, tags) were re-parented onto `primary_id`.
37663
+
37664
+ All ids — both the primary and every duplicate — must belong to your Platform. `primary_id` may not appear in `duplicate_ids`.
37665
+
37666
+ **Required permission:** `Ibl.CRM/Persons/write`.
37667
+ summary: Merge duplicate persons into a primary
37668
+ tags:
37669
+ - persons
37670
+ requestBody:
37671
+ content:
37672
+ application/json:
37673
+ schema:
37674
+ $ref: '#/components/schemas/PersonMergeRequest'
37675
+ application/scim+json:
37676
+ schema:
37677
+ $ref: '#/components/schemas/PersonMergeRequest'
37678
+ application/x-www-form-urlencoded:
37679
+ schema:
37680
+ $ref: '#/components/schemas/PersonMergeRequest'
37681
+ multipart/form-data:
37682
+ schema:
37683
+ $ref: '#/components/schemas/PersonMergeRequest'
37684
+ '*/*':
37685
+ schema:
37686
+ $ref: '#/components/schemas/PersonMergeRequest'
37687
+ required: true
37688
+ security:
37689
+ - PlatformApiKeyAuthentication: []
37690
+ responses:
37691
+ '200':
37692
+ content:
37693
+ application/json:
37694
+ schema:
37695
+ $ref: '#/components/schemas/PersonMergeResponse'
37696
+ description: ''
37697
+ '400':
37698
+ description: 'Validation error: the primary appears in duplicates, or one
37699
+ or more ids belong to another Platform.'
37700
+ '403':
37701
+ description: Missing required permission `Ibl.CRM/Persons/write`.
37702
+ '404':
37703
+ description: Primary person not found.
36358
37704
  /platforms/{platform_key}/items/{item_type}/{item_id}/access-check/:
36359
37705
  get:
36360
37706
  operationId: platforms_items_access_check_retrieve
@@ -42358,6 +43704,20 @@ components:
42358
43704
  description: Total time spent across all platforms
42359
43705
  required:
42360
43706
  - total_time_spent_seconds
43707
+ LifecycleStageEnum:
43708
+ enum:
43709
+ - lead
43710
+ - qualified
43711
+ - opportunity
43712
+ - customer
43713
+ - churned
43714
+ type: string
43715
+ description: |-
43716
+ * `lead` - Lead
43717
+ * `qualified` - Qualified
43718
+ * `opportunity` - Opportunity
43719
+ * `customer` - Customer
43720
+ * `churned` - Churned
42361
43721
  LtiKey:
42362
43722
  type: object
42363
43723
  properties:
@@ -43605,6 +44965,48 @@ components:
43605
44965
  required:
43606
44966
  - app
43607
44967
  - onboarding_completed
44968
+ Organization:
44969
+ type: object
44970
+ properties:
44971
+ id:
44972
+ type: string
44973
+ format: uuid
44974
+ readOnly: true
44975
+ description: Server-assigned UUID.
44976
+ platform:
44977
+ type: integer
44978
+ readOnly: true
44979
+ description: Platform the Organization belongs to. Set server-side from
44980
+ the auth token.
44981
+ name:
44982
+ type: string
44983
+ description: Display name. Unique per platform (case-sensitive).
44984
+ maxLength: 255
44985
+ address:
44986
+ description: Free-form JSON address (street, city, country, etc.).
44987
+ owner:
44988
+ type: integer
44989
+ description: platform `core.User` id of the internal owner / account manager.
44990
+ Optional.
44991
+ nullable: true
44992
+ metadata:
44993
+ description: Free-form JSON for Platform-defined attributes.
44994
+ created_at:
44995
+ type: string
44996
+ format: date-time
44997
+ readOnly: true
44998
+ description: Creation timestamp.
44999
+ updated_at:
45000
+ type: string
45001
+ format: date-time
45002
+ readOnly: true
45003
+ description: Last-modified timestamp.
45004
+ required:
45005
+ - created_at
45006
+ - id
45007
+ - name
45008
+ - platform
45009
+ - updated_at
43608
45010
  OverTime:
43609
45011
  type: object
43610
45012
  properties:
@@ -44004,6 +45406,29 @@ components:
44004
45406
  type: array
44005
45407
  items:
44006
45408
  $ref: '#/components/schemas/ItemSubscriptionList'
45409
+ PaginatedOrganizationList:
45410
+ type: object
45411
+ required:
45412
+ - count
45413
+ - results
45414
+ properties:
45415
+ count:
45416
+ type: integer
45417
+ example: 123
45418
+ next:
45419
+ type: string
45420
+ nullable: true
45421
+ format: uri
45422
+ example: http://api.example.org/accounts/?page=4
45423
+ previous:
45424
+ type: string
45425
+ nullable: true
45426
+ format: uri
45427
+ example: http://api.example.org/accounts/?page=2
45428
+ results:
45429
+ type: array
45430
+ items:
45431
+ $ref: '#/components/schemas/Organization'
44007
45432
  PaginatedPathwayGroupSuggestion:
44008
45433
  type: object
44009
45434
  description: Response serializer for paginated pathway group suggestion list
@@ -44058,6 +45483,29 @@ components:
44058
45483
  - next_page
44059
45484
  - previous_page
44060
45485
  - results
45486
+ PaginatedPersonList:
45487
+ type: object
45488
+ required:
45489
+ - count
45490
+ - results
45491
+ properties:
45492
+ count:
45493
+ type: integer
45494
+ example: 123
45495
+ next:
45496
+ type: string
45497
+ nullable: true
45498
+ format: uri
45499
+ example: http://api.example.org/accounts/?page=4
45500
+ previous:
45501
+ type: string
45502
+ nullable: true
45503
+ format: uri
45504
+ example: http://api.example.org/accounts/?page=2
45505
+ results:
45506
+ type: array
45507
+ items:
45508
+ $ref: '#/components/schemas/Person'
44061
45509
  PaginatedPlatformInvitation:
44062
45510
  type: object
44063
45511
  description: Response serializer for paginated platform invitation list
@@ -45191,6 +46639,128 @@ components:
45191
46639
  type: boolean
45192
46640
  default: true
45193
46641
  description: Whether this notification type is enabled
46642
+ PatchedOrganization:
46643
+ type: object
46644
+ properties:
46645
+ id:
46646
+ type: string
46647
+ format: uuid
46648
+ readOnly: true
46649
+ description: Server-assigned UUID.
46650
+ platform:
46651
+ type: integer
46652
+ readOnly: true
46653
+ description: Platform the Organization belongs to. Set server-side from
46654
+ the auth token.
46655
+ name:
46656
+ type: string
46657
+ description: Display name. Unique per platform (case-sensitive).
46658
+ maxLength: 255
46659
+ address:
46660
+ description: Free-form JSON address (street, city, country, etc.).
46661
+ owner:
46662
+ type: integer
46663
+ description: platform `core.User` id of the internal owner / account manager.
46664
+ Optional.
46665
+ nullable: true
46666
+ metadata:
46667
+ description: Free-form JSON for Platform-defined attributes.
46668
+ created_at:
46669
+ type: string
46670
+ format: date-time
46671
+ readOnly: true
46672
+ description: Creation timestamp.
46673
+ updated_at:
46674
+ type: string
46675
+ format: date-time
46676
+ readOnly: true
46677
+ description: Last-modified timestamp.
46678
+ PatchedPerson:
46679
+ type: object
46680
+ properties:
46681
+ id:
46682
+ type: string
46683
+ format: uuid
46684
+ readOnly: true
46685
+ description: Server-assigned UUID. Stable across renames and merges.
46686
+ platform:
46687
+ type: integer
46688
+ readOnly: true
46689
+ description: Platform the person belongs to. Set automatically from your
46690
+ credentials; you cannot pass another Platform's id.
46691
+ name:
46692
+ type: string
46693
+ description: Display name (e.g. 'Alice Chen').
46694
+ maxLength: 255
46695
+ primary_email:
46696
+ type: string
46697
+ format: email
46698
+ description: Canonical email address. When a platform user is created with
46699
+ a matching email in your Platform, this person is automatically linked
46700
+ to them (case-insensitive).
46701
+ maxLength: 254
46702
+ emails:
46703
+ description: Additional email addresses associated with this person.
46704
+ contact_numbers:
46705
+ description: Phone/contact numbers in any free-form shape.
46706
+ job_title:
46707
+ type: string
46708
+ default: ''
46709
+ description: Role / job title — display only, not validated.
46710
+ maxLength: 255
46711
+ organization:
46712
+ type: string
46713
+ format: uuid
46714
+ description: UUID of an organization in your Platform. References to organizations
46715
+ in other Platforms are rejected.
46716
+ nullable: true
46717
+ owner:
46718
+ type: integer
46719
+ description: Id of the platform user who owns / manages this person (internal
46720
+ account manager). Optional.
46721
+ nullable: true
46722
+ platform_user:
46723
+ type: integer
46724
+ description: Read-only. Populated once this person is bound to a platform
46725
+ user — either automatically on user creation when emails match, or explicitly
46726
+ via `POST /persons/{id}/link-user/`.
46727
+ readOnly: true
46728
+ nullable: true
46729
+ lifecycle_stage:
46730
+ allOf:
46731
+ - $ref: '#/components/schemas/LifecycleStageEnum'
46732
+ default: lead
46733
+ description: |-
46734
+ Sales pipeline stage. One of: `lead`, `qualified`, `opportunity`, `customer`, `churned`.
46735
+
46736
+ * `lead` - Lead
46737
+ * `qualified` - Qualified
46738
+ * `opportunity` - Opportunity
46739
+ * `customer` - Customer
46740
+ * `churned` - Churned
46741
+ unique_id:
46742
+ type: string
46743
+ default: ''
46744
+ description: Optional external system id (e.g. import key from another CRM).
46745
+ When non-blank, must be unique within your Platform.
46746
+ maxLength: 128
46747
+ active:
46748
+ type: boolean
46749
+ readOnly: true
46750
+ description: Read-only. Set to `false` when the person is linked to a platform
46751
+ user or merged into another person.
46752
+ metadata:
46753
+ description: Free-form JSON for Platform-defined attributes.
46754
+ created_at:
46755
+ type: string
46756
+ format: date-time
46757
+ readOnly: true
46758
+ description: Creation timestamp.
46759
+ updated_at:
46760
+ type: string
46761
+ format: date-time
46762
+ readOnly: true
46763
+ description: Last-modified timestamp.
45194
46764
  PatchedPlatformPublicImageAsset:
45195
46765
  type: object
45196
46766
  properties:
@@ -46418,6 +47988,238 @@ components:
46418
47988
  required:
46419
47989
  - platform_key
46420
47990
  - resources
47991
+ Person:
47992
+ type: object
47993
+ properties:
47994
+ id:
47995
+ type: string
47996
+ format: uuid
47997
+ readOnly: true
47998
+ description: Server-assigned UUID. Stable across renames and merges.
47999
+ platform:
48000
+ type: integer
48001
+ readOnly: true
48002
+ description: Platform the person belongs to. Set automatically from your
48003
+ credentials; you cannot pass another Platform's id.
48004
+ name:
48005
+ type: string
48006
+ description: Display name (e.g. 'Alice Chen').
48007
+ maxLength: 255
48008
+ primary_email:
48009
+ type: string
48010
+ format: email
48011
+ description: Canonical email address. When a platform user is created with
48012
+ a matching email in your Platform, this person is automatically linked
48013
+ to them (case-insensitive).
48014
+ maxLength: 254
48015
+ emails:
48016
+ description: Additional email addresses associated with this person.
48017
+ contact_numbers:
48018
+ description: Phone/contact numbers in any free-form shape.
48019
+ job_title:
48020
+ type: string
48021
+ default: ''
48022
+ description: Role / job title — display only, not validated.
48023
+ maxLength: 255
48024
+ organization:
48025
+ type: string
48026
+ format: uuid
48027
+ description: UUID of an organization in your Platform. References to organizations
48028
+ in other Platforms are rejected.
48029
+ nullable: true
48030
+ owner:
48031
+ type: integer
48032
+ description: Id of the platform user who owns / manages this person (internal
48033
+ account manager). Optional.
48034
+ nullable: true
48035
+ platform_user:
48036
+ type: integer
48037
+ description: Read-only. Populated once this person is bound to a platform
48038
+ user — either automatically on user creation when emails match, or explicitly
48039
+ via `POST /persons/{id}/link-user/`.
48040
+ readOnly: true
48041
+ nullable: true
48042
+ lifecycle_stage:
48043
+ allOf:
48044
+ - $ref: '#/components/schemas/LifecycleStageEnum'
48045
+ default: lead
48046
+ description: |-
48047
+ Sales pipeline stage. One of: `lead`, `qualified`, `opportunity`, `customer`, `churned`.
48048
+
48049
+ * `lead` - Lead
48050
+ * `qualified` - Qualified
48051
+ * `opportunity` - Opportunity
48052
+ * `customer` - Customer
48053
+ * `churned` - Churned
48054
+ unique_id:
48055
+ type: string
48056
+ default: ''
48057
+ description: Optional external system id (e.g. import key from another CRM).
48058
+ When non-blank, must be unique within your Platform.
48059
+ maxLength: 128
48060
+ active:
48061
+ type: boolean
48062
+ readOnly: true
48063
+ description: Read-only. Set to `false` when the person is linked to a platform
48064
+ user or merged into another person.
48065
+ metadata:
48066
+ description: Free-form JSON for Platform-defined attributes.
48067
+ created_at:
48068
+ type: string
48069
+ format: date-time
48070
+ readOnly: true
48071
+ description: Creation timestamp.
48072
+ updated_at:
48073
+ type: string
48074
+ format: date-time
48075
+ readOnly: true
48076
+ description: Last-modified timestamp.
48077
+ required:
48078
+ - active
48079
+ - created_at
48080
+ - id
48081
+ - name
48082
+ - platform
48083
+ - platform_user
48084
+ - updated_at
48085
+ PersonInviteConflict:
48086
+ type: object
48087
+ description: Shape returned when an active invitation already exists for this
48088
+ email.
48089
+ properties:
48090
+ detail:
48091
+ type: string
48092
+ invitation_id:
48093
+ type: integer
48094
+ description: Id of the pre-existing active invitation.
48095
+ person_id:
48096
+ type: string
48097
+ format: uuid
48098
+ platform_key:
48099
+ type: string
48100
+ required:
48101
+ - detail
48102
+ - invitation_id
48103
+ - person_id
48104
+ - platform_key
48105
+ PersonInviteRequest:
48106
+ type: object
48107
+ properties:
48108
+ is_admin:
48109
+ type: boolean
48110
+ description: Grant Platform-admin privileges on acceptance. Defaults to
48111
+ `false`.
48112
+ is_staff:
48113
+ type: boolean
48114
+ description: Grant staff privileges on acceptance. Defaults to `false`.
48115
+ enrollment_config:
48116
+ type: object
48117
+ additionalProperties: {}
48118
+ description: Optional enrollment payload. Forwarded to the platform invitation
48119
+ to auto-enroll the invitee in the listed courses, programs, or pathways
48120
+ on acceptance.
48121
+ redirect_to:
48122
+ type: string
48123
+ description: URL to send the invitee to after they accept the invitation
48124
+ (e.g. a custom landing page, an enrollment screen). Passed straight through
48125
+ to the platform invitation row. Leave blank to use the platform default.
48126
+ maxLength: 255
48127
+ PersonInviteResponse:
48128
+ type: object
48129
+ description: Shape returned by `POST /persons/{id}/invite/`.
48130
+ properties:
48131
+ person_id:
48132
+ type: string
48133
+ format: uuid
48134
+ description: UUID of the person that was invited.
48135
+ invitation_id:
48136
+ type: integer
48137
+ description: Id of the newly created invitation.
48138
+ invitation_email:
48139
+ type: string
48140
+ format: email
48141
+ description: Email address the invitation was sent to.
48142
+ platform_key:
48143
+ type: string
48144
+ description: Key of the Platform the invitation targets.
48145
+ auto_accept:
48146
+ type: boolean
48147
+ description: Whether the invitation is auto-accepted when the invitee first
48148
+ signs in.
48149
+ active:
48150
+ type: boolean
48151
+ description: Whether the invitation is currently active.
48152
+ redirect_to:
48153
+ type: string
48154
+ nullable: true
48155
+ description: URL the invitee will be sent to after accepting. Null/blank
48156
+ means the platform default destination.
48157
+ created:
48158
+ type: string
48159
+ format: date-time
48160
+ nullable: true
48161
+ description: When the invitation was created.
48162
+ required:
48163
+ - active
48164
+ - auto_accept
48165
+ - created
48166
+ - invitation_email
48167
+ - invitation_id
48168
+ - person_id
48169
+ - platform_key
48170
+ - redirect_to
48171
+ PersonLinkUserRequest:
48172
+ type: object
48173
+ properties:
48174
+ user_id:
48175
+ type: integer
48176
+ description: Id of the platform user to bind to this person. The user must
48177
+ already be a member of your Platform — invite them first if they are not.
48178
+ required:
48179
+ - user_id
48180
+ PersonMergeRequest:
48181
+ type: object
48182
+ properties:
48183
+ primary_id:
48184
+ type: string
48185
+ format: uuid
48186
+ description: UUID of the person to keep (the surviving record). Must belong
48187
+ to your Platform.
48188
+ duplicate_ids:
48189
+ type: array
48190
+ items:
48191
+ type: string
48192
+ format: uuid
48193
+ description: UUIDs of the persons to merge into `primary_id`. Each must
48194
+ belong to your Platform. `primary_id` may not appear in this list. The
48195
+ duplicates are marked inactive; their related records (deals, activities,
48196
+ tags) are re-parented onto the primary.
48197
+ required:
48198
+ - duplicate_ids
48199
+ - primary_id
48200
+ PersonMergeResponse:
48201
+ type: object
48202
+ description: Shape returned by `POST /persons/merge/`.
48203
+ properties:
48204
+ primary_id:
48205
+ type: string
48206
+ format: uuid
48207
+ description: UUID of the surviving (primary) person.
48208
+ merged_ids:
48209
+ type: array
48210
+ items:
48211
+ type: string
48212
+ format: uuid
48213
+ description: UUIDs of the persons marked inactive by this merge.
48214
+ reparented:
48215
+ type: object
48216
+ additionalProperties: {}
48217
+ description: Per-relation counts of related records (deals, activities,
48218
+ tags) re-parented onto the primary.
48219
+ required:
48220
+ - merged_ids
48221
+ - primary_id
48222
+ - reparented
46421
48223
  Platform:
46422
48224
  type: object
46423
48225
  description: 'Note: Create and update operations deprecated.'