---
updatedAt: 2026-09-11T07:28:51.000Z
agentTools:
  projectIndex: https://docs.padlet.dev/llms.txt
---

# Get post attachment data

Get post attachment information by post ID.

Returns post attachment object by `post_id`.

> 📘 API key
>
> You will need to include your API key found <a href="https://padlet.com/dashboard/settings/developers" target="_blank">here</a>.
>
> Please include the key in your header. `{"X-API-KEY": <api_key>}`

<Callout icon="🔒" theme="default">
  ### Authorization required

  This endpoint requires admin access to the board. You must be an admin or owner of the board to access its data.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Endpoints",
    "version": "1.0",
    "description": "Read and create posts.",
    "contact": {
      "name": "Padlet Engineer",
      "email": "engine@wallwisher.com",
      "url": "https://legal.padlet.com"
    },
    "license": {
      "url": "https://legal.padlet.com",
      "name": "CPadlet"
    },
    "termsOfService": "https://legal.padlet.com"
  },
  "servers": [
    {
      "url": "https://api.padlet.dev/v1",
      "description": "V1."
    }
  ],
  "paths": {
    "/posts/{post_id}/attachmentData": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "post_id",
          "in": "path",
          "required": true,
          "description": "ID of the post"
        }
      ],
      "get": {
        "summary": "Get post attachment data",
        "tags": [
          "Post"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/attachmentData"
          },
          "404": {
            "$ref": "#/components/responses/404-not-found"
          }
        },
        "operationId": "get-post-attachment-data",
        "description": "Get post attachment information by post ID.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-internal": false
      }
    }
  },
  "components": {
    "responses": {
      "404-not-found": {
        "description": "Object not found",
        "content": {
          "application/vnd.api+json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "string",
                        "example": "404"
                      },
                      "title": {
                        "type": "string",
                        "example": "Record not found"
                      },
                      "detail": {
                        "type": "string",
                        "example": "Record not found"
                      },
                      "code": {
                        "type": "string",
                        "example": "NOT_FOUND"
                      }
                    }
                  }
                }
              }
            },
            "example": {
              "errors": [
                {
                  "status": "404",
                  "title": "Record not found",
                  "detail": "Record not found",
                  "code": "NOT_FOUND"
                }
              ]
            }
          }
        }
      },
      "attachmentData": {
        "description": "Returns post attachment data",
        "content": {
          "application/vnd.api+json": {
            "schema": {
              "type": "object",
              "x-examples": {
                "URL Example": {
                  "data": {
                    "type": "attachmentData",
                    "attributes": {
                      "previewImageUrl": "https://padlet-artifacts.storage.googleapis.com/8f536ed811cfa1a2f356679173e08f6df78ffc87/af240aa1953396055d127dc8b7e69891-h-2fbcf21a0b37a5f542c15b8da4ea5152.jpg",
                      "embedCode": "<iframe class=\"wb-embed-content\" frameborder=\"0\" style=\"border:0;\" width=\"550\" height=\"768\" src=\"https://mediagci.padlet.com/1/widget?url=https%3A%2F%2Ftwitter.com%2FMarkZucker_%2Fstatus%2F1683878489760608256\" srcdoc=\"<blockquote class=&quot;twitter-tweet&quot;><p lang=&quot;en&quot; dir=&quot;ltr&quot;>The logo looks great <a href=&quot;https://t.co/MhRYK3y78z&quot;>pic.twitter.com/MhRYK3y78z</a></p>&amp;mdash; Mark Zuckerberg (Parody) (@MarkZucker_) <a href=&quot;https://twitter.com/MarkZucker_/status/1683878489760608256?ref_src=twsrc%5Etfw&quot;>July 25, 2023</a></blockquote>\n<script async src=&quot;https://platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;></script>\n\" loading=\"lazy\"></iframe>"
                    }
                  }
                },
                "Poll Example": {
                  "data": {
                    "type": "attachmentData",
                    "attributes": {
                      "previewImageUrl": "",
                      "embedCode": "",
                      "poll": {
                        "question": "What's your favorite color?",
                        "choices": [
                          {
                            "text": "Red",
                            "voteCount": 8
                          },
                          {
                            "text": "Blue",
                            "voteCount": 20
                          }
                        ],
                        "isActive": true,
                        "closedAt": "2025-09-03T21:48:41.696Z"
                      }
                    }
                  }
                }
              },
              "properties": {
                "data": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "attachmentData"
                    },
                    "id": {
                      "type": "string",
                      "description": "ID of the object"
                    },
                    "attributes": {
                      "title": "Attachment Data Attributes",
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "previewImageUrl": {
                          "type": "string",
                          "example": "",
                          "description": "Post preview image url."
                        },
                        "embedCode": {
                          "type": "string",
                          "example": ""
                        },
                        "poll": {
                          "type": "object",
                          "nullable": true,
                          "description": "Optional poll data when the attachment is a poll",
                          "properties": {
                            "question": {
                              "type": "string",
                              "example": "What is your favorite color?"
                            },
                            "choices": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string",
                                    "description": "The choice text"
                                  },
                                  "voteCount": {
                                    "type": "integer",
                                    "description": "Number of votes for this choice",
                                    "default": 0
                                  }
                                },
                                "required": [
                                  "text",
                                  "voteCount"
                                ]
                              },
                              "example": [
                                {
                                  "text": "Red",
                                  "voteCount": 8
                                },
                                {
                                  "text": "Blue",
                                  "voteCount": 20
                                }
                              ]
                            },
                            "isActive": {
                              "type": "boolean",
                              "example": true
                            },
                            "closedAt": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true,
                              "description": "The date and time when the poll was closed. Null if still active.",
                              "example": "2025-09-03T21:48:41.696Z"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "application/xml": {
            "schema": {
              "type": "object",
              "properties": {}
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "name": "X-Api-Key",
        "type": "apiKey",
        "in": "header",
        "description": ""
      }
    }
  },
  "x-internal": false,
  "tags": [
    {
      "name": "Post",
      "description": "Operations related to posts inside a board."
    }
  ]
}
```