---
title: "Insert new affiliation"
method: POST
path: "/api/pvt/affiliations"
tags: ["Configuration"]
---

# Insert new affiliation

`POST /api/pvt/affiliations`

Registers a new affiliation (payment or anti-fraud provider) in your store.

## Permissions

Any user or [API key](https://developers.vtex.com/docs/guides/api-authentication-using-api-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:

| **Product** | **Category** | **Resource** |
| --------------- | ----------------- | ----------------- |
| PCI Gateway | Payment-ManageStore | **Manage Store** |

There are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).

>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing API keys](https://help.vtex.com/en/tutorial/best-practices-api-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.

## Headers

- `Content-Type` string, required
- `Accept` string, required

## Request body

- InsertAffiliationRequest — Insert new affiliation request body information.
  - `implementation` string, required — Provider implementation class name.
  - `name` string, required — Provider name.
  - `configuration` object[], required — Array containing provider configuration information.
    - `name` string, required — Configuration parameter name.
    - `value` string, required — Configuration parameter value.
  - `isdelivered` boolean, required — Indicates whether the provider is published and available for use.
  - `isConfigured` boolean, required — Indicates whether the provider is configured.

## Response `200`

OK

- AffiliationResponse — Affiliation by ID response body information.
  - `id` string, required — Provider identification.
  - `implementation` string, required — Provider implementation class name.
  - `name` string, required — Provider name.
  - `configuration` object[], required — Array containing provider configuration information.
    - `name` string, required — Configuration parameter name.
    - `value` string, required — Configuration parameter value.
    - `valueKey` string, nullable, required — Value key information.
  - `isdelivered` boolean, required — Indicates whether the provider is published and available for use.
  - `isConfigured` boolean, required — Indicates whether the provider is configured.

## Changes

- **2024-06-10** `aca4931fa22b` — 2 info
  - the endpoint scheme security `VtexIdclientAutCookie` was added to the API
  - the endpoint scheme security `appKey AND appToken` was added to the API
- **2024-02-06** `f2ac9712d7ce` — 1 info
  - request body became optional

[Change history](https://skmtc.dev/vtex/apis/payments-gateway-api/changes/api/pvt/affiliations/post.md)

---

[API](https://skmtc.dev/vtex/apis/payments-gateway-api.md) · [All operations](https://skmtc.dev/vtex/apis/payments-gateway-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vtex/payments-gateway-api/revisions/c1c6fd255d0e/schema)
