diff --git a/openapi.yaml b/openapi.yaml
index f69e364..522b233 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -2752,6 +2752,530 @@ paths:
"401":
$ref: '#/components/responses/Unauthorized'
+ /beneficiaries/bulk_groups:
+ post:
+ tags: [Beneficiaries]
+ summary: Add many Contacts to Groups, or take them out of Groups
+ description: |
+ Adds many Contacts (Beneficiaries) to some of the organisation's Groups and takes them out of
+ others, in one request. This is **Add or remove › Groups** for the Contacts selected on the
+ Manage Contacts page, e.g. putting every selected Contact in "Girls' football". Each change is
+ made the same way as ticking or unticking a Group on the Edit Contact page, so it appears on
+ the Contact's History.
+
+ **Which Groups.** `add_ids` and `remove_ids` are ids of the organisation's Groups
+ (`GET /groups`). Give at least one, and never the same Group in both. A Contact already in a
+ Group being added, or not in a Group being removed, is left as they are.
+
+ **Which Contacts.** Either `beneficiary_ids` (at most 500), or everyone matching
+ `filter_data` (the Manage Contacts filters) leaving out `excluded_ids`.
+
+ **Skipped Contacts** are counted in `skip_counts`: `headline_only` (the user only has
+ Headline Only Access to them) and `not_allowed` (the user may not edit them).
+
+ Up to 50 Contacts are changed straight away (`200`); more run in the background (`202`), and
+ `GET /beneficiaries/bulk_actions/{id}` reports the progress. `charity_id` may be left out when
+ the user belongs to one organisation.
+ operationId: changeBeneficiaryGroups
+ security: [{tokenAuth: []}]
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ charity_id:
+ type: integer
+ description: The organisation whose Contacts to change
+ add_ids:
+ type: array
+ items: { type: integer }
+ description: Groups to add every Contact to
+ remove_ids:
+ type: array
+ items: { type: integer }
+ description: Groups to take every Contact out of
+ beneficiary_ids:
+ type: array
+ maxItems: 500
+ items: { type: integer }
+ description: The Contacts to change, at most 500. Leave out to use filter_data instead.
+ filter_data:
+ type: object
+ additionalProperties: true
+ description: Manage Contacts filters selecting the Contacts, used when beneficiary_ids is left out
+ excluded_ids:
+ type: array
+ items: { type: integer }
+ description: Contacts matching the filters to leave out
+ example:
+ charity_id: 12
+ add_ids: [31]
+ remove_ids: [32]
+ beneficiary_ids: [160498, 160499, 160500]
+ responses:
+ "200":
+ description: The Contacts were changed straight away (50 or fewer)
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ example:
+ id: 72
+ status: completed
+ total_count: 3
+ processed_count: 3
+ changed_count: 2
+ skip_counts: { not_allowed: 1 }
+ background: false
+ summary: "2 contacts changed. 1 skipped: 1 because you aren't allowed to edit them."
+ "202":
+ description: More than 50 Contacts, so they are changed in the background. Poll GET /beneficiaries/bulk_actions/{id}.
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntityList'
+ /beneficiaries/bulk_flags:
+ post:
+ tags: [Beneficiaries]
+ summary: Raise Flags on many Contacts, or remove them
+ description: |
+ Raises some of the organisation's Flags (Contact Flags) on many Contacts (Beneficiaries) and
+ removes others, in one request. This is **Add or remove › Flags** for the Contacts selected
+ on the Manage Contacts page. Each Flag is raised the same way as on a Contact's profile, by
+ you, enabled and with no description.
+
+ **Which Flags.** `add_ids` and `remove_ids` are ids of Flags you may raise
+ (`GET /flags`): a Flag restricted to Teams is only yours to use if you are in one of them.
+ Give at least one, and never the same Flag in both. A Contact who already has a Flag being
+ added, or lacks one being removed, is left as they are. You need to be an Organisation
+ Editor, or a colleague on one of the organisation's Projects, to raise Flags.
+
+ **Which Contacts.** Either `beneficiary_ids` (at most 500), or everyone matching
+ `filter_data` (the Manage Contacts filters) leaving out `excluded_ids`.
+
+ **Skipped Contacts** are counted in `skip_counts`: `headline_only` (the user only has
+ Headline Only Access to them) and `raised_by_someone_else` (only the person who raised a Flag
+ may remove it; such a Contact is left unchanged).
+
+ Up to 50 Contacts are changed straight away (`200`); more run in the background (`202`), and
+ `GET /beneficiaries/bulk_actions/{id}` reports the progress. `charity_id` may be left out when
+ the user belongs to one organisation.
+ operationId: changeBeneficiaryFlags
+ security: [{tokenAuth: []}]
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ charity_id:
+ type: integer
+ description: The organisation whose Contacts to change
+ add_ids:
+ type: array
+ items: { type: integer }
+ description: Flags to raise on every Contact
+ remove_ids:
+ type: array
+ items: { type: integer }
+ description: Flags to remove from every Contact
+ beneficiary_ids:
+ type: array
+ maxItems: 500
+ items: { type: integer }
+ description: The Contacts to change, at most 500. Leave out to use filter_data instead.
+ filter_data:
+ type: object
+ additionalProperties: true
+ description: Manage Contacts filters selecting the Contacts, used when beneficiary_ids is left out
+ excluded_ids:
+ type: array
+ items: { type: integer }
+ description: Contacts matching the filters to leave out
+ example:
+ charity_id: 12
+ add_ids: [5]
+ beneficiary_ids: [160498, 160499, 160500]
+ responses:
+ "200":
+ description: The Contacts were changed straight away (50 or fewer)
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ "202":
+ description: More than 50 Contacts, so they are changed in the background. Poll GET /beneficiaries/bulk_actions/{id}.
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntityList'
+ /flags:
+ get:
+ tags: [Beneficiaries]
+ summary: List the Flags you may raise
+ description: |
+ The organisation's Flags (Contact Flags), e.g. "Safeguarding concern", that you may raise on a
+ Contact: a Flag restricted to Teams is listed only for members of those Teams. Use an `id`
+ with `POST /beneficiaries/bulk_flags`. `charity_id` may be left out when the user belongs to
+ one organisation.
+ operationId: listFlags
+ security: [{tokenAuth: []}]
+ parameters:
+ - name: charity_id
+ in: query
+ required: false
+ schema: { type: integer }
+ - $ref: '#/components/parameters/Page'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/LastSyncDatetime'
+ responses:
+ "200":
+ description: A page of Flags, by name
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: '#/components/schemas/PaginationEnvelope'
+ - type: object
+ properties:
+ data:
+ type: array
+ items: { $ref: '#/components/schemas/Flag' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntityList'
+ /groups:
+ get:
+ tags: [Beneficiaries]
+ summary: List the organisation's Groups
+ description: |
+ The organisation's Groups (Contact Groups), the labels Contacts are sorted into, e.g. "Girls'
+ football". These are the Groups the Edit Contact page offers. Use an `id` with
+ `POST /beneficiaries/bulk_groups`. Any member of the organisation can list them.
+ `charity_id` may be left out when the user belongs to one organisation.
+ operationId: listGroups
+ security: [{tokenAuth: []}]
+ parameters:
+ - name: charity_id
+ in: query
+ required: false
+ schema: { type: integer }
+ - $ref: '#/components/parameters/Page'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/LastSyncDatetime'
+ responses:
+ "200":
+ description: A page of Groups, by title
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: '#/components/schemas/PaginationEnvelope'
+ - type: object
+ properties:
+ data:
+ type: array
+ items: { $ref: '#/components/schemas/Group' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntityList'
+ /beneficiaries/bulk_audiences:
+ post:
+ tags: [Beneficiaries]
+ summary: Give many Contacts Audiences, or end them
+ description: |
+ Gives many Contacts (Beneficiaries) some of the organisation's Audiences (Contact Roles) and
+ ends others, in one request. This is **Add or remove › Audiences** for the Contacts selected
+ on the Manage Contacts page.
+
+ **Which Audiences.** `add_ids` and `remove_ids` are ids from `GET /audiences`. Audiences being
+ added start on `start_date` (default today). Removing an Audience ends it today rather than
+ deleting it, so it stays in the Contact's history. A Contact already in an Audience being
+ added, or not in one being removed, is left as they are. You need to be a colleague in the
+ organisation.
+
+ **Which Contacts.** Either `beneficiary_ids` (at most 500), or everyone matching
+ `filter_data` (the Manage Contacts filters) leaving out `excluded_ids`.
+
+ **Skipped Contacts** are counted in `skip_counts`: `headline_only` and `not_allowed_to_end`
+ (you may end an Audience only if you added it, are an Organisation Editor, or are an editor or
+ reporter on one of the Contact's Projects).
+
+ Up to 50 Contacts are changed straight away (`200`); more run in the background (`202`), and
+ `GET /beneficiaries/bulk_actions/{id}` reports the progress. `charity_id` may be left out when
+ the user belongs to one organisation.
+ operationId: changeBeneficiaryAudiences
+ security: [{tokenAuth: []}]
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ charity_id:
+ type: integer
+ description: The organisation whose Contacts to change
+ add_ids:
+ type: array
+ items: { type: integer }
+ description: Audiences to give every Contact
+ remove_ids:
+ type: array
+ items: { type: integer }
+ description: Audiences to end for every Contact, today
+ start_date:
+ type: string
+ format: date
+ description: When the Audiences being added start. Default today.
+ beneficiary_ids:
+ type: array
+ maxItems: 500
+ items: { type: integer }
+ description: The Contacts to change, at most 500. Leave out to use filter_data instead.
+ filter_data:
+ type: object
+ additionalProperties: true
+ description: Manage Contacts filters selecting the Contacts, used when beneficiary_ids is left out
+ excluded_ids:
+ type: array
+ items: { type: integer }
+ description: Contacts matching the filters to leave out
+ example:
+ charity_id: 12
+ add_ids: [7]
+ start_date: "2026-11-01"
+ beneficiary_ids: [160498, 160499]
+ responses:
+ "200":
+ description: The Contacts were changed straight away (50 or fewer)
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ "202":
+ description: More than 50 Contacts, so they are changed in the background. Poll GET /beneficiaries/bulk_actions/{id}.
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntityList'
+ /beneficiaries/bulk_type:
+ post:
+ tags: [Beneficiaries]
+ summary: Change the Type of many Contacts
+ description: |
+ Changes the Type (Contact Type, e.g. Person or Organisation) of many Contacts (Beneficiaries)
+ in one request. This is **Add or remove › Type** for the Contacts selected on the Manage
+ Contacts page. A Contact has one Type, so `beneficiary_type_id` (from `GET /beneficiary_types`)
+ is the Type to change them all to. Bio fields that only show for one Type stay saved, but are
+ hidden while a Contact has a Type without them.
+
+ **Which Contacts.** Either `beneficiary_ids` (at most 500), or everyone matching
+ `filter_data` (the Manage Contacts filters) leaving out `excluded_ids`.
+
+ **Skipped Contacts** are counted in `skip_counts`: `headline_only` and `not_allowed` (you may
+ not edit them). A Contact already of that Type is left as they are.
+
+ Up to 50 Contacts are changed straight away (`200`); more run in the background (`202`), and
+ `GET /beneficiaries/bulk_actions/{id}` reports the progress. `charity_id` may be left out when
+ the user belongs to one organisation.
+ operationId: changeBeneficiaryType
+ security: [{tokenAuth: []}]
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required: [beneficiary_type_id]
+ properties:
+ charity_id:
+ type: integer
+ description: The organisation whose Contacts to change
+ beneficiary_type_id:
+ type: integer
+ description: The Type to change every Contact to
+ beneficiary_ids:
+ type: array
+ maxItems: 500
+ items: { type: integer }
+ description: The Contacts to change, at most 500. Leave out to use filter_data instead.
+ filter_data:
+ type: object
+ additionalProperties: true
+ description: Manage Contacts filters selecting the Contacts, used when beneficiary_ids is left out
+ excluded_ids:
+ type: array
+ items: { type: integer }
+ description: Contacts matching the filters to leave out
+ example:
+ charity_id: 12
+ beneficiary_type_id: 3
+ beneficiary_ids: [160498, 160499, 160500]
+ responses:
+ "200":
+ description: The Contacts were changed straight away (50 or fewer)
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ "202":
+ description: More than 50 Contacts, so they are changed in the background. Poll GET /beneficiaries/bulk_actions/{id}.
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntityList'
+ /beneficiaries/bulk_required_skills:
+ post:
+ tags: [Beneficiaries]
+ summary: Add Skills to many Contacts' Skills Required, or remove them
+ description: |
+ Adds some of the organisation's Skills to many Contacts' (Beneficiaries') **Skills Required**
+ and removes others, in one request. This is **Add or remove › Skills Required** for the
+ Contacts selected on the Manage Contacts page. Each change is made as in the Skills Required
+ box on a Contact's profile.
+
+ **Which Skills.** `add_ids` and `remove_ids` are ids from `GET /skills`. Give at least one,
+ and never the same Skill in both. A Contact who already requires a Skill being added, or
+ doesn't require one being removed, is left as they are. Anyone who can see a Contact may add
+ a Skill; only Organisation Editors may remove one.
+
+ **Which Contacts.** Either `beneficiary_ids` (at most 500), or everyone matching
+ `filter_data` (the Manage Contacts filters) leaving out `excluded_ids`.
+
+ **Skipped Contacts** are counted in `skip_counts`: `headline_only` and
+ `not_allowed_to_remove` (you aren't an Organisation Editor, so the Contact is left unchanged).
+
+ Up to 50 Contacts are changed straight away (`200`); more run in the background (`202`), and
+ `GET /beneficiaries/bulk_actions/{id}` reports the progress. `charity_id` may be left out when
+ the user belongs to one organisation.
+ operationId: changeBeneficiaryRequiredSkills
+ security: [{tokenAuth: []}]
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ charity_id:
+ type: integer
+ description: The organisation whose Contacts to change
+ add_ids:
+ type: array
+ items: { type: integer }
+ description: Skills to add to every Contact's Skills Required
+ remove_ids:
+ type: array
+ items: { type: integer }
+ description: Skills to remove from every Contact's Skills Required
+ beneficiary_ids:
+ type: array
+ maxItems: 500
+ items: { type: integer }
+ description: The Contacts to change, at most 500. Leave out to use filter_data instead.
+ filter_data:
+ type: object
+ additionalProperties: true
+ description: Manage Contacts filters selecting the Contacts, used when beneficiary_ids is left out
+ excluded_ids:
+ type: array
+ items: { type: integer }
+ description: Contacts matching the filters to leave out
+ example:
+ charity_id: 12
+ add_ids: [31]
+ remove_ids: [32]
+ beneficiary_ids: [160498, 160499, 160500]
+ responses:
+ "200":
+ description: The Contacts were changed straight away (50 or fewer)
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ example:
+ id: 72
+ status: completed
+ total_count: 3
+ processed_count: 3
+ changed_count: 2
+ skip_counts: {}
+ background: false
+ summary: "2 contacts changed."
+ "202":
+ description: More than 50 Contacts, so they are changed in the background. Poll GET /beneficiaries/bulk_actions/{id}.
+ content:
+ application/json:
+ schema: { $ref: '#/components/schemas/BulkProjectMove' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntityList'
+ /skills:
+ get:
+ tags: [Beneficiaries]
+ summary: List the organisation's Skills
+ description: |
+ The organisation's Skills, e.g. "First aid", as offered in the Skills Required box on a
+ Contact's profile. Use an `id` with `POST /beneficiaries/bulk_required_skills`. Any member of
+ the organisation can list them. `charity_id` may be left out when the user belongs to one
+ organisation.
+ operationId: listSkills
+ security: [{tokenAuth: []}]
+ parameters:
+ - name: charity_id
+ in: query
+ required: false
+ schema: { type: integer }
+ - $ref: '#/components/parameters/Page'
+ - $ref: '#/components/parameters/PerPage'
+ - $ref: '#/components/parameters/LastSyncDatetime'
+ responses:
+ "200":
+ description: A page of Skills, by name
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: '#/components/schemas/PaginationEnvelope'
+ - type: object
+ properties:
+ data:
+ type: array
+ items: { $ref: '#/components/schemas/Skill' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntityList'
/relationship_categories:
get:
tags: [Beneficiaries]
@@ -17613,6 +18137,42 @@ components:
type: string
enum: [Person, Organisation, Animal, Object]
+ Flag:
+ type: object
+ description: A Flag (Contact Flag) of the organisation
+ properties:
+ id: { type: integer }
+ name:
+ type: string
+ description: The Flag's name, e.g. Safeguarding concern
+ color:
+ type: string
+ description: The colour the Flag is shown in
+ created_at: { type: string, format: date-time }
+ updated_at: { type: string, format: date-time }
+
+ Group:
+ type: object
+ description: A Group (Contact Group) of the organisation
+ properties:
+ id: { type: integer }
+ title:
+ type: string
+ description: The Group's name, e.g. Girls' football
+ created_at: { type: string, format: date-time }
+ updated_at: { type: string, format: date-time }
+
+ Skill:
+ type: object
+ description: A Skill of the organisation
+ properties:
+ id: { type: integer }
+ name:
+ type: string
+ description: The Skill's name, e.g. First aid
+ created_at: { type: string, format: date-time }
+ updated_at: { type: string, format: date-time }
+
RelationshipCategory:
type: object
description: A kind of relationship between Contacts, with its two sides
diff --git a/server.js b/server.js
index 1d57e26..fe23246 100644
--- a/server.js
+++ b/server.js
@@ -1675,6 +1675,107 @@ function buildDocsPage() {
{ code: "401", cls: "response-4xx", desc: "Not authenticated" },
{ code: "404", cls: "response-4xx", desc: "Not found, or started by someone else" }
], "Only the user who started the move can see it.")}
+ ${endpointCard("POST", "/beneficiaries/bulk_groups", "Add many Contacts to Groups, or take them out of Groups", true, [
+ { name: "add_ids", in: "body", type: "integer[]", required: false, desc: "Groups to add every Contact to, from GET /groups" },
+ { name: "remove_ids", in: "body", type: "integer[]", required: false, desc: "Groups to take every Contact out of. Give at least one of add_ids and remove_ids, and never the same Group in both" },
+ { name: "charity_id", in: "body", type: "integer", required: false, desc: "The organisation. Optional if you belong to only one" },
+ { name: "beneficiary_ids", in: "body", type: "integer[]", required: false, desc: "The Contacts to change, at most 500. Leave out to choose them with filter_data" },
+ { name: "filter_data", in: "body", type: "object", required: false, desc: "Manage Contacts filters choosing the Contacts, e.g. {\"project_ids\": [\"572\"]}" },
+ { name: "project_id", in: "body", type: "integer", required: false, desc: "Shortcut for filter_data: the Contacts in this Project" },
+ { name: "excluded_ids", in: "body", type: "integer[]", required: false, desc: "Contacts matching the filters to leave out" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "Up to 50 Contacts, changed straight away: id, status, total_count, processed_count, changed_count, skip_counts and summary" },
+ { code: "202", cls: "response-2xx", desc: "More than 50 Contacts: the change runs in the background. Poll GET /beneficiaries/bulk_actions/{id} with the id" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "An organisation you aren't in" },
+ { code: "422", cls: "response-4xx", desc: "Nothing to add or remove, a Group that isn't the organisation's, a Group in both lists, more than 500 beneficiary_ids, or no charity_id when you belong to several organisations" }
+ ], "Add or remove › Groups for the Contacts selected on the Manage Contacts page. Each change is made as ticking or unticking a Group on the Edit Contact page is, so it appears on the Contact's History. Contacts you only have Headline Only Access to (skip_counts.headline_only), or may not edit (skip_counts.not_allowed), are skipped. A Contact already in a Group being added, or not in one being removed, is left as they are.")}
+ ${endpointCard("POST", "/beneficiaries/bulk_flags", "Raise Flags on many Contacts, or remove them", true, [
+ { name: "add_ids", in: "body", type: "integer[]", required: false, desc: "Flags to raise on every Contact, from GET /flags" },
+ { name: "remove_ids", in: "body", type: "integer[]", required: false, desc: "Flags to remove from every Contact. Give at least one of add_ids and remove_ids, and never the same Flag in both" },
+ { name: "charity_id", in: "body", type: "integer", required: false, desc: "The organisation. Optional if you belong to only one" },
+ { name: "beneficiary_ids", in: "body", type: "integer[]", required: false, desc: "The Contacts to change, at most 500. Leave out to choose them with filter_data" },
+ { name: "filter_data", in: "body", type: "object", required: false, desc: "Manage Contacts filters choosing the Contacts" },
+ { name: "excluded_ids", in: "body", type: "integer[]", required: false, desc: "Contacts matching the filters to leave out" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "Up to 50 Contacts, changed straight away: id, status, changed_count, skip_counts and summary" },
+ { code: "202", cls: "response-2xx", desc: "More than 50 Contacts: the change runs in the background. Poll GET /beneficiaries/bulk_actions/{id} with the id" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "An organisation you aren't in" },
+ { code: "422", cls: "response-4xx", desc: "Nothing to add or remove, a Flag you can't see, a Flag in both lists, or you can't raise Flags in this organisation" }
+ ], "Add or remove › Flags for the Contacts selected on the Manage Contacts page. Each Flag is raised by you, as on a Contact's profile. Only the person who raised a Flag may remove it: a Contact with one raised by someone else is skipped (skip_counts.raised_by_someone_else), as are Contacts you only have Headline Only Access to.")}
+ ${endpointCard("GET", "/flags", "List the Flags you may raise", true, [
+ { name: "charity_id", in: "query", type: "integer", required: false, desc: "The organisation. Optional if you belong to only one" },
+ { name: "page", in: "query", type: "integer", required: false, desc: "Page number" },
+ { name: "per_page", in: "query", type: "integer", required: false, desc: "Default 10, max 200" },
+ { name: "last_synced_datetime", in: "query", type: "string", required: false, desc: "Only Flags changed since then" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "data: each Flag's id, name and color, by name, in the paginated envelope" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "An organisation you aren't in" }
+ ], "Flags (Contact Flags), e.g. Safeguarding concern. A Flag restricted to Teams is listed only if you are in one of them. Use an id with POST /beneficiaries/bulk_flags.")}
+ ${endpointCard("GET", "/groups", "List the organisation's Groups", true, [
+ { name: "charity_id", in: "query", type: "integer", required: false, desc: "The organisation. Optional if you belong to only one" },
+ { name: "page", in: "query", type: "integer", required: false, desc: "Page number" },
+ { name: "per_page", in: "query", type: "integer", required: false, desc: "Default 10, max 200" },
+ { name: "last_synced_datetime", in: "query", type: "string", required: false, desc: "Only Groups changed since then" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "data: each Group's id and title, by title, in the paginated envelope" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "An organisation you aren't in" }
+ ], "Groups (Contact Groups), e.g. Girls' football: the Groups the Edit Contact page offers. Use an id with POST /beneficiaries/bulk_groups. Any member of the organisation can list them.")}
+ ${endpointCard("POST", "/beneficiaries/bulk_audiences", "Give many Contacts Audiences, or end them", true, [
+ { name: "add_ids", in: "body", type: "integer[]", required: false, desc: "Audiences to give every Contact, from GET /audiences" },
+ { name: "remove_ids", in: "body", type: "integer[]", required: false, desc: "Audiences to end for every Contact, today" },
+ { name: "start_date", in: "body", type: "date", required: false, desc: "When the Audiences being added start. Default today" },
+ { name: "charity_id", in: "body", type: "integer", required: false, desc: "The organisation. Optional if you belong to only one" },
+ { name: "beneficiary_ids", in: "body", type: "integer[]", required: false, desc: "The Contacts to change, at most 500. Leave out to choose them with filter_data" },
+ { name: "filter_data", in: "body", type: "object", required: false, desc: "Manage Contacts filters choosing the Contacts" },
+ { name: "excluded_ids", in: "body", type: "integer[]", required: false, desc: "Contacts matching the filters to leave out" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "Up to 50 Contacts, changed straight away: id, status, changed_count, skip_counts and summary" },
+ { code: "202", cls: "response-2xx", desc: "More than 50 Contacts: the change runs in the background. Poll GET /beneficiaries/bulk_actions/{id} with the id" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "An organisation you aren't in" },
+ { code: "422", cls: "response-4xx", desc: "Nothing to add or remove, an Audience of another organisation, a bad start_date, or you aren't a colleague in the organisation" }
+ ], "Add or remove › Audiences for the Contacts selected on the Manage Contacts page. Ending an Audience sets its end date to today rather than deleting it, so it stays in the Contact's history. Contacts whose Audience you may not end are skipped (skip_counts.not_allowed_to_end).")}
+ ${endpointCard("POST", "/beneficiaries/bulk_required_skills", "Add Skills to many Contacts' Skills Required, or remove them", true, [
+ { name: "add_ids", in: "body", type: "integer[]", required: false, desc: "Skills to add, from GET /skills" },
+ { name: "remove_ids", in: "body", type: "integer[]", required: false, desc: "Skills to remove. Only Organisation Editors may remove one" },
+ { name: "charity_id", in: "body", type: "integer", required: false, desc: "The organisation. Optional if you belong to only one" },
+ { name: "beneficiary_ids", in: "body", type: "integer[]", required: false, desc: "The Contacts to change, at most 500. Leave out to choose them with filter_data" },
+ { name: "filter_data", in: "body", type: "object", required: false, desc: "Manage Contacts filters choosing the Contacts" },
+ { name: "excluded_ids", in: "body", type: "integer[]", required: false, desc: "Contacts matching the filters to leave out" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "Up to 50 Contacts, changed straight away: id, status, changed_count, skip_counts and summary" },
+ { code: "202", cls: "response-2xx", desc: "More than 50 Contacts: the change runs in the background. Poll GET /beneficiaries/bulk_actions/{id} with the id" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "An organisation you aren't in" },
+ { code: "422", cls: "response-4xx", desc: "Nothing to add or remove, or a Skill of another organisation" }
+ ], "Add or remove › Skills Required for the Contacts selected on the Manage Contacts page, as the Skills Required box on a Contact's profile does. Anyone who can see a Contact may add a Skill; for anyone but an Organisation Editor, a removal skips the Contact (skip_counts.not_allowed_to_remove).")}
+ ${endpointCard("GET", "/skills", "List the organisation's Skills", true, [
+ { name: "charity_id", in: "query", type: "integer", required: false, desc: "The organisation. Optional if you belong to only one" },
+ { name: "page", in: "query", type: "integer", required: false, desc: "Page number" },
+ { name: "per_page", in: "query", type: "integer", required: false, desc: "Default 10, max 200" },
+ { name: "last_synced_datetime", in: "query", type: "string", required: false, desc: "Only Skills changed since then" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "data: each Skill's id and name, by name, in the paginated envelope" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "An organisation you aren't in" }
+ ], "Skills, e.g. First aid. Use an id with POST /beneficiaries/bulk_required_skills.")}
+ ${endpointCard("POST", "/beneficiaries/bulk_type", "Change the Type of many Contacts", true, [
+ { name: "beneficiary_type_id", in: "body", type: "integer", required: true, desc: "The Contact Type to change every Contact to, from GET /beneficiary_types" },
+ { name: "charity_id", in: "body", type: "integer", required: false, desc: "The organisation. Optional if you belong to only one" },
+ { name: "beneficiary_ids", in: "body", type: "integer[]", required: false, desc: "The Contacts to change, at most 500. Leave out to choose them with filter_data" },
+ { name: "filter_data", in: "body", type: "object", required: false, desc: "Manage Contacts filters choosing the Contacts" },
+ { name: "excluded_ids", in: "body", type: "integer[]", required: false, desc: "Contacts matching the filters to leave out" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "Up to 50 Contacts, changed straight away: id, status, changed_count, skip_counts and summary" },
+ { code: "202", cls: "response-2xx", desc: "More than 50 Contacts: the change runs in the background. Poll GET /beneficiaries/bulk_actions/{id} with the id" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "An organisation you aren't in" },
+ { code: "422", cls: "response-4xx", desc: "No Type given" }
+ ], "Add or remove › Type for the Contacts selected on the Manage Contacts page. Bio fields that only show for one Type stay saved, but are hidden while a Contact has a Type without them. Contacts you may not edit are skipped (skip_counts.not_allowed).")}
${endpointCard("GET", "/relationship_categories", "List the organisation's Relationship Categories", true, [
{ name: "charity_id", in: "query", type: "integer", required: false, desc: "The organisation. Optional if you belong to only one" },
{ name: "page", in: "query", type: "integer", required: false, desc: "Page number" },