> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.partnerpage.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.partnerpage.io/_mcp/server.

# Create a new directory matchmaking request

POST https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/{directoryId}/matchmaking/
Content-Type: application/json

Create a matchmaking request in one of your own directories from your own server. Authenticate with your API token (`Authorization: Token <your-api-token>`); the token's organization must own the directory. CAPTCHA is not required: the token is the trust signal. The matchmaking form on the public directory website is a separate flow for anonymous visitors; it requires a valid `captcha` and an API token does not replace it there.

Before submitting, read the directory's matchmaking request form (`GET /api/directory/public/v1alpha/directories/{directoryId}/forms/matchmaking-request/`) for the field IDs, internal labels, types and which fields are required. Send one answer per field in `form.answers`, identified by `fieldId` or `internalLabel`. First name, last name, email and company name are always required; the directory's form can require more. Property names are accepted in camelCase (as in the examples) or snake\_case (as in the schema). `utmQueryParams` stores attribution data with the request.

A company website without a scheme (`acme.com`) is stored with `https://`. One that is not an http(s) web address (for example an email address) is dropped, with its answer cleared, and the request is still created without it instead of answering 400.

The directory must have matchmaking requests enabled. Limited to 50 requests per hour per user.

Reference: https://docs.partnerpage.io/api-reference/matchmaking/create-a-new-directory-matchmaking-request

## Authentication

- `Authorization` header (required) (prefixed with ` Token   `) — Your API key, sent as `Authorization: Token <your API key>`

## Request

### Path parameters

- `directoryId` (string, required) — ID of the directory to create a matchmaking request for

### Body (application/json)

This endpoint expects a DirectoryMatchmakingRequestCreateRequest.

- `form` (DirectoryMatchmakingRequestCreateFormRequest, required)
- `utmQueryParams` (map from string to any, optional) — UTM attribution to store with the request, for example `{"utmSource": "api", "utmMedium": "server-to-server"}`.

## Response

### 201

Directory matchmaking request created successfully.

- `id` (string, required)
- `answers` (list of SubmittedAnswer, required)
- `created` (string, required, nullable)
- `owner` (string, required, nullable)
- `utmQueryParams` (any, optional, nullable)

## Errors

### 400 Bad Request Error

Invalid submission: a required field is missing, an answer does not match its field, a field ID or internal label is unknown, or the email domain is not accepted as a business email (when the directory requires business emails). The body names the failing answer or field.

- `any`

### 401 Unauthorized Error

Missing or invalid API token (CAPTCHA is never required)

- `any`

### 403 Forbidden Error

Your API token's organization does not own this directory, matchmaking requests are disabled for it, or the directory does not exist

- `any`

### 429 Too Many Requests Error

Rate limit exceeded (50 requests per hour per user)

- `any`

### 500 Internal Server Error

Unexpected error; the body carries the error message

- `any`

## Types

### DirectoryMatchmakingRequestCreateFormRequest

- `answers` (list of SubmittedAnswerWriterRequest, required) — One answer per field of the directory's matchmaking request form.

### SubmittedAnswer

- `field` (any, required)
- `answer` (any, required, nullable)
- `otherText` (string, optional, nullable)

### SubmittedAnswerWriterRequest

One submitted form answer.

- `answer` (any, required, nullable) — The submitted value. A string for text, email, URL and phone fields; the shape of option, date and other custom fields follows the field definition returned by the form endpoint.
- `fieldId` (string, optional) — ID of the form field this answer belongs to. Identify every answer by `fieldId` or by `internalLabel`.
- `internalLabel` (string, optional) — Internal label of the form field, for example `partnerpage-email`. Resolved within the directory's form.
- `otherText` (string, optional) — Free text entered for an option field's "Other" choice.

## Examples

### Field IDs and internal labels (application/json)

**Request**

```json
{
  "form": {
    "answers": [
      {
        "answer": null,
        "fieldId": "0165c5e6-e562-4ad9-adce-efc9844a95fc"
      },
      {
        "answer": null,
        "internalLabel": "partnerpage-last_name"
      },
      {
        "answer": null,
        "internalLabel": "partnerpage-email"
      },
      {
        "answer": null,
        "internalLabel": "partnerpage-company_name"
      }
    ]
  },
  "utmQueryParams": {
    "utmMedium": "server-to-server",
    "utmSource": "api"
  }
}
```

**Response**

```json
{
  "id": "219a7d94-b934-4ccf-880f-d24b55e7e03e",
  "answers": [],
  "created": "2024-08-23T13:40:00+00:00",
  "owner": null,
  "utmQueryParams": {}
}
```

**SDK Code**

```python Field IDs and internal labels (application/json)
import requests

url = "https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/:directoryId/matchmaking/"

payload = {
    "form": { "answers": [
            {
                "answer": None,
                "fieldId": "0165c5e6-e562-4ad9-adce-efc9844a95fc"
            },
            {
                "answer": None,
                "internalLabel": "partnerpage-last_name"
            },
            {
                "answer": None,
                "internalLabel": "partnerpage-email"
            },
            {
                "answer": None,
                "internalLabel": "partnerpage-company_name"
            }
        ] },
    "utmQueryParams": {
        "utmMedium": "server-to-server",
        "utmSource": "api"
    }
}
headers = {
    "Authorization": "Token  <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Field IDs and internal labels (application/json)
const url = 'https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/:directoryId/matchmaking/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token  <apiKey>', 'Content-Type': 'application/json'},
  body: '{"form":{"answers":[{"answer":null,"fieldId":"0165c5e6-e562-4ad9-adce-efc9844a95fc"},{"answer":null,"internalLabel":"partnerpage-last_name"},{"answer":null,"internalLabel":"partnerpage-email"},{"answer":null,"internalLabel":"partnerpage-company_name"}]},"utmQueryParams":{"utmMedium":"server-to-server","utmSource":"api"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

### Internal labels only (application/json)

**Request**

```json
{
  "form": {
    "answers": [
      {
        "answer": null,
        "internalLabel": "partnerpage-first_name"
      },
      {
        "answer": null,
        "internalLabel": "partnerpage-last_name"
      },
      {
        "answer": null,
        "internalLabel": "partnerpage-email"
      },
      {
        "answer": null,
        "internalLabel": "partnerpage-company_name"
      },
      {
        "answer": null,
        "internalLabel": "partnerpage-company_website"
      },
      {
        "answer": null,
        "internalLabel": "partnerpage-phone"
      },
      {
        "answer": null,
        "internalLabel": "partnerpage-comments"
      }
    ]
  }
}
```

**Response**

```json
{
  "id": "219a7d94-b934-4ccf-880f-d24b55e7e03e",
  "answers": [],
  "created": "2024-08-23T13:40:00+00:00",
  "owner": null,
  "utmQueryParams": {}
}
```

**SDK Code**

```python Internal labels only (application/json)
import requests

url = "https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/:directoryId/matchmaking/"

payload = { "form": { "answers": [
            {
                "answer": None,
                "internalLabel": "partnerpage-first_name"
            },
            {
                "answer": None,
                "internalLabel": "partnerpage-last_name"
            },
            {
                "answer": None,
                "internalLabel": "partnerpage-email"
            },
            {
                "answer": None,
                "internalLabel": "partnerpage-company_name"
            },
            {
                "answer": None,
                "internalLabel": "partnerpage-company_website"
            },
            {
                "answer": None,
                "internalLabel": "partnerpage-phone"
            },
            {
                "answer": None,
                "internalLabel": "partnerpage-comments"
            }
        ] } }
headers = {
    "Authorization": "Token  <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Internal labels only (application/json)
const url = 'https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/:directoryId/matchmaking/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token  <apiKey>', 'Content-Type': 'application/json'},
  body: '{"form":{"answers":[{"answer":null,"internalLabel":"partnerpage-first_name"},{"answer":null,"internalLabel":"partnerpage-last_name"},{"answer":null,"internalLabel":"partnerpage-email"},{"answer":null,"internalLabel":"partnerpage-company_name"},{"answer":null,"internalLabel":"partnerpage-company_website"},{"answer":null,"internalLabel":"partnerpage-phone"},{"answer":null,"internalLabel":"partnerpage-comments"}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```