DELETE Disconnect Source

Disconnect a vault, either keeping the identities that came from it or deleting them with it

DELETEhttps://api.anakin.io/v1/wire/identity-sources/{id}

Disconnects a source and deletes its stored credential. What happens to the identities that were sourced from it is your choice, and it is the only decision on this page that can't be undone.

Requires an X-API-Key; the source must belong to the authenticated user. Check identities_using first to see what's at stake.


Two behaviours

Keep the identities (default). The identities survive with their source_id cleared. They keep running on their cached session cookies until those expire, then can't refresh — the dashboard shows them as source disconnected. Reconnect and re-bind to restore them.

DELETE /identity-sources/{id}

Delete the identities too. The sourced identities are removed along with the source, in one atomic statement. This cannot be undone.

DELETE /identity-sources/{id}/identities
DELETE /identity-sources/{id}?delete_identities=true
DELETEhttps://api.anakin.io/v1/wire/identity-sources/{id}/identities

Both destructive forms do the same thing. Prefer the /identities path: the destructive intent is in the URL, so it can't be reached by a stale link or a copy-pasted query string that lost its flag. The ?delete_identities=true variant is kept for existing callers.

Any value other than exactly true for delete_identities is treated as false — the safe reading. ?delete_identities=1 and ?delete_identities=TRUE both keep your identities.


Path Parameters

ParameterTypeDescription
id requiredstring (UUID)Identity source ID

Query Parameters

ParameterTypeDescription
delete_identitiesstringtrue deletes the sourced identities along with the source. Anything else keeps them. Ignored on the /identities path, which always deletes

Response

200 OK
{ "status": "ok" }

Identical for both behaviours. It does not report how many identities were affected — read identities_using before deleting if you need that.


Error Responses

CodeHTTPWhen
NOT_FOUND404No source with that ID
FORBIDDEN403The source belongs to another user
INTERNAL_ERROR500The disconnect failed; nothing was deleted

Code Examples

# keep the identities — they run on cached cookies until those expire
curl https://api.anakin.io/v1/wire/identity-sources/f1e2d3c4-0000-0000-0000-000000000000 \
  -X DELETE \
  -H "X-API-Key: your_api_key"

# delete the identities too — irreversible
curl https://api.anakin.io/v1/wire/identity-sources/f1e2d3c4-0000-0000-0000-000000000000/identities \
  -X DELETE \
  -H "X-API-Key: your_api_key"

Rate limit

20 requests per minute per user, for both forms.