# List recent posts by a profile or company

**`GET https://myagentmail.com/linkedin/posts/by-author`**

Group: LinkedIn — Posts
Operation ID: `linkedinListPostsByAuthor`

Pull the most recent posts authored by a LinkedIn profile or
company page. Same helper the engagement-signal runner uses
internally; exposed as a GET so agents can do one-shot lookups
("show me Acme's last 5 posts") without spinning up a recurring
signal.

`profileUrl` accepts either a profile URL
(`https://www.linkedin.com/in/<slug>/`) or a company URL
(`https://www.linkedin.com/company/<slug>/`). The route resolves
to a `urn:li:fsd_profile:` or `urn:li:fsd_company:` URN
automatically.

Quota: each call burns one `engagement_poll` slot from the
per-session daily budget.


## Query parameters

- `sessionId` (string, required) —
- `profileUrl` (string, required) —
- `count` (integer) —
- `sinceUrn` (string) — Watermark — return only posts whose activityUrn is newer than this.

## Responses

### 200 — Author identity + array of posts (newest first).

```json
{
  "ok": false,
  "author": {
    "kind": "profile",
    "urn": "string",
    "label": "string"
  },
  "count": 0,
  "posts": [
    {
      "activityUrn": "urn:li:activity:7332661864792854528",
      "postedAt": 0,
      "excerpt": "string"
    }
  ]
}
```

### 400 — Could not resolve the profile/company URL.

### 404 — Session not found.

### 429 — Daily quota exceeded for this session.

## Code samples

### TypeScript

```typescript
import { MyAgentMail } from "myagentmail";

const client = new MyAgentMail({ apiKey: process.env.MYAGENTMAIL_API_KEY! });

// GET /linkedin/posts/by-author
const result = await client.request("get", "/linkedin/posts/by-author");
```

### curl

```bash
curl -X GET 'https://myagentmail.com/linkedin/posts/by-author?sessionId=string&profileUrl=string' \
  -H 'X-API-Key: $MYAGENTMAIL_API_KEY'
```

### Python

```python
import os, requests

r = requests.get(
    "https://myagentmail.com/linkedin/posts/by-author?sessionId=string&profileUrl=string",
    headers={"X-API-Key": os.environ["MYAGENTMAIL_API_KEY"]},
)
r.raise_for_status()
print(r.json())
```
