# Create Sequence Creates a new sequence for the current account. The operation is asynchronous — poll GET /api/v3/sequences/create_status with the returned status_endpoint params to check completion. Endpoint: POST /api/v3/sequences Version: 3.1.0 Security: apiKeyAuth ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Request fields (application/json): - `sequence` (object, required) - `sequence.serie_name` (string, required) Example: "SERIE2026" - `sequence.set_as_default` (boolean) When true (or the string "true"), the new série becomes the account's default série. - `sequence.create_and_registry` (boolean) When true (or the string "true"), the série is also registered with the tax authority (AT) right after it is created. The response is then 202 instead of 201. - `sequence.delete_demo_series` (boolean) When true, the demo série is deleted as part of the operation. Only a real true (or the string "true") opts in; any other value means false. ## Response 201 fields (application/json): - `success` (boolean) Example: true - `status_endpoint` (string) Relative path and query string to poll with GET /api/v3/sequences/create_status. Its account_id is an encrypted account token, not the numeric account id — pass it back unchanged. Example: "/create_status?account_id=7117e09c4cd4ba7b05b2cc10e34d8684&serie_name=SERIE2026&create_and_registry=false&sequence_already_exists=false" ## Response 202 fields (application/json): - `success` (boolean) Example: true - `status_endpoint` (string) Relative path and query string to poll with GET /api/v3/sequences/create_status. Its account_id is an encrypted account token, not the numeric account id — pass it back unchanged. Example: "/create_status?account_id=7117e09c4cd4ba7b05b2cc10e34d8684&serie_name=SERIE2026&create_and_registry=false&sequence_already_exists=false" ## Response 400 fields (application/json): - `errors` (array) Example: [{"message":"Validation failed: Serie has already been taken","code":"serie_already_exists"}] - `errors.message` (string) - `errors.code` (string) Enum: "invalid_serie", "serie_already_exists", "unknown_error", "registration_error" ## Response 401 fields (application/json): - `errors` (array) Example: [{"error":"Authentication Error"}] - `errors.error` (string) ## Response 422 fields (application/json): - `errors` (array) Example: [{"error":"param is missing or the value is empty or invalid: sequence"}] - `errors.error` (string)