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

# Publish a photo

> Post a photo by URL to the Page.

Publishes a photo from a public https URL, with optional text.

## Authentication

Use the `hmat_` channel token from `GET /meta/channels/{id}/token` or `hookmyapp channels token <channel>`. Do not use an `hmok_` API key for this call.

```bash theme={null}
Authorization: Bearer hmat_...
```

## Path parameters

<ParamField path="pageId" type="string" required>
  The connected Page id.
</ParamField>

## Request body

<ParamField body="url" type="string" required>
  Public https URL of a JPG or PNG.
</ParamField>

<ParamField body="message" type="string">
  Text shown with the photo.
</ParamField>

## Example

```bash theme={null}
curl -X POST "https://gateway.hookmyapp.com/meta/v25.0/{PAGE_ID}/photos" \
  -H "Authorization: Bearer hmat_..." \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/photo.jpg", "message": "New drop" }'
```

## Successful response

```json theme={null}
{ "id": "700000000000001", "post_id": "100000000000001_500000000000002" }
```

`post_id` is the post; `id` is the photo object. Use `post_id` for comments, insights and delete.
