---
title: "Retrieve the variable schema and lead schema mapping for a specific campaign"
method: GET
path: "/campaigns/{campaignId}/schemas"
tags: ["Campaigns"]
---

# Retrieve the variable schema and lead schema mapping for a specific campaign

`GET /campaigns/{campaignId}/schemas`

## Request

- Base URL: `https://api.pitchlane.com/api/public/v1`
- URL: `https://api.pitchlane.com/api/public/v1/campaigns/{campaignId}/schemas`
- Auth: API key in header `X-API-Key`

## Path parameters

- `campaignId` string, required

## Response `200`

Returns both variable and lead schema mappings along with their example payloads

- object
  - `variableSchema` object: The schema for the variables associated with the campaign
  - `exampleVariableSchemaPayload` object: An example payload that adheres to the variable schema
  - `leadSchemaMapping` object: The schema for the leads associated with the campaign. The keys of this should be what goes in your API request body.
  - `exampleLeadSchemaMappingPayload` object: An example payload that adheres to the lead schema

## Other responses

- `404`: Campaign not found

---

[API](https://skmtc.dev/pitchlane/apis/pitchlane-api.md) · [All operations](https://skmtc.dev/pitchlane/apis/pitchlane-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pitchlane/apis/pitchlane-api/revisions/a8d831473a5c?raw)
