Create a sign-up code
POST
/console/signup-codes
const url = 'https://example.com/console/signup-codes';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"code":"example","maxUses":1,"expiresAt":"2026-04-15T12:00:00Z","note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/console/signup-codes \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "code": "example", "maxUses": 1, "expiresAt": "2026-04-15T12:00:00Z", "note": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
string
maxUses
integer
expiresAt
string | null format: date-time
note
string | null
Responses
Section titled “Responses”Created
Media typeapplication/json
object
code
required
string
note
required
string | null
maxUses
required
integer
usedCount
required
integer
expiresAt
required
string | null format: date-time
createdAt
required
string format: date-time
Examplegenerated
{ "code": "example", "note": "example", "maxUses": 1, "usedCount": 1, "expiresAt": "2026-04-15T12:00:00Z", "createdAt": "2026-04-15T12:00:00Z"}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not Bottle staff, no two-step sign-in, or a console role too low for this
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}A code with that name exists
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}