Archiving and deleting accounts (previously organizations)
Overview
To delete an account, you must archive it first, then delete it.
What happens when you archive an account:
- It’s removed from your main list and won’t appear in search (unless specifically searching for archived records, you can only search for
"type": "archived_organization"
(via theget
endpoint). - It can’t be used in campaigns or audiences.
- It’s unlinked from all associated people.
Archived accounts stay in your archive until you choose to restore or permanently delete them.
NOTE: You can archive up to 100 accounts at a time.
To archive accounts:
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 account ID using the
get
endpoint to retrieve one or more accounts. Or, find the account ID in the Ortto app by viewing the accounts profile and copying the ID from the URL (e.g.https://ortto.app/myinstance/cdp/accounts/
1062c76b689c7fb81ffeae00
/activities?from=cdp-filter&key=accounts-all-
).If you need to restore an archived account, 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 account (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"] }'