Skip to content
ProspectAPIs

API reference / Connected account

Revoke a hosted connect link

Written and maintained by The ProspectAPIs team

DELETE/v1/accounts/connect-link/:link_id

DELETE /v1/accounts/connect-link/:link_id is the ProspectAPIs operation revokeAccountConnectLink, in the Connected account group of the REST API. Revoke a connect link so it can no longer connect anything. Calling it again is safe. An account already connected through it is untouched. Free. Cost: free; revoke a connect link before it is used. Send your API key as a Bearer token in the Authorization header.

How this fits with the rest of the connected account API, with worked examples, is in the connected accounts guide.

Parameters

Parameters of DELETE /v1/accounts/connect-link/:link_id
NameInTypeDescription
link_id requiredpathstring (uuid)The link_id from POST /v1/accounts/connect-link.

Responses

Response codes of DELETE /v1/accounts/connect-link/:link_id
StatusMeaning
200Revoked.
401The API key is missing or invalid.
404No connect link with that link_id on this key.
503Temporarily unavailable.

Every error answers with the same JSON body, an error string and sometimes a code; the errors page lists each status and when it happens.

200 response fields

Revoked.

Fields of the 200 response
FieldTypeDescription
link_id requiredstring (uuid)
revoked requiredtrue
Response headers
HeaderMeaning
RateLimit-LimitRequests this API key may make per minute.
RateLimit-RemainingRequests left in the current one-minute window.
RateLimit-ResetSeconds until the current window resets.

Code samples

Each sample sends the same request. Set PROSPECTAPIS_KEY in your environment first. Values come from the spec's examples; replace them with your own.

curl
curl -X DELETE https://api.prospectapis.com/v1/accounts/connect-link/3f6c1d2e-8b4a-4f7e-9c21-5a0d7e9b4c13 \
  -H "Authorization: Bearer $PROSPECTAPIS_KEY"
JavaScript (fetch)
const res = await fetch("https://api.prospectapis.com/v1/accounts/connect-link/3f6c1d2e-8b4a-4f7e-9c21-5a0d7e9b4c13", {
  method: "DELETE",
  headers: { Authorization: `Bearer ${process.env.PROSPECTAPIS_KEY}` },
});
if (!res.ok) throw new Error(`${res.status}: ${(await res.json().catch(() => ({}))).error ?? res.statusText}`);
const data = await res.json();
console.log(data);
Python (requests)
import os, requests

res = requests.delete(
    "https://api.prospectapis.com/v1/accounts/connect-link/3f6c1d2e-8b4a-4f7e-9c21-5a0d7e9b4c13",
    headers={"Authorization": f"Bearer {os.environ['PROSPECTAPIS_KEY']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()
print(data)

Billing

The call itself is free, and what it sets up is billed as it runs: revoke a connect link before it is used. Metered spend on the same key is reported after each response in X-Credits-Remaining, and GET /v1/account shows the balance at any time.

The connected accounts guide covers this area end to end. Previous operation: Create a hosted connect link. Next operation: Find the contacts a website lists. Every operation, grouped by area, is on the API reference index.

Create a free account to get a key, then run the samples above with your own values (this call acts for real, so use real inputs).

Was this page helpful?