Delete a project domain
Delete a specific domain attached to a project.
Use this endpoint when you want to remove a domain from the allowed list for a project (for example, when a customer migrates to a new domain or you want to revoke access for a specific host).
Endpoint
DELETE /project/{project}/domains/{domain}
Full URL:
https://api.devpayr.dev/api/v1/project/{project}/domains/{domain}Authentication
β Required: API Key
Send your API key using:
X-API-KEY: <your_api_key>Path Parameters
project
integer
Yes
The ID of the project that owns the domain.
domain
integer
Yes
The ID of the project domain record to delete.
Authorization Rules
DevPayr validates access in 3 steps:
1) Project-scoped API key must match the project
If your API key is scoped to a specific project, it must match the {project} in the URL.
Error (403)
2) Global API key must match project ownership
If your API key is global, it must belong to the same user that owns the project.
Error (403)
3) Domain must belong to the specified project
Even if you have access to the project, the domain record must belong to that project.
Error (403)
Example Request
Response
Success (200)
DevPayr returns a standard response envelope with a confirmation message:
message:"Domain deleted successfully."
Example Response
Deletion Behavior
The delete happens inside a database transaction.
The domain record is deleted and becomes inaccessible via the API.
An audit log entry is recorded (
project.domain_deleted.api) including:domain string
project ID
the project owner as actor
Errors
Missing API Key (401)
Invalid / Expired API Key (403)
Unauthorized (403)
Project-scoped mismatch:
Global key not owner:
Domain not tied to project:
Project or Domain Not Found (404)
Rate Limited (429)
Last updated