> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/schoolsbuddy/public-rest-apis/contacts.md).

# Contacts

## GET /api/v1/Contacts

> Get contacts with filters.

```json
{"openapi":"3.0.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"Contacts"}],"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"ContactTypeEnum":{"enum":["IsParent","IsEmergencyContact","IsBillingContact","IsReportContact","IsCommunicationContact"],"type":"string"},"ContactDtoListPagedContactSearchResponseDto":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"},"nullable":true},"messageTranslationParameters":{"nullable":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactDto"},"nullable":true},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"firstPage":{"type":"string","format":"uri","nullable":true},"lastPage":{"type":"string","format":"uri","nullable":true},"totalPages":{"type":"integer","format":"int32"},"totalRecords":{"type":"integer","format":"int32"},"nextPage":{"type":"string","format":"uri","nullable":true},"previousPage":{"type":"string","format":"uri","nullable":true},"baseUri":{"type":"string","format":"uri","nullable":true},"searchParameters":{"type":"array","items":{"$ref":"#/components/schemas/StringStringKeyValuePair"},"nullable":true}},"additionalProperties":false},"ContactDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"organisationId":{"type":"integer","format":"int32"},"contactId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"emailAddress":{"type":"string","nullable":true},"mobilePhoneNumber":{"type":"string","nullable":true},"phoneNumber":{"type":"string","nullable":true},"streetAddress":{"type":"string","nullable":true},"streetAddress2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"relatedPeople":{"type":"array","items":{"$ref":"#/components/schemas/ContactRelatedPersonDto"},"nullable":true},"createdAtUtc":{"type":"string","format":"date-time"},"updatedAtUtc":{"type":"string","format":"date-time","nullable":true},"isArchived":{"type":"boolean"},"updatable":{"type":"boolean"}},"additionalProperties":false},"ContactRelatedPersonDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"isArchived":{"type":"boolean"},"vban":{"type":"string","nullable":true},"isParent":{"type":"boolean"},"isBillingContact":{"type":"boolean"},"isReportContact":{"type":"boolean"},"isCommunicationContact":{"type":"boolean"},"isEmergencyContact":{"type":"boolean"}},"additionalProperties":false},"StringStringKeyValuePair":{"type":"object","properties":{"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Contacts":{"get":{"tags":["Contacts"],"summary":"Get contacts with filters.","parameters":[{"name":"IncludeArchived","in":"query","schema":{"type":"boolean"}},{"name":"ContactType","in":"query","schema":{"$ref":"#/components/schemas/ContactTypeEnum"}},{"name":"Search","in":"query","schema":{"type":"string"}},{"name":"PageNumber","in":"query","schema":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"}},{"name":"PageSize","in":"query","schema":{"maximum":2000,"minimum":1,"type":"integer","format":"int32"}},{"name":"OrganisationIds","in":"query","schema":{"type":"array","items":{"type":"integer","format":"int32"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDtoListPagedContactSearchResponseDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v1/Contacts

> Create a new contact, linked to between 1 and 10 active students of the\
> organisation in the same call (SB-16593): a contact cannot exist without a\
> student link. Link further students with \`POST /api/v1/Students/{id}/contacts\`.

```json
{"openapi":"3.0.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"Contacts"}],"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"ContactCreateRequestDto":{"required":["emailAddress","firstName","lastName","relatedPeople"],"type":"object","properties":{"contactId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"mobilePhoneNumber":{"type":"string","nullable":true},"phoneNumber":{"type":"string","nullable":true},"streetAddress":{"type":"string","nullable":true},"streetAddress2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"relatedPeople":{"maxItems":10,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ContactCreateRelatedPersonRequestDto"}},"lastName":{"minLength":1,"type":"string"},"firstName":{"minLength":1,"type":"string"},"emailAddress":{"minLength":1,"type":"string","format":"email"}},"additionalProperties":false},"ContactCreateRelatedPersonRequestDto":{"required":["id"],"type":"object","properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"}},"additionalProperties":false},"ContactDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"organisationId":{"type":"integer","format":"int32"},"contactId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"emailAddress":{"type":"string","nullable":true},"mobilePhoneNumber":{"type":"string","nullable":true},"phoneNumber":{"type":"string","nullable":true},"streetAddress":{"type":"string","nullable":true},"streetAddress2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"relatedPeople":{"type":"array","items":{"$ref":"#/components/schemas/ContactRelatedPersonDto"},"nullable":true},"createdAtUtc":{"type":"string","format":"date-time"},"updatedAtUtc":{"type":"string","format":"date-time","nullable":true},"isArchived":{"type":"boolean"},"updatable":{"type":"boolean"}},"additionalProperties":false},"ContactRelatedPersonDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"isArchived":{"type":"boolean"},"vban":{"type":"string","nullable":true},"isParent":{"type":"boolean"},"isBillingContact":{"type":"boolean"},"isReportContact":{"type":"boolean"},"isCommunicationContact":{"type":"boolean"},"isEmergencyContact":{"type":"boolean"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Contacts":{"post":{"tags":["Contacts"],"summary":"Create a new contact, linked to between 1 and 10 active students of the\norganisation in the same call (SB-16593): a contact cannot exist without a\nstudent link. Link further students with `POST /api/v1/Students/{id}/contacts`.","parameters":[{"name":"organisationId","in":"query","description":"The organisation to create the contact in (cross-cutting-design §3.8.1).\nOptional for a single-organisation client, required when the client holds\nmore than one organisation.","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The contact creation request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreateRequestDto"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /api/v1/Contacts/{id}

> Get contact by Id.

```json
{"openapi":"3.0.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"Contacts"}],"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"ContactDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"organisationId":{"type":"integer","format":"int32"},"contactId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"emailAddress":{"type":"string","nullable":true},"mobilePhoneNumber":{"type":"string","nullable":true},"phoneNumber":{"type":"string","nullable":true},"streetAddress":{"type":"string","nullable":true},"streetAddress2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"relatedPeople":{"type":"array","items":{"$ref":"#/components/schemas/ContactRelatedPersonDto"},"nullable":true},"createdAtUtc":{"type":"string","format":"date-time"},"updatedAtUtc":{"type":"string","format":"date-time","nullable":true},"isArchived":{"type":"boolean"},"updatable":{"type":"boolean"}},"additionalProperties":false},"ContactRelatedPersonDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"isArchived":{"type":"boolean"},"vban":{"type":"string","nullable":true},"isParent":{"type":"boolean"},"isBillingContact":{"type":"boolean"},"isReportContact":{"type":"boolean"},"isCommunicationContact":{"type":"boolean"},"isEmergencyContact":{"type":"boolean"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Contacts/{id}":{"get":{"tags":["Contacts"],"summary":"Get contact by Id.","parameters":[{"name":"id","in":"path","description":"Contact Id","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"organisationId","in":"query","description":"Organisation Id (optional query parameter)","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## PUT /api/v1/Contacts/{id}

> Update an existing contact. Partial-update semantics (BP10 /\
> cross-cutting-design §3.7e): an omitted field preserves the stored value.

```json
{"openapi":"3.0.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"Contacts"}],"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"ContactUpdateRequestDto":{"type":"object","properties":{"contactId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"emailAddress":{"type":"string","format":"email","nullable":true},"mobilePhoneNumber":{"type":"string","nullable":true},"phoneNumber":{"type":"string","nullable":true},"streetAddress":{"type":"string","nullable":true},"streetAddress2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"isArchived":{"type":"boolean","nullable":true}},"additionalProperties":false},"ContactDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"organisationId":{"type":"integer","format":"int32"},"contactId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"emailAddress":{"type":"string","nullable":true},"mobilePhoneNumber":{"type":"string","nullable":true},"phoneNumber":{"type":"string","nullable":true},"streetAddress":{"type":"string","nullable":true},"streetAddress2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"relatedPeople":{"type":"array","items":{"$ref":"#/components/schemas/ContactRelatedPersonDto"},"nullable":true},"createdAtUtc":{"type":"string","format":"date-time"},"updatedAtUtc":{"type":"string","format":"date-time","nullable":true},"isArchived":{"type":"boolean"},"updatable":{"type":"boolean"}},"additionalProperties":false},"ContactRelatedPersonDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"isArchived":{"type":"boolean"},"vban":{"type":"string","nullable":true},"isParent":{"type":"boolean"},"isBillingContact":{"type":"boolean"},"isReportContact":{"type":"boolean"},"isCommunicationContact":{"type":"boolean"},"isEmergencyContact":{"type":"boolean"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Contacts/{id}":{"put":{"tags":["Contacts"],"summary":"Update an existing contact. Partial-update semantics (BP10 /\ncross-cutting-design §3.7e): an omitted field preserves the stored value.","parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"organisationId","in":"query","description":"The organisation the contact belongs to (cross-cutting-design §3.8.1).\nOptional for a single-organisation client, required when the client holds\nmore than one organisation.","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The contact update request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v1/Contacts/BulkArchive

> Bulk archive or unarchive contacts. Each id is processed independently —\
> one failure never rolls back or short-circuits the rest (BP4,\
> cross-cutting-design §4).

```json
{"openapi":"3.0.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"Contacts"}],"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"ContactBulkArchiveRequestDto":{"required":["ids"],"type":"object","properties":{"organisationId":{"type":"integer","format":"int32","nullable":true},"archive":{"type":"boolean"},"ids":{"maxItems":1000,"minItems":1,"type":"array","items":{"type":"integer","format":"int32"}}},"additionalProperties":false},"Int32BulkOperationResult":{"type":"object","properties":{"successfulIds":{"type":"array","items":{"type":"integer","format":"int32"},"description":"Gets or sets the ids of the items that were processed successfully.\nOn BulkCreate these are the newly-created ids.","nullable":true},"failedItems":{"type":"array","items":{"$ref":"#/components/schemas/BulkFailedItem"},"description":"Gets or sets the per-item failures, each carrying its request index,\noptional client reference, name, machine-readable code, and message.","nullable":true},"totalRequested":{"type":"integer","description":"Gets or sets the total number of items in the request. Set by the\ncaller (it is not derivable from the success/failure lists alone —\nitems rejected before per-item processing may appear in neither).","format":"int32"},"totalSuccessful":{"type":"integer","description":"Gets the number of items processed successfully (computed).","format":"int32","readOnly":true},"totalFailed":{"type":"integer","description":"Gets the number of items that failed (computed).","format":"int32","readOnly":true}},"additionalProperties":false,"description":"Standard envelope returned by every Public API bulk endpoint\n(BulkCreate / BulkUpdate / BulkArchive). Each item in the request is\nprocessed independently — one item failing does not roll back the\nothers — and the envelope reports per-item outcome. See\ncross-cutting-design.md §4."},"BulkFailedItem":{"type":"object","properties":{"index":{"type":"integer","description":"Gets or sets the zero-based index of the failed item within the\nrequest array, so callers keeping request order can map it back.","format":"int32"},"clientReferenceId":{"type":"string","description":"Gets or sets the optional opaque client-supplied reference echoed\nback from the request item. Null when the caller did not supply one.","nullable":true},"name":{"type":"string","description":"Gets or sets the name of the entity the failed item referred to,\nfor at-a-glance identification in the response.","nullable":true},"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\n`VALIDATION_FAILED`, `GROUP_IMPORTED_READ_ONLY`) per\ncross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"A single per-item failure entry in a SchoolsBuddy.PublicAPI.Models.BulkOperationResult`1\nenvelope. Mirrors the structured error body (cross-cutting-design.md §5.3):\na machine-readable SchoolsBuddy.PublicAPI.Models.BulkFailedItem.Code plus a human-readable SchoolsBuddy.PublicAPI.Models.BulkFailedItem.Error."},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Contacts/BulkArchive":{"post":{"tags":["Contacts"],"summary":"Bulk archive or unarchive contacts. Each id is processed independently —\none failure never rolls back or short-circuits the rest (BP4,\ncross-cutting-design §4).","requestBody":{"description":"The bulk archive request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBulkArchiveRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Int32BulkOperationResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
