Redeem a credit code
Changed onRedeem a credit code for the authenticated organization. The credit is added to the organization prepaid credit and shows in GET /credits/balance under prepaid_credit.
Redeeming requires an organization owner or admin. An API key redeems with the authority of the user who created it, based on that user's current role; a key without that authority gets the same credit_code_invalid refusal as an unknown code.
The Idempotency-Key header is required. Retrying with the same key and code returns the original grant with replayed: true and grants nothing new; the same key with a different code is refused with idempotency_key_reused. Every refusal carries a human-readable error.message that can be shown to the user as is.
Request
- Base URL: https://api.primitive.dev/v1
- URL: https://api.primitive.dev/v1/credits/redeem
- Auth: HTTP bearer
Headers
Required client-supplied key: 1 to 200 printable ASCII characters, without spaces. Use a new key for each code you redeem and reuse it only to retry the same request.
Request body
Response
The code was redeemed, or this request replayed an earlier redemption with the same Idempotency-Key.
Changes
- info
removed the
invalid_signup_codeenum value from the/response property for the response status - info
removed the
invalid_signup_codeenum value from the/response property for the response status - info
removed the
invalid_signup_codeenum value from the/response property for the response status - info
removed the
invalid_signup_codeenum value from the/response property for the response status - info
removed the
invalid_signup_codeenum value from the/response property for the response status - info
removed the
invalid_signup_codeenum value from the/response property for the response status - info
removed the
invalid_signup_codeenum value from the/response property for the response status
- info
- warning
added the new
not_a_repeating_sendenum value to the/response property for the response status - warning
added the new
not_a_repeating_sendenum value to the/response property for the response status - warning
added the new
not_a_repeating_sendenum value to the/response property for the response status - warning
added the new
not_a_repeating_sendenum value to the/response property for the response status - warning
added the new
not_a_repeating_sendenum value to the/response property for the response status - warning
added the new
not_a_repeating_sendenum value to the/response property for the response status - warning
added the new
not_a_repeating_sendenum value to the/response property for the response status - warning
added the new
repeat_idle_requires_internal_recipientenum value to the/response property for the response status - warning
added the new
repeat_idle_requires_internal_recipientenum value to the/response property for the response status - warning
added the new
repeat_idle_requires_internal_recipientenum value to the/response property for the response status - warning
added the new
repeat_idle_requires_internal_recipientenum value to the/response property for the response status - warning
added the new
repeat_idle_requires_internal_recipientenum value to the/response property for the response status - warning
added the new
repeat_idle_requires_internal_recipientenum value to the/response property for the response status - warning
added the new
repeat_idle_requires_internal_recipientenum value to the/response property for the response status - warning
added the new
repeat_recipient_externalenum value to the/response property for the response status - warning
added the new
repeat_recipient_externalenum value to the/response property for the response status - warning
added the new
repeat_recipient_externalenum value to the/response property for the response status - warning
added the new
repeat_recipient_externalenum value to the/response property for the response status - warning
added the new
repeat_recipient_externalenum value to the/response property for the response status - warning
added the new
repeat_recipient_externalenum value to the/response property for the response status - warning
added the new
repeat_recipient_externalenum value to the/response property for the response status - warning
added the new
repeat_stop_not_allowedenum value to the/response property for the response status - warning
added the new
repeat_stop_not_allowedenum value to the/response property for the response status - warning
added the new
repeat_stop_not_allowedenum value to the/response property for the response status - warning
added the new
repeat_stop_not_allowedenum value to the/response property for the response status - warning
added the new
repeat_stop_not_allowedenum value to the/response property for the response status - warning
added the new
repeat_stop_not_allowedenum value to the/response property for the response status - warning
added the new
repeat_stop_not_allowedenum value to the/response property for the response status - warning
added the new
repeat_unsupportedenum value to the/response property for the response status - warning
added the new
repeat_unsupportedenum value to the/response property for the response status - warning
added the new
repeat_unsupportedenum value to the/response property for the response status - warning
added the new
repeat_unsupportedenum value to the/response property for the response status - warning
added the new
repeat_unsupportedenum value to the/response property for the response status - warning
added the new
repeat_unsupportedenum value to the/response property for the response status - warning
added the new
repeat_unsupportedenum value to the/response property for the response status
- warning