---
docId: doc_4e86db8dc9524cefa094ca63747ac162
title: Get the publication
description: Gets an agent's publication, the version that answers your contacts, and who published it.
api:
  group: agentes/publicacion
  auth: bearer
  operations:
    - operationId: getPublication
      method: GET
      path: '/v1/agents/{agentId}/publication'
      postmanName: Get the publication
---

<script>
  import { Ways } from '$lib/components';
</script>

# Get the publication

Check which version is answering your contacts and who published it. Use `publication.versionId` to read its configuration. Each incoming message uses the version published when it arrives.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl https://api.platic.ai/v1/agents/$AGENT_ID/publication \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.agents.publication.get("agent_123");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `agentId` | string | Agent id | ✓ |

## Response

```json
{
  "status": "success",
  "data": {
    "agentId": "Xq8mTe2LwP4kZ1aB9cDf",
    "publication": { "versionId": "v3", "number": 3 },
    "last": {
      "publicationId": "p2",
      "action": "publish",
      "versionId": "v3",
      "previousVersionId": "v1",
      "createdAt": "2026-10-28T12:20:00.000Z",
      "createdBy": { "kind": "api_key", "keyId": "k3yId" },
      "source": "api",
      "via": null,
      "note": "Launch"
    }
  }
}
```

## Response fields

| Field | Description |
|-------|-------------|
| `agentId` | Agent id |
| `publication.versionId` | Published version, for example `v3` |
| `publication.number` | Number of that version |
| `last` | The last publication, with the fields of each entry in the [publication history](/api-reference/agents/publications/list#response-fields) |

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `404` | `AGENT_NOT_FOUND` | The agent doesn't exist in the workspace or was deleted |

## Notes

- To read the configuration that is in production, use [Get a version](/api-reference/agents/versions/get) with `publication.versionId`.
- To see all previous publications, use the [publication history](/api-reference/agents/publications/list).
