Delete News API

Remove news articles and announcements from the platform

Content

Delete News API

Remove news articles and announcements from the platform. Delete outdated, incorrect, or no longer relevant content.

Remove Content

Delete news articles.

Clean Up

Remove outdated announcements.

Controlled

Admin-only operation.


Endpoint Overview

MUTATION/graphql

Delete an existing news article by its unique identifier. This permanently removes the article from the platform.

Authentication:Bearer Token
Required scopes:admin

Request Parameters

idInt!Required

The unique identifier of the news article to delete.


GraphQL Mutation

mutation deleteNews($id: Int!) {
  deleteNews(id: $id) {
    id
    title
    description
  }
}

Variables:

{
  "id": 456
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "query": "mutation deleteNews($id: Int!) { deleteNews(id: $id) { id title } }",
    "variables": {
      "id": 456
    }
  }'

Response

200News Deleted Successfully
{
  "data": {
    "deleteNews": {
      "id": "456",
      "title": "Scheduled Maintenance - January 20th",
      "description": "We will be performing scheduled maintenance..."
    }
  }
}
400News Not Found
{
  "errors": [
    {
      "message": "News article with ID 456 not found",
      "path": ["deleteNews"],
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ],
  "data": null
}

When to Delete

Outdated

Events that have passed.

Incorrect

Information that was wrong.

Duplicate

Accidentally posted twice.

No Longer Relevant

Context has changed significantly.


Best Practices

Archive First

Save content before deleting.

Consider Editing

Update instead of delete when possible.

Verify ID

Double-check the article ID.

Document Reason

Record why content was removed.



Permanent Action

Deletion is permanent. The news article cannot be recovered once deleted. Consider editing or archiving instead.

Create New Announcement

Need to replace deleted content? Create a new news article.

Create News