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
| Name | In | Type | Description |
|---|---|---|---|
| link_id required | path | string (uuid) | The link_id from POST /v1/accounts/connect-link. |
Responses
| Status | Meaning |
|---|---|
| 200 | Revoked. |
| 401 | The API key is missing or invalid. |
| 404 | No connect link with that link_id on this key. |
| 503 | Temporarily 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.
| Field | Type | Description |
|---|---|---|
| link_id required | string (uuid) | |
| revoked required | true |
| Header | Meaning |
|---|---|
| RateLimit-Limit | Requests this API key may make per minute. |
| RateLimit-Remaining | Requests left in the current one-minute window. |
| RateLimit-Reset | Seconds 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 -X DELETE https://api.prospectapis.com/v1/accounts/connect-link/3f6c1d2e-8b4a-4f7e-9c21-5a0d7e9b4c13 \
-H "Authorization: Bearer $PROSPECTAPIS_KEY"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);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.
Related
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?