When a promotion expires, the promotion codes attached to that promotion will automatically become invalid, though they are not deleted. Should you re-enable the expired promotion, the promotion codes attached to that promotion will be completely deleted.
promotion_codes
{"data": {"type": "promotion","id": "7005b249-300b-4cf6-964e-e663278af218","name": "Promo #1","description": "Initial Promotion","enabled": true,"promotion_type": "fixed_discount","schema": {"currencies": [{"currency": "USD","amount": 900},{"currency": "GBP","amount": 1100}]},"start": "2017-11-13T00:00:00Z","end": "2019-11-13T00:00:00Z","created_at": "2018-05-10T15:25:21.164Z","updated_at": "2018-05-10T15:26:18.203Z"}}
curl -X POST https://api.moltin.com/v2/promotions/:id/codes \-H "Authorization: Bearer XXXX" \-H "Content-Type: application/json" \-d $'{"data":{"type":"promotion_codes","codes": [{"code":"ZXY_CBA"},{"code":"ABC_XYZ"}]}}'