Delete credential
DELETE
/credentials/{id}
const url = 'https://api.somebodyai.co/api/v1/credentials/507f1f77bcf86cd799439011?force=true';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://api.somebodyai.co/api/v1/credentials/507f1f77bcf86cd799439011?force=true' \ --header 'Authorization: Bearer <token>'Deletes a credential by ID.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
MongoDB ObjectId
string
MongoDB ObjectId
Query Parameters
Section titled “Query Parameters”force
string
Responses
Section titled “Responses”Credential deleted
Media typeapplication/json
object
success
required
boolean
Example
{ "success": true}Unauthorized - missing or invalid auth
Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{ "error": "Resource not found", "details": [ "Field is required" ]}Resource not found
Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{ "error": "Resource not found", "details": [ "Field is required" ]}Credential is referenced by at least one agent
Media typeapplication/json
object
error
required
string
referenceCount
required
number
Example
{ "error": "Credential is in use"}