Archiving and deleting organizations
The process to delete an organization is first to archive it, then to delete it.
Archiving an organization soft deletes it from your main organizations list.
When you archive an organization, it:
- can no longer be found via search, which only operates on organizations in your main organization list; you can only search for
"type": "archived_organization"
(via theget
endpoint). - can no longer be involved in campaigns or audiences, and
- will no longer be linked to any people.
Archived organizations will stay in your archive until you restore or delete them.
Once you archive an organization you can delete it permanently.
You can archive batches of up to 100 organizations at once.
Here is how to archive organizations:
shell
curl --request PUT \ --url https://api.ap3api.com/v1/organizations/archive \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: API_KEY' \ --data '{ "inclusion_ids": ["1062c76b689c7fb81ffeae00"] }'
where
inclusion_ids
is an array of strings representing organization IDs.NOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:
Australia: https://api.au.ap3api.com/ Europe: https://api.eu.ap3api.com/For example: https://api.eu.ap3api.com/v1/<entity/endpoint>
All other Ortto users will use the default service endpoint (https://api.ap3api.com/).
You can obtain the organization ID using the
get
endpoint to retrieve one or more organizations. Or, find the organization ID in the Ortto app by viewing the organization’s profile and copying the ID from the URL (e.g.https://ortto.app/myinstance/cdp/organizations/
1062c76b689c7fb81ffeae00
/activities?from=cdp-filter&key=organizations-all-
).If you need to restore an archived organization, you can do it like so:
shell
curl --request PUT \ --url https://api.ap3api.com/v1/organizations/restore \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: API_KEY' \ --data '{ "inclusion_ids": ["1062c76b689c7fb81ffeae00"] }'
Here is how to delete organizations (once they are archived):
shell
curl --request DELETE \ --url https://api.ap3api.com/v1/organizations/delete \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: API_KEY' \ --data '{ "inclusion_ids": ["1062c76b689c7fb81ffeae00"] }'