> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryordinal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# post.archived

> Fired when a post is archived (moved to trash)

All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.

<ResponseField name="type" type="string" required>
  The event type (e.g. `post.archived`).
</ResponseField>

<ResponseField name="data" type="object" required>
  Event-specific payload for this webhook.

  <Expandable title="Data object parameters">
    <ResponseField name="post" type="object" required>
      The archived post.

      <Expandable title="Post object parameters">
        <ResponseField name="id" type="string" required>
          Post ID.
        </ResponseField>

        <ResponseField name="title" type="string" required>
          Post title.
        </ResponseField>

        <ResponseField name="status" type="string" required>
          Post status.
        </ResponseField>

        <ResponseField name="channels" type="array" required>
          Channels the post was scheduled for.
        </ResponseField>

        <ResponseField name="campaign" type="object | null">
          Campaign if assigned. Contains `id`, `name`, `startDate`, and `endDate`.
        </ResponseField>

        <ResponseField name="url" type="string" required>
          Ordinal post URL.
        </ResponseField>

        <ResponseField name="labels" type="array" required>
          Labels attached to the post. Each contains `id`, `name`, `color`, and `backgroundColor`.
        </ResponseField>

        <ResponseField name="workspace" type="object" required>
          Workspace the post belongs to. Contains `id`, `slug`, and `name`.
        </ResponseField>

        <ResponseField name="archivedBy" type="object" required>
          User who archived the post. Contains `id`, `firstName`, `lastName`, and `email`.
        </ResponseField>

        <ResponseField name="archivedAt" type="string" required>
          ISO 8601 timestamp when the post was archived.
        </ResponseField>

        <ResponseField name="linkedIn" type="object | null">
          LinkedIn content when the post includes LinkedIn. Contains `profile` (id, name, detail), `copy`, and `assets` (id, name, url, mimetype, size, width, height, duration).
        </ResponseField>

        <ResponseField name="x" type="object | null">
          X/Twitter content when the post includes Twitter. Contains `profile` (id, name, detail) and `tweets` (array of `{ copy, assets }`).
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="createdAt" type="string" required>
  ISO 8601 timestamp when the webhook event was created.
</ResponseField>

<ResponseExample>
  ```json Example theme={null}
  {
    "type": "post.archived",
    "data": {
      "post": {
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "title": "Draft Post",
          "status": "archived",
          "channels": ["LinkedIn", "Twitter"],
          "campaign": null,
          "url": "https://app.tryordinal.com/acme/posts/550e8400-e29b-41d4-a716-446655440001",
        "labels": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440400",
          "name": "Marketing",
          "color": "#9333ea",
          "backgroundColor": "#f3e8ff"
        }
        ],
        "workspace": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "slug": "acme",
        "name": "Acme Inc"
        },
        "archivedBy": {
        "id": "550e8400-e29b-41d4-a716-446655440010",
        "firstName": "Jane",
        "lastName": "Doe",
        "email": "jane@example.com"
        },
        "archivedAt": "2025-02-26T15:00:00.000Z",
        "linkedIn": {
        "profile": {
          "id": "550e8400-e29b-41d4-a716-446655440002",
          "name": "Acme Inc",
          "detail": "acme-inc"
        },
        "copy": "Draft post content for LinkedIn",
        "assets": [
          {
            "id": "550e8400-e29b-41d4-a716-446655440010",
            "name": "product-photo.jpg",
            "url": "https://cdn.tryordinal.com/assets/product-photo.jpg",
            "mimetype": "image/jpeg",
            "size": 245678,
            "width": 1920,
            "height": 1080,
            "duration": null
          }
        ]
        },
        "x": {
        "profile": {
          "id": "550e8400-e29b-41d4-a716-446655440004",
          "name": "Acme Inc",
          "detail": "@acme_inc"
        },
        "tweets": [
          {
            "copy": "Draft post content for Twitter",
            "assets": [
              {
                "id": "550e8400-e29b-41d4-a716-446655440011",
                "name": "product-photo.jpg",
                "url": "https://cdn.tryordinal.com/assets/product-photo.jpg",
                "mimetype": "image/jpeg",
                "size": 245678,
                "width": 1920,
                "height": 1080,
                "duration": null
              }
            ]
          }
        ]
      }
    }
    },
    "createdAt": "2025-02-26T15:00:00.000Z"
  }
  ```
</ResponseExample>
