Journey Docs
Partner API ExplorerCode Pools

Add codes to a pool

Required scopeoffers:codes:write
POST
/v1/partner/code-pools/{poolRef}/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.

Authorization

headerAuthorizationBearer <token>

WorkOS access token (JWT) for a user who is a member of the partner organization. The organization the request is scoped to is taken from the token, not from a header or query parameter.

Only a JWT is accepted in this header. A Journey jny_ API key sent as a bearer token is rejected with 401 Invalid or expired token; send it in X-API-Key instead.

WorkOS organization API keys are not accepted yet.

Path Parameters

poolRef*string

Pool reference — the offer id backing the pool. Must match ^[A-Za-z0-9_-]{1,100}$.

Match^[A-Za-z0-9_-]{1,100}$

Request Body

application/json
  1. body
codes*array<>
Items1 <= items <= 10000
expiresAt?string

Optional ISO-8601 timestamp (with timezone); if set, every uploaded code expires then.

Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$

Response Body

Counts of inserted and duplicate codes.

curl -X POST 'https://api-prd.cf.journey.com/v1/partner/code-pools/string/codes' \  -H 'Content-Type: application/json' \  -d '{  "codes": [    "string"  ]}'
Empty