Skip to main content
DELETE
/
account
/
projects
/
{projectId}
curl --request DELETE \
  --url https://api.autosend.com/v1/account/projects/60d5ec49f1b2c72d9c8b1234 \
  --header 'Authorization: Bearer ASA_your-admin-api-key'
{
  "success": true,
  "message": "Project deleted successfully"
}
This endpoint requires an organization admin API key (ASA_ prefix). Standard project API keys cannot access this endpoint.
This action deletes the project and all associated resources (domains, senders, templates, campaigns, contacts). This cannot be undone.
curl --request DELETE \
  --url https://api.autosend.com/v1/account/projects/60d5ec49f1b2c72d9c8b1234 \
  --header 'Authorization: Bearer ASA_your-admin-api-key'
{
  "success": true,
  "message": "Project deleted successfully"
}

Authorizations

Authorizations
string | header
required
Organization admin API key header of the form Bearer ASA_<key>. Standard project API keys (AS_ prefix) will receive a 403 error.

Path Parameters

projectId
string
required
The unique identifier of the project to delete (MongoDB ObjectId). The project must belong to the authenticated organization.Example: "60d5ec49f1b2c72d9c8b1234"

Response

Project deleted successfully
success
boolean
Indicates if the request was successfulExample: true
message
string
Confirmation messageExample: "Project deleted successfully"

Error Responses

403 - Not an admin key
object
Returned when using a standard project API key instead of an organization admin API key.
{
  "success": false,
  "error":{
    "message":"This endpoint requires an organization admin API key (ASA_ prefix)"
  }
}
400 - Invalid project ID
object
Returned when the projectId parameter is not a valid MongoDB ObjectId.
{
  "success": false,
  "error": [
    {
      "message": "Invalid project ID"
    }
  ]
}
404 - Project not found
object
Returned when the project does not exist or does not belong to the organization.
{
  "success": false,
  "error": {
    "message": "Project not found"
  }
}