# Add codes to a pool

> Source: /api-reference/partner/explorer/code-pools/add-codes
> Seeds single-use codes into the pool. Codes already present are reported as duplicates rather than failing the request, so a retry of a partially applied batch is safe.
> Full spec: https://docs.journey.com/openapi/partner.v1.json

## `POST /v1/partner/code-pools/{poolRef}/codes`

```json
{
  "description": "Seeds single-use codes into the pool. Codes already present are reported as duplicates rather than failing the request, so a retry of a partially applied batch is safe.",
  "operationId": "codePoolsPartner_addCodes",
  "parameters": [
    {
      "description": "Pool reference — the offer id backing the pool. Must match `^[A-Za-z0-9_-]{1,100}$`.",
      "in": "path",
      "name": "poolRef",
      "required": true,
      "schema": {
        "pattern": "^[A-Za-z0-9_-]{1,100}$",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AddPoolCodesRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "description": "Counts of inserted and duplicate codes."
    },
    "400": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerErrorResponse"
          }
        }
      },
      "description": "Request validation failed. `errors` lists the offending fields."
    },
    "401": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerErrorResponse"
          }
        }
      },
      "description": "No usable credential. Send `Authorization: Bearer <jwt>` or `X-API-Key: jny_...`."
    },
    "403": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerErrorResponse"
          }
        }
      },
      "description": "The credential authenticated but lacks the scopes in `x-required-scopes`, or the resource belongs to another organization."
    },
    "404": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerErrorResponse"
          }
        }
      },
      "description": "No such resource, or it is outside the organization the credential resolves to."
    }
  },
  "security": [
    {
      "partnerBearer": []
    },
    {
      "partnerApiKey": []
    }
  ],
  "summary": "Add codes to a pool",
  "tags": [
    "partner/code-pools"
  ],
  "x-required-scopes": [
    [
      "offers:codes:write"
    ]
  ]
}
```